printers: Check whether URI is valid while searching for printers
Fixes #679
This commit is contained in:
parent
bf8b8f52b7
commit
e497ad900d
1 changed files with 4 additions and 1 deletions
|
@ -1607,13 +1607,16 @@ search_address (const gchar *text,
|
|||
|
||||
if (text && text[0] != '\0')
|
||||
{
|
||||
g_autoptr(GSocketConnectable) conn;
|
||||
gchar *scheme = NULL;
|
||||
gchar *host = NULL;
|
||||
gint port;
|
||||
|
||||
parse_uri (text, &scheme, &host, &port);
|
||||
|
||||
if (host)
|
||||
conn = g_network_address_parse_uri (host, port, NULL);
|
||||
|
||||
if (host != NULL && conn != NULL)
|
||||
{
|
||||
THostSearchData *search_data;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue