Module: kamailio
Branch: master
Commit: dca057b9d9f8f0d74049cc5104e5e3865c79b487
URL:
https://github.com/kamailio/kamailio/commit/dca057b9d9f8f0d74049cc5104e5e38…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-01-05T09:15:11+01:00
ctl: print format char in error log messages
---
Modified: src/modules/ctl/binrpc_run.c
---
Diff:
https://github.com/kamailio/kamailio/commit/dca057b9d9f8f0d74049cc5104e5e38…
Patch:
https://github.com/kamailio/kamailio/commit/dca057b9d9f8f0d74049cc5104e5e38…
---
diff --git a/src/modules/ctl/binrpc_run.c b/src/modules/ctl/binrpc_run.c
index 9054ef5..76893eb 100644
--- a/src/modules/ctl/binrpc_run.c
+++ b/src/modules/ctl/binrpc_run.c
@@ -1082,18 +1082,18 @@ static int rpc_struct_add(struct rpc_struct_l* s, char* fmt, ...)
avp.type=BINRPC_T_STRUCT;
err=binrpc_addavp(&s->pkt, &avp);
if (err<0){
- LM_ERR("failed to add attribute-value\n");
+ LM_ERR("failed to add attribute-value (%c)\n", *fmt);
goto error_add;
}
rs=new_rpc_struct();
if (rs==0){
- LM_ERR("not enough memory\n");
+ LM_ERR("not enough memory (%c)\n", *fmt);
goto error_mem;
}
rs->offset=binrpc_pkt_len(&s->pkt);
err=binrpc_end_struct(&s->pkt);
if (err<0) {
- LM_ERR("failed to end struct\n");
+ LM_ERR("failed to end struct (%c)\n", *fmt);
goto error_add;
}
clist_append(&s->substructs, rs, next, prev);
@@ -1109,7 +1109,7 @@ static int rpc_struct_add(struct rpc_struct_l* s, char* fmt, ...)
}
err=binrpc_addavp(&s->pkt, &avp);
if (err<0) {
- LM_ERR("failed to add attribute-value\n");
+ LM_ERR("failed to add attribute-value (%c)\n", *fmt);
goto error;
}
}