# HG changeset patch # User Senko Rasic # Date 1228036808 -3600 # Node ID daad23d59b56af061a5136f4ea189955bb8a5387 # Parent f84be3f7c7e056c0c96e06318c8b286d1eb98ee1 Don't check for sync dns problems when using asyncns [#33] lm_socket_create() checks for sync DNS failure, but the check is executed even if Loudmouth is using asyncns, in which case Loudmouth crashes. committer: Mikael Hallendal diff -r f84be3f7c7e0 -r daad23d59b56 loudmouth/lm-socket.c --- a/loudmouth/lm-socket.c Sun Nov 30 09:49:06 2008 +0100 +++ b/loudmouth/lm-socket.c Sun Nov 30 10:20:08 2008 +0100 @@ -1022,7 +1022,7 @@ if (socket->connect_func) { (socket->connect_func) (socket, FALSE, socket->user_data); } - g_free (socket->connect_data); + g_free (socket->connect_data); socket->connect_data = NULL; return; } @@ -1107,6 +1107,10 @@ _lm_socket_create_phase1 (socket, NULL, 0); } +#ifndef HAVE_ASYNCNS + /* Only do this check if we are not using asyncns or it will crash. + * Report and patch by Senko. + */ if (socket->connect_data == NULL) { /* Open failed synchronously, probably a DNS lookup problem */ lm_socket_unref(socket); @@ -1118,6 +1122,7 @@ return NULL; } +#endif /* HAVE_ASYNCNS */ /* If the connection fails synchronously, we don't want to call the