Skip to content

Commit

Permalink
Add a "struct ucontact_info" logging function
Browse files Browse the repository at this point in the history
(cherry picked from commit a2dd10a)
  • Loading branch information
liviuchircu committed Jan 17, 2018
1 parent 59f98e9 commit 3707054
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/reg/ci.c
Expand Up @@ -192,3 +192,22 @@ ucontact_info_t *pack_ci(struct sip_msg* _m, contact_t* _c, unsigned int _e,
error:
return 0;
}

void print_ci(ucontact_info_t *ci)
{
LM_DBG(" ----- UCI DUMP (%p) ------\n", ci);
LM_DBG("received: %.*s, path: %.*s\n", ci->received.len, ci->received.s,
ci->path ? ci->path->len : 0, ci->path ? ci->path->s : NULL);
LM_DBG("expires: %ld, expires_in: %ld, expires_out: %ld\n", ci->expires,
ci->expires_in, ci->expires_out);
LM_DBG("q: %d, instance: %.*s, callid: %.*s\n", ci->q, ci->instance.len,
ci->instance.s, ci->callid ? ci->callid->len : 0,
ci->callid ? ci->callid->s : NULL);
LM_DBG("cseq: %d, flags: %d, cflags: %d\n", ci->cseq, ci->flags,
ci->cflags);
LM_DBG("user_agent: %.*s, sock: %p, methods: %d\n",
ci->user_agent ? ci->user_agent->len : 0,
ci->user_agent ? ci->user_agent->s : NULL, ci->sock, ci->methods);
LM_DBG("last_modified: %ld, attr: %.*s\n", ci->last_modified,
ci->attr ? ci->attr->len : 0, ci->attr ? ci->attr->s : NULL);
}
2 changes: 2 additions & 0 deletions lib/reg/ci.h
Expand Up @@ -36,4 +36,6 @@ extern unsigned short mct_avp_type;
ucontact_info_t *pack_ci(struct sip_msg* _m, contact_t* _c, unsigned int _e,
unsigned int _f, unsigned int _nat_flag, unsigned int _reg_flags);

void print_ci(ucontact_info_t *ci);

#endif /* __LIB_REG_CI__ */

0 comments on commit 3707054

Please sign in to comment.