Skip to content

Commit

Permalink
avpops: Make an empty avp_print() more obvious
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Jan 23, 2019
1 parent 0c57246 commit f9a4874
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions modules/avpops/avpops_impl.c
Expand Up @@ -1488,22 +1488,24 @@ int ops_print_avp(void)
avp_list = get_avp_list();
avp = *avp_list;

LM_INFO("----------- All AVPs in this context --------\n");
LM_INFO(" (SIP txn, script event, timer route, etc.)\n");
for ( ; avp ; avp=avp->next)
{
LM_INFO("p=%p, flags=0x%04X\n",avp, avp->flags);
name = get_avp_name(avp);
LM_INFO("\t\t\tname=<%.*s>\n",name->len,name->s);
LM_INFO("\t\t\tid=<%d>\n",avp->id);
LM_INFO(" name=<%.*s>\n",name->len,name->s);
LM_INFO(" id=<%d>\n",avp->id);
get_avp_val( avp, &val);
if (avp->flags&AVP_VAL_STR)
{
LM_INFO("\t\t\tval_str=<%.*s / %d>\n",val.s.len,val.s.s,
LM_INFO(" val_str=<%.*s / %d>\n",val.s.len,val.s.s,
val.s.len);
} else {
LM_INFO("\t\t\tval_int=<%d>\n",val.n);
LM_INFO(" val_int=<%d>\n",val.n);
}
}

LM_INFO("---------------- END ALL AVPs ---------------\n");

return 1;
}
Expand Down

0 comments on commit f9a4874

Please sign in to comment.