FACT++  1.0
int find_release_request ( int  conn_id,
int  service_id 
)

Definition at line 2609 of file dis.c.

References req_ent::delay_delete, dll_get_next(), find_client(), reqp_ent::prev, release_request(), reqp_ent::reqp, req_ent::service_id, and req_ent::to_delete.

Referenced by dis_insert_request().

2610 {
2611  register REQUEST_PTR *reqpp, *auxp;
2612  register CLIENT *clip;
2613  register REQUEST *reqp;
2614  int release_request();
2615 
2616  DISABLE_AST
2617  clip = find_client(conn_id);
2618  if(clip)
2619  {
2620  reqpp = clip->requestp_head;
2621  while( (reqpp = (REQUEST_PTR *) dll_get_next((DLL *)clip->requestp_head,
2622  (DLL *) reqpp)) )
2623  {
2624  reqp = (REQUEST *) reqpp->reqp;
2625  if(reqp->service_id == service_id)
2626  {
2627  if(reqp->delay_delete)
2628  {
2629  reqp->to_delete += 0x2;
2630  }
2631  else
2632  {
2633  auxp = reqpp->prev;
2634  release_request(reqp, reqpp, 0);
2635  reqpp = auxp;
2636  }
2637  }
2638  }
2639 /* The client should close the connection (there may be commands)
2640  if( dll_empty((DLL *)clip->requestp_head) )
2641  {
2642  release_conn( conn_id, 0, 0 );
2643  }
2644 */
2645  }
2646  ENABLE_AST
2647  return(1);
2648 }
unsigned service_id
Definition: db_dim_client.c:22
int to_delete
Definition: dis.c:64
int service_id
Definition: dis.c:56
Definition: dis.c:98
CLIENT * find_client(int conn_id)
Definition: dis.c:2455
Definition: dim.h:530
int release_request(REQUEST *reqp, REQUEST_PTR *reqpp, int remove)
Definition: dis.c:2650
int delay_delete
Definition: dis.c:63
DLL * dll_get_next(DLL *head, DLL *item)
Definition: dll.c:66
Definition: dis.c:92
REQUEST * reqp
Definition: dis.c:95
struct reqp_ent * prev
Definition: dis.c:94
Definition: dis.c:52

+ Here is the call graph for this function:

+ Here is the caller graph for this function: