FACT++  1.0
void remove_service ( int  req_id)

Definition at line 1398 of file dis_old.c.

References req_ent::conn_id, DIS_HEADER, dna_write(), id_get_ptr(), Memory::malloc(), release_conn(), service_id, req_ent::service_id, DIS_PACKET::service_id, req_ent::service_ptr, DIS_PACKET::size, and SRC_DIS.

Referenced by dis_remove_service().

1399 {
1400  register REQUEST *reqp;
1401  register SERVICE *servp;
1402  static DIS_PACKET *dis_packet;
1403  static int packet_size = 0;
1404  int service_id;
1405 
1406  reqp = (REQUEST *)id_get_ptr(req_id, SRC_DIS);
1407  servp = reqp->service_ptr;
1408  if( !packet_size ) {
1409  dis_packet = (DIS_PACKET *)malloc(DIS_HEADER);
1410  packet_size = DIS_HEADER;
1411  }
1412  service_id = (reqp->service_id | 0x80000000);
1413  dis_packet->service_id = htovl(service_id);
1414  dis_packet->size = htovl(DIS_HEADER);
1415  if( !dna_write(reqp->conn_id, dis_packet, DIS_HEADER) )
1416  {
1417  release_conn(reqp->conn_id, 0, 0);
1418  }
1419 }
int dna_write(int conn_id, void *buffer, int size)
Definition: dna.c:455
unsigned service_id
Definition: db_dim_client.c:22
void * id_get_ptr(int id, SRC_TYPES type)
Definition: conn_handler.c:184
int service_id
Definition: dis.c:56
void * malloc()
Definition: EventBuilder.cc:99
Definition: dis.c:69
int size
Definition: dim.h:244
int service_id
Definition: dim.h:245
struct serv * service_ptr
Definition: dis.c:59
static int release_conn(int conn_id, int print_flg, int dns_flag)
Definition: dis_old.c:2374
#define DIS_HEADER
Definition: dim.h:249
int conn_id
Definition: dis.c:55
Definition: dis.c:52

+ Here is the call graph for this function:

+ Here is the caller graph for this function: