From 687340a74c5c791f11590893a6ed909e98c860e7 Mon Sep 17 00:00:00 2001 From: Riza Sulistyo Date: Wed, 27 Jan 2016 05:42:20 +0000 Subject: Misc (Re #1882): When server sends blank realm on the Authentication challanges, the stack doesn't include the realm param. And hence, the server will reject the request. This patch will include the blank realm on the next request. Thanks to Keith Hanaway for the report. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5237 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsip/sip_auth_msg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pjsip/src') diff --git a/pjsip/src/pjsip/sip_auth_msg.c b/pjsip/src/pjsip/sip_auth_msg.c index 0f37fae2..fd42b697 100644 --- a/pjsip/src/pjsip/sip_auth_msg.c +++ b/pjsip/src/pjsip/sip_auth_msg.c @@ -71,7 +71,8 @@ static int print_digest_credential(pjsip_digest_credential *cred, char *buf, pj_ const pjsip_parser_const_t *pc = pjsip_parser_const(); copy_advance_pair_quote_cond(buf, "username=", 9, cred->username, '"', '"'); - copy_advance_pair_quote_cond(buf, ", realm=", 8, cred->realm, '"', '"'); + copy_advance_pair_quote_cond_always(buf, ", realm=", 8, cred->realm, '"', + '"'); copy_advance_pair_quote(buf, ", nonce=", 8, cred->nonce, '"', '"'); copy_advance_pair_quote_cond(buf, ", uri=", 6, cred->uri, '"', '"'); copy_advance_pair_quote(buf, ", response=", 11, cred->response, '"', '"'); -- cgit v1.2.3