version 1.7, 2012/03/15 01:55:33
|
version 1.8, 2012/03/29 01:34:16
|
Line 166 rpc_srv_unregisterCall(rpc_srv_t * __restrict srv, con
|
Line 166 rpc_srv_unregisterCall(rpc_srv_t * __restrict srv, con
|
if (rpc_calcHashes(&func, csModule, csFunc) == -1) |
if (rpc_calcHashes(&func, csModule, csFunc) == -1) |
return -1; |
return -1; |
|
|
|
pthread_mutex_lock(&srv->srv_mtx); |
f = rpc_srv_getCall(srv, func.func_tag, func.func_hash); |
f = rpc_srv_getCall(srv, func.func_tag, func.func_hash); |
AIT_FREE_VAL(&func.func_name); |
AIT_FREE_VAL(&func.func_name); |
AIT_FREE_VAL(&func.func_file); |
AIT_FREE_VAL(&func.func_file); |
if (!f) /* not found element for unregister */ | if (!f) { /* not found element for unregister */ |
| pthread_mutex_unlock(&srv->srv_mtx); |
return 0; |
return 0; |
|
} |
|
|
pthread_mutex_lock(&srv->srv_mtx); |
|
/* remove from list of functions */ |
/* remove from list of functions */ |
if (srv->srv_funcs == f) /* if is 1st element */ |
if (srv->srv_funcs == f) /* if is 1st element */ |
srv->srv_funcs = srv->srv_funcs->func_next; |
srv->srv_funcs = srv->srv_funcs->func_next; |