Browse Source

Extended callid space for list_* output

pull/194/head
Frederic-Philippe Metz 10 years ago
committed by Pawel Kuzak
parent
commit
82199216b2
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      daemon/cli.c

+ 4
- 4
daemon/cli.c View File

@ -73,7 +73,7 @@ static void cli_incoming_list_totals(char* buffer, int len, struct callmaster* m
printlen = snprintf(replybuffer,(outbufend-replybuffer), "Control statistics:\n\n"); printlen = snprintf(replybuffer,(outbufend-replybuffer), "Control statistics:\n\n");
ADJUSTLEN(printlen,outbufend,replybuffer); ADJUSTLEN(printlen,outbufend,replybuffer);
printlen = snprintf(replybuffer,(outbufend-replybuffer), " %10s | %10s | %10s | %10s | %10s | %10s | %10s | %10s \n",
printlen = snprintf(replybuffer,(outbufend-replybuffer), " %20s | %10s | %10s | %10s | %10s | %10s | %10s | %10s \n",
"Proxy", "Offer", "Answer", "Delete", "Ping", "List", "Query", "Errors"); "Proxy", "Offer", "Answer", "Delete", "Ping", "List", "Query", "Errors");
ADJUSTLEN(printlen,outbufend,replybuffer); ADJUSTLEN(printlen,outbufend,replybuffer);
@ -87,7 +87,7 @@ static void cli_incoming_list_totals(char* buffer, int len, struct callmaster* m
for (GList *l = list; l; l = l->next) { for (GList *l = list; l; l = l->next) {
struct control_ng_stats* cur = l->data; struct control_ng_stats* cur = l->data;
printlen = snprintf(replybuffer,(outbufend-replybuffer), " %10s | %10u | %10u | %10u | %10u | %10u | %10u | %10u \n",
printlen = snprintf(replybuffer,(outbufend-replybuffer), " %20s | %10u | %10u | %10u | %10u | %10u | %10u | %10u \n",
smart_ntop_p_buf(&cur->proxy), smart_ntop_p_buf(&cur->proxy),
cur->offer, cur->offer,
cur->answer, cur->answer,
@ -164,7 +164,7 @@ static void cli_incoming_list_callid(char* buffer, int len, struct callmaster* m
return; return;
} }
printlen = snprintf (replybuffer,(outbufend-replybuffer), "\ncallid: %30s | deletionmark:%4s | created:%12i | proxy:%s | tos:%u | last_signal:%llu\n\n",
printlen = snprintf (replybuffer,(outbufend-replybuffer), "\ncallid: %60s | deletionmark:%4s | created:%12i | proxy:%s | tos:%u | last_signal:%llu\n\n",
c->callid.s , c->ml_deleted?"yes":"no", (int)c->created, c->created_from, (unsigned int)c->tos, (unsigned long long)c->last_signal); c->callid.s , c->ml_deleted?"yes":"no", (int)c->created, c->created_from, (unsigned int)c->tos, (unsigned long long)c->last_signal);
ADJUSTLEN(printlen,outbufend,replybuffer); ADJUSTLEN(printlen,outbufend,replybuffer);
@ -360,7 +360,7 @@ static void cli_incoming_list(char* buffer, int len, struct callmaster* m, char*
while (g_hash_table_iter_next (&iter, &key, &value)) { while (g_hash_table_iter_next (&iter, &key, &value)) {
ptrkey = (str*)key; ptrkey = (str*)key;
call = (struct call*)value; call = (struct call*)value;
printlen = snprintf(replybuffer, outbufend-replybuffer, "callid: %30s | deletionmark:%4s | created:%12i | proxy:%s\n", ptrkey->s, call->ml_deleted?"yes":"no", (int)call->created, call->created_from);
printlen = snprintf(replybuffer, outbufend-replybuffer, "callid: %60s | deletionmark:%4s | created:%12i | proxy:%s\n", ptrkey->s, call->ml_deleted?"yes":"no", (int)call->created, call->created_from);
ADJUSTLEN(printlen,outbufend,replybuffer); ADJUSTLEN(printlen,outbufend,replybuffer);
} }
rwlock_unlock_r(&m->hashlock); rwlock_unlock_r(&m->hashlock);


Loading…
Cancel
Save