]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
grr
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 23 Apr 2009 14:47:07 +0000 (14:47 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 23 Apr 2009 14:47:07 +0000 (14:47 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13133 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/iksemel/src/stream.c

index 2ce7460c202d9ab7df4a90832b341363bbbeab05..a7e57cb236da36a992d484f559d16a32d79fa451 100644 (file)
@@ -512,11 +512,11 @@ iks_recv (iksparser *prs, int timeout)
 #ifdef HAVE_GNUTLS
                if (data->flags & SF_SECURE) {
                        len = gnutls_record_recv (data->sess, data->buf, NET_IO_BUF_SIZE - 1);
+                       if (len == 0) len = -1;
                } else
 #endif
                {
                        len = data->trans->recv (data->sock, data->buf, NET_IO_BUF_SIZE - 1, timeout);
-                       if (len == 0) len = -1;
                }
                if (len < 0) return IKS_NET_RWERR;
                if (len == 0) break;