FACT++  1.0
static void add_exit_handler_item ( int  conn_id,
int  tag 
)
static

Definition at line 3043 of file dis.c.

References exit_ent::conn_id, exit_ent::exit_id, Memory::malloc(), Net_conns, exit_ent::node, NET_CONNECTION::node, sll_init(), sll_insert_queue(), sll_search(), exit_ent::task, and NET_CONNECTION::task.

Referenced by add_exit_handler(), and dis_set_client_exit_handler().

3044 {
3045  EXIT_H *newp;
3046 
3047  DISABLE_AST
3048  if(!Exit_h_head)
3049  {
3050  Exit_h_head = (EXIT_H *)malloc(sizeof(EXIT_H));
3051  sll_init( (SLL *) Exit_h_head );
3052  }
3053  if( (newp = (EXIT_H *)sll_search((SLL *) Exit_h_head,
3054  (char *)&conn_id, 4)) )
3055  {
3056  newp->conn_id = conn_id;
3057  newp->exit_id = tag;
3058  strcpy(newp->node, Net_conns[conn_id].node);
3059  strcpy(newp->task, Net_conns[conn_id].task);
3060  }
3061  else
3062  {
3063  newp = (EXIT_H *)malloc(sizeof(EXIT_H));
3064  newp->conn_id = conn_id;
3065  newp->exit_id = tag;
3066  strcpy(newp->node, Net_conns[conn_id].node);
3067  strcpy(newp->task, Net_conns[conn_id].task);
3068  sll_insert_queue( (SLL *) Exit_h_head, (SLL *) newp );
3069  }
3070  ENABLE_AST
3071 }
static EXIT_H * Exit_h_head
Definition: dis.c:139
char task[MAX_TASK_NAME]
Definition: dim.h:408
DllExp DIM_NOSHARE NET_CONNECTION * Net_conns
Definition: conn_handler.c:32
void * malloc()
Definition: EventBuilder.cc:99
char node[MAX_NODE_NAME]
Definition: dim.h:407
Definition: dim.h:536
void sll_init(SLL *head)
Definition: sll.c:14
int sll_insert_queue(SLL *head, SLL *item)
Definition: sll.c:20
char node[MAX_NODE_NAME]
Definition: dis.c:135
char task[MAX_TASK_NAME]
Definition: dis.c:136
int exit_id
Definition: dis.c:134
Definition: dis.c:131
int conn_id
Definition: dis.c:133
SLL * sll_search(SLL *head, char *data, int size)
Definition: sll.c:35

+ Here is the call graph for this function:

+ Here is the caller graph for this function: