--- libaitrpc/src/srv.c 2013/04/02 15:50:14 1.15 +++ libaitrpc/src/srv.c 2013/07/16 08:25:55 1.16.2.5 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: srv.c,v 1.15 2013/04/02 15:50:14 misho Exp $ +* $Id: srv.c,v 1.16.2.5 2013/07/16 08:25:55 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -67,7 +67,7 @@ static sched_task_func_t cbProto[SOCK_RAW + 1][4] = { }; -inline void +void rpc_freeCli(rpc_cli_t * __restrict c) { rpc_srv_t *s = c->cli_parent; @@ -529,7 +529,7 @@ end: /* ------------------------------------------------------ */ -inline void +void rpc_freeBLOBCli(rpc_cli_t * __restrict c) { rpc_srv_t *s = c->cli_parent; @@ -628,7 +628,8 @@ rxBLOB(sched_task_t *task) } break; case set: - if ((b = rpc_srv_registerBLOB(s, ntohl(blob.hdr_len)))) { + if ((b = rpc_srv_registerBLOB(s, ntohl(blob.hdr_len), + ntohl(blob.hdr_ret), c))) { /* set new BLOB variable for reply :) */ blob.hdr_var = htonl(b->blob_var); @@ -826,7 +827,7 @@ rpc_srv_initBLOBServer(rpc_srv_t * __restrict srv, u_s * @srv = RPC Server instance * return: none */ -inline void +void rpc_srv_endBLOBServer(rpc_srv_t * __restrict srv) { if (!srv) @@ -889,6 +890,8 @@ rpc_srv_loopBLOBServer(rpc_srv_t * __restrict srv) TAILQ_FOREACH_SAFE(b, &srv->srv_blob.blobs, blob_node, tmp) { TAILQ_REMOVE(&srv->srv_blob.blobs, b, blob_node); + rpc_srv_unregisterBLOB(srv, b->blob_var); + rpc_srv_blobFree(srv, b); e_free(b); } @@ -1029,7 +1032,7 @@ err: /* error condition */ * @psrv = RPC Server instance * return: none */ -inline void +void rpc_srv_endServer(rpc_srv_t ** __restrict psrv) { if (!psrv || !*psrv)