Module: kamailio
Branch: master
Commit: 943f548dc391dc0921ccb1cdc336f2fdfa4f3e0d
URL:
https://github.com/kamailio/kamailio/commit/943f548dc391dc0921ccb1cdc336f2f…
Author: Alex Hermann <alex(a)hexla.nl>
Committer: Alex Hermann <alex(a)hexla.nl>
Date: 2020-10-19T15:29:40+02:00
mqueue: Use HTTP status codes for rpc
---
Modified: src/modules/mqueue/mqueue_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/943f548dc391dc0921ccb1cdc336f2f…
Patch:
https://github.com/kamailio/kamailio/commit/943f548dc391dc0921ccb1cdc336f2f…
---
diff --git a/src/modules/mqueue/mqueue_mod.c b/src/modules/mqueue/mqueue_mod.c
index 860014cca9..e3b984484e 100644
--- a/src/modules/mqueue/mqueue_mod.c
+++ b/src/modules/mqueue/mqueue_mod.c
@@ -294,13 +294,13 @@ static void mqueue_rpc_get_size(rpc_t* rpc, void* ctx)
int mqueue_sz = 0;
if (rpc->scan(ctx, "S", &mqueue_name) < 1) {
- rpc->fault(ctx, 500, "No queue name");
+ rpc->fault(ctx, 400, "No queue name");
return;
}
if(mqueue_name.len <= 0 || mqueue_name.s == NULL) {
LM_ERR("bad mqueue name\n");
- rpc->fault(ctx, 500, "Invalid queue name");
+ rpc->fault(ctx, 400, "Invalid queue name");
return;
}
@@ -308,7 +308,7 @@ static void mqueue_rpc_get_size(rpc_t* rpc, void* ctx)
if(mqueue_sz < 0) {
LM_ERR("no such mqueue\n");
- rpc->fault(ctx, 500, "No such queue");
+ rpc->fault(ctx, 404, "No such queue");
return;
}