From 2e6ce02462863bca2b6b48306e8ac12311ddab5a Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 8 Sep 2011 16:44:57 -0500 Subject: [PATCH] fix unlikely failure condition --- src/switch_utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/switch_utils.c b/src/switch_utils.c index 158c5d540f..7d6fc21f55 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -654,8 +654,10 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to, } if (write(fd, &out, bytes) != bytes) { rval = -1; - } else + break; + } else { bytes = 0; + } }