FACT++  1.0
CLIENT* create_client ( int  conn_id,
SERVICE servp,
int *  new_client 
)

Definition at line 2434 of file dis.c.

References cli_ent::conn_id, dll_init(), dll_insert_queue(), serv::dnsp, cli_ent::dnsp, find_client(), Memory::malloc(), and cli_ent::requestp_head.

Referenced by dis_insert_request().

2435 {
2436  CLIENT *clip;
2437 
2438  *new_client = 0;
2439  if(!(clip = find_client(conn_id)))
2440  {
2441  /*
2442  dna_set_test_write(conn_id, 15);
2443  */
2444  clip = (CLIENT *)malloc(sizeof(CLIENT));
2445  clip->conn_id = conn_id;
2446  clip->dnsp = servp->dnsp;
2447  clip->requestp_head = (REQUEST_PTR *)malloc(sizeof(REQUEST_PTR));
2448  dll_init( (DLL *) clip->requestp_head );
2449  dll_insert_queue( (DLL *) Client_head, (DLL *) clip );
2450  *new_client = 1;
2451  }
2452  return clip;
2453 }
DIS_DNS_CONN * dnsp
Definition: dis.c:87
void dll_insert_queue(DLL *head, DLL *item)
Definition: dll.c:23
Definition: dis.c:98
void * malloc()
Definition: EventBuilder.cc:99
void dll_init(DLL *head)
Definition: dll.c:14
CLIENT * find_client(int conn_id)
Definition: dis.c:2455
static CLIENT * Client_head
Definition: dis.c:106
Definition: dim.h:530
int conn_id
Definition: dis.c:101
DIS_DNS_CONN * dnsp
Definition: dis.c:103
REQUEST_PTR * requestp_head
Definition: dis.c:102
Definition: dis.c:92

+ Here is the call graph for this function:

+ Here is the caller graph for this function: