Skip to content

Commit

Permalink
uac.reg_add
Browse files Browse the repository at this point in the history
  • Loading branch information
sznoname authored and henningw committed Aug 8, 2022
1 parent cd1bf83 commit a900fef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/uac/doc/uac_admin.xml
Expand Up @@ -1508,7 +1508,7 @@ event_route[uac:reply] {
</itemizedlist>
</para>
<para>
Use a dot (.) if no value should be set for auth_password, auth_ha1,
Use a dot (.) if no value should be set for realm, auth_password, auth_ha1, socket
or contact_addr.
</para>

Expand Down
10 changes: 10 additions & 0 deletions src/modules/uac/uac_reg.c
Expand Up @@ -2170,6 +2170,11 @@ static void rpc_uac_reg_add(rpc_t* rpc, void* ctx)
return;
}

if(reg.realm.len==1 && reg.realm.s[0] == '.') {
reg.realm.s = NULL;
reg.realm.len = 0;
}

if(reg.auth_password.len==1 && reg.auth_password.s[0] == '.') {
reg.auth_password.s = NULL;
reg.auth_password.len = 0;
Expand All @@ -2180,6 +2185,11 @@ static void rpc_uac_reg_add(rpc_t* rpc, void* ctx)
reg.auth_ha1.len = 0;
}

if(reg.socket.len==1 && reg.socket.s[0] == '.') {
reg.socket.s = NULL;
reg.socket.len = 0;
}

if(reg.contact_addr.len==1 && reg.contact_addr.s[0] == '.') {
reg.contact_addr = reg_contact_addr;
}
Expand Down

0 comments on commit a900fef

Please sign in to comment.