Skip to content

Commit

Permalink
Add warning if OSP connection fails
Browse files Browse the repository at this point in the history
The osp_scanner_connect function will now log a warning message
containing the hostname or socket path.
  • Loading branch information
timopollmeier committed Jun 7, 2019
1 parent 3559900 commit c69e4bb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -49251,6 +49251,11 @@ osp_scanner_connect (scanner_t scanner)
}
connection = osp_connection_new (host, port, ca_pub, key_pub, key_priv);

if (port)
g_warning ("Could not connect to Scanner at %s:%d", host, port);
else
g_warning ("Could not connect to Scanner at %s", host);

g_free (host);
g_free (ca_pub);
g_free (key_pub);
Expand Down

0 comments on commit c69e4bb

Please sign in to comment.