Browse code

uac.reg_add

sznoname authored on 25/07/2022 03:03:44
Showing 2 changed files
... ...
@@ -1508,7 +1508,7 @@ event_route[uac:reply] {
1508 1508
 		</itemizedlist>
1509 1509
 		</para>
1510 1510
 		<para>
1511
-			Use a dot (.) if no value should be set for auth_password, auth_ha1,
1511
+			Use a dot (.) if no value should be set for realm, auth_password, auth_ha1, socket
1512 1512
 			or contact_addr.
1513 1513
 		</para>
1514 1514
 
... ...
@@ -2170,6 +2170,11 @@ static void rpc_uac_reg_add(rpc_t* rpc, void* ctx)
2170 2170
 		return;
2171 2171
 	}
2172 2172
 
2173
+	if(reg.realm.len==1 && reg.realm.s[0] == '.') {
2174
+		reg.realm.s = NULL;
2175
+		reg.realm.len = 0;
2176
+	}
2177
+
2173 2178
 	if(reg.auth_password.len==1 && reg.auth_password.s[0] == '.') {
2174 2179
 		reg.auth_password.s = NULL;
2175 2180
 		reg.auth_password.len = 0;
... ...
@@ -2180,6 +2185,11 @@ static void rpc_uac_reg_add(rpc_t* rpc, void* ctx)
2180 2185
 		reg.auth_ha1.len = 0;
2181 2186
 	}
2182 2187
 
2188
+	if(reg.socket.len==1 && reg.socket.s[0] == '.') {
2189
+		reg.socket.s = NULL;
2190
+		reg.socket.len = 0;
2191
+	}
2192
+
2183 2193
 	if(reg.contact_addr.len==1 && reg.contact_addr.s[0] == '.') {
2184 2194
 		reg.contact_addr = reg_contact_addr;
2185 2195
 	}