FACT++  1.0
void dis_set_client_exit_handler ( int  conn_id,
int  tag 
)

Definition at line 2749 of file dis_old.c.

References exit_ent::conn_id, exit_ent::exit_id, Memory::malloc(), sll_init(), sll_insert_queue(), sll_remove(), and sll_search().

Referenced by dis_hash_print().

2750 {
2751  EXIT_H *newp;
2752 
2753  DISABLE_AST
2754  if(tag)
2755  {
2756  if(!Exit_h_head)
2757  {
2758  Exit_h_head = (EXIT_H *)malloc(sizeof(EXIT_H));
2759  sll_init( (SLL *) Exit_h_head );
2760  }
2761  if( (newp = (EXIT_H *)sll_search((SLL *) Exit_h_head,
2762  (char *)&conn_id, 4)) )
2763  {
2764  newp->conn_id = conn_id;
2765  newp->exit_id = tag;
2766  }
2767  else
2768  {
2769  newp = (EXIT_H *)malloc(sizeof(EXIT_H));
2770  newp->conn_id = conn_id;
2771  newp->exit_id = tag;
2772  sll_insert_queue( (SLL *) Exit_h_head, (SLL *) newp );
2773  }
2774  }
2775  else
2776  {
2777  if(!Exit_h_head)
2778  {
2779  ENABLE_AST
2780  return;
2781  }
2782  if( (newp = (EXIT_H *)sll_search((SLL *) Exit_h_head,
2783  (char *)&conn_id, 4)) )
2784  {
2785  sll_remove( (SLL *) Exit_h_head, (SLL *) newp );
2786  }
2787  }
2788  ENABLE_AST
2789 }
void * malloc()
Definition: EventBuilder.cc:99
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
int sll_remove(SLL *head, SLL *item)
Definition: sll.c:74
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
static EXIT_H * Exit_h_head
Definition: dis_old.c:137

+ Here is the call graph for this function:

+ Here is the caller graph for this function: