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:
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user