FACT++  1.0
int release_request ( REQUEST reqp,
REQUEST_PTR reqpp,
int  remove 
)

Definition at line 2341 of file dis_old.c.

References req_ent::conn_id, Dis_timer_q, dll_empty(), dll_remove(), dtq_rem_entry(), find_client(), Memory::free(), id_free(), release_conn(), req_ent::req_id, cli_ent::requestp_head, Serving, SRC_DIS, and req_ent::timr_ent.

Referenced by dis_remove_service(), do_update_service(), find_release_request(), and release_all_requests().

2342 {
2343  int conn_id;
2344  CLIENT *clip;
2345 
2346  DISABLE_AST
2347  conn_id = reqp->conn_id;
2348  if(reqpp)
2349  dll_remove((DLL *)reqpp);
2350  dll_remove((DLL *)reqp);
2351  if(reqp->timr_ent)
2353  id_free(reqp->req_id, SRC_DIS);
2354  free(reqp);
2355  free(reqpp);
2356 /* Would do it too early, the client will disconnect anyway
2357 */
2358  if((remove) && (!Serving))
2359  {
2360  clip = find_client(conn_id);
2361  if(clip)
2362  {
2363  if( dll_empty((DLL *)clip->requestp_head) )
2364  {
2365  release_conn( conn_id, 0, 0);
2366  }
2367  }
2368  }
2369 
2370  ENABLE_AST
2371  return(1);
2372 }
static int Dis_timer_q
Definition: dis_old.c:141
Definition: dis.c:98
TIMR_ENT * timr_ent
Definition: dis.c:65
void dll_remove(DLL *item)
Definition: dll.c:100
Definition: dim.h:530
int dtq_rem_entry(int queue_id, TIMR_ENT *entry)
Definition: dtq.c:503
REQUEST_PTR * requestp_head
Definition: dis.c:102
CLIENT * find_client(int conn_id)
Definition: dis_old.c:2148
int dll_empty(DLL *head)
Definition: dll.c:88
void id_free(int id, SRC_TYPES type)
Definition: conn_handler.c:206
void free(void *mem)
static int Serving
Definition: dis_old.c:124
int req_id
Definition: dis.c:57
static int release_conn(int conn_id, int print_flg, int dns_flag)
Definition: dis_old.c:2374
int conn_id
Definition: dis.c:55

+ Here is the call graph for this function:

+ Here is the caller graph for this function: