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

C++ OSIP_TRACE函数代码示例

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

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



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

示例1: eXosip_message_build_answer

int
eXosip_message_build_answer (struct eXosip_t *excontext, int tid, int status, osip_message_t ** answer)
{
    osip_transaction_t *tr = NULL;
    int i;

    *answer = NULL;

    if (tid <= 0)
        return OSIP_BADPARAMETER;
    if (status < 200 || status > 699)
        return OSIP_BADPARAMETER;

    if (tid > 0) {
        _eXosip_transaction_find (excontext, tid, &tr);
    }
    if (tr == NULL) {
        OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL, "eXosip: No call here?\n"));
        return OSIP_NOTFOUND;
    }

    i = -1;
    if (status < 300)             /* 2xx answer */
        i = _eXosip_build_response_default (excontext, answer, NULL, status, tr->orig_request);
    else if (status > 300)        /* 3456xx answer */
        i = _eXosip_build_response_default (excontext, answer, NULL, status, tr->orig_request);

    if (i != 0)
        return i;
    return OSIP_SUCCESS;
}
开发者ID:qwerty258,项目名称:eXosip2-mirror-VS2013,代码行数:31,代码来源:eXmessage_api.c


示例2: osip_dialog_update_route_set_as_uas

int
osip_dialog_update_route_set_as_uas (osip_dialog_t * dialog, osip_message_t * invite)
{
    osip_contact_t *contact;
    int i;

    if (osip_list_eol (invite->contacts, 0))
    {
        OSIP_TRACE (osip_trace
                    (__FILE__, __LINE__, OSIP_WARNING, NULL,
                     "missing a contact in invite!\n"));
    }
    else
    {
        if (dialog->remote_contact_uri != NULL)
        {
            osip_contact_free (dialog->remote_contact_uri);
        }
        dialog->remote_contact_uri = NULL;
        contact = osip_list_get (invite->contacts, 0);
        i = osip_contact_clone (contact, &(dialog->remote_contact_uri));
        if (i != 0)
            return -1;
    }
    return 0;
}
开发者ID:smx-smx,项目名称:dsl-n55u,代码行数:26,代码来源:osip_dialog.c


示例3: osip_fifo_insert

int
osip_fifo_insert (osip_fifo_t * ff, void *el)
{
#ifdef OSIP_MT
  osip_mutex_lock (ff->qislocked);
#endif

  if (ff->state != osip_full)
    {
      /* ff->nb_elt++; */
      osip_list_add (&ff->queue, el, 0); /* insert at end of queue */
  } else
    {
      OSIP_TRACE (osip_trace
                  (__FILE__, __LINE__, OSIP_WARNING, NULL,
                   "too much traffic in fifo.\n"));
#ifdef OSIP_MT
      osip_mutex_unlock (ff->qislocked);
#endif
      return -1;                /* stack is full */
    }
  /* if (ff->nb_elt >= MAX_LEN) */
  if (osip_list_size (&ff->queue) >= MAX_LEN)
    ff->state = osip_full;
  else
    ff->state = osip_ok;

#ifdef OSIP_MT
  osip_sem_post (ff->qisempty);
  osip_mutex_unlock (ff->qislocked);
#endif
  return 0;
}
开发者ID:tws67,项目名称:bayonne-base-windows,代码行数:33,代码来源:port_fifo.c


示例4: _eXosip_default_gateway_with_getifaddrs

static int
_eXosip_default_gateway_with_getifaddrs(int type, char *address, int size)
{
	struct ifaddrs *ifp;

	struct ifaddrs *ifpstart;

	int ret = -1;

	if (getifaddrs(&ifpstart) < 0) {
		return OSIP_NO_NETWORK;
	}

	for (ifp = ifpstart; ifp != NULL; ifp = ifp->ifa_next) {
		if (ifp->ifa_addr && ifp->ifa_addr->sa_family == type
			&& (ifp->ifa_flags & IFF_RUNNING) && !(ifp->ifa_flags & IFF_LOOPBACK))
		{
			getnameinfo(ifp->ifa_addr,
						(type == AF_INET6) ?
						sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in),
						address, size, NULL, 0, NI_NUMERICHOST);
			if (strchr(address, '%') == NULL) {	/*avoid ipv6 link-local addresses */
				OSIP_TRACE(osip_trace
						   (__FILE__, __LINE__, OSIP_INFO2, NULL,
							"_eXosip_default_gateway_with_getifaddrs(): found %s\n",
							address));
				ret = 0;
				break;
			}
		}
	}
	freeifaddrs(ifpstart);
	return ret;
}
开发者ID:flybird119,项目名称:meetphone,代码行数:34,代码来源:eXutils.c


示例5: eXosip_message_send_answer

int
eXosip_message_send_answer (struct eXosip_t *excontext, int tid, int status, osip_message_t * answer)
{
    osip_transaction_t *tr = NULL;
    osip_event_t *evt_answer;
    int i = -1;

    if (tid <= 0)
        return OSIP_BADPARAMETER;
    if (status <= 100 || status > 699)
        return OSIP_BADPARAMETER;
    if (answer == NULL && status > 100 && status < 200)
        return OSIP_BADPARAMETER;

    if (tid > 0) {
        _eXosip_transaction_find (excontext, tid, &tr);
    }
    if (tr == NULL) {
        OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL, "eXosip: No MESSAGE transaction found\n"));
        osip_message_free (answer);
        return OSIP_NOTFOUND;
    }

    /* is the transaction already answered? */
    if (tr->state == NIST_COMPLETED || tr->state == NIST_TERMINATED) {
        OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL, "eXosip: transaction already answered\n"));
        osip_message_free (answer);
        return OSIP_WRONG_STATE;
    }

    if (answer == NULL) {
        i = -1;
        if (status > 199 && status < 300)
            i = _eXosip_build_response_default (excontext, &answer, NULL, status, tr->orig_request);
        else if (status > 300 && status <= 699)
            i = _eXosip_build_response_default (excontext, &answer, NULL, status, tr->orig_request);
        if (i != 0)
            return i;
    }

    evt_answer = osip_new_outgoing_sipmessage (answer);
    evt_answer->transactionid = tr->transactionid;

    osip_transaction_add_event (tr, evt_answer);
    _eXosip_wakeup (excontext);
    return OSIP_SUCCESS;
}
开发者ID:qwerty258,项目名称:eXosip2-mirror-VS2013,代码行数:47,代码来源:eXmessage_api.c


示例6: _eXosip_answer_invite_3456xx

int
_eXosip_answer_invite_3456xx (eXosip_call_t * jc, eXosip_dialog_t * jd,
                              int code, osip_message_t ** answer)
{
  int i;
  osip_transaction_t *tr;

  *answer = NULL;
  tr = eXosip_find_last_inc_invite (jc, jd);
  if (tr == NULL)
    {
      OSIP_TRACE (osip_trace
                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
                   "eXosip: cannot find transaction to answer"));
      return -1;
    }
  /* is the transaction already answered? */
  if (tr->state == IST_COMPLETED
      || tr->state == IST_CONFIRMED || tr->state == IST_TERMINATED)
    {
      OSIP_TRACE (osip_trace
                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
                   "eXosip: transaction already answered\n"));
      return -1;
    }

  i =
    _eXosip_build_response_default (answer, jd->d_dialog, code, tr->orig_request);
  if (i != 0)
    {
      OSIP_TRACE (osip_trace
                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
                   "ERROR: Could not create response for invite\n"));
      return -1;
    }

  if ((300 <= code) && (code <= 399))
    {
      /* Should add contact fields */
      /* ... */
    }

  osip_message_set_content_length (*answer, "0");
  /*  send message to transaction layer */

  return 0;
}
开发者ID:BackupTheBerlios,项目名称:sfsipua-svn,代码行数:47,代码来源:jresponse.c


示例7: eXosip_insubscription_send_request

int
eXosip_insubscription_send_request (int did, osip_message_t * request)
{
    eXosip_dialog_t *jd = NULL;
    eXosip_notify_t *jn = NULL;

    osip_transaction_t *transaction;
    osip_event_t *sipevent;
    int i;

    if (request == NULL)
        return -1;

    if (did > 0)
    {
        eXosip_notify_dialog_find (did, &jn, &jd);
    }
    if (jd == NULL || jn == NULL)
    {
        OSIP_TRACE (osip_trace
                    (__FILE__, __LINE__, OSIP_ERROR, NULL,
                     "eXosip: No incoming subscription here?\n"));
        osip_message_free (request);
        return -1;
    }

    transaction = NULL;
    transaction = eXosip_find_last_out_notify (jn, jd);
    if (transaction != NULL)
    {
        if (transaction->state != NICT_TERMINATED &&
                transaction->state != NIST_TERMINATED &&
                transaction->state != NICT_COMPLETED &&
                transaction->state != NIST_COMPLETED)
        {
            osip_message_free (request);
            return -1;
        }
        transaction = NULL;
    }

    i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, request);
    if (i != 0)
    {
        osip_message_free (request);
        return -1;
    }

    osip_list_add (jd->d_out_trs, transaction, 0);

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

    osip_transaction_set_your_instance (transaction,
                                        __eXosip_new_jinfo (NULL, jd, NULL, jn));
    osip_transaction_add_event (transaction, sipevent);
    __eXosip_wakeup ();
    return 0;
}
开发者ID:tibastral,项目名称:symphonie,代码行数:59,代码来源:eXinsubscription_api.c


示例8: eXosip_insubscription_build_request

int
eXosip_insubscription_build_request (int did, const char *method,
                                     osip_message_t ** request)
{
    eXosip_dialog_t *jd = NULL;
    eXosip_notify_t *jn = NULL;

    osip_transaction_t *transaction;
    char *transport;
    int i;

    *request = NULL;
    if (method == NULL || method[0] == '\0')
        return -1;

    if (did > 0)
    {
        eXosip_notify_dialog_find (did, &jn, &jd);
    }
    if (jd == NULL || jn == NULL)
    {
        OSIP_TRACE (osip_trace
                    (__FILE__, __LINE__, OSIP_ERROR, NULL,
                     "eXosip: No incoming subscription here?\n"));
        return -1;
    }

    transaction = NULL;
    transaction = eXosip_find_last_out_notify (jn, jd);
    if (transaction != NULL)
    {
        if (transaction->state != NICT_TERMINATED &&
                transaction->state != NIST_TERMINATED &&
                transaction->state != NICT_COMPLETED &&
                transaction->state != NIST_COMPLETED)
            return -1;
    }

    transport = NULL;
    if (transaction == NULL)
        transaction = jn->n_inc_tr;

    if (transaction != NULL && transaction->orig_request != NULL)
        transport = _eXosip_transport_protocol (transaction->orig_request);

    transaction = NULL;

    if (transport == NULL)
        i = _eXosip_build_request_within_dialog (request, method, jd->d_dialog, "UDP");
    else
        i =
            _eXosip_build_request_within_dialog (request, method, jd->d_dialog,
                    transport);
    if (i != 0)
        return -2;

    return 0;
}
开发者ID:tibastral,项目名称:symphonie,代码行数:58,代码来源:eXinsubscription_api.c


示例9: __osip_nict_init

int
__osip_nict_init (osip_nict_t ** nict, osip_t * osip, osip_message_t * request)
{
  osip_route_t *route;
  int i;

  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL, "allocating NICT context\n"));

  *nict = (osip_nict_t *) osip_malloc (sizeof (osip_nict_t));
  if (*nict == NULL)
    return OSIP_NOMEM;

  memset (*nict, 0, sizeof (osip_nict_t));
  /* for REQUEST retransmissions */
  {
    osip_via_t *via;
    char *proto;

    i = osip_message_get_via (request, 0, &via);        /* get top via */
    if (i < 0) {
      osip_free (*nict);
      *nict = NULL;
      return i;
    }
    proto = via_get_protocol (via);
    if (proto == NULL) {
      osip_free (*nict);
      *nict = NULL;
      return OSIP_UNDEFINED_ERROR;
    }
#ifdef USE_BLOCKINGSOCKET
    if (osip_strcasecmp (proto, "TCP") != 0 && osip_strcasecmp (proto, "TLS") != 0 && osip_strcasecmp (proto, "SCTP") != 0) {
      (*nict)->timer_e_length = DEFAULT_T1;
      (*nict)->timer_k_length = DEFAULT_T4;
      (*nict)->timer_e_start.tv_sec = -1;
      (*nict)->timer_k_start.tv_sec = -1;       /* not started */
    }
    else {                      /* reliable protocol is used: */
      (*nict)->timer_e_length = -1;     /* E is not ACTIVE */
      (*nict)->timer_k_length = 0;      /* MUST do the transition immediatly */
      (*nict)->timer_e_start.tv_sec = -1;
      (*nict)->timer_k_start.tv_sec = -1;       /* not started */
    }
  }
#else
    if (osip_strcasecmp (proto, "TCP") != 0 && osip_strcasecmp (proto, "TLS") != 0 && osip_strcasecmp (proto, "SCTP") != 0) {
      (*nict)->timer_e_length = DEFAULT_T1;
      (*nict)->timer_k_length = DEFAULT_T4;
      (*nict)->timer_e_start.tv_sec = -1;
      (*nict)->timer_k_start.tv_sec = -1;       /* not started */
    }
    else {                      /* reliable protocol is used: */
      (*nict)->timer_e_length = DEFAULT_T1;
      (*nict)->timer_k_length = 0;      /* MUST do the transition immediatly */
      (*nict)->timer_e_start.tv_sec = -1;
      (*nict)->timer_k_start.tv_sec = -1;       /* not started */
    }
  }
开发者ID:CrazyBBer,项目名称:sip_stack,代码行数:58,代码来源:nict.c


示例10: eXosip_options_build_answer

int
eXosip_options_build_answer (int tid, int status, osip_message_t ** answer)
{
  osip_transaction_t *tr = NULL;
  int i = -1;

  *answer = NULL;
  if (tid > 0)
    {
      eXosip_transaction_find (tid, &tr);
    }
  if (tr == NULL)
    {
      OSIP_TRACE (osip_trace
                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
                   "eXosip: No call here?\n"));
      return -1;
    }
  if (status > 100 && status < 200)
    {
#if 0
      /* TODO: not implemented */
      i = _eXosip_build_response_default (response, NULL, code, tr->orig_request);
#endif
      OSIP_TRACE (osip_trace
                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
                   "eXosip: status code 1xx for options not implemented (use 200<status<=699)\n"));
      return -1;
  } else if (status > 199 && status < 300)
    {
      i = _eXosip_build_response_default (answer, NULL, status, tr->orig_request);
  } else if (status > 300 && status <= 699)
    {
      i = _eXosip_build_response_default (answer, NULL, status, tr->orig_request);
  } else
    {
      OSIP_TRACE (osip_trace
                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
                   "eXosip: wrong status code (200<status<=699)\n"));
      return -1;
    }
  if (i != 0)
    return -1;
  return 0;
}
开发者ID:tibastral,项目名称:symphonie,代码行数:45,代码来源:eXoptions_api.c


示例11: __osip_ist_free

int
__osip_ist_free (osip_ist_t * ist)
{
  if (ist == NULL)
    return OSIP_SUCCESS;
  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL, "free ist resource\n"));
  osip_free (ist);
  return OSIP_SUCCESS;
}
开发者ID:Christof0113,项目名称:rtsp-tools,代码行数:9,代码来源:ist.c


示例12: _eXosip_insubscription_answer_3456xx

int
_eXosip_insubscription_answer_3456xx (eXosip_notify_t * jn,
                                      eXosip_dialog_t * jd, int code)
{
  osip_event_t *evt_answer;
  osip_message_t *response;
  int i;
  osip_transaction_t *tr;

  tr = eXosip_find_last_inc_subscribe (jn, jd);
  if (tr == NULL)
    {
      OSIP_TRACE (osip_trace
                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
                   "eXosip: cannot find transaction to answer"));
      return -1;
    }
  if (jd == NULL)
    i = _eXosip_build_response_default (&response, NULL, code, tr->orig_request);
  else
    i =
      _eXosip_build_response_default (&response, jd->d_dialog, code,
                                      tr->orig_request);
  if (i != 0)
    {
      OSIP_TRACE (osip_trace
                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
                   "ERROR: Could not create response for subscribe\n"));
      return -1;
    }

  if ((300 <= code) && (code <= 399))
    {
      /* Should add contact fields */
      /* ... */
    }

  evt_answer = osip_new_outgoing_sipmessage (response);
  evt_answer->transactionid = tr->transactionid;

  osip_transaction_add_event (tr, evt_answer);
  __eXosip_wakeup ();
  return 0;
}
开发者ID:BackupTheBerlios,项目名称:sfsipua-svn,代码行数:44,代码来源:jresponse.c


示例13: osip_dialog_update_route_set_as_uac

int
osip_dialog_update_route_set_as_uac (osip_dialog_t * dialog,
                                     osip_message_t * response)
{
  /* only the remote target URI is updated here... */
  osip_contact_t *contact;
  int i;

  if (dialog == NULL)
    return -1;
  if (response == NULL)
    return -1;

  if (osip_list_eol (&response->contacts, 0))
    {                           /* no contact header in response? */
      OSIP_TRACE (osip_trace
                  (__FILE__, __LINE__, OSIP_WARNING, NULL,
                   "missing a contact in response!\n"));
  } else
    {
      /* I personally think it's a bad idea to keep the old
         value in case the new one is broken... */
      if (dialog->remote_contact_uri != NULL)
        {
          osip_contact_free (dialog->remote_contact_uri);
        }
      dialog->remote_contact_uri = NULL;
      contact = osip_list_get (&response->contacts, 0);
      i = osip_contact_clone (contact, &(dialog->remote_contact_uri));
      if (i != 0)
        return -1;
    }

  if (dialog->state == DIALOG_EARLY && osip_list_size (&dialog->route_set) == 0)
    {                           /* update the route set */
      int pos = 0;

      while (!osip_list_eol (&response->record_routes, pos))
        {
          osip_record_route_t *rr;
          osip_record_route_t *rr2;

          rr =
            (osip_record_route_t *) osip_list_get (&response->record_routes, pos);
          i = osip_record_route_clone (rr, &rr2);
          if (i != 0)
            return -1;
          osip_list_add (&dialog->route_set, rr2, 0);
          pos++;
        }
    }

  if (MSG_IS_STATUS_2XX (response))
    dialog->state = DIALOG_CONFIRMED;
  return 0;
}
开发者ID:gabrieldelsaint,项目名称:UIM,代码行数:56,代码来源:osip_dialog.c


示例14: SendMsg

int SendMsg(osip_transaction_t *tr,osip_message_t *sip, char *host,int port, int out_socket)
{
	int len = 0;
	char *msgP;
	int msgLen;
	int i;
	int status;

	printf("SendMsg\n");

	if((i = osip_message_to_str(sip, &msgP, &msgLen)) != 0){
		OSIP_TRACE(osip_trace(__FILE__,__LINE__,OSIP_BUG,NULL,"failed to convert message\n"));
		return -1;
	}
	if(!networkMsgSend(sipSock,msgP,strlen(msgP),host,5080))
		OSIP_TRACE(osip_trace(__FILE__,__LINE__,OSIP_INFO1,NULL,"Time: Udp message sent: \n%s\n",msgP));

	return 0;
}
开发者ID:usamaaftab80,项目名称:multi-p2p,代码行数:19,代码来源:main.c


