亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jrequest.c

?? exosip
?? C
?? 第 1 頁 / 共 2 頁
字號:
  i =    generating_request_out_of_dialog (reg, "REGISTER", NULL, transport, from,                                      proxy);  if (i != 0)    return -1;  memset(locip, '\0', sizeof(locip));  eXosip_guess_ip_for_via (eXosip.eXtl->proto_family, locip, 49);  if (locip[0]=='\0')    {      OSIP_TRACE (osip_trace                  (__FILE__, __LINE__, OSIP_ERROR, NULL,                   "eXosip: no default interface defined\n"));      osip_message_free(*reg);      *reg=NULL;      return -1;    }  if (contact == NULL)    {      i = osip_from_init (&a_from);      if (i == 0)        i = osip_from_parse (a_from, from);      if (i == 0 && a_from != NULL          && a_from->url != NULL && a_from->url->username != NULL)        {	  int len = 50 + strlen (a_from->url->username);	  if (transport!=NULL && osip_strcasecmp(transport, "UDP")!=0)	    {	      len = len + strlen(transport) + 12; /* strlen(";transport=") */	    }	  if (jreg->r_line[0]!='\0')	    {	      len = len + strlen(jreg->r_line) + 12; /* strlen(";line=") */	    }	  contact = (char *) osip_malloc (len);          if (firewall_ip[0] != '\0')            {              char *c_address = (*reg)->req_uri->host;              struct addrinfo *addrinfo;              struct __eXosip_sockaddr addr;              i =                eXosip_get_addrinfo (&addrinfo, (*reg)->req_uri->host, 5060,                                     IPPROTO_UDP);              if (i == 0)                {                  memcpy (&addr, addrinfo->ai_addr, addrinfo->ai_addrlen);                  eXosip_freeaddrinfo (addrinfo);                  c_address = inet_ntoa (((struct sockaddr_in *) &addr)->sin_addr);                  OSIP_TRACE (osip_trace                              (__FILE__, __LINE__, OSIP_INFO1, NULL,                               "eXosip: here is the resolved destination host=%s\n",                               c_address));                }              if (eXosip_is_public_address (c_address))                {                  sprintf (contact, "<sip:%s@%s:%s>", a_from->url->username,                           firewall_ip,                           firewall_port);              } else                {                  sprintf (contact, "<sip:%s@%s:%s>", a_from->url->username,                           locip, firewall_port);                }          } else            {              sprintf (contact, "<sip:%s@%s:%s>", a_from->url->username,                       locip, firewall_port);            }	  	  if (transport!=NULL && osip_strcasecmp(transport, "UDP")!=0)	    {	      contact[strlen(contact)-1]='\0';	      strcat(contact, ";transport=");	      strcat(contact, transport);	      strcat(contact, ">");	    }	  if (jreg->r_line[0]!='\0')	    {	      contact[strlen(contact)-1]='\0';	      strcat(contact, ";line=");	      strcat(contact, jreg->r_line);	      strcat(contact, ">");	    }          osip_message_set_contact (*reg, contact);          osip_free (contact);        }      osip_from_free (a_from);  } else    {      osip_message_set_contact (*reg, contact);    }  {    char exp[10];               /* MUST never be ouside 1 and 3600 */    snprintf (exp, 9, "%i", expires);    osip_message_set_expires (*reg, exp);  }  osip_message_set_content_length (*reg, "0");  return 0;}#ifndef MINISIZEintgenerating_publish (osip_message_t ** message, const char *to,                    const char *from, const char *route){  int i;  if (to != NULL && *to == '\0')    return -1;  if (route != NULL && *route == '\0')    route = NULL;  i = generating_request_out_of_dialog (message, "PUBLISH", to, "UDP", from,                                        route);  if (i != 0)    return -1;  /* osip_message_set_organization(*message, "Jack's Org"); */  return 0;}#endifstatic intdialog_fill_route_set (osip_dialog_t * dialog, osip_message_t * request){  /* if the pre-existing route set contains a "lr" (compliance     with bis-08) then the req_uri should contains the remote target     URI */  int i;  int pos = 0;  osip_uri_param_t *lr_param;  osip_route_t *route;  char *last_route;  /* AMD bug: fixed 17/06/2002 */  route = (osip_route_t *) osip_list_get (&dialog->route_set, 0);  osip_uri_uparam_get_byname (route->url, "lr", &lr_param);  if (lr_param != NULL)         /* the remote target URI is the req_uri! */    {      i = osip_uri_clone (dialog->remote_contact_uri->url, &(request->req_uri));      if (i != 0)        return -1;      /* "[request] MUST includes a Route header field containing         the route set values in order." */      /* AMD bug: fixed 17/06/2002 */      pos = 0;                  /* first element is at index 0 */      while (!osip_list_eol (&dialog->route_set, pos))        {          osip_route_t *route2;          route = osip_list_get (&dialog->route_set, pos);          i = osip_route_clone (route, &route2);          if (i != 0)            return -1;          osip_list_add (&request->routes, route2, -1);          pos++;        }      return 0;    }  /* if the first URI of route set does not contain "lr", the req_uri     is set to the first uri of route set */  i = osip_uri_clone (route->url, &(request->req_uri));  if (i != 0)    return -1;  /* add the route set */  /* "The UAC MUST add a route header field containing     the remainder of the route set values in order. */  pos = 0;                      /* yes it is */  while (!osip_list_eol (&dialog->route_set, pos))       /* not the first one in the list */    {      osip_route_t *route2;      route = osip_list_get (&dialog->route_set, pos);      i = osip_route_clone (route, &route2);      if (i != 0)        return -1;      if (!osip_list_eol (&dialog->route_set, pos + 1))        osip_list_add (&request->routes, route2, -1);      else        osip_route_free (route2);      pos++;    }  /* The UAC MUST then place the remote target URI into     the route header field as the last value */  i = osip_uri_to_str (dialog->remote_contact_uri->url, &last_route);  if (i != 0)    return -1;  i = osip_message_set_route (request, last_route);  osip_free (last_route);  if (i != 0)    {      return -1;    }  /* route header and req_uri set */  return 0;}int_eXosip_build_request_within_dialog (osip_message_t ** dest,                                     const char *method,                                     osip_dialog_t * dialog, const char *transport){  int i;  osip_message_t *request;  char locip[65];  char firewall_ip[65];  char firewall_port[10];  *dest=NULL;  if (dialog==NULL)    return -1;  if (eXosip.eXtl==NULL)    return -1;  if (eXosip.eXtl->tl_get_masquerade_contact!=NULL)    {      eXosip.eXtl->tl_get_masquerade_contact(firewall_ip, sizeof(firewall_ip),					     firewall_port, sizeof(firewall_port));    }  i = osip_message_init (&request);  if (i != 0)    return -1;  if (dialog->remote_contact_uri == NULL)    {      /* this dialog is probably not established! or the remote UA         is not compliant with the latest RFC       */      osip_message_free (request);      return -1;    }  memset(locip, '\0', sizeof(locip));  eXosip_guess_ip_for_via (eXosip.eXtl->proto_family, locip, 49);  if (locip[0]=='\0')    {      OSIP_TRACE (osip_trace                  (__FILE__, __LINE__, OSIP_ERROR, NULL,                   "eXosip: no default interface defined\n"));      osip_message_free(request);      return -1;    }  /* prepare the request-line */  request->sip_method = osip_strdup (method);  request->sip_version = osip_strdup ("SIP/2.0");  request->status_code = 0;  request->reason_phrase = NULL;  /* and the request uri???? */  if (osip_list_eol (&dialog->route_set, 0))    {      /* The UAC must put the remote target URI (to field) in the req_uri */      i = osip_uri_clone (dialog->remote_contact_uri->url, &(request->req_uri));      if (i != 0)        goto grwd_error_1;  } else    {      /* fill the request-uri, and the route headers. */      dialog_fill_route_set (dialog, request);    }  /* To and From already contains the proper tag! */  i = osip_to_clone (dialog->remote_uri, &(request->to));  if (i != 0)    goto grwd_error_1;  i = osip_from_clone (dialog->local_uri, &(request->from));  if (i != 0)    goto grwd_error_1;  /* set the cseq and call_id header */  osip_message_set_call_id (request, dialog->call_id);  if (0 == strcmp ("ACK", method))    {      osip_cseq_t *cseq;      char *tmp;      i = osip_cseq_init (&cseq);      if (i != 0)        goto grwd_error_1;      tmp = osip_malloc (20);      sprintf (tmp, "%i", dialog->local_cseq);      osip_cseq_set_number (cseq, tmp);      osip_cseq_set_method (cseq, osip_strdup (method));      request->cseq = cseq;  } else    {      osip_cseq_t *cseq;      char *tmp;      i = osip_cseq_init (&cseq);      if (i != 0)        goto grwd_error_1;      dialog->local_cseq++;     /* we should we do that?? */      tmp = osip_malloc (20);      sprintf (tmp, "%i", dialog->local_cseq);      osip_cseq_set_number (cseq, tmp);      osip_cseq_set_method (cseq, osip_strdup (method));      request->cseq = cseq;    }  /* always add the Max-Forward header */  osip_message_set_max_forwards (request, "70"); /* a UA should start a request with 70 */  i = _eXosip_request_add_via(request, transport, locip);  if (i != 0)    goto grwd_error_1;  /* add specific headers for each kind of request... */  {    char contact[200];    if (firewall_ip[0] != '\0')      {        char *c_address = request->req_uri->host;        struct addrinfo *addrinfo;        struct __eXosip_sockaddr addr;        i =          eXosip_get_addrinfo (&addrinfo, request->req_uri->host, 5060,                               IPPROTO_UDP);        if (i == 0)          {            memcpy (&addr, addrinfo->ai_addr, addrinfo->ai_addrlen);            eXosip_freeaddrinfo (addrinfo);            c_address = inet_ntoa (((struct sockaddr_in *) &addr)->sin_addr);            OSIP_TRACE (osip_trace                        (__FILE__, __LINE__, OSIP_INFO1, NULL,                         "eXosip: here is the resolved destination host=%s\n",                         c_address));          }        if (eXosip_is_public_address (c_address))          {            sprintf (contact, "<sip:%s@%s:%s>",                     dialog->local_uri->url->username,                     firewall_ip, firewall_port);        } else          {            sprintf (contact, "<sip:%s@%s:%s>",                     dialog->local_uri->url->username, locip, firewall_port);          }    } else      {        sprintf (contact, "<sip:%s@%s:%s>", dialog->local_uri->url->username,                 locip, firewall_port);      }    osip_message_set_contact (request, contact);    /* Here we'll add the supported header if it's needed! */    /* the require header must be added by the upper layer if needed */  }  if (0 == strcmp ("NOTIFY", method))    {  } else if (0 == strcmp ("INFO", method))    {  } else if (0 == strcmp ("OPTIONS", method))    {      osip_message_set_accept (request, "application/sdp");  } else if (0 == strcmp ("ACK", method))    {      /* The ACK MUST contains the same credential than the INVITE!! */      /* TODO... */    }  osip_message_set_user_agent (request, eXosip.user_agent);  /*  else if ... */  *dest = request;  return 0;  /* grwd_error_2: */  dialog->local_cseq--;grwd_error_1:  osip_message_free (request);  *dest = NULL;  return -1;}/* this request is only build within a dialog!! */intgenerating_bye (osip_message_t ** bye, osip_dialog_t * dialog, char *transport){  int i;  i = _eXosip_build_request_within_dialog (bye, "BYE", dialog, transport);  if (i != 0)    return -1;  return 0;}/* It is RECOMMENDED to only cancel INVITE request */intgenerating_cancel (osip_message_t ** dest, osip_message_t * request_cancelled){  int i;  osip_message_t *request;  i = osip_message_init (&request);  if (i != 0)    return -1;  /* prepare the request-line */  osip_message_set_method (request, osip_strdup ("CANCEL"));  osip_message_set_version (request, osip_strdup ("SIP/2.0"));  osip_message_set_status_code (request, 0);  osip_message_set_reason_phrase (request, NULL);  i = osip_uri_clone (request_cancelled->req_uri, &(request->req_uri));  if (i != 0)    goto gc_error_1;  i = osip_to_clone (request_cancelled->to, &(request->to));  if (i != 0)    goto gc_error_1;  i = osip_from_clone (request_cancelled->from, &(request->from));  if (i != 0)    goto gc_error_1;  /* set the cseq and call_id header */  i = osip_call_id_clone (request_cancelled->call_id, &(request->call_id));  if (i != 0)    goto gc_error_1;  i = osip_cseq_clone (request_cancelled->cseq, &(request->cseq));  if (i != 0)    goto gc_error_1;  osip_free (request->cseq->method);  request->cseq->method = osip_strdup ("CANCEL");  /* copy ONLY the top most Via Field (this method is also used by proxy) */  {    osip_via_t *via;    osip_via_t *via2;    i = osip_message_get_via (request_cancelled, 0, &via);    if (i != 0)      goto gc_error_1;    i = osip_via_clone (via, &via2);    if (i != 0)      goto gc_error_1;    osip_list_add (&request->vias, via2, -1);  }  /* add the same route-set than in the previous request */  {    int pos = 0;    osip_route_t *route;    osip_route_t *route2;    while (!osip_list_eol (&request_cancelled->routes, pos))      {        route = (osip_route_t *) osip_list_get (&request_cancelled->routes, pos);        i = osip_route_clone (route, &route2);        if (i != 0)          goto gc_error_1;        osip_list_add (&request->routes, route2, -1);        pos++;      }  }  osip_message_set_max_forwards (request, "70");        /* a UA should start a request with 70 */  osip_message_set_user_agent (request, eXosip.user_agent);  *dest = request;  return 0;gc_error_1:  osip_message_free (request);  *dest = NULL;  return -1;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
奇米四色…亚洲| 亚洲第一福利视频在线| 国产盗摄女厕一区二区三区 | 97se亚洲国产综合在线| 国产精品电影一区二区三区| 91伊人久久大香线蕉| 亚洲六月丁香色婷婷综合久久| 在线观看日韩国产| 日韩va欧美va亚洲va久久| 精品黑人一区二区三区久久 | 不卡的电视剧免费网站有什么| 一区在线观看免费| 欧美日韩中文精品| 麻豆成人av在线| 国产精品短视频| 欧美男人的天堂一二区| 精品一区二区三区在线观看国产| 久久久精品2019中文字幕之3| 成人av网址在线| 亚洲一区自拍偷拍| 久久免费午夜影院| 色综合久久中文综合久久97| 视频一区免费在线观看| 国产女人18水真多18精品一级做| 色婷婷精品久久二区二区蜜臂av| 欧美bbbbb| 亚洲欧洲国产专区| 日韩一区二区免费电影| 成人午夜视频在线观看| 日韩在线一区二区三区| 欧美国产激情二区三区| 5566中文字幕一区二区电影| 成人av影院在线| 久久精品99国产精品| 亚洲精品久久久蜜桃| 久久伊人中文字幕| 7777精品伊人久久久大香线蕉完整版 | 石原莉奈一区二区三区在线观看| 国产性天天综合网| 在线播放欧美女士性生活| 成人av网站在线| 国产在线国偷精品免费看| 亚洲午夜激情av| 国产精品久久看| 精品国偷自产国产一区| 亚洲婷婷综合色高清在线| 欧美精品久久久久久久多人混战 | 久久精品国产精品亚洲红杏| 亚洲激情在线播放| 欧美精品一区二区三区在线 | 欧美一区二区三区在线| 色婷婷亚洲精品| av在线不卡网| 国产成人午夜99999| 久久www免费人成看片高清| 亚洲h动漫在线| 亚洲国产sm捆绑调教视频 | 久久一日本道色综合| 91精品国产综合久久蜜臀| 不卡av在线免费观看| 精品一区二区三区免费| 日韩电影免费在线| 日韩影院精彩在线| 亚洲永久免费视频| 一级特黄大欧美久久久| 悠悠色在线精品| 亚洲欧美日本韩国| 中文字幕一区二| 国产精品久久久久影院亚瑟 | 一区二区三区.www| 亚洲女同一区二区| 亚洲欧美日韩国产中文在线| 国产精品伦理一区二区| 中文字幕一区三区| 日韩久久一区二区| 亚洲人成精品久久久久久| 亚洲欧美精品午睡沙发| 日韩理论片在线| 亚洲一区在线播放| 水野朝阳av一区二区三区| 午夜精品久久久久久不卡8050| 亚洲国产毛片aaaaa无费看| 亚洲一区二区三区不卡国产欧美| 一区二区三区中文字幕| 亚洲一区在线电影| 日韩精品乱码av一区二区| 麻豆免费精品视频| 国产老妇另类xxxxx| 国产成人在线影院| 91毛片在线观看| 欧美日韩国产系列| 欧美精品一区二区三区蜜桃视频| 久久久久九九视频| 国产精品的网站| 亚洲www啪成人一区二区麻豆 | 亚洲一区免费观看| 秋霞午夜鲁丝一区二区老狼| 国产一区二区91| 99久精品国产| 6080午夜不卡| 中文字幕免费观看一区| 一区二区三区高清| 免费在线看成人av| 成人免费黄色大片| 欧美日本一道本| 国产欧美日韩另类一区| 亚洲激情成人在线| 免费人成在线不卡| 丰满亚洲少妇av| 欧美美女直播网站| 久久久精品免费免费| 亚洲综合另类小说| 国产一区二区精品久久| 欧美最新大片在线看| 久久久久九九视频| 亚洲国产中文字幕在线视频综合| 国内精品伊人久久久久av影院 | 韩国成人精品a∨在线观看| bt欧美亚洲午夜电影天堂| 欧美日韩大陆在线| 国产精品毛片久久久久久| 日日摸夜夜添夜夜添精品视频| 国产精品996| 3d成人动漫网站| 一区在线观看视频| 紧缚奴在线一区二区三区| 色又黄又爽网站www久久| 精品999在线播放| 亚洲国产精品久久艾草纯爱| 成人综合激情网| 日韩三级视频在线观看| 亚洲黄色小视频| 国产成人自拍网| 精品欧美一区二区三区精品久久 | 91麻豆精品国产自产在线观看一区| 国产日韩欧美麻豆| 免费观看久久久4p| 欧美三区在线视频| 亚洲欧洲精品一区二区三区 | 欧美揉bbbbb揉bbbbb| 国产精品视频第一区| 免费xxxx性欧美18vr| 欧美三级一区二区| 亚洲精品五月天| 粉嫩av一区二区三区| 欧美va亚洲va香蕉在线| 日韩专区在线视频| 欧美日本在线播放| 亚洲午夜三级在线| 欧美亚洲动漫精品| 亚洲激情av在线| 日本乱码高清不卡字幕| 国产精品久久毛片a| 国产99久久久国产精品潘金| 久久美女艺术照精彩视频福利播放 | 日韩欧美一区中文| 日韩精品五月天| 91精品国产黑色紧身裤美女| 亚洲成人动漫精品| 欧美日韩国产精品自在自线| 亚洲男女一区二区三区| 99re视频精品| 亚洲精品欧美激情| 欧美视频在线观看一区| 一区二区三区中文免费| 91福利视频网站| 亚洲电影在线播放| 欧美乱妇20p| 奇米精品一区二区三区在线观看一 | 欧美视频在线一区二区三区| 伊人色综合久久天天人手人婷| 99re热这里只有精品免费视频| 亚洲六月丁香色婷婷综合久久| 日本国产一区二区| 视频一区二区三区入口| 日韩欧美专区在线| 国产激情91久久精品导航| 欧美高清在线视频| 日本丶国产丶欧美色综合| 亚洲成a人v欧美综合天堂| 91麻豆精品国产综合久久久久久 | 欧美一卡二卡三卡| 国模无码大尺度一区二区三区| 久久久久久免费| 色婷婷久久久亚洲一区二区三区| 亚洲一区二区美女| 日韩一区二区电影| 国产a级毛片一区| 一区二区在线观看免费| 欧美日韩亚洲国产综合| 久久99精品久久久久婷婷| 欧美激情一区二区三区蜜桃视频| 成人国产精品视频| 午夜欧美一区二区三区在线播放 | 久久午夜老司机| 91在线视频免费91| 日本午夜精品一区二区三区电影| 国产亚洲污的网站| 色综合久久中文综合久久97 | 成人欧美一区二区三区1314|