• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ osip_list_add函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中osip_list_add函数的典型用法代码示例。如果您正苦于以下问题:C++ osip_list_add函数的具体用法?C++ osip_list_add怎么用?C++ osip_list_add使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了osip_list_add函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: osip_content_type_clone

int
osip_content_type_clone(const osip_content_type_t * ctt,
						osip_content_type_t ** dest)
{
	int i;
	osip_content_type_t *ct;

	*dest = NULL;
	if (ctt == NULL)
		return OSIP_BADPARAMETER;

	i = osip_content_type_init(&ct);
	if (i != 0)					/* allocation failed */
		return i;
	if (ctt->type != NULL)
		ct->type = osip_strdup(ctt->type);
	if (ctt->subtype != NULL)
		ct->subtype = osip_strdup(ctt->subtype);

	{
		int pos = 0;
		osip_generic_param_t *u_param;
		osip_generic_param_t *dest_param;

		while (!osip_list_eol(&ctt->gen_params, pos)) {
			u_param =
				(osip_generic_param_t *) osip_list_get(&ctt->gen_params, pos);
			i = osip_generic_param_clone(u_param, &dest_param);
			if (i != 0) {
				osip_content_type_free(ct);
				//osip_free(ct);
				return i;
			}
			osip_list_add(&ct->gen_params, dest_param, -1);
			pos++;
		}
	}
	*dest = ct;
	return OSIP_SUCCESS;
}
开发者ID:AirDev,项目名称:linphone-android,代码行数:40,代码来源:osip_content_type.c


示例2: osip_message_set_content_encoding

/* content-Encoding = token
   token possible values are gzip,compress,deflate
*/
int
osip_message_set_content_encoding (osip_message_t * sip, const char *hvalue)
{
  osip_content_encoding_t *content_encoding;
  int i;

  if (hvalue == NULL || hvalue[0] == '\0')
    return 0;

  i = osip_content_encoding_init (&content_encoding);
  if (i != 0)
    return -1;
  i = osip_content_encoding_parse (content_encoding, hvalue);
  if (i != 0)
    {
      osip_content_encoding_free (content_encoding);
      return -1;
    }
  sip->message_property = 2;
  osip_list_add (sip->content_encodings, content_encoding, -1);
  return 0;
}
开发者ID:BackupTheBerlios,项目名称:sfsipua-svn,代码行数:25,代码来源:osip_content_encoding.c


示例3: osip_message_set_via

/* returns -1 on error. */
int
osip_message_set_via (osip_message_t * sip, const char *hvalue)
{
  osip_via_t *via;
  int i;

  if (hvalue == NULL || hvalue[0] == '\0')
    return 0;

  i = osip_via_init (&via);
  if (i != 0)
    return -1;
  i = osip_via_parse (via, hvalue);
  if (i != 0)
    {
      osip_via_free (via);
      return -1;
    }
  sip->message_property = 2;
  osip_list_add (sip->vias, via, -1);
  return 0;
}
开发者ID:samm-git,项目名称:e3372h-vendor-src,代码行数:23,代码来源:osip_via.c


示例4: osip_message_set_record_route

/* returns -1 on error. */
int
osip_message_set_record_route (osip_message_t * sip, const char *hvalue)
{
  osip_record_route_t *record_route;
  int i;

  if (hvalue == NULL || hvalue[0] == '\0')
    return 0;

  i = osip_record_route_init (&record_route);
  if (i != 0)
    return -1;
  i = osip_record_route_parse (record_route, hvalue);
  if (i != 0)
    {
      osip_record_route_free (record_route);
      return -1;
    }
  sip->message_property = 2;
  osip_list_add (sip->record_routes, record_route, -1);
  return 0;
}
开发者ID:BackupTheBerlios,项目名称:sfsipua-svn,代码行数:23,代码来源:osip_record_route.c


示例5: osip_message_set_error_info

int
osip_message_set_error_info (osip_message_t * sip, const char *hvalue)
{
  osip_error_info_t *error_info;
  int i;

  if (hvalue == NULL || hvalue[0] == '\0')
    return 0;

  i = osip_error_info_init (&error_info);
  if (i != 0)
    return -1;
  i = osip_error_info_parse (error_info, hvalue);
  if (i != 0)
    {
      osip_error_info_free (error_info);
      return -1;
    }
  sip->message_property = 2;
  osip_list_add (sip->error_infos, error_info, -1);
  return 0;
}
开发者ID:BackupTheBerlios,项目名称:sfsipua-svn,代码行数:22,代码来源:osip_error_info.c


