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
}
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;
}