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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? osip.c

?? libosip2-3.0.3最新版本
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
/*  The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-)  Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Aymeric MOIZARD jack@atosc.org    This library is free software; you can redistribute it and/or  modify it under the terms of the GNU Lesser General Public  License as published by the Free Software Foundation; either  version 2.1 of the License, or (at your option) any later version.    This library is distributed in the hope that it will be useful,  but WITHOUT ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  Lesser General Public License for more details.    You should have received a copy of the GNU Lesser General Public  License along with this library; if not, write to the Free Software  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/#include <osip2/internal.h>#include <osip2/osip.h>#include "fsm.h"#include "xixt.h"#ifdef OSIP_MTstatic struct osip_mutex *ict_fastmutex;static struct osip_mutex *ist_fastmutex;static struct osip_mutex *nict_fastmutex;static struct osip_mutex *nist_fastmutex;#endif#include <osip2/osip_dialog.h>#ifdef OSIP_MTstatic struct osip_mutex *ixt_fastmutex;#endifstatic int __osip_global_init (void);static void __osip_global_free (void);static int increase_ref_count (void);static void decrease_ref_count (void);static int__osip_global_init (){  /* load the fsm configuration */#ifndef MINISIZE  __ict_load_fsm ();  __ist_load_fsm ();  __nict_load_fsm ();  __nist_load_fsm ();#endif  /* load the parser configuration */  parser_init ();#ifdef OSIP_MT  ict_fastmutex = osip_mutex_init ();  ist_fastmutex = osip_mutex_init ();  nict_fastmutex = osip_mutex_init ();  nist_fastmutex = osip_mutex_init ();  ixt_fastmutex = osip_mutex_init ();#endif  return 0;}static void__osip_global_free (){#ifndef MINISIZE  __ict_unload_fsm ();  __ist_unload_fsm ();  __nict_unload_fsm ();  __nist_unload_fsm ();#endif#ifdef OSIP_MT  osip_mutex_destroy (ict_fastmutex);  osip_mutex_destroy (ist_fastmutex);  osip_mutex_destroy (nict_fastmutex);  osip_mutex_destroy (nist_fastmutex);  osip_mutex_destroy (ixt_fastmutex);#endif}voidosip_response_get_destination (osip_message_t * response, char **address,                               int *portnum){  osip_via_t *via;  char *host = NULL;  int port = 0;  via = (osip_via_t *) osip_list_get (&response->vias, 0);  if (via)    {      osip_generic_param_t *maddr;      osip_generic_param_t *received;      osip_generic_param_t *rport;      osip_via_param_get_byname (via, "maddr", &maddr);      osip_via_param_get_byname (via, "received", &received);      osip_via_param_get_byname (via, "rport", &rport);      /* 1: user should not use the provided information         (host and port) if they are using a reliable         transport. Instead, they should use the already         open socket attached to this transaction. */      /* 2: check maddr and multicast usage */      if (maddr != NULL)        host = maddr->gvalue;      /* we should check if this is a multicast address and use         set the "ttl" in this case. (this must be done in the         UDP message (not at the SIP layer) */      else if (received != NULL)        host = received->gvalue;      else        host = via->host;      if (rport == NULL || rport->gvalue == NULL)        {          if (via->port != NULL)            port = osip_atoi (via->port);          else            port = 5060;      } else        port = osip_atoi (rport->gvalue);    }  *portnum = port;  if (host != NULL)    *address = osip_strdup (host);  else    *address = NULL;}intosip_ixt_lock (osip_t * osip){#ifdef OSIP_MT  return osip_mutex_lock (ixt_fastmutex);#else  return 0;#endif}intosip_ixt_unlock (osip_t * osip){#ifdef OSIP_MT  return osip_mutex_unlock (ixt_fastmutex);#else  return 0;#endif}/* these are for transactions that would need retransmission not handled by state machines */voidosip_add_ixt (osip_t * osip, ixt_t * ixt){  /* add in list osip_t->ixt */  osip_ixt_lock (osip);  osip_list_add (&osip->ixt_retransmissions, (void *) ixt, 0);  osip_ixt_unlock (osip);}voidosip_remove_ixt (osip_t * osip, ixt_t * ixt){  int i;  int found = 0;  ixt_t *tmp;  /* add in list osip_t->ixt */  osip_ixt_lock (osip);  for (i = 0; !osip_list_eol (&osip->ixt_retransmissions, i); i++)    {      tmp = (ixt_t *) osip_list_get (&osip->ixt_retransmissions, i);      if (tmp == ixt)        {          osip_list_remove (&osip->ixt_retransmissions, i);          found = 1;          break;        }    }  osip_ixt_unlock (osip);}intixt_init (ixt_t ** ixt){  ixt_t *pixt;  *ixt = pixt = (ixt_t *) osip_malloc (sizeof (ixt_t));  if (pixt == NULL)    return -1;  pixt->dialog = NULL;  pixt->msg2xx = NULL;  pixt->ack = NULL;  pixt->interval = DEFAULT_T1;  osip_gettimeofday(&pixt->start, NULL);  add_gettimeofday(&pixt->start, pixt->interval+10);  pixt->counter = 10;  pixt->dest = NULL;  pixt->port = 5060;  pixt->sock = -1;  return 0;}voidixt_free (ixt_t * ixt){  osip_message_free (ixt->ack);  osip_message_free (ixt->msg2xx);  osip_free (ixt->dest);  osip_free (ixt);}/* usefull for UAs */voidosip_start_200ok_retransmissions (osip_t * osip, osip_dialog_t * dialog,                                  osip_message_t * msg200ok, int sock){  ixt_t *ixt;  ixt_init (&ixt);  ixt->dialog = dialog;  osip_message_clone (msg200ok, &ixt->msg2xx);  ixt->sock = sock;  osip_response_get_destination (msg200ok, &ixt->dest, &ixt->port);  osip_add_ixt (osip, ixt);}voidosip_start_ack_retransmissions (osip_t * osip, osip_dialog_t * dialog,                                osip_message_t * ack, char *dest, int port,                                int sock){  int i;  ixt_t *ixt;  i = ixt_init (&ixt);  if (i != 0)    return;  ixt->dialog = dialog;  osip_message_clone (ack, &ixt->ack);  ixt->dest = osip_strdup (dest);  ixt->port = port;  ixt->sock = sock;  osip_add_ixt (osip, ixt);}/* we stop the 200ok when receiving the corresponding ack */struct osip_dialog *osip_stop_200ok_retransmissions (osip_t * osip, osip_message_t * ack){  osip_dialog_t *dialog = NULL;  int i;  ixt_t *ixt;  osip_ixt_lock (osip);  for (i = 0; !osip_list_eol (&osip->ixt_retransmissions, i); i++)    {      ixt = (ixt_t *) osip_list_get (&osip->ixt_retransmissions, i);      if (osip_dialog_match_as_uas (ixt->dialog, ack) == 0)        {          osip_list_remove (&osip->ixt_retransmissions, i);          dialog = ixt->dialog;          ixt_free (ixt);          break;        }    }  osip_ixt_unlock (osip);  return dialog;}/* when a dialog is destroyed by the application,   it is safer to remove all ixt that are related to it */voidosip_stop_retransmissions_from_dialog (osip_t * osip, osip_dialog_t * dialog){  int i;  ixt_t *ixt;  osip_ixt_lock (osip);  for (i = 0; !osip_list_eol (&osip->ixt_retransmissions, i); i++)    {      ixt = (ixt_t *) osip_list_get (&osip->ixt_retransmissions, i);      if (ixt->dialog == dialog)        {          osip_list_remove (&osip->ixt_retransmissions, i);          ixt_free (ixt);          i--;        }    }  osip_ixt_unlock (osip);}voidixt_retransmit (osip_t * osip, ixt_t * ixt, struct timeval *current){  if (osip_timercmp(current, &ixt->start, >))    {      ixt->interval = ixt->interval * 2;      if (ixt->interval > 4000)         ixt->interval = 4000;      add_gettimeofday (&ixt->start, ixt->interval);      if (ixt->ack != NULL)        osip->cb_send_message (NULL, ixt->ack, ixt->dest, ixt->port, ixt->sock);      else if (ixt->msg2xx != NULL)        osip->cb_send_message (NULL, ixt->msg2xx, ixt->dest, ixt->port, ixt->sock);      ixt->counter--;    }}voidosip_retransmissions_execute (osip_t * osip){  int i;  ixt_t *ixt;  struct timeval current;  osip_gettimeofday (&current, NULL);  osip_ixt_lock (osip);  for (i = 0; !osip_list_eol (&osip->ixt_retransmissions, i); i++)    {      ixt = (ixt_t *) osip_list_get (&osip->ixt_retransmissions, i);      ixt_retransmit (osip, ixt, &current);      if (ixt->counter == 0)        {          /* remove it */          osip_list_remove (&osip->ixt_retransmissions, i);          ixt_free (ixt);          i--;        }    }  osip_ixt_unlock (osip);}intosip_ict_lock (osip_t * osip){#ifdef OSIP_MT  return osip_mutex_lock (ict_fastmutex);#else  return 0;#endif}intosip_ict_unlock (osip_t * osip){#ifdef OSIP_MT  return osip_mutex_unlock (ict_fastmutex);#else  return 0;#endif}intosip_ist_lock (osip_t * osip){#ifdef OSIP_MT  return osip_mutex_lock (ist_fastmutex);#else  return 0;#endif}intosip_ist_unlock (osip_t * osip){#ifdef OSIP_MT  return osip_mutex_unlock (ist_fastmutex);#else  return 0;#endif}intosip_nict_lock (osip_t * osip){#ifdef OSIP_MT  return osip_mutex_lock (nict_fastmutex);#else  return 0;#endif}intosip_nict_unlock (osip_t * osip){#ifdef OSIP_MT  return osip_mutex_unlock (nict_fastmutex);#else  return 0;#endif}intosip_nist_lock (osip_t * osip){#ifdef OSIP_MT  return osip_mutex_lock (nist_fastmutex);#else  return 0;#endif}intosip_nist_unlock (osip_t * osip){#ifdef OSIP_MT  return osip_mutex_unlock (nist_fastmutex);#else  return 0;#endif}#if defined(HAVE_DICT_DICT_H)#define HSIZE           200unsigned s_hash (const unsigned char *p);unsigneds_hash (const unsigned char *p){  unsigned hash = 0;  while (*p)    {      hash *= 31;      hash ^= *p++;    }  return hash;}#endifint__osip_add_ict (osip_t * osip, osip_transaction_t * ict){#ifdef OSIP_MT  osip_mutex_lock (ict_fastmutex);#endif#if defined(HAVE_DICT_DICT_H)  {    osip_generic_param_t *b_request = NULL;    int rv = -99;    osip_via_param_get_byname (ict->topvia, "branch", &b_request);    if (b_request != NULL && b_request->gvalue != NULL)      rv = dict_insert (osip->osip_ict_hastable,                        b_request->gvalue, (void *) ict, FALSE);#if 0    else      rv = dict_insert (osip->osip_ict_hastable,                        b_request->gvalue, (void *) ict, FALSE);#endif    if (rv == 0)      {        OSIP_TRACE (osip_trace                    (__FILE__, __LINE__, OSIP_INFO1, NULL,                     "New key inserted in ict hastable `%s'\n",                     b_request->gvalue));    } else if (rv != -99)      {        OSIP_TRACE (osip_trace                    (__FILE__, __LINE__, OSIP_WARNING, NULL,                     "already inserted `%s'\n", b_request->gvalue));      }  }#endif  osip_list_add (&osip->osip_ict_transactions, ict, -1);#ifdef OSIP_MT  osip_mutex_unlock (ict_fastmutex);#endif  return 0;}int__osip_add_ist (osip_t * osip, osip_transaction_t * ist){#ifdef OSIP_MT  osip_mutex_lock (ist_fastmutex);#endif#if defined(HAVE_DICT_DICT_H)  {    osip_generic_param_t *b_request = NULL;    int rv = -99;    osip_via_param_get_byname (ist->topvia, "branch", &b_request);    if (b_request != NULL && b_request->gvalue != NULL)      rv = dict_insert (osip->osip_ist_hastable,                        b_request->gvalue, (void *) ist, FALSE);    else#if 0      rv = dict_insert (osip->osip_ist_hastable,                        b_request->gvalue, (void *) ist, FALSE);#endif    if (rv == 0)      {        OSIP_TRACE (osip_trace                    (__FILE__, __LINE__, OSIP_INFO1, NULL,                     "New key inserted in ist hastable `%s'\n",                     b_request->gvalue));    } else if (rv != -99)      {        OSIP_TRACE (osip_trace                    (__FILE__, __LINE__, OSIP_WARNING, NULL,                     "already inserted `%s'\n", b_request->gvalue));      }  }#endif  osip_list_add (&osip->osip_ist_transactions, ist, -1);#ifdef OSIP_MT  osip_mutex_unlock (ist_fastmutex);#endif  return 0;}int__osip_add_nict (osip_t * osip, osip_transaction_t * nict){#ifdef OSIP_MT  osip_mutex_lock (nict_fastmutex);#endif#if defined(HAVE_DICT_DICT_H)  {    osip_generic_param_t *b_request = NULL;    int rv = -99;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕免费在线观看视频一区| 欧美午夜电影网| 在线不卡欧美精品一区二区三区| 久久久久国产精品免费免费搜索| 亚洲国产精品自拍| zzijzzij亚洲日本少妇熟睡| 精品区一区二区| 亚洲综合激情小说| 97久久精品人人爽人人爽蜜臀| 精品卡一卡二卡三卡四在线| 亚洲国产精品影院| 色婷婷国产精品| 中文字幕一区二区三区精华液| 老鸭窝一区二区久久精品| 欧美性一二三区| 亚洲精品国产精华液| 成人av网址在线| 久久久久国产免费免费| 精品无码三级在线观看视频| 欧美高清激情brazzers| 亚洲夂夂婷婷色拍ww47| 91美女片黄在线观看91美女| 中文字幕第一区二区| 国产一区二区三区黄视频 | 国产91精品一区二区麻豆亚洲| 777xxx欧美| 五月婷婷久久综合| 欧美午夜精品电影| 一区二区视频免费在线观看| aa级大片欧美| 亚洲欧洲日韩女同| 99精品热视频| 国产精品乱码妇女bbbb| 国产精品一区二区三区99| 久久久久久一级片| 国产米奇在线777精品观看| 日韩精品一区二区三区四区视频| 日本强好片久久久久久aaa| 6080yy午夜一二三区久久| 性久久久久久久久久久久| 欧美精品粉嫩高潮一区二区| 三级成人在线视频| 337p亚洲精品色噜噜| 日本一不卡视频| 欧美一二三四在线| 久久99在线观看| 2019国产精品| 国产成人在线视频网站| 国产嫩草影院久久久久| yourporn久久国产精品| 亚洲精品视频自拍| 欧美吞精做爰啪啪高潮| 日韩 欧美一区二区三区| 欧美一区二区三区爱爱| 激情小说亚洲一区| 国产日韩综合av| caoporn国产一区二区| 亚洲欧美成人一区二区三区| 欧美亚洲国产一卡| 日韩国产欧美三级| 精品免费国产一区二区三区四区| 国产在线国偷精品免费看| 国产婷婷精品av在线| 91性感美女视频| 亚洲电影一级黄| 欧美成人福利视频| 国产成人啪免费观看软件| 国产精品久久久久国产精品日日| 91高清视频免费看| 免费在线观看一区| 国产午夜精品一区二区| 一本色道亚洲精品aⅴ| 天天操天天色综合| 久久久www免费人成精品| 91麻豆精东视频| 日日摸夜夜添夜夜添亚洲女人| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 91麻豆精品国产无毒不卡在线观看| 蜜臀久久99精品久久久久久9| 国产丝袜欧美中文另类| 欧美中文字幕久久| 美女视频黄久久| 国产精品对白交换视频| 欧美日韩国产片| 国产传媒日韩欧美成人| 亚洲一区二区三区自拍| 日韩免费观看高清完整版在线观看| 国产成人h网站| 亚洲1区2区3区视频| 久久精品人人做人人爽97| 欧美中文字幕久久| 国产精品一区二区在线看| 亚洲免费观看高清完整版在线观看 | 一区二区三区成人| 久久综合九色综合97_久久久| 一本久久a久久免费精品不卡| 美女精品自拍一二三四| 亚洲人成在线播放网站岛国 | 91碰在线视频| 久久99热狠狠色一区二区| 亚洲品质自拍视频| 精品日韩在线观看| 色综合天天综合网天天看片| 激情综合一区二区三区| 亚洲综合999| 中文字幕精品综合| 在线综合亚洲欧美在线视频| 99国产精品久| 国产精品自在欧美一区| 三级一区在线视频先锋 | 91麻豆精品国产91久久久资源速度| 丁香婷婷综合色啪| 免费一区二区视频| 亚洲黄网站在线观看| 国产欧美中文在线| 欧美一二三区在线| 欧美性受xxxx黑人xyx性爽| 成人97人人超碰人人99| 日本强好片久久久久久aaa| 一区二区三区日韩在线观看| 国产日韩欧美不卡在线| 欧美一区二区三区爱爱| 欧美中文字幕亚洲一区二区va在线 | 亚洲成人tv网| 亚洲啪啪综合av一区二区三区| 久久欧美一区二区| 欧美大胆一级视频| 欧美视频完全免费看| 色综合天天综合网国产成人综合天| 国产成人av一区二区| 另类专区欧美蜜桃臀第一页| 午夜精品久久久久| 亚洲另类在线一区| 国产精品乱码妇女bbbb| 国产欧美日韩亚州综合| 久久蜜桃av一区精品变态类天堂| 欧美一区二区福利视频| 欧美日韩在线三级| 91福利视频网站| 色婷婷一区二区三区四区| av一区二区三区在线| 懂色av噜噜一区二区三区av| 国产精品538一区二区在线| 国产中文一区二区三区| 国内外成人在线视频| 老鸭窝一区二区久久精品| 日韩成人午夜精品| 日韩精品高清不卡| 天天色图综合网| 丝袜美腿亚洲一区| 石原莉奈一区二区三区在线观看| 亚洲成va人在线观看| 亚洲亚洲精品在线观看| 亚洲一卡二卡三卡四卡| 亚洲线精品一区二区三区八戒| 一区二区三区色| 亚洲福利一区二区三区| 香蕉乱码成人久久天堂爱免费| 同产精品九九九| 丝袜脚交一区二区| 日本aⅴ精品一区二区三区 | 亚洲综合在线第一页| 依依成人精品视频| 一区二区国产盗摄色噜噜| 亚洲最色的网站| 亚洲大片精品永久免费| 日韩av中文在线观看| 美国十次了思思久久精品导航| 久久99国产精品久久99果冻传媒| 精品一区二区三区在线观看国产| 国产自产视频一区二区三区| 国产成人夜色高潮福利影视| 成人自拍视频在线| 99精品热视频| 欧美日韩一区小说| 日韩一区二区三| 久久久久久久久久久久久久久99 | 综合久久给合久久狠狠狠97色| 亚洲人成网站精品片在线观看| 亚洲综合一区二区精品导航| 偷偷要91色婷婷| 国产一区二区视频在线| 成人18视频日本| 欧美撒尿777hd撒尿| 日韩视频在线你懂得| 久久久久久久网| 亚洲人123区| 日韩专区一卡二卡| 国产在线视频一区二区| a在线欧美一区| 欧美日韩国产bt| 欧美精品一区二区三区很污很色的 | 一本久道中文字幕精品亚洲嫩 | 国产成人免费9x9x人网站视频| k8久久久一区二区三区 | 波多野结衣欧美| 欧美日韩三级在线| 久久日韩粉嫩一区二区三区 | 欧美不卡一区二区三区四区| 欧美激情资源网|