示例6: osip_message_set_proxy_authenticate

/* returns -1 on error. */
int
osip_message_set_proxy_authenticate (osip_message_t * sip, const char *hvalue)
{
  osip_proxy_authenticate_t *proxy_authenticate;
  int i;

  if (hvalue == NULL || hvalue[0] == '\0')
    return 0;

  i = osip_proxy_authenticate_init (&(proxy_authenticate));
  if (i != 0)
    return -1;
  i = osip_proxy_authenticate_parse (proxy_authenticate, hvalue);
  if (i != 0)
    {
      osip_proxy_authenticate_free (proxy_authenticate);
      return -1;
    }
  sip->message_property = 2;
  osip_list_add (sip->proxy_authenticates, proxy_authenticate, -1);
  return 0;
}
开发者ID:samm-git,项目名称:e3372h-vendor-src,代码行数:23,代码来源:osip_proxy_authenticate.c


示例7: osip_message_set_allow

int
osip_message_set_allow (osip_message_t * sip, const char *hvalue)
{
  osip_allow_t *allow;
  int i;

  if (hvalue == NULL || hvalue[0] == '\0')
    return 0;

  i = osip_allow_init (&allow);
  if (i != 0)
    return -1;
  i = osip_allow_parse (allow, hvalue);
  if (i != 0)
    {
      osip_allow_free (allow);
      return -1;
    }
  sip->message_property = 2;
  osip_list_add (&sip->allows, allow, -1);
  return 0;
}
开发者ID:gabrieldelsaint,项目名称:UIM,代码行数:22,代码来源:osip_allow.c


示例8: osip_message_set_call_info

int
osip_message_set_call_info (osip_message_t * sip, const char *hvalue)
{
  osip_call_info_t *call_info;
  int i;

  if (hvalue == NULL || hvalue[0] == '\0')
    return 0;

  i = osip_call_info_init (&call_info);
  if (i != 0)
    return -1;
  i = osip_call_info_parse (call_info, hvalue);
  if (i != 0)                   /* allocation failed */
    {
      osip_call_info_free (call_info);
      return -1;
    }
  sip->message_property = 2;
  osip_list_add (sip->call_infos, call_info, -1);
  return 0;
}
开发者ID:BackupTheBerlios,项目名称:sfsipua-svn,代码行数:22,代码来源:osip_call_info.c


示例9: osip_message_set_accept_language

int
osip_message_set_accept_language (osip_message_t * sip, const char *hvalue)
{
  osip_accept_language_t *accept_language;
  int i;

  if (hvalue == NULL || hvalue[0] == '\0')
    return 0;

  i = osip_accept_language_init (&accept_language);
  if (i != 0)
    return -1;
  i = osip_accept_language_parse (accept_language, hvalue);
  if (i != 0)
    {
      osip_accept_language_free (accept_language);
      return -1;
    }
  sip->message_property = 2;
  osip_list_add (sip->accept_languages, accept_language, -1);
  return 0;
}
开发者ID:samm-git,项目名称:e3372h-vendor-src,代码行数:22,代码来源:osip_accept_language.c


示例10: eXosip_options_send_request

int eXosip_options_send_request(struct eXosip_t *excontext, osip_message_t * options)
{
	osip_transaction_t *transaction;
	osip_event_t *sipevent;
	int i;

	i = _eXosip_transaction_init(excontext, &transaction, NICT, excontext->j_osip, options);
	if (i != 0) {
		osip_message_free(options);
		return i;
	}

	osip_list_add(&excontext->j_transactions, transaction, 0);

	sipevent = osip_new_outgoing_sipmessage(options);
	sipevent->transactionid = transaction->transactionid;

	osip_transaction_add_event(transaction, sipevent);

	_eXosip_wakeup(excontext);
	return OSIP_SUCCESS;
}
开发者ID:chinglen,项目名称:exosip2,代码行数:22,代码来源:eXoptions_api.c


示例11: osip_call_info_clone

