Beispiel #1
0
int msghdrtag_snprintf(tagi_t const *t, char b[], size_t size)
{
  msg_header_t const *h;

  assert(t);

  if (!t) {
    if (size) b[0] = 0;
    return 0;
  }

  h = (msg_header_t const *)t->t_value;

  if (h != MSG_HEADER_NONE && h != NULL) {
    return msg_header_field_e(b, size, h, 0);
  }
  else {
    return snprintf(b, size, "<NONE>");
  }
}
Beispiel #2
0
/** Encode a SIP header contents.
 *
 * @deprecated Use msg_header_field_e() instead.
 */
issize_t sip_header_field_e(char *b, isize_t bsiz, sip_header_t const *h, int flags)
{
  return msg_header_field_e(b, bsiz, h, flags);
}