xtalk: allow dump_packet() without debug flags

xtalk: dump_packet() may now be used without debug flags by passing
mask == 0.

Origin: Xorcom xtalk (r9302)

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10710 17933a7a-c749-41c5-a318-cba88f637d49
This commit is contained in:
Oron Peled 2012-09-20 13:38:39 +00:00 committed by Tzafrir Cohen
parent 241e5e0144
commit 99ebb2a94c

View File

@ -48,7 +48,7 @@ void dump_packet(int loglevel, int mask, const char *msg, const char *buf, int l
{ {
int i; int i;
if(mask & debug_mask) { if(!mask || (mask & debug_mask)) {
log_function(loglevel, ~0, "%-15s:", msg); log_function(loglevel, ~0, "%-15s:", msg);
for(i = 0; i < len; i++) for(i = 0; i < len; i++)
log_function(loglevel, ~0, " %02X", (uint8_t)buf[i]); log_function(loglevel, ~0, " %02X", (uint8_t)buf[i]);