version 1.18, 2015/07/02 22:28:15
|
version 1.19, 2025/03/31 12:21:07
|
Line 12 terms:
|
Line 12 terms:
|
All of the documentation and software included in the ELWIX and AITNET |
All of the documentation and software included in the ELWIX and AITNET |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
|
|
Copyright 2004 - 2015 | Copyright 2004 - 2025 |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
|
|
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
Line 65 rpc_funcs_cmp(struct tagRPCFunc *a, struct tagRPCFunc
|
Line 65 rpc_funcs_cmp(struct tagRPCFunc *a, struct tagRPCFunc
|
return ret; |
return ret; |
} |
} |
|
|
AVL_GENERATE(tagRPCFuncs, tagRPCFunc, func_node, rpc_funcs_cmp); | RB_GENERATE(tagRPCFuncs, tagRPCFunc, func_node, rpc_funcs_cmp); |
|
|
#pragma GCC visibility pop |
#pragma GCC visibility pop |
|
|
Line 96 rpc_srv_registerCall(rpc_srv_t * __restrict srv, u_sho
|
Line 96 rpc_srv_registerCall(rpc_srv_t * __restrict srv, u_sho
|
} |
} |
|
|
/* search for duplicate */ |
/* search for duplicate */ |
if (AVL_FIND(tagRPCFuncs, &srv->srv_funcs, func)) { | if (RB_FIND(tagRPCFuncs, &srv->srv_funcs, func)) { |
e_free(func); |
e_free(func); |
return 0; |
return 0; |
} |
} |
Line 107 rpc_srv_registerCall(rpc_srv_t * __restrict srv, u_sho
|
Line 107 rpc_srv_registerCall(rpc_srv_t * __restrict srv, u_sho
|
/* add to list of functions */ |
/* add to list of functions */ |
RPC_FUNCS_LOCK(&srv->srv_funcs); |
RPC_FUNCS_LOCK(&srv->srv_funcs); |
SLIST_INSERT_HEAD(&srv->srv_funcs, func, func_next); |
SLIST_INSERT_HEAD(&srv->srv_funcs, func, func_next); |
AVL_INSERT(tagRPCFuncs, &srv->srv_funcs, func); | RB_INSERT(tagRPCFuncs, &srv->srv_funcs, func); |
RPC_FUNCS_UNLOCK(&srv->srv_funcs); |
RPC_FUNCS_UNLOCK(&srv->srv_funcs); |
return 1; |
return 1; |
} |
} |
Line 134 rpc_srv_unregisterCall(rpc_srv_t * __restrict srv, u_s
|
Line 134 rpc_srv_unregisterCall(rpc_srv_t * __restrict srv, u_s
|
return 0; |
return 0; |
|
|
RPC_FUNCS_LOCK(&srv->srv_funcs); |
RPC_FUNCS_LOCK(&srv->srv_funcs); |
AVL_REMOVE(tagRPCFuncs, &srv->srv_funcs, f); | RB_REMOVE(tagRPCFuncs, &srv->srv_funcs, f); |
SLIST_REMOVE(&srv->srv_funcs, f, tagRPCFunc, func_next); |
SLIST_REMOVE(&srv->srv_funcs, f, tagRPCFunc, func_next); |
RPC_FUNCS_UNLOCK(&srv->srv_funcs); |
RPC_FUNCS_UNLOCK(&srv->srv_funcs); |
|
|
Line 162 rpc_srv_getCall(rpc_srv_t * __restrict srv, uint16_t t
|
Line 162 rpc_srv_getCall(rpc_srv_t * __restrict srv, uint16_t t
|
memset(&tmp, 0, sizeof tmp); |
memset(&tmp, 0, sizeof tmp); |
|
|
AIT_KEY(&tmp.func_name) = tag; |
AIT_KEY(&tmp.func_name) = tag; |
return AVL_FIND(tagRPCFuncs, &srv->srv_funcs, &tmp); | return RB_FIND(tagRPCFuncs, &srv->srv_funcs, &tmp); |
} |
} |
|
|
/* --------------------------------------------------------- */ |
/* --------------------------------------------------------- */ |