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

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

?? osip.c

?? libosip2-3.0.3最新版本
?? C
?? 第 1 頁 / 共 4 頁
字號:
            {              transactions = &osip->osip_nist_transactions;#ifdef OSIP_MT              mut = nist_fastmutex;#endif            }      } else        {          if (0 == strcmp (evt->sip->cseq->method, "INVITE")              || 0 == strcmp (evt->sip->cseq->method, "ACK"))            {              transactions = &osip->osip_ict_transactions;#ifdef OSIP_MT              mut = ict_fastmutex;#endif          } else            {              transactions = &osip->osip_nict_transactions;#ifdef OSIP_MT              mut = nict_fastmutex;#endif            }        }    }  if (transactions == NULL)    return NULL;                /* not a message??? */#ifdef OSIP_MT  osip_mutex_lock (mut);#endif  transaction = osip_transaction_find (transactions, evt);  if (consume == 1)    {                           /* we add the event before releasing the mutex!! */      if (transaction != NULL)        {          osip_transaction_add_event (transaction, evt);#ifdef OSIP_MT          osip_mutex_unlock (mut);#endif          return transaction;        }    }#ifdef OSIP_MT  osip_mutex_unlock (mut);#endif  return transaction;}osip_transaction_t *osip_create_transaction (osip_t * osip, osip_event_t * evt){  osip_transaction_t *transaction;  int i;  osip_fsm_type_t ctx_type;  if (evt == NULL)    return NULL;  if (evt->sip == NULL)    return NULL;  /* make sure the request's method reflect the cseq value. */  if (MSG_IS_REQUEST (evt->sip))    {      /* delete request where cseq method does not match         the method in request-line */      if (evt->sip->cseq == NULL          || evt->sip->cseq->method == NULL || evt->sip->sip_method == NULL)        {          return NULL;        }      if (0 != strcmp (evt->sip->cseq->method, evt->sip->sip_method))        {          OSIP_TRACE (osip_trace                      (__FILE__, __LINE__, OSIP_WARNING, NULL,                       "core module: Discard invalid message with method!=cseq!\n"));          return NULL;        }    }  if (MSG_IS_ACK (evt->sip))    /* ACK never create transactions */    return NULL;  if (EVT_IS_INCOMINGREQ (evt))    {      /* we create a new context for this incoming request */      if (0 == strcmp (evt->sip->cseq->method, "INVITE"))        ctx_type = IST;      else        ctx_type = NIST;  } else if (EVT_IS_OUTGOINGREQ (evt))    {      if (0 == strcmp (evt->sip->cseq->method, "INVITE"))        ctx_type = ICT;      else        ctx_type = NICT;  } else    {      OSIP_TRACE (osip_trace                  (__FILE__, __LINE__, OSIP_ERROR, NULL,                   "Cannot build a transction for this message!\n"));      return NULL;    }  i = osip_transaction_init (&transaction, ctx_type, osip, evt->sip);  if (i == -1)    {      return NULL;    }  evt->transactionid = transaction->transactionid;  return transaction;}osip_transaction_t *osip_transaction_find (osip_list_t * transactions, osip_event_t * evt){  osip_list_iterator_t iterator;  osip_transaction_t *transaction;  osip_t *osip = NULL;  transaction =    (osip_transaction_t *) osip_list_get_first (transactions, &iterator);  if (transaction != NULL)    osip = (osip_t *) transaction->config;  if (osip == NULL)    return NULL;  if (EVT_IS_INCOMINGREQ (evt))    {#ifdef HAVE_DICT_DICT_H      /* search in hastable! */      osip_generic_param_t *b_request;      osip_via_t *topvia_request;      topvia_request = osip_list_get (evt->sip->vias, 0);      if (topvia_request == NULL)        {          OSIP_TRACE (osip_trace                      (__FILE__, __LINE__, OSIP_ERROR, NULL,                       "Remote UA is not compliant: missing a Via header!\n"));          return NULL;        }      osip_via_param_get_byname (topvia_request, "branch", &b_request);      if (b_request != NULL && b_request->gvalue != NULL)        {          if (MSG_IS_INVITE (evt->sip) || MSG_IS_ACK (evt->sip))            {              transaction =                (osip_transaction_t *) dict_search (osip->osip_ist_hastable,                                                    b_request->gvalue);              OSIP_TRACE (osip_trace                          (__FILE__, __LINE__, OSIP_INFO2, NULL,                           "Find matching Via header for INVITE(ACK) REQUEST!\n"));              if (transaction != NULL)                return transaction;          } else            {              transaction =                (osip_transaction_t *) dict_search (osip->osip_nist_hastable,                                                    b_request->gvalue);              OSIP_TRACE (osip_trace                          (__FILE__, __LINE__, OSIP_INFO2, NULL,                           "Find matching Via header for NON-INVITE REQUEST!\n"));              if (transaction != NULL)                return transaction;            }        }#endif      transaction =        (osip_transaction_t *) osip_list_get_first (transactions, &iterator);      while (osip_list_iterator_has_elem (iterator))        {          if (0 ==              __osip_transaction_matching_request_osip_to_xist_17_2_3              (transaction, evt->sip))            return transaction;          transaction = (osip_transaction_t *) osip_list_get_next (&iterator);        }  } else if (EVT_IS_INCOMINGRESP (evt))    {#ifdef HAVE_DICT_DICT_H      /* search in hastable! */      osip_generic_param_t *b_request;      osip_via_t *topvia_request;      topvia_request = osip_list_get (evt->sip->vias, 0);      if (topvia_request == NULL)        {          OSIP_TRACE (osip_trace                      (__FILE__, __LINE__, OSIP_ERROR, NULL,                       "Remote UA is not compliant: missing a Via header!\n"));          return NULL;        }      osip_via_param_get_byname (topvia_request, "branch", &b_request);      if (b_request != NULL && b_request->gvalue != NULL)        {          if (MSG_IS_RESPONSE_FOR (evt->sip, "INVITE"))            {              transaction =                (osip_transaction_t *) dict_search (osip->osip_ict_hastable,                                                    b_request->gvalue);              OSIP_TRACE (osip_trace                          (__FILE__, __LINE__, OSIP_INFO2, NULL,                           "Find matching Via header for INVITE ANSWER!\n"));              if (transaction != NULL)                return transaction;          } else            {              transaction =                (osip_transaction_t *) dict_search (osip->osip_nict_hastable,                                                    b_request->gvalue);              OSIP_TRACE (osip_trace                          (__FILE__, __LINE__, OSIP_INFO2, NULL,                           "Find matching Via header for NON-INVITE ANSWER!\n"));              if (transaction != NULL)                return transaction;            }        }#endif      transaction =        (osip_transaction_t *) osip_list_get_first (transactions, &iterator);      while (osip_list_iterator_has_elem (iterator))        {          if (0 ==              __osip_transaction_matching_response_osip_to_xict_17_1_3              (transaction, evt->sip))            return transaction;          transaction = (osip_transaction_t *) osip_list_get_next (&iterator);        }  } else                        /* handle OUTGOING message */    {                           /* THE TRANSACTION ID MUST BE SET */      transaction =        (osip_transaction_t *) osip_list_get_first (transactions, &iterator);      while (osip_list_iterator_has_elem (iterator))        {          if (transaction->transactionid == evt->transactionid)            return transaction;          transaction = (osip_transaction_t *) osip_list_get_next (&iterator);        }    }  return NULL;}static int ref_count = 0;#ifdef OSIP_MTstatic struct osip_mutex *ref_mutex = NULL;#endifstatic intincrease_ref_count (void){#ifdef OSIP_MT  if (ref_count == 0)    ref_mutex = osip_mutex_init ();  /* Here we should assert() that the mutex was really generated. */  osip_mutex_lock (ref_mutex);#endif  if (ref_count == 0)    __osip_global_init ();  ref_count++;#ifdef OSIP_MT  osip_mutex_unlock (ref_mutex);#endif  return 0;}static voiddecrease_ref_count (void){#ifdef OSIP_MT  osip_mutex_lock (ref_mutex);#endif  /* assert (ref_count > 0); */  ref_count--;  if (ref_count == 0)    {#ifdef OSIP_MT      osip_mutex_unlock (ref_mutex);      osip_mutex_destroy (ref_mutex);#endif      __osip_global_free ();      return;    }#ifdef OSIP_MT  osip_mutex_unlock (ref_mutex);#endif}intosip_init (osip_t ** osip){  if (increase_ref_count () != 0)    return -1;  *osip = (osip_t *) osip_malloc (sizeof (osip_t));  if (*osip == NULL)    return -1;                  /* allocation failed */  memset (*osip, 0, sizeof (osip_t));  osip_list_init (&(*osip)->osip_ict_transactions);  osip_list_init (&(*osip)->osip_ist_transactions);  osip_list_init (&(*osip)->osip_nict_transactions);  osip_list_init (&(*osip)->osip_nist_transactions);  osip_list_init (&(*osip)->ixt_retransmissions);#if defined(HAVE_DICT_DICT_H)  (*osip)->osip_ict_hastable = hashtable_dict_new ((dict_cmp_func) strcmp,                                                   (dict_hsh_func) s_hash,                                                   NULL, NULL, HSIZE);  (*osip)->osip_ist_hastable = hashtable_dict_new ((dict_cmp_func) strcmp,                                                   (dict_hsh_func) s_hash,                                                   NULL, NULL, HSIZE);  (*osip)->osip_nict_hastable = hashtable_dict_new ((dict_cmp_func) strcmp,                                                    (dict_hsh_func) s_hash,                                                    NULL, NULL, HSIZE);  (*osip)->osip_nist_hastable = hashtable_dict_new ((dict_cmp_func) strcmp,                                                    (dict_hsh_func) s_hash,                                                    NULL, NULL, HSIZE);#elif defined(HAVE_DICT_DICT_H_HASHTABLE)  (*osip)->osip_ict_hastable = rb_tree_new ((dict_cmp_func) strcmp, NULL, NULL);  (*osip)->osip_ist_hastable = rb_tree_new ((dict_cmp_func) strcmp, NULL, NULL);  (*osip)->osip_nict_hastable = rb_tree_new ((dict_cmp_func) strcmp, NULL, NULL);  (*osip)->osip_nist_hastable = rb_tree_new ((dict_cmp_func) strcmp, NULL, NULL);#endif  return 0;}voidosip_release (osip_t * osip){  osip_free (osip);  decrease_ref_count ();}voidosip_set_application_context (osip_t * osip, void *pointer){  osip->application_context = pointer;}void *osip_get_application_context (osip_t * osip){  if (osip == NULL)    return NULL;  return osip->application_context;}intosip_ict_execute (osip_t * osip){  osip_transaction_t *transaction;  osip_event_t *se;  int more_event;  osip_list_iterator_t iterator;  void **array;  int len;  int index = 0;  /* list must be copied because osip_transaction_execute() may change it */#ifdef OSIP_MT  osip_mutex_lock (ict_fastmutex);#endif  len = osip_list_size (&osip->osip_ict_transactions);  if (0 >= len)    {#ifdef OSIP_MT      osip_mutex_unlock (ict_fastmutex);#endif      return 0;    }  array = osip_malloc (sizeof (void *) * len);  if (array==NULL)    {#ifdef OSIP_MT      osip_mutex_unlock (ict_fastmutex);#endif      return 0;    }  transaction =    (osip_transaction_t *) osip_list_get_first (&osip->osip_ict_transactions,                                                &iterator);  while (osip_list_iterator_has_elem (iterator))    {      array[index++] = transaction;      transaction = (osip_transaction_t *) osip_list_get_next (&iterator);    }#ifdef OSIP_MT  osip_mutex_unlock (ict_fastmutex);#endif  for (index = 0; index < len; ++index)    {      transaction = (osip_transaction_t *) array[index];      more_event = 1;      do        {          se = (osip_event_t *) osip_fifo_tryget (transaction->transactionff);          if (se == NULL)       /* no more event for this transaction */            more_event = 0;          else            osip_transaction_execute (transaction, se);        }      while (more_event == 1);    }  osip_free (array);  return 0;}intosip_ist_execute (osip_t * osip){  osip_transaction_t *transaction;  osip_event_t *se;  int more_event;  osip_list_iterator_t iterator;  void **array;  int len;  int index = 0;  /* list must be copied because osip_transaction_execute() may change it */#ifdef OSIP_MT  osip_mutex_lock (ist_fastmutex);#endif  len = osip_list_size (&osip->osip_ist_transactions);  if (0 >= len)    {#ifdef OSIP_MT      osip_mutex_unlock (ist_fastmutex);#endif      return 0;    }  array = osip_malloc (sizeof (void *) * len);  if (array==NULL)    {#ifdef OSIP_MT      osip_mutex_unlock (ist_fastmutex);#endif      return 0;    }  transaction =    (osip_transaction_t *) osip_list_get_first (&osip->osip_ist_transactions,                                                &iterator);  while (osip_list_iterator_has_elem (iterator))    {      array[index++] = transaction;      transaction = (osip_transaction_t *) osip_list_get_next (&iterator);    }#ifdef OSIP_MT  osip_mutex_unlock (ist_fastmutex);#endif  for (index = 0; index < len; ++index)    {      transaction = (osip_transaction_t *) array[index];      more_event = 1;      do        {          se = (osip_event_t *) osip_fifo_tryget (transaction->transactionff);          if (se == NULL)       /* no more event for this transaction */            more_event = 0;          else            osip_transaction_execute (transaction, se);        }      while (more_event == 1);    }  osip_free (array);  return 0;}intosip_nict_execute (osip_t * osip){  osip_transaction_t *transaction;  osip_event_t *se;  int more_event;  osip_list_iterator_t iterator;  void **array;  int len;  int index = 0;  /* list must be copied because osip_transaction_execute() may change it */#ifdef OSIP_MT  osip_mutex_lock (nict_fastmutex);#endif  len = osip_list_size (&osip->osip_nict_transactions);  if (0 >= len)    {#ifdef OSIP_MT      osip_mutex_unlock (nict_fastmutex);#endif      return 0;    }  array = osip_malloc (sizeof (void *) * len);  if (array==NULL)    {#ifdef OSIP_MT      osip_mutex_unlock (nict_fastmutex);#endif      return 0;    }  transaction =    (osip_transaction_t *) osip_list_get_first (&osip->osip_nict_transactions,                                                &iterator);  while (osip_list_iterator_has_elem (iterator))    {      array[index++] = transaction;      transaction = (osip_transaction_t *) osip_list_get_next (&iterator);    }#ifdef OSIP_MT  osip_mutex_unlock (nict_fastmutex);#endif  for (index = 0; index < len; ++index)    {      transaction = (osip_transaction_t *) array[index];      more_event = 1;      do        {          se = (osip_event_t *) osip_fifo_tryget (transaction->transactionff);          if (se == NULL)       /* no more event for this transaction */            more_event = 0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91国偷自产一区二区三区观看| 波多野结衣亚洲| 色乱码一区二区三区88| 中文一区在线播放| 久久国产精品无码网站| 欧美精品三级日韩久久| 亚洲免费观看高清完整| 成人小视频免费观看| 久久久久久久久久电影| 激情图片小说一区| 欧美mv和日韩mv的网站| 热久久久久久久| 日韩久久精品一区| 蜜臀av性久久久久av蜜臀妖精| 91麻豆精品国产91久久久使用方法 | 国产精品影音先锋| 日韩午夜激情电影| 极品少妇一区二区三区精品视频| 日韩欧美国产综合一区| 国产一区视频在线看| 久久日韩粉嫩一区二区三区 | 51精品视频一区二区三区| 亚洲福中文字幕伊人影院| 欧美美女喷水视频| 天天综合色天天| 精品卡一卡二卡三卡四在线| 精东粉嫩av免费一区二区三区| 国产午夜精品理论片a级大结局| 国产精品香蕉一区二区三区| 中文字幕综合网| 欧美美女激情18p| 国产美女精品在线| 亚洲色图都市小说| 3751色影院一区二区三区| 国产呦精品一区二区三区网站| 日本一区二区综合亚洲| 色94色欧美sute亚洲线路二 | 亚洲精品高清在线观看| 欧美精品自拍偷拍| heyzo一本久久综合| 午夜精品免费在线| 亚洲国产精品二十页| 欧美日韩一区二区欧美激情| 国产乱码精品一区二区三区五月婷| 国产精品久久久久久久久果冻传媒| 欧美精品粉嫩高潮一区二区| 国产成人av一区二区三区在线 | 亚洲欧美视频在线观看视频| 制服丝袜激情欧洲亚洲| 97精品国产97久久久久久久久久久久| 亚洲福利视频三区| 国产精品超碰97尤物18| 26uuu亚洲| 日韩欧美成人午夜| 777xxx欧美| 在线观看成人小视频| 成人精品免费视频| 国产精品夜夜嗨| 久草这里只有精品视频| 午夜精品影院在线观看| 亚洲综合色成人| 亚洲美女屁股眼交| 一区二区三区在线视频观看 | 久久久精品一品道一区| 欧美电视剧免费观看| 日韩精品一区二区三区swag| 欧美一区二区三区免费在线看 | 色天天综合色天天久久| 成人激情午夜影院| 北条麻妃一区二区三区| 成a人片亚洲日本久久| 成人国产精品免费观看视频| 成人综合婷婷国产精品久久免费| 国产99精品视频| av在线一区二区| 色一区在线观看| 欧美国产精品一区| 欧美大片顶级少妇| 欧美在线免费视屏| 奇米一区二区三区av| 亚洲精选免费视频| 久久久久成人黄色影片| 亚洲欧美福利一区二区| 午夜欧美电影在线观看| 亚洲激情成人在线| 亚洲高清不卡在线| 男女男精品视频| 国产精品亚洲视频| 99久精品国产| 欧美酷刑日本凌虐凌虐| 精品久久久网站| 国产精品国产三级国产aⅴ中文| 亚洲欧美日韩系列| 美脚の诱脚舐め脚责91| 国产精品系列在线观看| av中文字幕亚洲| 99天天综合性| 制服丝袜av成人在线看| 国产欧美一区视频| 亚洲va欧美va人人爽| 国产一区二区三区四| 在线观看日韩精品| 精品1区2区在线观看| 亚洲一区影音先锋| 成人动漫一区二区三区| 日韩一区二区电影| 悠悠色在线精品| 成人性生交大片| 亚洲精品在线三区| 亚洲一二三区在线观看| 成人激情综合网站| 久久女同精品一区二区| 视频一区二区国产| 色婷婷精品大在线视频| 日本一二三不卡| 国产一区二区在线看| 欧美一区二区三区四区在线观看 | av电影天堂一区二区在线| 日韩欧美一级二级三级久久久| 最好看的中文字幕久久| 成人毛片在线观看| 国产视频一区二区三区在线观看| 久久9热精品视频| 日韩免费福利电影在线观看| 日韩不卡免费视频| 5月丁香婷婷综合| 日本不卡免费在线视频| 欧美老女人在线| 青青草视频一区| 日韩欧美国产三级| 国产综合色精品一区二区三区| 精品第一国产综合精品aⅴ| 日产精品久久久久久久性色| 欧美一激情一区二区三区| 美脚の诱脚舐め脚责91| 精品久久久久香蕉网| 国产成人自拍网| 亚洲激情在线播放| 欧美日韩二区三区| 久久精品国产精品青草| 久久久综合精品| 成人精品免费网站| 夜夜操天天操亚洲| 6080日韩午夜伦伦午夜伦| 国模娜娜一区二区三区| 国产精品午夜在线观看| 色老汉av一区二区三区| 日韩高清中文字幕一区| 久久久久久一级片| 成人高清免费观看| 一片黄亚洲嫩模| 久久久精品影视| 91国产福利在线| 久久99热狠狠色一区二区| 中文字幕一区二区三区色视频| 欧美在线三级电影| 国产精品中文欧美| 天天影视涩香欲综合网| 中文字幕不卡在线观看| 在线成人午夜影院| 97久久精品人人爽人人爽蜜臀| 日日摸夜夜添夜夜添亚洲女人| 国产精品免费久久| 精品欧美久久久| 欧美这里有精品| 9人人澡人人爽人人精品| 日韩av电影天堂| 一区二区三区中文免费| 国产日韩精品一区二区三区| 欧美电影在线免费观看| 欧美综合一区二区| 顶级嫩模精品视频在线看| 麻豆精品视频在线观看免费| 亚洲成人一二三| 亚洲精品欧美激情| 最新成人av在线| 国产精品美女久久久久aⅴ国产馆| 欧美刺激脚交jootjob| 91精品国产一区二区人妖| 欧美群妇大交群中文字幕| 在线观看日韩一区| 日本午夜精品一区二区三区电影| 亚洲精品一区二区三区蜜桃下载| 91在线精品秘密一区二区| 亚洲一区二区三区中文字幕在线| 一色桃子久久精品亚洲| 日韩欧美一区中文| 综合中文字幕亚洲| 国产欧美日韩一区二区三区在线观看| 精品国产制服丝袜高跟| 日韩欧美精品三级| 日韩欧美电影一二三| 欧美tickling网站挠脚心| 884aa四虎影成人精品一区| 欧美一区二区三区在线观看 | 日本成人在线网站| 天堂久久一区二区三区| 美女一区二区久久| 国产老妇另类xxxxx| 波多野结衣在线一区|