FACT++  1.0
void modify_service ( DIC_SERVICE servp,
int  timeout,
int *  address,
int  size,
void(*)()  routine,
dim_long  tag,
int *  fill_addr,
int  fill_size,
int  stamped 
)

Definition at line 884 of file dic.c.

References dic_serv::curr_timeout, Dic_timer_q, dtq_add_entry(), dtq_rem_entry(), dic_serv::fill_address, dic_serv::fill_size, Memory::free(), Memory::malloc(), dic_serv::serv_address, dic_serv::serv_id, dic_serv::serv_size, size, dic_serv::stamped, dic_serv::tag, dic_serv::timeout, dic_serv::timer_ent, and dic_serv::user_routine.

Referenced by request_service().

886 {
887  int *fillp;
888 
889  if( servp->timer_ent )
890  {
892  servp->timer_ent = 0;
893  }
894  servp->timeout = timeout;
895  servp->serv_address = address;
896  servp->serv_size = size;
897  servp->user_routine = routine;
898  servp->tag = tag;
899  if(servp->fill_size > 0)
900  free( servp->fill_address );
901  fillp = fill_addr;
902  if(fill_size > 0)
903  {
904  fillp = (int *)malloc((size_t)fill_size);
905  memcpy( (char *) fillp, (char *) fill_addr, (size_t)fill_size );
906  }
907  servp->fill_address = fillp;
908  servp->fill_size = fill_size;
909  servp->stamped = stamped;
910  if(timeout)
911  {
912  servp->curr_timeout = timeout;
914  servp->curr_timeout,
915  service_tmout, servp->serv_id );
916  }
917  else
918  servp->timer_ent = NULL;
919 }
int * fill_address
Definition: dim.h:470
int stamped
Definition: dim.h:478
void * malloc()
Definition: EventBuilder.cc:99
void(* user_routine)()
Definition: dim.h:472
dim_long tag
Definition: dim.h:473
int * serv_address
Definition: dim.h:468
int dtq_rem_entry(int queue_id, TIMR_ENT *entry)
Definition: dtq.c:503
int serv_id
Definition: dim.h:461
int size
Definition: db_dim_server.c:17
void free(void *mem)
TIMR_ENT * dtq_add_entry(int queue_id, int time, void(*user_routine)(), dim_long tag)
Definition: dtq.c:399
int curr_timeout
Definition: dim.h:467
TIMR_ENT * timer_ent
Definition: dim.h:474
void service_tmout(int serv_id)
Definition: dic.c:518
int timeout
Definition: dim.h:466
int fill_size
Definition: dim.h:471
int serv_size
Definition: dim.h:469
static int Dic_timer_q
Definition: dic.c:45

+ Here is the call graph for this function:

+ Here is the caller graph for this function: