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

Definition at line 2302 of file dis_old.c.

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

Referenced by dis_insert_request().

2303 {
2304  register REQUEST_PTR *reqpp, *auxp;
2305  register CLIENT *clip;
2306  register REQUEST *reqp;
2307  int release_request();
2308 
2309  DISABLE_AST
2310  clip = find_client(conn_id);
2311  if(clip)
2312  {
2313  reqpp = clip->requestp_head;
2314  while( (reqpp = (REQUEST_PTR *) dll_get_next((DLL *)clip->requestp_head,
2315  (DLL *) reqpp)) )
2316  {
2317  reqp = (REQUEST *) reqpp->reqp;
2318  if(reqp->service_id == service_id)
2319  {
2320  if(reqp->delay_delete)
2321  {
2322  reqp->to_delete += 0x2;
2323  }
2324  else
2325  {
2326  auxp = reqpp->prev;
2327  release_request(reqp, reqpp, 0);
2328  reqpp = auxp;
2329  }
2330  }
2331  }
2332  if( dll_empty((DLL *)clip->requestp_head) )
2333  {
2334  release_conn( conn_id, 0, 0 );
2335  }
2336  }
2337  ENABLE_AST
2338  return(1);
2339 }
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
int release_request(REQUEST *reqp, REQUEST_PTR *reqpp, int remove)
Definition: dis_old.c:2341
Definition: dim.h:530
CLIENT * find_client(int conn_id)
Definition: dis_old.c:2148
int dll_empty(DLL *head)
Definition: dll.c:88
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
static int release_conn(int conn_id, int print_flg, int dns_flag)
Definition: dis_old.c:2374
Definition: dis.c:52

+ Here is the call graph for this function:

+ Here is the caller graph for this function: