ithewei пре 6 година
родитељ
комит
28d1fef453
3 измењених фајлова са 6 додато и 4 уклоњено
  1. 1 1
      base/array.h
  2. 3 3
      event/overlapio.c
  3. 2 0
      http/http_content.cpp

+ 1 - 1
base/array.h

@@ -81,7 +81,7 @@ static inline void atype##_resize(atype* p, int maxsize) {\
 \
 static inline void atype##_double_resize(atype* p) {\
     assert(p->maxsize != 0);\
-    return atype##_resize(p, p->maxsize*2);\
+    atype##_resize(p, p->maxsize*2);\
 }\
 \
 static inline void atype##_push_back(atype* p, type* elem) {\

+ 3 - 3
event/overlapio.c

@@ -163,7 +163,7 @@ static void on_wsarecv_complete(hio_t* io) {
     if (io->read_cb) {
         if (io->io_type == HIO_TYPE_UDP || io->io_type == HIO_TYPE_IP) {
             if (hovlp->addr && hovlp->addrlen) {
-                hio_setpeeraddr(io, hovlp->addr, hovlp->addrlen);
+                hio_set_peeraddr(io, hovlp->addr, hovlp->addrlen);
             }
         }
         //printd("read_cb------\n");
@@ -196,7 +196,7 @@ static void on_wsasend_complete(hio_t* io) {
     if (io->write_cb) {
         if (io->io_type == HIO_TYPE_UDP || io->io_type == HIO_TYPE_IP) {
             if (hovlp->addr) {
-                hio_setpeeraddr(io, hovlp->addr, hovlp->addrlen);
+                hio_set_peeraddr(io, hovlp->addr, hovlp->addrlen);
             }
         }
         //printd("write_cb------\n");
@@ -360,7 +360,7 @@ WSASend:
             int err = WSAGetLastError();
             if (err != ERROR_IO_PENDING) {
                 fprintf(stderr, "WSASend error: %d\n", err);
-                return NULL;
+                return ret;
             }
         }
         return hio_add(io, hio_handle_events, WRITE_EVENT);

+ 2 - 0
http/http_content.cpp

@@ -2,6 +2,8 @@
 
 #include "hurl.h"
 
+#include <string.h>
+
 std::string dump_query_params(QueryParams& query_params) {
     std::string query_string;
     for (auto& pair : query_params) {