version 1.7, 2012/03/15 01:55:33
|
version 1.7.2.2, 2012/03/28 13:37:13
|
Line 114 execCall(sched_task_t *task)
|
Line 114 execCall(sched_task_t *task)
|
ioTRACE(RPC_TRACE_LEVEL); |
ioTRACE(RPC_TRACE_LEVEL); |
|
|
/* Go decapsulate variables ... */ |
/* Go decapsulate variables ... */ |
if (!(rpc->call_req.flags & RPC_NOREPLY) && argc) { | if (argc) { |
arr = io_buffer2vars(buf + sizeof(struct tagRPCCall), |
arr = io_buffer2vars(buf + sizeof(struct tagRPCCall), |
TASK_DATLEN(task) - sizeof(struct tagRPCCall), argc, 1); |
TASK_DATLEN(task) - sizeof(struct tagRPCCall), argc, 1); |
if (!arr) { |
if (!arr) { |
Line 135 execCall(sched_task_t *task)
|
Line 135 execCall(sched_task_t *task)
|
ioDEBUG(RPC_DEBUG_LEVEL, "RPC function %s from module %s", |
ioDEBUG(RPC_DEBUG_LEVEL, "RPC function %s from module %s", |
AIT_GET_STR(&f->func_name), AIT_GET_LIKE(&f->func_file, char*)); |
AIT_GET_STR(&f->func_name), AIT_GET_LIKE(&f->func_file, char*)); |
|
|
|
/* if client doesn't want reply */ |
|
argc = rpc->call_req.flags & RPC_NOREPLY; |
rpc->call_rep.ret = RPC_ERROR(rpc_srv_execCall(f, rpc, arr)); |
rpc->call_rep.ret = RPC_ERROR(rpc_srv_execCall(f, rpc, arr)); |
if (rpc->call_rep.ret == htonl(-1)) { |
if (rpc->call_rep.ret == htonl(-1)) { |
rpc->call_rep.eno = RPC_ERROR(errno); |
rpc->call_rep.eno = RPC_ERROR(errno); |
rpc->call_argc ^= rpc->call_argc; |
rpc->call_argc ^= rpc->call_argc; |
} else { |
} else { |
rpc->call_rep.eno ^= rpc->call_rep.eno; |
rpc->call_rep.eno ^= rpc->call_rep.eno; |
rpc->call_argc = htons(rpc_srv_getVars(f, NULL)); | if (argc) { |
| /* without reply */ |
| io_clrVars(f->func_vars); |
| rpc->call_argc ^= rpc->call_argc; |
| } else |
| rpc->call_argc = htons(rpc_srv_getVars(f, NULL)); |
} |
} |
} |
} |
|
|
Line 312 rxBLOB(sched_task_t *task)
|
Line 319 rxBLOB(sched_task_t *task)
|
ioTRACE(RPC_TRACE_LEVEL); |
ioTRACE(RPC_TRACE_LEVEL); |
|
|
/* check for disable service at this moment? */ |
/* check for disable service at this moment? */ |
if (s->srv_blob.state == disable) { | if (!s || s->srv_blob.state == disable) { |
usleep(100000); |
usleep(100000); |
#ifdef HAVE_PTHREAD_YIELD |
#ifdef HAVE_PTHREAD_YIELD |
pthread_yield(); |
pthread_yield(); |
Line 586 rpc_srv_endBLOBServer(rpc_srv_t * __restrict srv)
|
Line 593 rpc_srv_endBLOBServer(rpc_srv_t * __restrict srv)
|
|
|
ioTRACE(RPC_TRACE_LEVEL); |
ioTRACE(RPC_TRACE_LEVEL); |
|
|
if (!srv) { | if (!srv || srv->srv_blob.state == disable) |
rpc_SetErr(EINVAL, "Can`t destroy server because parameter is null!"); | |
return; |
return; |
} else | else |
srv->srv_blob.state = kill; |
srv->srv_blob.state = kill; |
|
|
rpc_srv_unregisterCall(srv, NULL, CALL_BLOBSHUTDOWN); |
rpc_srv_unregisterCall(srv, NULL, CALL_BLOBSHUTDOWN); |
Line 621 rpc_srv_endBLOBServer(rpc_srv_t * __restrict srv)
|
Line 627 rpc_srv_endBLOBServer(rpc_srv_t * __restrict srv)
|
|
|
while (pthread_mutex_trylock(&srv->srv_blob.mtx) == EBUSY); |
while (pthread_mutex_trylock(&srv->srv_blob.mtx) == EBUSY); |
pthread_mutex_destroy(&srv->srv_blob.mtx); |
pthread_mutex_destroy(&srv->srv_blob.mtx); |
|
|
|
/* at final, save disable BLOB service state */ |
|
srv->srv_blob.state = disable; |
} |
} |
|
|
/* |
/* |
Line 838 rpc_srv_initServer(u_int regProgID, u_int regProcID, i
|
Line 847 rpc_srv_initServer(u_int regProgID, u_int regProcID, i
|
rpc_srv_registerCall(srv, NULL, CALL_SRVCLIENTS, 1); |
rpc_srv_registerCall(srv, NULL, CALL_SRVCLIENTS, 1); |
rpc_srv_registerCall(srv, NULL, CALL_SRVSESSIONS, 4); |
rpc_srv_registerCall(srv, NULL, CALL_SRVSESSIONS, 4); |
rpc_srv_registerCall(srv, NULL, CALL_SRVCALLS, 1); |
rpc_srv_registerCall(srv, NULL, CALL_SRVCALLS, 1); |
|
|
return srv; |
return srv; |
} |
} |
|
|