--- libaitrpc/inc/aitrpc.h 2013/08/23 13:53:15 1.19 +++ libaitrpc/inc/aitrpc.h 2013/11/22 13:41:33 1.21 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitrpc.h,v 1.19 2013/08/23 13:53:15 misho Exp $ +* $Id: aitrpc.h,v 1.21 2013/11/22 13:41:33 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -144,7 +144,8 @@ struct tagRPCCall { uint16_t call_argc; ait_val_t call_argv[0]; } __packed; /* size == 20 bytes */ -#define RPC_CHK_NOREPLY(x) ((x)->call_req.flags & RPC_NOREPLY) +#define RPC_CHK_NOREPLY(x) (ntohl((u_long) (x)->call_req.flags) & RPC_NOREPLY) +#define RPC_SET_ERRNO(x, _v) ((x)->call_rep.eno = htonl((_v))) /* Network BLOB packet - Header */ @@ -364,6 +365,7 @@ int rpc_srv_loopServer(rpc_srv_t * __restrict srv); else \ pthread_detach((_srv)->srv_tid); \ } } while (0) +#define rpc_srv_killServer(_srv) (assert((_srv)), (_srv)->srv_blob.kill = 1, (_srv)->srv_kill = 1) /* * rpc_srv_initBLOBServer() - Init & create BLOB Server