summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-07-19 14:53:29 +0200
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-07-19 14:53:29 +0200
commitd3bd9b3e2248bb9e9922fb2b77cb12b03fcd603f (patch)
tree1f27148ca419711c0792d233dcd0b72240708958 /src
parent71165dad6c8b01577def7c7006f67edbc1984a12 (diff)
account: copy STUN password from auth_pass, if set
Diffstat (limited to 'src')
-rw-r--r--src/account.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/account.c b/src/account.c
index 96bea4e..8decb2e 100644
--- a/src/account.c
+++ b/src/account.c
@@ -112,8 +112,8 @@ static int stunsrv_decode(struct account *acc, const struct sip_addr *aor)
err |= param_dstr(&acc->stun_pass, &aor->params, "stunpass");
else if (pl_isset(&uri.password))
err |= pl_strdup(&acc->stun_pass, &uri.password);
- else
- err |= pl_strdup(&acc->stun_pass, &aor->uri.password);
+ else if (acc->auth_pass)
+ err |= str_dup(&acc->stun_pass, acc->auth_pass);
if (pl_isset(&uri.host))
err |= pl_strdup(&acc->stun_host, &uri.host);