[PATCH 21/65] don't exit if a channel can't be created

From: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Thu, 17 Apr 2014 17:03:47 +0200

Signed-off-by: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
---
 ii.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ii.c b/ii.c
index 8814be7..b0b83db 100644
--- a/ii.c
+++ b/ii.c
_AT_@ -120,8 +120,10 @@ add_channel(char *cname) {
 		if(!strcmp(name, c->name))
 			return; /* already handled */
 
-	if((fd = open_channel(name)) == -1)
-		eprintf("exiting, cannot create in channel: %s:", name);
+	if((fd = open_channel(name)) == -1) {
+		weprintf("cannot create in channel: %s:", name);
+		return;
+	}
 
 	if(!(c = calloc(1, sizeof(Channel))))
 		eprintf("cannot allocate memory:");
-- 
2.4.10
--Multipart=_Mon__9_May_2016_17_21_10_+0200_I.6cpFVydhq75aaE
Content-Type: text/x-diff;
 name="0022-remove-infile-when-leaving-a-channel.patch"
Content-Disposition: attachment;
 filename="0022-remove-infile-when-leaving-a-channel.patch"
Content-Transfer-Encoding: 7bit
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Mon May 09 2016 - 17:24:22 CEST