--- libaitrpc/src/lists.c 2012/03/15 01:55:33 1.7 +++ libaitrpc/src/lists.c 2012/05/11 08:46:41 1.8.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: lists.c,v 1.7 2012/03/15 01:55:33 misho Exp $ +* $Id: lists.c,v 1.8.2.1 2012/05/11 08:46:41 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -136,10 +136,8 @@ rpc_srv_registerCall(rpc_srv_t * __restrict srv, const } /* add to list of functions */ - pthread_mutex_lock(&srv->srv_mtx); func->func_next = srv->srv_funcs; srv->srv_funcs = func; - pthread_mutex_unlock(&srv->srv_mtx); return 0; } @@ -169,10 +167,9 @@ rpc_srv_unregisterCall(rpc_srv_t * __restrict srv, con f = rpc_srv_getCall(srv, func.func_tag, func.func_hash); AIT_FREE_VAL(&func.func_name); AIT_FREE_VAL(&func.func_file); - if (!f) /* not found element for unregister */ + if (!f) /* not found element for unregister */ return 0; - pthread_mutex_lock(&srv->srv_mtx); /* remove from list of functions */ if (srv->srv_funcs == f) /* if is 1st element */ srv->srv_funcs = srv->srv_funcs->func_next; @@ -184,7 +181,6 @@ rpc_srv_unregisterCall(rpc_srv_t * __restrict srv, con AIT_FREE_VAL(&f->func_name); AIT_FREE_VAL(&f->func_file); free(f); - pthread_mutex_unlock(&srv->srv_mtx); return 1; }