Module: kamailio
Branch: master
Commit: afcd0bc7d231cb290ec54549016a8706f12f4210
URL:
https://github.com/kamailio/kamailio/commit/afcd0bc7d231cb290ec54549016a870…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-09-13T10:37:33+02:00
misctest: 0-padding for hex print
---
Modified: src/modules/misctest/misctest_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/afcd0bc7d231cb290ec54549016a870…
Patch:
https://github.com/kamailio/kamailio/commit/afcd0bc7d231cb290ec54549016a870…
---
diff --git a/src/modules/misctest/misctest_mod.c b/src/modules/misctest/misctest_mod.c
index 2a263432d1..68f70718fc 100644
--- a/src/modules/misctest/misctest_mod.c
+++ b/src/modules/misctest/misctest_mod.c
@@ -263,7 +263,7 @@ static int misctest_message_init(void)
char tbuf[BUF_SIZE];
FILE *f;
long fsize;
- sip_msg_t tmsg = { };
+ sip_msg_t tmsg = { };
if(misctest_message_data.s!=0 && misctest_message_data.len>0) {
if(misctest_message_data.len>=BUF_SIZE-2) {
@@ -387,7 +387,7 @@ int misctest_hexprint(void *data, size_t length, int linelen, int
split)
}
if (lrem) {
- sprintf(ptr, "%0.2x ", *((unsigned char *) inptr + pos));
+ sprintf(ptr, "%02x ", *((unsigned char *) inptr + pos));
lrem--;
} else {
sprintf(ptr, " ");