Skip to content

Instantly share code, notes, and snippets.

@alfredh
Created January 13, 2017 20:40
Show Gist options
  • Save alfredh/ab96b75b16a3c313770d9a85836388c9 to your computer and use it in GitHub Desktop.
Save alfredh/ab96b75b16a3c313770d9a85836388c9 to your computer and use it in GitHub Desktop.
diff --git a/src/account.c b/src/account.c
index 009fcf1..e8f03a9 100644
--- a/src/account.c
+++ b/src/account.c
@@ -92,12 +92,14 @@ static int stunsrv_decode(struct account *acc, const struct sip_addr *aor)
err = 0;
if (pl_isset(&uri.user))
- err |= pl_strdup(&acc->stun_user, &uri.user);
+ err |= re_sdprintf(&acc->stun_user, "%H",
+ uri_user_unescape, &uri.user);
else
err |= pl_strdup(&acc->stun_user, &aor->uri.user);
if (pl_isset(&uri.password))
- err |= pl_strdup(&acc->stun_pass, &uri.password);
+ err |= re_sdprintf(&acc->stun_pass, "%H",
+ uri_password_unescape, &uri.password);
else
err |= pl_strdup(&acc->stun_pass, &aor->uri.password);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment