FACT++  1.0
static int release_conn ( int  conn_id,
int  print_flg,
int  dns_flag 
)
static

Definition at line 2684 of file dis.c.

References check_delay_delete(), Client_exit_user_routine, Curr_conn_id, dim_print_date_time(), dna_get_node_task(), do_exit_handler(), recv_dns_dis_rout(), release_all_requests(), and STA_DISC.

Referenced by dis_insert_request(), dis_report_service(), dis_send_service(), do_dis_stop_serving_dns(), do_update_service(), execute_service(), register_services(), release_request(), remove_service(), send_dns_update_packet(), and unregister_service().

2685 {
2686  static int releasing = 0;
2687  CLIENT *clip;
2688  int do_exit_handler();
2689 
2690  DISABLE_AST
2691  if(print_flg){}
2692  if(dns_flag)
2693  {
2694  recv_dns_dis_rout( conn_id, 0, 0, STA_DISC );
2695  ENABLE_AST
2696  return(0);
2697  }
2698 #ifdef VMS
2699  if(print_flg)
2700  {
2702  dna_get_node_task(conn_id, node, task);
2703  printf(" Couldn't write to client %s@%s, releasing connection %d\n",
2704  task, node, conn_id);
2705  fflush(stdout);
2706  }
2707 #endif
2708  clip = check_delay_delete(conn_id);
2709  if(clip != (CLIENT *)-1)
2710  {
2711  if( Client_exit_user_routine != 0 )
2712  {
2713  releasing++;
2714  Curr_conn_id = conn_id;
2715  do_exit_handler(conn_id);
2716  releasing--;
2717  }
2718  if(!releasing)
2719  {
2720  release_all_requests(conn_id, clip);
2721  }
2722  }
2723  ENABLE_AST
2724  return(1);
2725 }
int do_exit_handler(int conn_id)
Definition: dis.c:3149
Definition: dns.c:26
#define STA_DISC
Definition: dim.h:197
void release_all_requests(int conn_id, CLIENT *clip)
Definition: dis.c:2464
static void(* Client_exit_user_routine)()=0
Definition: dis.c:125
Definition: dis.c:98
CLIENT * check_delay_delete(int conn_id)
Definition: dis.c:2500
int dna_get_node_task(int conn_id, char *node, char *task)
Definition: dna.c:594
static int Curr_conn_id
Definition: dis.c:123
void recv_dns_dis_rout(int conn_id, DNS_DIS_PACKET *packet, int size, int status)
Definition: dis.c:641
void dim_print_date_time()
Definition: utilities.c:134

+ Here is the call graph for this function:

+ Here is the caller graph for this function: