示例#1
0
static pjsip_name_addr* pjsip_name_addr_clone( pj_pool_t *pool,
        const pjsip_name_addr *rhs)
{
    pjsip_name_addr *addr = PJ_POOL_ALLOC_T(pool, pjsip_name_addr);
    if (!addr)
        return NULL;

    pjsip_name_addr_init(addr);
    pjsip_name_addr_assign(pool, addr, rhs);
    return addr;
}
示例#2
0
static pjsip_name_addr* pjsip_name_addr_clone( pj_pool_t *pool,
        const pjsip_name_addr *rhs)
{
    pjsip_name_addr *addr = pj_pool_alloc(pool, sizeof(pjsip_name_addr));
    if (!addr)
        return NULL;

    pjsip_name_addr_init(addr);
    pjsip_name_addr_assign(pool, addr, rhs);
    return addr;
}
示例#3
0
/// Creates an identity header (so either P-Associated-URI, P-Asserted-Identity
/// or P-Preferred-Identity)
pjsip_routing_hdr* PJUtils::identity_hdr_create(pj_pool_t* pool, const pj_str_t& name)
{
  pjsip_routing_hdr* hdr = (pjsip_routing_hdr*)pj_pool_alloc(pool, sizeof(pjsip_routing_hdr));

  pj_list_init(hdr);
  hdr->vptr = &identity_hdr_vptr;
  hdr->type = PJSIP_H_OTHER;
  hdr->name = name;
  hdr->sname = pj_str("");
  pjsip_name_addr_init(&hdr->name_addr);
  pj_list_init(&hdr->other_param);

  return hdr;
}
示例#4
0
pjsip_routing_hdr* identity_hdr_init(pj_pool_t* pool, void* mem, const pj_str_t name)
{
  pjsip_routing_hdr* hdr = (pjsip_routing_hdr*)mem;
  PJ_UNUSED_ARG(pool);

  pj_list_init(hdr);
  hdr->vptr = &identity_hdr_vptr;
  hdr->type = PJSIP_H_OTHER;
  hdr->name = name;
  hdr->sname = pj_str("");
  pjsip_name_addr_init(&hdr->name_addr);
  pj_list_init(&hdr->other_param);

  return hdr;
}
示例#5
0
PJ_DEF(pjsip_name_addr*) pjsip_name_addr_create(pj_pool_t *pool)
{
    pjsip_name_addr *name_addr = PJ_POOL_ALLOC_T(pool, pjsip_name_addr);
    pjsip_name_addr_init(name_addr);
    return name_addr;
}
示例#6
0
PJ_DEF(pjsip_name_addr*) pjsip_name_addr_create(pj_pool_t *pool)
{
    pjsip_name_addr *name_addr = pj_pool_alloc(pool, sizeof(pjsip_name_addr));
    pjsip_name_addr_init(name_addr);
    return name_addr;
}