From 2ef3506a22deb016055d66d2c036976028d948a1 Mon Sep 17 00:00:00 2001 From: Arnaud Cornet Date: Tue, 30 Dec 2008 11:12:52 +0100 Subject: [PATCH] Remove useless null check. Cycle server on early connection problem. --- src/connection.c | 2 -- src/irc.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/connection.c b/src/connection.c index c95c7a6..bfdec8b 100644 --- a/src/connection.c +++ b/src/connection.c @@ -897,8 +897,6 @@ static void create_socket(char *dsthostname, char *dstport, char *srchostname, cn->connected = CONN_ERROR; cdata = (struct connecting_data *) bip_malloc(sizeof(struct connecting_data)); - if (!cdata) - fatal("Out of memory."); cdata->dst = cdata->src = cdata->cur = NULL; err = getaddrinfo(dsthostname, dstport, &hint, &cdata->dst); diff --git a/src/irc.c b/src/irc.c index aafc584..15b3a7e 100644 --- a/src/irc.c +++ b/src/irc.c @@ -2127,6 +2127,7 @@ connection_t *irc_server_connect(struct link *link) if (conn->handle == -1) { mylog(LOG_INFO, "Cannot connect."); connection_free(conn); + server_next(link); return NULL; }