示例15: eXosip_subscribe_send_refresh_request

int
eXosip_subscribe_send_refresh_request (struct eXosip_t *excontext, int did, osip_message_t * sub)
{
  eXosip_dialog_t *jd = NULL;
  eXosip_subscribe_t *js = NULL;

  osip_transaction_t *transaction;
  osip_event_t *sipevent;
  int i;

  if (did <= 0)
    return OSIP_BADPARAMETER;

  if (did > 0) {
    _eXosip_subscribe_dialog_find (excontext, did, &js, &jd);
  }
  if (jd == NULL) {
    OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL, "eXosip: No subscribe here?\n"));
    osip_message_free (sub);
    return OSIP_NOTFOUND;
  }

  transaction = NULL;
  transaction = _eXosip_find_last_out_subscribe (js, jd);

  if (transaction != NULL) {
    if (transaction->state != NICT_TERMINATED && transaction->state != NIST_TERMINATED && transaction->state != NICT_COMPLETED && transaction->state != NIST_COMPLETED) {
      osip_message_free (sub);
      return OSIP_WRONG_STATE;
    }
    transaction = NULL;
  }

  transaction = NULL;
  i = _eXosip_transaction_init (excontext, &transaction, NICT, excontext->j_osip, sub);

  if (i != 0) {
    osip_message_free (sub);
    return i;
  }

  js->s_reg_period = 3600;
  _eXosip_subscribe_set_refresh_interval (js, sub);
  osip_list_add (jd->d_out_trs, transaction, 0);

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

  osip_transaction_set_reserved5 (transaction, js);
  osip_transaction_set_reserved3 (transaction, jd);

  osip_transaction_add_event (transaction, sipevent);
  _eXosip_wakeup (excontext);
  return OSIP_SUCCESS;
}
开发者ID:CrazyBBer,项目名称:sip_stack,代码行数:55,代码来源:eXsubscription_api.c


示例16: __osip_nist_free

int
__osip_nist_free (osip_nist_t * nist)
{
  if (nist == NULL)
    return -1;
  OSIP_TRACE (osip_trace
              (__FILE__, __LINE__, OSIP_INFO2, NULL, "free nist ressource\n"));

  osip_free (nist);
  return 0;
}
开发者ID:tws67,项目名称:bayonne-base-windows,代码行数:11,代码来源:nist.c


示例17: eXosip_remove_transaction_from_call

int
eXosip_remove_transaction_from_call (osip_transaction_t * tr, eXosip_call_t * jc)
{
  osip_transaction_t *inc_tr;
  osip_transaction_t *out_tr;
  eXosip_dialog_t *jd;
  int pos = 0;

  if (jc->c_inc_tr == tr)
    {
      jc->c_inc_tr = NULL;      /* can be NULL */
      return 0;
    }

  for (jd = jc->c_dialogs; jd != NULL; jd = jd->next)
    {
      pos = 0;
      while (!osip_list_eol (jd->d_inc_trs, pos))
        {
          inc_tr = osip_list_get (jd->d_inc_trs, pos);
          if (inc_tr == tr)
            {
              osip_list_remove (jd->d_inc_trs, pos);
              return 0;
            }
          pos++;
        }
    }

  if (jc->c_out_tr == tr)
    {
      jc->c_out_tr = NULL;      /* can be NULL */
      return 0;
    }

  for (jd = jc->c_dialogs; jd != NULL; jd = jd->next)
    {
      pos = 0;
      while (!osip_list_eol (jd->d_out_trs, pos))
        {
          out_tr = osip_list_get (jd->d_out_trs, pos);
          if (out_tr == tr)
            {
              osip_list_remove (jd->d_out_trs, pos);
              return 0;
            }
          pos++;
        }
    }

  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
                          "eXosip: No information.\n"));
  return -1;
}
开发者ID:tws67,项目名称:bayonne-base-windows,代码行数:54,代码来源:misc.c


