diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-02-05 18:59:31 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-02-05 18:59:31 +0000 |
commit | 1ae33feae9a3f0af400b09dcfdf32a80fe97542c (patch) | |
tree | 0ea3df1ead2d7a81b655338a010e6b85ea42754a /pjsip/src/pjsip-ua/sip_reg.c | |
parent | 7a7a50ebbab0f58b354489e4f7cbedb73fabaa31 (diff) |
Fixed ticket #89: implement transaction timeout in REGISTER request (thanks Frank Wiersma for reporting the problem)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@932 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsip-ua/sip_reg.c')
-rw-r--r-- | pjsip/src/pjsip-ua/sip_reg.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pjsip/src/pjsip-ua/sip_reg.c b/pjsip/src/pjsip-ua/sip_reg.c index 45d2020c..9b6a68be 100644 --- a/pjsip/src/pjsip-ua/sip_reg.c +++ b/pjsip/src/pjsip-ua/sip_reg.c @@ -38,6 +38,12 @@ #define DELAY_BEFORE_REFRESH 5 #define THIS_FILE "sip_regc.c" +/* Outgoing transaction timeout when server sends 100 but never replies + * with final response. Value is in MILISECONDS! + */ +#define REGC_TSX_TIMEOUT 33000 + + /** * SIP client registration structure. */ @@ -742,7 +748,8 @@ PJ_DEF(pj_status_t) pjsip_regc_send(pjsip_regc *regc, pjsip_tx_data *tdata) */ regc->has_tsx = PJ_TRUE; ++regc->busy; - status = pjsip_endpt_send_request(regc->endpt, tdata, -1, regc, &tsx_callback); + status = pjsip_endpt_send_request(regc->endpt, tdata, REGC_TSX_TIMEOUT, + regc, &tsx_callback); if (status!=PJ_SUCCESS) { PJ_LOG(4,(THIS_FILE, "Error sending request, status=%d", status)); } |