]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix unlikely failure condition
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 8 Sep 2011 21:44:57 +0000 (16:44 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 8 Sep 2011 21:47:21 +0000 (16:47 -0500)
src/switch_utils.c

index 158c5d540f044ffef18423172ce564f8e98c8c06..7d6fc21f555a7fa549f7cdf2312dd39dbe54c76d 100644 (file)
@@ -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;
+                               }
 
                        }