diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-12-29 00:13:10 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-12-29 00:13:10 +0000 |
commit | 2bc4a02f1f482398dff021ee249685a6b137ce4b (patch) | |
tree | 76611bfc3ae3d8121c1a8f4ef9098f54e6514c00 /pjsip/include | |
parent | ad51325cf945556abef358125f12b186382f8616 (diff) |
Fixed ticket #25: Authentication loops forever when server keeps rejecting request with stale=true
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@871 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsip/sip_auth.h | 1 | ||||
-rw-r--r-- | pjsip/include/pjsip/sip_config.h | 9 | ||||
-rw-r--r-- | pjsip/include/pjsip/sip_errno.h | 6 |
3 files changed, 16 insertions, 0 deletions
diff --git a/pjsip/include/pjsip/sip_auth.h b/pjsip/include/pjsip/sip_auth.h index 28e1c828..a3364edc 100644 --- a/pjsip/include/pjsip/sip_auth.h +++ b/pjsip/include/pjsip/sip_auth.h @@ -113,6 +113,7 @@ typedef struct pjsip_cached_auth pj_str_t realm; /**< Realm. */ pj_bool_t is_proxy; /**< Server type (401/407) */ pjsip_auth_qop_type qop_value; /**< qop required by server. */ + unsigned stale_cnt; /**< Number of stale retry. */ #if PJSIP_AUTH_QOP_SUPPORT pj_uint32_t nc; /**< Nonce count. */ pj_str_t cnonce; /**< Cnonce value. */ diff --git a/pjsip/include/pjsip/sip_config.h b/pjsip/include/pjsip/sip_config.h index 6cf04e86..e987b20c 100644 --- a/pjsip/include/pjsip/sip_config.h +++ b/pjsip/include/pjsip/sip_config.h @@ -409,6 +409,15 @@ /** + * Maximum number of stale retries when server keeps rejecting our request + * with stale=true. + */ +#ifndef PJSIP_MAX_STALE_COUNT +# define PJSIP_MAX_STALE_COUNT 3 +#endif + + +/** * @} */ diff --git a/pjsip/include/pjsip/sip_errno.h b/pjsip/include/pjsip/sip_errno.h index 03d21ec2..10b542c7 100644 --- a/pjsip/include/pjsip/sip_errno.h +++ b/pjsip/include/pjsip/sip_errno.h @@ -361,6 +361,12 @@ PJ_BEGIN_DECL * Invalid digest. */ #define PJSIP_EAUTHINVALIDDIGEST (PJSIP_ERRNO_START_PJSIP+110) /* 171110 */ +/** + * @hideinitializer + * Maximum number of stale retries exceeded. This happens when server + * keeps rejecting our authorization request with stale=true. + */ +#define PJSIP_EAUTHSTALECOUNT (PJSIP_ERRNO_START_PJSIP + 111) /* 171111 */ /************************************************************ |