--- libaitrpc/src/builtin.c 2012/03/15 01:55:33 1.6 +++ libaitrpc/src/builtin.c 2012/05/14 08:39:05 1.7 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: builtin.c,v 1.6 2012/03/15 01:55:33 misho Exp $ +* $Id: builtin.c,v 1.7 2012/05/14 08:39:05 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -184,9 +184,7 @@ rpcServerShutdown(rpc_func_t *call, int ic, array_t *i else srv = call->func_parent; - pthread_mutex_lock(&srv->srv_mtx); srv->srv_kill = kill; - pthread_mutex_unlock(&srv->srv_mtx); return 0; } @@ -204,9 +202,7 @@ rpcBLOBServerShutdown(rpc_func_t *call, int ic, array_ else srv = call->func_parent; - pthread_mutex_lock(&srv->srv_blob.mtx); srv->srv_blob.state = kill; - pthread_mutex_unlock(&srv->srv_blob.mtx); return 0; } @@ -238,19 +234,16 @@ rpcBLOBServerVars(rpc_func_t *call, int ic, array_t *i return 1; } - pthread_mutex_lock(&srv->srv_blob.mtx); for (i = 0, b = srv->srv_blob.blobs; b; i++, b = b->blob_next); len = i * sizeof str; if (!len) { AIT_SET_STR(io_array(vals, 0, ait_val_t*), ""); - pthread_mutex_unlock(&srv->srv_blob.mtx); return 0; } if (!(val = malloc(len))) { LOGERR; - pthread_mutex_unlock(&srv->srv_blob.mtx); return -1; } else memset(val, 0, len); @@ -263,7 +256,6 @@ rpcBLOBServerVars(rpc_func_t *call, int ic, array_t *i AIT_SET_STR(io_array(vals, 0, ait_val_t*), val); free(val); - pthread_mutex_unlock(&srv->srv_blob.mtx); return 0; } @@ -281,9 +273,7 @@ rpcBLOBServerState(rpc_func_t *call, int ic, array_t * if (AIT_TYPE(io_array(iv, 0, ait_val_t*)) != i32) return -1; - pthread_mutex_lock(&srv->srv_mtx); srv->srv_blob.state = AIT_GET_I32(io_array(iv, 0, ait_val_t*)); - pthread_mutex_unlock(&srv->srv_mtx); return 0; }