summaryrefslogtreecommitdiff
path: root/core/rpc.c
diff options
context:
space:
mode:
authorUnbit <info@unbit.it>2013-02-07 17:23:59 +0100
committerUnbit <info@unbit.it>2013-02-07 17:23:59 +0100
commit9f153451838557be66fe67bbfb67353e9d1e67c2 (patch)
tree2d937e24f9e970ad563364b3b9d4163ad1968775 /core/rpc.c
parent7d8441303813938bec17440c0ccb16daf94739b6 (diff)
downloaduwsgi-9f153451838557be66fe67bbfb67353e9d1e67c2.tar.gz
prepare dor async-friendly rpc
Diffstat (limited to 'core/rpc.c')
-rw-r--r--core/rpc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/rpc.c b/core/rpc.c
index 893593ee..78b1e285 100644
--- a/core/rpc.c
+++ b/core/rpc.c
@@ -14,8 +14,8 @@ int uwsgi_register_rpc(char *name, uint8_t modifier1, uint8_t args, void *func)
uwsgi_lock(uwsgi.rpc_table_lock);
- if (uwsgi.shared->rpc_count < MAX_RPC) {
- urpc = &uwsgi.shared->rpc_table[uwsgi.shared->rpc_count];
+ if (uwsgi.shared->rpc_count < uwsgi.rpc_max) {
+ urpc = &uwsgi.rpc_table[uwsgi.shared->rpc_count];
memcpy(urpc->name, name, strlen(name));
urpc->modifier1 = modifier1;
@@ -36,13 +36,13 @@ int uwsgi_register_rpc(char *name, uint8_t modifier1, uint8_t args, void *func)
uint16_t uwsgi_rpc(char *name, uint8_t argc, char *argv[], uint16_t argvs[], char *output) {
struct uwsgi_rpc *urpc = NULL;
- int i;
+ uint64_t i;
uint16_t ret = 0;
for (i = 0; i < uwsgi.shared->rpc_count; i++) {
- if (uwsgi.shared->rpc_table[i].name[0] != 0) {
- if (!strcmp(uwsgi.shared->rpc_table[i].name, name)) {
- urpc = &uwsgi.shared->rpc_table[i];
+ if (uwsgi.rpc_table[i].name[0] != 0) {
+ if (!strcmp(uwsgi.rpc_table[i].name, name)) {
+ urpc = &uwsgi.rpc_table[i];
break;
}
}