mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-26 12:14:56 +00:00
Added <signal.h> for linux, and squashed warning in transfer_file_data()
This commit is contained in:
1 parent
146cf1d1c0
commit
473e2a1cb2
1 file changed
+2
-1
+2
-1
@@ -88,6 +88,7 @@ typedef struct _stati64 file_stat_t;
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <arpa/inet.h> // For inet_pton() when USE_IPV6 is defined
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
@@ -3008,7 +3009,7 @@ static void close_local_endpoint(struct connection *conn) {
|
||||
static void transfer_file_data(struct connection *conn) {
|
||||
char buf[IOBUF_SIZE];
|
||||
int n = read(conn->endpoint.fd, buf,
|
||||
conn->cl < (int64_t) sizeof(buf) ? (int) conn->cl : sizeof(buf));
|
||||
conn->cl < (int64_t) sizeof(buf) ? conn->cl : (int) sizeof(buf));
|
||||
|
||||
if (is_error(n)) {
|
||||
close_local_endpoint(conn);
|
||||
|
||||
Reference in new issue
Block a user