summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-07-15 21:19:11 +0200
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-07-15 21:19:11 +0200
commit19e66aa85ac3cbc610ed2280064495ae66a7bdb2 (patch)
tree579b3e248319a6bc20156fc08c4d912eb47aaf42 /src
parent0619c7be158774e07cbc9a5c762ddf26f4d3d58c (diff)
account: optional param 'auth_pass' for password
example SIP account: <sip:username@domain.com>;auth_pass=XXXXXX ref. https://github.com/alfredh/baresip/issues/281
Diffstat (limited to 'src')
-rw-r--r--src/account.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/account.c b/src/account.c
index 1b2e468..96bea4e 100644
--- a/src/account.c
+++ b/src/account.c
@@ -394,6 +394,11 @@ int account_alloc(struct account **accp, const char *sipaddr)
if (err)
goto out;
}
+ else if (0 == msg_param_decode(&acc->laddr.params, "auth_pass", &pl)) {
+ err = pl_strdup(&acc->auth_pass, &pl);
+ if (err)
+ goto out;
+ }
err = stunsrv_decode(acc, &acc->laddr);
if (err)