int
osip_call_info_clone (const osip_call_info_t * ctt, osip_call_info_t ** dest)
{
  int i;
  osip_call_info_t *ct;

  *dest = NULL;
  if (ctt == NULL)
    return -1;
  if (ctt->element == NULL)
    return -1;

  i = osip_call_info_init (&ct);
  if (i != 0)                   /* allocation failed */
    return -1;
  ct->element = osip_strdup (ctt->element);

  {
    int pos = 0;
    osip_generic_param_t *u_param;
    osip_generic_param_t *dest_param;

    while (!osip_list_eol (ctt->gen_params, pos))
      {
        u_param = (osip_generic_param_t *) osip_list_get (ctt->gen_params, pos);
        i = osip_generic_param_clone (u_param, &dest_param);
        if (i != 0)
          {
            osip_call_info_free (ct);
            return -1;
          }
        osip_list_add (ct->gen_params, dest_param, -1);
        pos++;
      }
  }
  *dest = ct;
  return 0;
}
开发者ID:BackupTheBerlios,项目名称:sfsipua-svn,代码行数:38,代码来源:osip_call_info.c


示例12: osip_message_set_header

/* returns -1 on error. */
int
osip_message_set_header (osip_message_t * sip, const char *hname,
                         const char *hvalue)
{
  osip_header_t *h;
  int i;

  if (sip == NULL || hname == NULL)
    return OSIP_BADPARAMETER;

  i = osip_header_init (&h);
  if (i != 0)
    return i;

  h->hname = (char *) osip_malloc (strlen (hname) + 1);

  if (h->hname == NULL)
    {
      osip_header_free (h);
      return OSIP_NOMEM;
    }
  osip_clrncpy (h->hname, hname, strlen (hname));

  if (hvalue != NULL)
    {                           /* some headers can be null ("subject:") */
      h->hvalue = (char *) osip_malloc (strlen (hvalue) + 1);
      if (h->hvalue == NULL)
        {
          osip_header_free (h);
          return OSIP_NOMEM;
        }
      osip_clrncpy (h->hvalue, hvalue, strlen (hvalue));
  } else
    h->hvalue = NULL;
  sip->message_property = 2;
  osip_list_add (&sip->headers, h, -1);
  return OSIP_SUCCESS;                     /* ok */
}
开发者ID:LaughingAngus,项目名称:linphone-vs2008,代码行数:39,代码来源:osip_header.c


示例13: osip_message_set_authorization

/* returns -1 on error. */
int
osip_message_set_authorization (osip_message_t * sip, const char *hvalue)
{
  osip_authorization_t *authorization;
  int i;

  if (hvalue == NULL || hvalue[0] == '\0')
    return OSIP_SUCCESS;

  if (sip == NULL)
    return OSIP_BADPARAMETER;
  i = osip_authorization_init (&authorization);
  if (i != 0)
    return i;
  i = osip_authorization_parse (authorization, hvalue);
  if (i != 0) {
    osip_authorization_free (authorization);
    return i;
  }
  sip->message_property = 2;
  osip_list_add (&sip->authorizations, authorization, -1);
  return OSIP_SUCCESS;
}
开发者ID:Distrotech,项目名称:libosip2,代码行数:24,代码来源:osip_authorization.c


示例14: osip_message_set_www_authenticate

/* returns -1 on error. */
int
osip_message_set_www_authenticate (osip_message_t * sip, const char *hvalue)
{
  osip_www_authenticate_t *www_authenticate;
  int i;

  if (hvalue == NULL || hvalue[0] == '\0')
    return OSIP_SUCCESS;

  if (sip == NULL)
    return OSIP_BADPARAMETER;
  i = osip_www_authenticate_init (&www_authenticate);
  if (i != 0)
    return i;
  i = osip_www_authenticate_parse (www_authenticate, hvalue);
  if (i != 0) {
    osip_www_authenticate_free (www_authenticate);
    return i;
  }
  sip->message_property = 2;
  osip_list_add (&sip->www_authenticates, www_authenticate, -1);
  return OSIP_SUCCESS;
}
开发者ID:Distrotech,项目名称:libosip2,代码行数:24,代码来源:osip_www_authenticate.c


示例15: osip_accept_encoding_clone

