Module: kamailio
Branch: master
Commit: fa50c85a9e61dd6b91ce88f3f74c433af5d414e2
URL: 
https://github.com/kamailio/kamailio/commit/fa50c85a9e61dd6b91ce88f3f74c433af5d414e2

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2017-03-16T10:54:25+01:00

jsonrpcs: extra debug messages when rpc response is sent

---

Modified: src/modules/jsonrpcs/jsonrpcs_mod.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/fa50c85a9e61dd6b91ce88f3f74c433af5d414e2.diff
Patch: 
https://github.com/kamailio/kamailio/commit/fa50c85a9e61dd6b91ce88f3f74c433af5d414e2.patch

---

diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.c 
b/src/modules/jsonrpcs/jsonrpcs_mod.c
index f44fb9e..e639ab9 100644
--- a/src/modules/jsonrpcs/jsonrpcs_mod.c
+++ b/src/modules/jsonrpcs/jsonrpcs_mod.c
@@ -391,6 +391,8 @@ static int jsonrpc_send(jsonrpc_ctx_t* ctx)
                rbuf.len = strlen(rbuf.s);
        }
        if (rbuf.s!=NULL) {
+               LM_DBG("sending response with body: %p - %d %.*s\n", ctx->msg,
+                               ctx->http_code, ctx->http_text.len, 
ctx->http_text.s);
                if(ctx->msg) {
                        xhttp_api.reply(ctx->msg, ctx->http_code, 
&ctx->http_text,
                                &JSONRPC_CONTENT_TYPE_HTML, &rbuf);
@@ -400,6 +402,8 @@ static int jsonrpc_send(jsonrpc_ctx_t* ctx)
                        rbuf.s=NULL;
                }
        } else {
+               LM_DBG("sending response without body: %p - %d %.*s\n", 
ctx->msg,
+                               ctx->http_code, ctx->http_text.len, 
ctx->http_text.s);
                if(ctx->msg) {
                        xhttp_api.reply(ctx->msg, ctx->http_code, 
&ctx->http_text,
                                        NULL, NULL);


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to