]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix build
authorMichael Jerris <mike@jerris.com>
Tue, 10 Feb 2009 20:31:47 +0000 (20:31 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 10 Feb 2009 20:31:47 +0000 (20:31 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@659 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/openzap/src/testcid.c

index 815ae2a0d290514d414bd601a9e0e12b736b2808..0018bb9a5da7f6aef2aa2ed436540351647526d9 100644 (file)
@@ -9,7 +9,9 @@ struct helper {
 zap_status_t my_write_sample(int16_t *buf, zap_size_t buflen, void *user_data)
 {
        struct helper *foo = (struct helper *) user_data;
-       write(foo->fd, buf, buflen * 2);
+        size_t len;
+       len = write(foo->fd, buf, buflen * 2);
+        if (!len) return ZAP_FAIL;
        foo->wrote += buflen * 2;
        return ZAP_SUCCESS;
 }