int
osip_accept_encoding_clone (const osip_accept_encoding_t * ctt, osip_accept_encoding_t ** dest)
{
  int i;
  osip_accept_encoding_t *ct;

  *dest = NULL;
  if (ctt == NULL)
    return OSIP_BADPARAMETER;
  if (ctt->element == NULL)
    return OSIP_BADPARAMETER;

  i = osip_accept_encoding_init (&ct);
  if (i != 0)                   /* allocation failed */
    return i;
  ct->element = osip_strdup (ctt->element);
  if (ct->element == NULL) {
    osip_accept_encoding_free (ct);
    return OSIP_NOMEM;
  }
  {
    osip_generic_param_t *dest_param;
    osip_list_iterator_t it;
    osip_generic_param_t *u_param = (osip_generic_param_t*) osip_list_get_first(&ctt->gen_params, &it);
    while (u_param != OSIP_SUCCESS) {
      i = osip_generic_param_clone (u_param, &dest_param);
      if (i != 0) {
        osip_accept_encoding_free (ct);
        return i;
      }
      osip_list_add (&ct->gen_params, dest_param, -1);
      u_param = (osip_generic_param_t *) osip_list_get_next(&it);
    }
  }
  *dest = ct;
  return OSIP_SUCCESS;
}
开发者ID:Christof0113,项目名称:rtsp-tools,代码行数:37,代码来源:osip_accept_encoding.c


示例16: osip_message_set_route

/* returns -1 on error. */
int osip_message_set_route(osip_message_t * sip, const char *hvalue)
{
	osip_route_t *route;
	int i;

	if (hvalue == NULL || hvalue[0] == '\0')
		return OSIP_SUCCESS;

#ifdef __VXWORKS_OS__
	i = osip_route_init2(&route);
#else
	i = osip_route_init(&route);
#endif
	if (i != 0)
		return i;
	i = osip_route_parse(route, hvalue);
	if (i != 0) {
		osip_route_free(route);
		return i;
	}
	sip->message_property = 2;
	osip_list_add(&sip->routes, route, -1);
	return OSIP_SUCCESS;
}
开发者ID:AirDev,项目名称:linphone-android,代码行数:25,代码来源:osip_route.c


示例17: osip_body_set_header

int
osip_body_set_header (osip_body_t * body, const char *hname,
		      const char *hvalue)
{
  osip_header_t *h;
  int i;

  if (body == NULL)
    return -1;
  if (hname == NULL)
    return -1;
  if (hvalue == NULL)
    return -1;

  i = osip_header_init (&h);
  if (i != 0)
    return -1;

  h->hname = osip_strdup (hname);
  h->hvalue = osip_strdup (hvalue);

  osip_list_add (body->headers, h, -1);
  return 0;
}
开发者ID:BackupTheBerlios,项目名称:wl530g-svn,代码行数:24,代码来源:osip_body.c


示例18: init_sip_msg_from_src

osip_message_t* init_sip_msg_from_src (const osip_message_t *sipmsg, const int code)
{
    __tri(init_sip_msg_from_src);

    if (sipmsg->to && sipmsg->from)
    {
       osip_message_t* sipgen;
       osip_message_init (&sipgen);

       if (sipgen)
       {
           sipgen->message = NULL;
           osip_message_set_version (sipgen, osip_strdup ("SIP/2.0"));
           osip_message_set_status_code (sipgen, code);
           osip_message_set_reason_phrase (sipgen,
                                   osip_strdup(osip_message_get_reason (code)));


           if (code == SIP_MOVED_TEMPORARILY)
           {
               char contact[100];
                snprintf (contact, sizeof(contact), "<sip:%[email protected]%s:%s>",
                          sipmsg->to->url->username, "sip.voipcheap.com", "5060");

                osip_message_set_contact(sipgen, contact);

                osip_to_clone   (sipmsg->to,   &sipgen->from);
                osip_from_clone (sipmsg->from, &sipgen->to);

           }
           else
           {
               /*include 1st contact header  if 3xx*/
               if (code < SIP_BAD_REQUEST && (SIP_OK == code || code >= SIP_MULTIPLE_CHOICES) )
               {
                   osip_contact_t* src_contact = NULL;
                   osip_message_get_contact(sipmsg, 0, &src_contact);

                   if (src_contact)
                   {
                       osip_contact_t* res_contact = NULL;
                       osip_contact_clone (src_contact, &res_contact);

                       if (res_contact)
                       {
                           osip_list_add(&(sipgen->contacts),res_contact,0);
                       }
                   }
               }

               osip_to_clone   (sipmsg->to,   &sipgen->to);
               osip_from_clone (sipmsg->from, &sipgen->from);
           }

           /* via headers */
           int pos = 0;
           while (!osip_list_eol (&sipmsg->vias, pos))
           {
               osip_via_t*via = (osip_via_t*)osip_list_get (&sipmsg->vias, pos);
               char *tmp;
               osip_via_to_str (via, &tmp);
               osip_message_set_via (sipgen, tmp);
               osip_free (tmp);
               pos++;
           }

           osip_call_id_clone (sipmsg->call_id, &sipgen->call_id);
           osip_cseq_clone    (sipmsg->cseq,    &sipgen->cseq);
           __tre(return) sipgen;
       }
   }
开发者ID:zakalibit,项目名称:siplexd,代码行数:71,代码来源:siputils.c


示例19: __nict_load_fsm

void
__nict_load_fsm ()
{
  transition_t *transition;

  nict_fsm = (osip_statemachine_t *) osip_malloc (sizeof (osip_statemachine_t));
  nict_fsm->transitions = (osip_list_t *) osip_malloc (sizeof (osip_list_t));
  osip_list_init (nict_fsm->transitions);

  /* to avoid race conditions between timers and first request */
  transition = (transition_t *) osip_malloc (sizeof (transition_t));
  transition->state = NICT_PRE_TRYING;
  transition->type = SND_REQUEST;
  transition->method = (void (*)(void *, void *)) &nict_snd_request;
  osip_list_add (nict_fsm->transitions, transition, -1);
  /*
     transition         = (transition_t *) osip_malloc(sizeof(transition_t));
     transition->state  = NICT_TRYING;
     transition->type   = SND_REQUEST;
     transition->method = (void(*)(void *,void *))&nict_snd_request;
     osip_list_add(nict_fsm->transitions,transition,-1);
   */
  transition = (transition_t *) osip_malloc (sizeof (transition_t));
  transition->state = NICT_TRYING;
  transition->type = TIMEOUT_F;
  transition->method = (void (*)(void *, void *)) &osip_nict_timeout_f_event;
  osip_list_add (nict_fsm->transitions, transition, -1);

  transition = (transition_t *) osip_malloc (sizeof (transition_t));
  transition->state = NICT_TRYING;
  transition->type = TIMEOUT_E;
  transition->method = (void (*)(void *, void *)) &osip_nict_timeout_e_event;
  osip_list_add (nict_fsm->transitions, transition, -1);

  transition = (transition_t *) osip_malloc (sizeof (transition_t));
  transition->state = NICT_TRYING;
  transition->type = RCV_STATUS_1XX;
  transition->method = (void (*)(void *, void *)) &nict_rcv_1xx;
  osip_list_add (nict_fsm->transitions, transition, -1);

  transition = (transition_t *) osip_malloc (sizeof (transition_t));
  transition->state = NICT_TRYING;
  transition->type = RCV_STATUS_2XX;
  transition->method = (void (*)(void *, void *)) &nict_rcv_23456xx;
  osip_list_add (nict_fsm->transitions, transition, -1);

  transition = (transition_t *) osip_malloc (sizeof (transition_t));
  transition->state = NICT_TRYING;
  transition->type = RCV_STATUS_3456XX;
  transition->method = (void (*)(void *, void *)) &nict_rcv_23456xx;
  osip_list_add (nict_fsm->transitions, transition, -1);

  transition = (transition_t *) osip_malloc (sizeof (transition_t));
  transition->state = NICT_PROCEEDING;
  transition->type = TIMEOUT_F;
  transition->method = (void (*)(void *, void *)) &osip_nict_timeout_f_event;
  osip_list_add (nict_fsm->transitions, transition, -1);

  transition = (transition_t *) osip_malloc (sizeof (transition_t));
  transition->state = NICT_PROCEEDING;
  transition->type = TIMEOUT_E;
  transition->method = (void (*)(void *, void *)) &osip_nict_timeout_e_event;
  osip_list_add (nict_fsm->transitions, transition, -1);

  transition = (transition_t *) osip_malloc (sizeof (transition_t));
  transition->state = NICT_PROCEEDING;
  transition->type = RCV_STATUS_1XX;
  transition->method = (void (*)(void *, void *)) &nict_rcv_1xx;
  osip_list_add (nict_fsm->transitions, transition, -1);

  transition = (transition_t *) osip_malloc (sizeof (transition_t));
  transition->state = NICT_PROCEEDING;
  transition->type = RCV_STATUS_2XX;
  transition->method = (void (*)(void *, void *)) &nict_rcv_23456xx;
  osip_list_add (nict_fsm->transitions, transition, -1);

  transition = (transition_t *) osip_malloc (sizeof (transition_t));
  transition->state = NICT_PROCEEDING;
  transition->type = RCV_STATUS_3456XX;
  transition->method = (void (*)(void *, void *)) &nict_rcv_23456xx;
  osip_list_add (nict_fsm->transitions, transition, -1);

  transition = (transition_t *) osip_malloc (sizeof (transition_t));
  transition->state = NICT_COMPLETED;
  transition->type = TIMEOUT_K;
  transition->method = (void (*)(void *, void *)) &osip_nict_timeout_k_event;
  osip_list_add (nict_fsm->transitions, transition, -1);

  /* these ccan be used to announce retransmission of 2xx and 3456xx
     For the state machine, it is completely useless...
     transition         = (transition_t *) osip_malloc(sizeof(transition_t));
     transition->state  = NICT_COMPLETED;
     transition->type   = RCV_STATUS_2XX;
     transition->method = (void(*)(void *,void *))&nict_rcv_23456xx2;
     osip_list_add(nict_fsm->transitions,transition,-1);

     transition         = (transition_t *) osip_malloc(sizeof(transition_t));
     transition->state  = NICT_COMPLETED;
     transition->type   = RCV_STATUS_3456XX;
     transition->method = (void(*)(void *,void *))&nict_rcv_23456xx2;
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:sfsipua-svn,代码行数:101,代码来源:nict_fsm.c


示例20: osip_message_init

//---------------------------------------------------------------------
int
Node::SndResponse4Query(int status,
						const char *contact,
						osip_transaction_t *tr,
						osip_message_t *request)
{
	char *message1;
	size_t length = 0;
	
	//
	osip_generic_param_t *tag;
	osip_message_t *response;
	osip_event_t *evt ;
	char *tmp;
	int pos;
	int i;

	i = osip_message_init (&response);
	if (i != 0)
		return -1;

	osip_message_set_version (response, osip_strdup ("SIP/2.0"));
	osip_message_set_status_code (response, status);

	tmp = osip_strdup(osip_message_get_reason (status));
	if (tmp == NULL)
		osip_message_set_reason_phrase (response, osip_strdup ("Unknown status code"));
	else
		osip_message_set_reason_phrase (response, tmp);

	osip_message_set_method (response, NULL);
	osip_message_set_uri (response, NULL);

	i = osip_to_clone (request->to, &(response->to));
	if (i != 0)
		goto si2perror1;

	i = osip_to_get_tag (response->to, &tag);
	if (i != 0)
    {	/* we only add a tag if it does not already contains one! */
		if (status == 200 && MSG_IS_REGISTER (request))
		{
			osip_to_set_tag (response->to, osip_to_tag_new_random ());
		}
		else if (status >= 200)
		{
			osip_to_set_tag (response->to, osip_to_tag_new_random ());
		}
    }

	i = osip_from_clone (request->from, &(response->from));
	if (i != 0)
		goto si2perror1;
	
	pos = 0;
	while (!osip_list_eol (request->vias, pos))
    {
		osip_via_t *via;
		osip_via_t *via2;

		via = (osip_via_t *) osip_list_get (request->vias, pos);
		i = osip_via_clone (via, &via2);
		if (i != -0)
			goto si2perror1;
		osip_list_add (response->vias, via2, -1);
		pos++;
    }

	i = osip_call_id_clone (request->call_id, &(response->call_id));
	if (i != 0)
		goto si2perror1;
	i = osip_cseq_clone (request->cseq, &(response->cseq));
	if (i != 0)
		goto si2perror1;

	//set server
	osip_message_set_server (response, osip_strdup ("SI2P"));

	/*add contact*/
	if(contact !=NULL)	
	osip_message_set_contact(response,contact);

	i = osip_message_to_str(response, &message1, &length);
	LogStream("SEND======================================>>\n") ;
	LogStream(message1) ;
	if(message1)	osip_free(message1) ;

	evt = osip_new_outgoing_sipmessage (response);
  	evt->transactionid = tr->transactionid;
	osip_transaction_add_event(tr, evt);

  	adosip->ThreadWakeUp();

	return 0;

si2perror1:
	osip_message_free (response);
	return -1;
}
开发者ID:inuyasha1027,项目名称:SI2P,代码行数:100,代码来源:Node.cpp



注:本文中的osip_list_add函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ osip_list_eol函数代码示例发布时间:2022-05-30
下一篇:
C++ osip_free函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap