]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6854 #comment try this patch
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 30 Sep 2014 15:35:14 +0000 (20:35 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 30 Sep 2014 15:35:19 +0000 (20:35 +0500)
libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/tport/ws.c
src/mod/endpoints/mod_verto/ws.c

index 63605e55a1162377cea4c377902b44aec9869507..31d9a658f96c8b0b673bdd3d242aa824d8c7d374 100644 (file)
@@ -1 +1 @@
-Thu Sep 25 21:43:53 CDT 2014
+Tue Sep 30 20:32:49 CDT 2014
index 6fa69d216179a30f3c9b0866939f4dfcab1ff933..51ae0f13f7a0dbe524c961017f5c8cd5469bcb61 100644 (file)
@@ -352,7 +352,10 @@ ssize_t ws_raw_read(wsh_t *wsh, void *data, size_t bytes, int block)
                                        goto end;
                                }
 
-                               if (block) ms_sleep(10);
+                               if (block) {
+                                       wsh->x++;
+                                       ms_sleep(10);
+                               }
                        }
 
                } while (r == -1 && err == SSL_ERROR_WANT_READ && wsh->x < 100);
@@ -361,14 +364,19 @@ ssize_t ws_raw_read(wsh_t *wsh, void *data, size_t bytes, int block)
        }
 
        do {
+
                r = recv(wsh->sock, data, bytes, 0);
+
                if (r == -1) {
                        if (!block && xp_is_blocking(xp_errno())) {
                                r = -2;
                                goto end;
                        }
 
-                       if (block) ms_sleep(10);
+                       if (block) {
+                               wsh->x++;
+                               ms_sleep(10);
+                       }
                }
        } while (r == -1 && xp_is_blocking(xp_errno()) && wsh->x < 100);
        
index 6fa69d216179a30f3c9b0866939f4dfcab1ff933..51ae0f13f7a0dbe524c961017f5c8cd5469bcb61 100644 (file)
@@ -352,7 +352,10 @@ ssize_t ws_raw_read(wsh_t *wsh, void *data, size_t bytes, int block)
                                        goto end;
                                }
 
-                               if (block) ms_sleep(10);
+                               if (block) {
+                                       wsh->x++;
+                                       ms_sleep(10);
+                               }
                        }
 
                } while (r == -1 && err == SSL_ERROR_WANT_READ && wsh->x < 100);
@@ -361,14 +364,19 @@ ssize_t ws_raw_read(wsh_t *wsh, void *data, size_t bytes, int block)
        }
 
        do {
+
                r = recv(wsh->sock, data, bytes, 0);
+
                if (r == -1) {
                        if (!block && xp_is_blocking(xp_errno())) {
                                r = -2;
                                goto end;
                        }
 
-                       if (block) ms_sleep(10);
+                       if (block) {
+                               wsh->x++;
+                               ms_sleep(10);
+                       }
                }
        } while (r == -1 && xp_is_blocking(xp_errno()) && wsh->x < 100);