ffserver: do not ignore send() return
authorReynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
Mon, 28 Apr 2014 17:45:34 +0000 (13:45 -0400)
committerReynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
Tue, 29 Apr 2014 03:54:58 +0000 (23:54 -0400)
Should fix Coverity Scan issue #732178

Signed-off-by: Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
ffserver.c

index 1d32892..20900fb 100644 (file)
@@ -811,7 +811,8 @@ static void http_send_too_busy_reply(int fd)
                        "</body></html>\r\n",
                        nb_connections, nb_max_connections);
     av_assert0(len < sizeof(buffer));
-    send(fd, buffer, len, 0);
+    if (send(fd, buffer, len, 0) < len)
+        av_log(NULL, AV_LOG_WARNING, "Could not send too-busy reply, send() failed\n");
 }