Module: kamailio Branch: 5.0 Commit: 74978801e2687dc43f4a017f1669360fd2c7f318 URL: https://github.com/kamailio/kamailio/commit/74978801e2687dc43f4a017f1669360f...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2017-03-16T11:01:07+01:00
jsonrpcs: extra debug messages when rpc response is sent
(cherry picked from commit fa50c85a9e61dd6b91ce88f3f74c433af5d414e2)
---
Modified: src/modules/jsonrpcs/jsonrpcs_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/74978801e2687dc43f4a017f1669360f... Patch: https://github.com/kamailio/kamailio/commit/74978801e2687dc43f4a017f1669360f...
---
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);