FACT++  1.0
static void rpcin_routine ( void *  tagp,
void *  buf,
int *  size 
)
static

Definition at line 181 of file discpp.cxx.

References dis_get_conn_id(), dis_get_timeout(), dis_selective_update_service, ids, DimCore::inCallback, DimRpc::itsDataIn, DimRpc::itsIdOut, DimRpc::itsKilled, DimRpc::itsSizeIn, DimRpc::itsTimeout, DimRpc::rpcHandler(), size, t, and time.

Referenced by DimRpc::declareIt().

182 {
183  time_t tt1 = 0, tt2 = 0;
184 
185 // int *tag = (int *)tagp;
186 // int id = *tag;
187  DimRpc *t;
188  int tout, clientId, ids[2];
189 // long tid;
190 
191 // t = (DimRpc *)id_get_ptr(id, SRC_DIS);
192  t = *(DimRpc **)tagp;
193  t->itsDataIn = buf;
194  t->itsSizeIn = *size;
195  clientId = dis_get_conn_id();
196  tout = dis_get_timeout(t->itsIdOut, clientId);
197  t->itsTimeout = tout;
198 // tid = 0;
199  if(tout > 0)
200  {
201  tt1 = time((time_t *)0);
202  t->itsKilled = 0;
203 // dtq_start_timer(t->itsTimeout,(void(*)(void *))timeout_rout,(void *)t);
204 // tid = dim_start_thread((void(*)(void *))timeout_rout,(void *)t);
205  }
207  t->rpcHandler();
209  t->itsDataIn = 0;
210  t->itsSizeIn = 0;
211  if(tout > 0)
212  {
213  tt2 = time((time_t *)0);
214  if((tt2 - tt1) > tout)
215  t->itsKilled = 1;
216  }
217  if(!t->itsKilled)
218  {
219 // if(tid)
220 // {
221 // dtq_stop_timer((void *)t);
222 // dim_stop_thread(tid);
223 // }
224  ids[0] = clientId;
225  ids[1] = 0;
227  }
228 }
Definition: dis.hxx:301
#define dis_selective_update_service
Definition: dis.h:24
int ids[10]
int itsSizeIn
Definition: dis.hxx:316
int itsTimeout
Definition: dis.hxx:354
int dis_get_conn_id()
Definition: dis.c:2795
int itsIdOut
Definition: dis.hxx:342
static int inCallback
Definition: dim.hxx:11
Warning because the service this data corrsponds to might have been last updated longer ago than Local time
Definition: smartfact.txt:92
int size
Definition: db_dim_server.c:17
virtual void rpcHandler()=0
int dis_get_timeout(unsigned service_id, int client_id)
Definition: dis.c:1901
TT t
Definition: test_client.c:26
void * itsDataIn
Definition: dis.hxx:315
int itsKilled
Definition: dis.hxx:353

+ Here is the call graph for this function:

+ Here is the caller graph for this function: