]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip: dont return early from registration if init auth fails
authorNick French <nickfrench@gmail.com>
Thu, 25 Feb 2021 02:51:55 +0000 (20:51 -0600)
committerJoshua Colp <jcolp@sangoma.com>
Tue, 2 Mar 2021 17:17:49 +0000 (11:17 -0600)
commitdedfb334bdd4726867721958517576a91f9e81f1
treeed912d7441b0105c3de5e28db0a14853184e35d0
parentd5e73d2121b80dbe8b381086f6c3fc1578dd9609
res_pjsip: dont return early from registration if init auth fails

If set_outbound_initial_authentication_credentials() fails,
handle_client_registration() bails early without creating or
sending a register message.

[set_outbound_initial_authentication_credentials() failures
can occur during the process of retrieving an oauth access
token.]

The return from handle_client_registration is ignored, so
returning an error doesn't do any good.

This is a real problem when the registration request is a
re-register, because then the registration will still be
marked 'active' despite the re-register never being sent at all.

So instead, log a warning but let the registration be created
and sent (and probably fail) and follow the normal registration
failed retry/abort logic.

ASTERISK-29315 #close

Change-Id: I2e03b1ea7fba1fa1a8279086aa4b17679e7fa7fa
res/res_pjsip_outbound_registration.c