xdasd_trigger.c File Reference

OpenXDAS trigger script processing engine. More...

#include "xdasd_trigger.h"
#include "xdasd_exec.h"
#include "xdasd_parse.h"
#include "xdasd_mqueue.h"
#include "xdasd_list.h"
#include "xdasd_log.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

static int tr_put (void *msg)
 A MsgQueue 'put' routine for trigger script processing.
static void * tr_get (void)
 A MsgQueue 'get' routine for trigger script processing.
static void tr_process (void *msg)
 A MsgQueue 'process' routine for trigger script processing.
int xdasd_trigger_append (Parsed *parsed)
 Execute a shell script with variable expansion on a background thread.
int xdasd_trigger_init (void)
 Initialize the trigger script execution subsystem.
void xdasd_trigger_exit (void)
 Cleanup the trigger script execution subsystem.

Variables

static XDList s_list_trigger
static MsgQueue s_mq_trigger


Detailed Description

OpenXDAS trigger script processing engine.

Author:
John Calcote (jcalcote@novell.com)
Attention:
Please submit patches to http://openxdas.sourceforge.net

Definition in file xdasd_trigger.c.


Function Documentation

static void* tr_get ( void   )  [static]

A MsgQueue 'get' routine for trigger script processing.

Returns:
A typeless alias for the retrieved parsed message, or NULL (0) if there is nothing in the queue to be retrieved.

For internal use only.

Definition at line 95 of file xdasd_trigger.c.

References XDList_tag::count, XDList_tag::tail, and xdasd_list_unlink().

Referenced by xdasd_trigger_init().

static void tr_process ( void *  msg  )  [static]

A MsgQueue 'process' routine for trigger script processing.

Parameters:
[in] msg - A typeless alias for the parsed message to be processed.

For internal use only.

Definition at line 108 of file xdasd_trigger.c.

References trigger_tag::elem, XDList_tag::head, parsed_tag::msg, XDLItem_tag::next, parsed_tag::parsed, trigger_tag::script, t, parsed_tag::triggers, xdasd_exec(), xdasd_log(), and xdasd_parse_free().

Referenced by xdasd_trigger_init().

static int tr_put ( void *  msg  )  [static]

A MsgQueue 'put' routine for trigger script processing.

Parameters:
[in] msg - A typeless alias for the message to be added to the queue.
Returns:
Zero on success, or a non-zero error code on allocation failure.

For internal use only.

Definition at line 62 of file xdasd_trigger.c.

References parsed_tag::elem, malloc, parsed_tag::msg, parsed_tag::parsed, parsed_tag::structsz, parsed_tag::triggers, XDAS_FIELD_COUNT, and xdasd_list_link_tail().

Referenced by xdasd_trigger_init().


Variable Documentation

The trigger message queue.

Definition at line 51 of file xdasd_trigger.c.

The trigger queue manager.

Definition at line 52 of file xdasd_trigger.c.

Referenced by xdasd_trigger_append(), xdasd_trigger_exit(), and xdasd_trigger_init().


Generated on Thu Aug 20 22:33:07 2009 for OpenXDAS by  doxygen 1.5.6