version 1.15, 2013/04/02 15:50:14
|
version 1.16.2.1, 2013/07/15 14:16:52
|
Line 67 static sched_task_func_t cbProto[SOCK_RAW + 1][4] = {
|
Line 67 static sched_task_func_t cbProto[SOCK_RAW + 1][4] = {
|
}; |
}; |
|
|
|
|
inline void | void |
rpc_freeCli(rpc_cli_t * __restrict c) |
rpc_freeCli(rpc_cli_t * __restrict c) |
{ |
{ |
rpc_srv_t *s = c->cli_parent; |
rpc_srv_t *s = c->cli_parent; |
Line 529 end:
|
Line 529 end:
|
|
|
/* ------------------------------------------------------ */ |
/* ------------------------------------------------------ */ |
|
|
inline void | void |
rpc_freeBLOBCli(rpc_cli_t * __restrict c) |
rpc_freeBLOBCli(rpc_cli_t * __restrict c) |
{ |
{ |
rpc_srv_t *s = c->cli_parent; |
rpc_srv_t *s = c->cli_parent; |
Line 559 closeBLOBClient(sched_task_t *task)
|
Line 559 closeBLOBClient(sched_task_t *task)
|
} |
} |
|
|
static void * |
static void * |
|
toutBLOB(sched_task_t *task) |
|
{ |
|
rpc_cli_t *c = TASK_DATA(task); |
|
|
|
rpc_srv_unregisterBLOB((rpc_srv_t*) c->cli_parent, (uint32_t) TASK_ARG(task)); |
|
|
|
return NULL; |
|
} |
|
|
|
static void * |
txBLOB(sched_task_t *task) |
txBLOB(sched_task_t *task) |
{ |
{ |
rpc_cli_t *c = TASK_ARG(task); |
rpc_cli_t *c = TASK_ARG(task); |
Line 583 rxBLOB(sched_task_t *task)
|
Line 593 rxBLOB(sched_task_t *task)
|
rpc_blob_t *b; |
rpc_blob_t *b; |
struct tagBLOBHdr blob; |
struct tagBLOBHdr blob; |
int rlen; |
int rlen; |
|
struct timespec ts = { RPC_BLOB_TIMEOUT, 0 }; |
|
|
memset(&blob, 0, sizeof blob); |
memset(&blob, 0, sizeof blob); |
rlen = recv(TASK_FD(task), &blob, sizeof blob, 0); |
rlen = recv(TASK_FD(task), &blob, sizeof blob, 0); |
Line 632 rxBLOB(sched_task_t *task)
|
Line 643 rxBLOB(sched_task_t *task)
|
/* set new BLOB variable for reply :) */ |
/* set new BLOB variable for reply :) */ |
blob.hdr_var = htonl(b->blob_var); |
blob.hdr_var = htonl(b->blob_var); |
|
|
|
/* set live BLOB timeout */ |
|
ts.tv_sec = blob.hdr_ret ? blob.hdr_ret : RPC_BLOB_TIMEOUT; |
|
|
/* receive BLOB from client */ |
/* receive BLOB from client */ |
blob.hdr_ret = htonl(rpc_srv_recvBLOB(c, b)); |
blob.hdr_ret = htonl(rpc_srv_recvBLOB(c, b)); |
rpc_srv_blobUnmap(b); |
rpc_srv_blobUnmap(b); |
|
|
|
schedTimer(TASK_ROOT(task), toutBLOB, |
|
(void*) (intptr_t) ntohl(blob.hdr_var), ts, |
|
TASK_ARG(task), ntohl(blob.hdr_len)); |
} else { |
} else { |
blob.hdr_cmd = error; |
blob.hdr_cmd = error; |
blob.hdr_ret = RPC_ERROR(-1); |
blob.hdr_ret = RPC_ERROR(-1); |
Line 645 rxBLOB(sched_task_t *task)
|
Line 663 rxBLOB(sched_task_t *task)
|
blob.hdr_cmd = error; |
blob.hdr_cmd = error; |
blob.hdr_ret = RPC_ERROR(-1); |
blob.hdr_ret = RPC_ERROR(-1); |
} |
} |
|
|
|
schedCancelby(TASK_ROOT(task), taskTIMER, CRITERIA_ARG, |
|
(void*) (intptr_t) ntohl(blob.hdr_var), NULL); |
break; |
break; |
default: |
default: |
rpc_SetErr(EPROCUNAVAIL, "Unsupported BLOB command %d", blob.hdr_cmd); |
rpc_SetErr(EPROCUNAVAIL, "Unsupported BLOB command %d", blob.hdr_cmd); |
Line 826 rpc_srv_initBLOBServer(rpc_srv_t * __restrict srv, u_s
|
Line 847 rpc_srv_initBLOBServer(rpc_srv_t * __restrict srv, u_s
|
* @srv = RPC Server instance |
* @srv = RPC Server instance |
* return: none |
* return: none |
*/ |
*/ |
inline void | void |
rpc_srv_endBLOBServer(rpc_srv_t * __restrict srv) |
rpc_srv_endBLOBServer(rpc_srv_t * __restrict srv) |
{ |
{ |
if (!srv) |
if (!srv) |
Line 1029 err: /* error condition */
|
Line 1050 err: /* error condition */
|
* @psrv = RPC Server instance |
* @psrv = RPC Server instance |
* return: none |
* return: none |
*/ |
*/ |
inline void | void |
rpc_srv_endServer(rpc_srv_t ** __restrict psrv) |
rpc_srv_endServer(rpc_srv_t ** __restrict psrv) |
{ |
{ |
if (!psrv || !*psrv) |
if (!psrv || !*psrv) |