diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-09-09 16:34:30 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-09-09 16:34:30 +0000 |
commit | 40cfcab19c02578df219e8ef2dd8a3c6d04b8799 (patch) | |
tree | 567c72c8f53800a9686d8801749214698aba8c7d | |
parent | c2d366f11b537de549e431a294cf0cb65f6572d6 (diff) |
Fixed authentication with qop: nc is not printed, and set nc length to 8 bytes (sipcenter proxy server complained about this). It's now working fine with or without qop. Default caching and auto_send still set to disabled.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@696 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip/src/pjsip/sip_auth_client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pjsip/src/pjsip/sip_auth_client.c b/pjsip/src/pjsip/sip_auth_client.c index 20e18710..112d45d6 100644 --- a/pjsip/src/pjsip/sip_auth_client.c +++ b/pjsip/src/pjsip/sip_auth_client.c @@ -228,7 +228,7 @@ static pj_status_t respond_digest( pj_pool_t *pool, */ cred->qop = pjsip_AUTH_STR; cred->nc.ptr = pj_pool_alloc(pool, 16); - pj_ansi_snprintf(cred->nc.ptr, 16, "%06u", nc); + cred->nc.slen = pj_ansi_snprintf(cred->nc.ptr, 16, "%08u", nc); if (cnonce && cnonce->slen) { pj_strdup(pool, &cred->cnonce, cnonce); @@ -588,7 +588,6 @@ PJ_DEF(pj_status_t) pjsip_auth_clt_init_req( pjsip_auth_clt_sess *sess, { const pjsip_method *method; pjsip_cached_auth *auth; - pj_status_t status; PJ_ASSERT_RETURN(sess && tdata, PJ_EINVAL); PJ_ASSERT_RETURN(sess->pool, PJSIP_ENOTINITIALIZED); @@ -640,6 +639,7 @@ PJ_DEF(pj_status_t) pjsip_auth_clt_init_req( pjsip_auth_clt_sess *sess, */ const pjsip_cred_info *cred; pjsip_authorization_hdr *hauth; + pj_status_t status; cred = auth_find_cred(sess, &auth->realm, &auth->last_chal->scheme); |