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

Definition at line 2650 of file dis.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().

2651 {
2652  int conn_id;
2653  CLIENT *clip;
2654 
2655  DISABLE_AST
2656  conn_id = reqp->conn_id;
2657  if(reqpp)
2658  dll_remove((DLL *)reqpp);
2659  dll_remove((DLL *)reqp);
2660  if(reqp->timr_ent)
2662  id_free(reqp->req_id, SRC_DIS);
2663  free(reqp);
2664  if(reqpp)
2665  free(reqpp);
2666 /* Would do it too early, the client will disconnect anyway
2667 */
2668  if((remove) && (Serving == 0))
2669  {
2670  clip = find_client(conn_id);
2671  if(clip)
2672  {
2673  if( dll_empty((DLL *)clip->requestp_head) )
2674  {
2675  release_conn( conn_id, 0, 0);
2676  }
2677  }
2678  }
2679 
2680  ENABLE_AST
2681  return(1);
2682 }
Definition: dis.c:98
static int release_conn(int conn_id, int print_flg, int dns_flag)
Definition: dis.c:2684
CLIENT * find_client(int conn_id)
Definition: dis.c:2455
TIMR_ENT * timr_ent
Definition: dis.c:65
void dll_remove(DLL *item)
Definition: dll.c:100
Definition: dim.h:530
static int Dis_timer_q
Definition: dis.c:143
int dtq_rem_entry(int queue_id, TIMR_ENT *entry)
Definition: dtq.c:503
REQUEST_PTR * requestp_head
Definition: dis.c:102
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)
int req_id
Definition: dis.c:57
static int Serving
Definition: dis.c:124
int conn_id
Definition: dis.c:55

+ Here is the call graph for this function:

+ Here is the caller graph for this function: