]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7046 fix warning introduced from b341ff7 properly
authorMichael Jerris <mike@jerris.com>
Mon, 29 Dec 2014 18:49:42 +0000 (13:49 -0500)
committerMichael Jerris <mike@jerris.com>
Mon, 29 Dec 2014 18:49:42 +0000 (13:49 -0500)
src/mod/endpoints/mod_verto/mod_verto.c

index d79d8d11913547f3116cf25fdbd33d5d6bbe557c..ae9d9a9e2f032ec1cd19715e8e901b8ce0afc504 100644 (file)
@@ -1518,7 +1518,7 @@ new_req:
                !strncmp(request.content_type, "application/x-www-form-urlencoded", 33)) {
 
                char *buffer = NULL;
-               switch_size_t len = 0, bytes = 0;
+               switch_ssize_t len = 0, bytes = 0;
 
                if (request.content_length > 2 * 1024 * 1024 - 1) {
                        char *data = "HTTP/1.1 413 Request Entity Too Large\r\n"
@@ -1538,8 +1538,8 @@ new_req:
                while(bytes < request.content_length) {
                        len = request.content_length - bytes;
 
-                       if ((switch_ssize_t)(len = ws_raw_read(&jsock->ws, buffer + bytes, len, jsock->ws.block)) < 0) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Read error %" SWITCH_SIZE_T_FMT"\n", len);
+                       if ((len = ws_raw_read(&jsock->ws, buffer + bytes, len, jsock->ws.block)) < 0) {
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Read error %" SWITCH_SSIZE_T_FMT"\n", len);
                                goto done;
                        }