]> jfr.im git - irc/rizon/plexus4.git/commitdiff
Cleanly abort tests which try to connect clients if ircd is not listening.
authorDarius Jahandarie <redacted>
Sat, 13 Feb 2016 18:24:27 +0000 (13:24 -0500)
committerDarius Jahandarie <redacted>
Tue, 15 Nov 2016 17:48:55 +0000 (12:48 -0500)
test/client.c

index 180d54c5bd197e6c9b01f7a45f95256b00d177b9..1b897a3da723e99b0e0bce1fdd79c4f2ab763424 100644 (file)
@@ -34,6 +34,13 @@ create(const char *name, struct irc_ssaddr *ip)
 
   struct PlexusClient *pclient = MyMalloc(sizeof(struct PlexusClient));
   struct Listener *listener = find_listener_flags(0);
+
+  if (!listener)
+  {
+    ck_abort_msg("could not find ircd listener");
+    return NULL;
+  }
+
   struct Client *client = add_connection(listener, ip, fds[0]);
 
   pclient->client = client;