osmux: Slightly improve output format of osmux_snprintf

The buffer for osmux_test is increased as the former doesn't seem to be
able to cope with the whole output.

Change-Id: Ic838dd9d7ad89b4510ccfa58c0390c69a075b616
This commit is contained in:
Pau Espin 2017-08-14 17:23:05 +02:00
parent 7cca0da1cc
commit e786055567
2 changed files with 5 additions and 2 deletions

View File

@ -877,12 +877,15 @@ static int osmux_snprintf_payload(char *buf, size_t size,
int ret, i;
int len = size, offset = 0;
ret = snprintf(buf+offset, len, "[ ");
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
for (i=0; i<payload_len; i++) {
ret = snprintf(buf+offset, len, "%02x ", payload[i]);
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
}
ret = snprintf(buf+offset, len, "]");
ret = snprintf(buf+offset, len, "] ");
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
return offset;

View File

@ -102,7 +102,7 @@ static struct osmux_out_handle h_output;
static void osmux_deliver(struct msgb *batch_msg, void *data)
{
char buf[1024];
char buf[2048];
struct osmux_hdr *osmuxh;
LLIST_HEAD(list);