1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-11-17 16:05:36 +00:00

sip-origin: Honour set port when completing address

This makes sure to include the port when dialing the short form.

Fixes: #506
This commit is contained in:
Evangelos Ribeiro Tzaras 2022-10-06 12:07:46 +02:00
parent 563ceb770c
commit 9d63f8961c

View file

@ -361,10 +361,14 @@ dial (CallsOrigin *origin,
TAG_END ()); TAG_END ());
/* Make sure @host is in the dial target */ /* Make sure @host is in the dial target */
if (g_strstr_len (address, -1, "@")) if (g_strstr_len (address, -1, "@")) {
dial_target = g_strdup (address); dial_target = g_strdup (address);
else } else {
dial_target = g_strconcat (address, "@", self->host, NULL); if (self->port > 0)
dial_target = g_strconcat (address, "@", self->host, ":", self->port, NULL);
else
dial_target = g_strconcat (address, "@", self->host, NULL);
}
g_debug ("Calling `%s' from origin '%s'", address, name); g_debug ("Calling `%s' from origin '%s'", address, name);