示例18: find_next_crlfcrlf

int
find_next_crlfcrlf (char *start_of_part, char **end_of_part)
{
  char *start_of_line;
  char *end_of_line;
  int i;

  start_of_line = start_of_part;

  for (;;)
    {
      i = find_next_crlf (start_of_line, &end_of_line);
      if (i == -1)
	{			/* error case??? no end of mesage found */
	  OSIP_TRACE (osip_trace
		      (__FILE__, __LINE__, OSIP_ERROR, NULL,
		       "Final CRLF is missing\n"));
	  return -1;
	}
      if ('\0' == end_of_line[0])
	{			/* error case??? no end of message found */
	  OSIP_TRACE (osip_trace
		      (__FILE__, __LINE__, OSIP_ERROR, NULL,
		       "Final CRLF is missing\n"));
	  return -1;
	}
      else if ('\r' == end_of_line[0])
	{
	  if ('\n' == end_of_line[1])
	    end_of_line++;
	  *end_of_part = end_of_line + 1;
	  return 0;
	}
      else if ('\n' == end_of_line[0])
	{
	  *end_of_part = end_of_line + 1;
	  return 0;
	}
      start_of_line = end_of_line;
    }
}
开发者ID:BackupTheBerlios,项目名称:sfsipua-svn,代码行数:41,代码来源:msg_parser.c


示例19: __osip_message_startline_to_str

static int
__osip_message_startline_to_str (osip_message_t * sip, char **dest)
{

  if (sip->sip_method != NULL)
    return __osip_message_startline_to_strreq (sip, dest);
  if (sip->status_code != 0)
    return __osip_message_startline_to_strresp (sip, dest);

  OSIP_TRACE (osip_trace (__FILE__, __LINE__, TRACE_LEVEL1, NULL, "ERROR method has no value or status code is 0!\n"));
  return OSIP_BADPARAMETER;     /* should never come here */
}
开发者ID:benjaminlevine,项目名称:Huawei-HG633-Open-Source-Software-Package,代码行数:12,代码来源:osip_message_to_str.c


示例20: __osip_find_next_crlf

int __osip_find_next_crlf(const char *start_of_header, const char **end_of_header)
{
	const char *soh = start_of_header;

	*end_of_header = NULL;		/* AMD fix */

	while (('\r' != *soh) && ('\n' != *soh)) {
		if (*soh)
			soh++;
		else {
			OSIP_TRACE(osip_trace
					   (__FILE__, __LINE__, OSIP_ERROR, NULL,
						"Final CRLF is missing\n"));
			return OSIP_SYNTAXERROR;
		}
	}

	if (('\r' == soh[0]) && ('\n' == soh[1]))
		/* case 1: CRLF is the separator
		   case 2 or 3: CR or LF is the separator */
		soh = soh + 1;


	/* VERIFY if TMP is the end of header or LWS.            */
	/* LWS are extra SP, HT, CR and LF contained in headers. */
	if ((' ' == soh[1]) || ('\t' == soh[1])) {
		/* From now on, incoming message that potentially
		   contains LWS must be processed with
		   -> void osip_util_replace_all_lws(char *)
		   This is because the parser methods does not
		   support detection of LWS inside. */
		OSIP_TRACE(osip_trace
				   (__FILE__, __LINE__, OSIP_BUG, NULL,
					"Message that contains LWS must be processed with osip_util_replace_all_lws(char *tmp) before being parsed.\n"));
		return -2;
	}

	*end_of_header = soh + 1;
	return OSIP_SUCCESS;
}
开发者ID:AirDev,项目名称:linphone-android,代码行数:40,代码来源:osip_message_parse.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ OSInit函数代码示例发布时间:2022-05-30
下一篇:
C++ OSG_ASSERT函数代码示例发布时间: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