Fix the value of Device.Services.VoiceService.{i}.VoiceProfile.{i}.Line.{i}.SIP.URI parameter

This commit is contained in:
Amin Ben Ramdhane 2019-12-17 17:52:46 +01:00
parent 7b95853bdf
commit 6441cc6001

View file

@ -1929,7 +1929,7 @@ int get_line_sip_uri(char *refparam, struct dmctx *ctx, void *data, char *instan
dmuci_get_value_by_section_string(telargs->sip_section, "domain", &domain);
dmuci_get_value_by_section_string(telargs->sip_section, "user", &user);
if (user && domain)
if (user && user[0] != '\0' && domain && domain[0] != '\0')
dmasprintf(value, "%s@%s", user, domain); // MEM WILL BE FREED IN DMMEMCLEAN
else
*value = "";