📄 osip.c
字号:
/* handle nict timers */ while (!list_eol (osip->nict_transactions, pos)) { sipevent_t *evt; tr = (transaction_t *) list_get (osip->nict_transactions, pos); evt = nict_need_timer_k_event (tr->nict_context, tr->state, tr->transactionid); if (evt != NULL) fifo_add (tr->transactionff, evt); else { evt = nict_need_timer_f_event (tr->nict_context, tr->state, tr->transactionid); if (evt != NULL) fifo_add (tr->transactionff, evt); else { evt = nict_need_timer_e_event (tr->nict_context, tr->state, tr->transactionid); if (evt != NULL) fifo_add (tr->transactionff, evt); } } pos++; }#ifdef OSIP_MT smutex_unlock (nict_fastmutex);#endif}voidosip_timers_nist_execute (osip_t * osip){ transaction_t *tr; int pos = 0;#ifdef OSIP_MT smutex_lock (nist_fastmutex);#endif /* handle nist timers */ while (!list_eol (osip->nist_transactions, pos)) { sipevent_t *evt; tr = (transaction_t *) list_get (osip->nist_transactions, pos); evt = nist_need_timer_j_event (tr->nist_context, tr->state, tr->transactionid); if (evt != NULL) fifo_add (tr->transactionff, evt); pos++; }#ifdef OSIP_MT smutex_unlock (nist_fastmutex);#endif}voidosip_setcb_send_message (osip_t * cf, int (*cb) (transaction_t *, sip_t *, char *, int, int)){ cf->cb_send_message = cb;}voidosip_setcb_ict_kill_transaction (osip_t * cf, void (*cb) (transaction_t *)){ cf->cb_ict_kill_transaction = cb;}voidosip_setcb_ict_invite_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ict_invite_sent = cb;}voidosip_setcb_ict_invite_sent2 (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ict_invite_sent2 = cb;}voidosip_setcb_ict_ack_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ict_ack_sent = cb;}voidosip_setcb_ict_ack_sent2 (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ict_ack_sent2 = cb;}voidosip_setcb_ict_1xx_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ict_1xx_received = cb;}voidosip_setcb_ict_2xx_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ict_2xx_received = cb;}voidosip_setcb_ict_2xx_received2 (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ict_2xx_received2 = cb;}voidosip_setcb_ict_3xx_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ict_3xx_received = cb;}voidosip_setcb_ict_4xx_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ict_4xx_received = cb;}voidosip_setcb_ict_5xx_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ict_5xx_received = cb;}voidosip_setcb_ict_6xx_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ict_6xx_received = cb;}voidosip_setcb_ict_3456xx_received2 (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ict_3456xx_received2 = cb;}voidosip_setcb_ict_transport_error (osip_t * cf, void (*cb) (transaction_t *, int error)){ cf->cb_ict_transport_error = cb;}/* callbacks for ist */voidosip_setcb_ist_kill_transaction (osip_t * cf, void (*cb) (transaction_t *)){ cf->cb_ist_kill_transaction = cb;}voidosip_setcb_ist_invite_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ist_invite_received = cb;}voidosip_setcb_ist_invite_received2 (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ist_invite_received2 = cb;}voidosip_setcb_ist_ack_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ist_ack_received = cb;}voidosip_setcb_ist_ack_received2 (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ist_ack_received2 = cb;}voidosip_setcb_ist_1xx_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ist_1xx_sent = cb;}voidosip_setcb_ist_2xx_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ist_2xx_sent = cb;}voidosip_setcb_ist_2xx_sent2 (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ist_2xx_sent2 = cb;}voidosip_setcb_ist_3xx_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ist_3xx_sent = cb;}voidosip_setcb_ist_4xx_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ist_4xx_sent = cb;}voidosip_setcb_ist_5xx_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ist_5xx_sent = cb;}voidosip_setcb_ist_6xx_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ist_6xx_sent = cb;}voidosip_setcb_ist_3456xx_sent2 (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_ist_3456xx_sent2 = cb;}voidosip_setcb_ist_transport_error (osip_t * cf, void (*cb) (transaction_t *, int error)){ cf->cb_ist_transport_error = cb;}/* callbacks for nict */voidosip_setcb_nict_kill_transaction (osip_t * cf, void (*cb) (transaction_t *)){ cf->cb_nict_kill_transaction = cb;}voidosip_setcb_nict_register_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_register_sent = cb;}voidosip_setcb_nict_bye_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_bye_sent = cb;}voidosip_setcb_nict_options_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_options_sent = cb;}voidosip_setcb_nict_info_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_info_sent = cb;}voidosip_setcb_nict_cancel_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_cancel_sent = cb;}voidosip_setcb_nict_notify_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_notify_sent = cb;}voidosip_setcb_nict_subscribe_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_subscribe_sent = cb;}voidosip_setcb_nict_unknown_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_unknown_sent = cb;}voidosip_setcb_nict_request_sent2 (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_request_sent2 = cb;}voidosip_setcb_nict_1xx_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_1xx_received = cb;}voidosip_setcb_nict_2xx_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_2xx_received = cb;}voidosip_setcb_nict_2xx_received2 (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_2xx_received2 = cb;}voidosip_setcb_nict_3xx_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_3xx_received = cb;}voidosip_setcb_nict_4xx_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_4xx_received = cb;}voidosip_setcb_nict_5xx_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_5xx_received = cb;}voidosip_setcb_nict_6xx_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_6xx_received = cb;}voidosip_setcb_nict_3456xx_received2 (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nict_3456xx_received2 = cb;}voidosip_setcb_nict_transport_error (osip_t * cf, void (*cb) (transaction_t *, int error)){ cf->cb_nict_transport_error = cb;} /* callbacks for nist */voidosip_setcb_nist_kill_transaction (osip_t * cf, void (*cb) (transaction_t *)){ cf->cb_nist_kill_transaction = cb;}voidosip_setcb_nist_register_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_register_received = cb;}voidosip_setcb_nist_bye_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_bye_received = cb;}voidosip_setcb_nist_options_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_options_received = cb;}voidosip_setcb_nist_info_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_info_received = cb;}voidosip_setcb_nist_cancel_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_cancel_received = cb;}voidosip_setcb_nist_notify_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_notify_received = cb;}voidosip_setcb_nist_subscribe_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_subscribe_received = cb;}voidosip_setcb_nist_unknown_received (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_unknown_received = cb;} /* ... TO BE ADDED: All known and used method extansions */voidosip_setcb_nist_request_received2 (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_request_received2 = cb;}voidosip_setcb_nist_1xx_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_1xx_sent = cb;}voidosip_setcb_nist_2xx_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_2xx_sent = cb;}voidosip_setcb_nist_2xx_sent2 (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_2xx_sent2 = cb;}voidosip_setcb_nist_3xx_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_3xx_sent = cb;}voidosip_setcb_nist_4xx_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_4xx_sent = cb;}voidosip_setcb_nist_5xx_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_5xx_sent = cb;}voidosip_setcb_nist_6xx_sent (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_6xx_sent = cb;}voidosip_setcb_nist_3456xx_sent2 (osip_t * cf, void (*cb) (transaction_t *, sip_t *)){ cf->cb_nist_3456xx_sent2 = cb;}voidosip_setcb_nist_transport_error (osip_t * cf, void (*cb) (transaction_t *, int error)){ cf->cb_nist_transport_error = cb;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -