1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2025-01-05 19:15:32 +00:00

sip: origin: Add protocol prefix if missing

This commit is contained in:
Evangelos Ribeiro Tzaras 2021-07-17 14:55:18 +02:00
parent e95204b7bf
commit f5cd48bd99

View file

@ -287,7 +287,16 @@ dial (CallsOrigin *origin,
g_debug ("Calling `%s' from origin '%s'", address, name);
add_call (CALLS_SIP_ORIGIN (origin), address, FALSE, nh);
/* We don't require the user to input the prefix */
if (!g_str_has_prefix (address, "sip:") &&
!g_str_has_prefix (address, "sips:")) {
g_autofree char * address_prefix =
g_strconcat (self->protocol_prefix, ":", address, NULL);
add_call (CALLS_SIP_ORIGIN (origin), address_prefix, FALSE, nh);
} else {
add_call (CALLS_SIP_ORIGIN (origin), address, FALSE, nh);
}
}
static void