Module: kamailio
Branch: master
Commit: a900fef06bbb71c722f29edfde130d618a784174
URL:
https://github.com/kamailio/kamailio/commit/a900fef06bbb71c722f29edfde130d6…
Author: sznoname <342899761(a)qq.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-08-08T15:57:26+02:00
uac.reg_add
---
Modified: src/modules/uac/doc/uac_admin.xml
Modified: src/modules/uac/uac_reg.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a900fef06bbb71c722f29edfde130d6…
Patch:
https://github.com/kamailio/kamailio/commit/a900fef06bbb71c722f29edfde130d6…
---
diff --git a/src/modules/uac/doc/uac_admin.xml b/src/modules/uac/doc/uac_admin.xml
index a15fbbc90b2..2cdee2f66f7 100644
--- a/src/modules/uac/doc/uac_admin.xml
+++ b/src/modules/uac/doc/uac_admin.xml
@@ -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>
diff --git a/src/modules/uac/uac_reg.c b/src/modules/uac/uac_reg.c
index 85fe266c92c..02138101c07 100644
--- a/src/modules/uac/uac_reg.c
+++ b/src/modules/uac/uac_reg.c
@@ -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;
@@ -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;
}