summaryrefslogtreecommitdiff
path: root/res/res_pjsip/pjsip_distributor.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2014-01-14 16:43:33 +0000
committerMark Michelson <mmichelson@digium.com>2014-01-14 16:43:33 +0000
commitaced8bdd2e5d210f024be602bf5a1e70555ecec4 (patch)
tree08378a96bacf86db73a249bf3e7866363e5d0e28 /res/res_pjsip/pjsip_distributor.c
parent9ec4d15c8e20aa010754980bd01dcc5abfa5801e (diff)
Fix erroneous behavior when sending auth rejection to artificial endpoint.
We were not including an authentication challenge when sending a 401 response to unmatched endpoints. This was due to the conversion to use a vector for authentication section names on an endpoint. The vector for artificial endpoints was empty, resulting in the challenge being sent back containing no challenges. This is worked around by placing a bogus value in the artificial endpoint's auth vector. This value is never looked up by anything, since they instead will directly call ast_sip_get_artificial_auth(). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip/pjsip_distributor.c')
-rw-r--r--res/res_pjsip/pjsip_distributor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/res/res_pjsip/pjsip_distributor.c b/res/res_pjsip/pjsip_distributor.c
index e59305ec5..5cc645cc3 100644
--- a/res/res_pjsip/pjsip_distributor.c
+++ b/res/res_pjsip/pjsip_distributor.c
@@ -228,6 +228,11 @@ static int create_artificial_endpoint(void)
}
AST_VECTOR_INIT(&artificial_endpoint->inbound_auths, 1);
+ /* Pushing a bogus value into the vector will ensure that
+ * the proper size of the vector is returned. This value is
+ * not actually used anywhere
+ */
+ AST_VECTOR_APPEND(&artificial_endpoint->inbound_auths, "artificial-auth");
return 0;
}