version 1.6, 2012/03/15 01:55:33
|
version 1.7, 2012/05/14 08:39:05
|
Line 184 rpcServerShutdown(rpc_func_t *call, int ic, array_t *i
|
Line 184 rpcServerShutdown(rpc_func_t *call, int ic, array_t *i
|
else |
else |
srv = call->func_parent; |
srv = call->func_parent; |
|
|
pthread_mutex_lock(&srv->srv_mtx); |
|
srv->srv_kill = kill; |
srv->srv_kill = kill; |
pthread_mutex_unlock(&srv->srv_mtx); |
|
|
|
return 0; |
return 0; |
} |
} |
Line 204 rpcBLOBServerShutdown(rpc_func_t *call, int ic, array_
|
Line 202 rpcBLOBServerShutdown(rpc_func_t *call, int ic, array_
|
else |
else |
srv = call->func_parent; |
srv = call->func_parent; |
|
|
pthread_mutex_lock(&srv->srv_blob.mtx); |
|
srv->srv_blob.state = kill; |
srv->srv_blob.state = kill; |
pthread_mutex_unlock(&srv->srv_blob.mtx); |
|
|
|
return 0; |
return 0; |
} |
} |
Line 238 rpcBLOBServerVars(rpc_func_t *call, int ic, array_t *i
|
Line 234 rpcBLOBServerVars(rpc_func_t *call, int ic, array_t *i
|
return 1; |
return 1; |
} |
} |
|
|
pthread_mutex_lock(&srv->srv_blob.mtx); |
|
for (i = 0, b = srv->srv_blob.blobs; b; i++, b = b->blob_next); |
for (i = 0, b = srv->srv_blob.blobs; b; i++, b = b->blob_next); |
len = i * sizeof str; |
len = i * sizeof str; |
|
|
if (!len) { |
if (!len) { |
AIT_SET_STR(io_array(vals, 0, ait_val_t*), ""); |
AIT_SET_STR(io_array(vals, 0, ait_val_t*), ""); |
pthread_mutex_unlock(&srv->srv_blob.mtx); |
|
return 0; |
return 0; |
} |
} |
|
|
if (!(val = malloc(len))) { |
if (!(val = malloc(len))) { |
LOGERR; |
LOGERR; |
pthread_mutex_unlock(&srv->srv_blob.mtx); |
|
return -1; |
return -1; |
} else |
} else |
memset(val, 0, len); |
memset(val, 0, len); |
Line 263 rpcBLOBServerVars(rpc_func_t *call, int ic, array_t *i
|
Line 256 rpcBLOBServerVars(rpc_func_t *call, int ic, array_t *i
|
|
|
AIT_SET_STR(io_array(vals, 0, ait_val_t*), val); |
AIT_SET_STR(io_array(vals, 0, ait_val_t*), val); |
free(val); |
free(val); |
pthread_mutex_unlock(&srv->srv_blob.mtx); |
|
return 0; |
return 0; |
} |
} |
|
|
Line 281 rpcBLOBServerState(rpc_func_t *call, int ic, array_t *
|
Line 273 rpcBLOBServerState(rpc_func_t *call, int ic, array_t *
|
if (AIT_TYPE(io_array(iv, 0, ait_val_t*)) != i32) |
if (AIT_TYPE(io_array(iv, 0, ait_val_t*)) != i32) |
return -1; |
return -1; |
|
|
pthread_mutex_lock(&srv->srv_mtx); |
|
srv->srv_blob.state = AIT_GET_I32(io_array(iv, 0, ait_val_t*)); |
srv->srv_blob.state = AIT_GET_I32(io_array(iv, 0, ait_val_t*)); |
pthread_mutex_unlock(&srv->srv_mtx); |
|
return 0; |
return 0; |
} |
} |
|
|