* Fix netsplits generated when connection to a network is lost.
+ * Fix crash in on_transport_log when no error is set. (#219)
+
FEATURES
* Provide Python bindings for the main library code. Mainly used for
static void on_transport_log(struct irc_transport *transport, const struct irc_line *l, const GError *error)
{
struct irc_network *network = transport->userdata;
-
- network_log(LOG_WARNING, network, "Error while sending line '%s': %s",
- l->args[0], error->message);
+ const char *errmsg = (error == NULL)?"UNKNOWN":error->message;
+
+ if (l->argc == 0)
+ network_log(LOG_WARNING, network, "Error while sending empty line: %s",
+ errmsg);
+ else
+ network_log(LOG_WARNING, network, "Error while sending line '%s': %s",
+ l->args[0], errmsg);
}
static const struct irc_transport_callbacks network_callbacks = {