diff options
Diffstat (limited to 'src/win32/pipe/pipe.cpp')
-rw-r--r-- | src/win32/pipe/pipe.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/win32/pipe/pipe.cpp b/src/win32/pipe/pipe.cpp index 36e6ef5ec..6c4a9a3f1 100644 --- a/src/win32/pipe/pipe.cpp +++ b/src/win32/pipe/pipe.cpp @@ -6,6 +6,7 @@ */ #include "services.h" +#include "sockets.h" int pipe(int fds[2]) { @@ -14,22 +15,22 @@ int pipe(int fds[2]) int cfd = socket(AF_INET, SOCK_STREAM, 0), lfd = socket(AF_INET, SOCK_STREAM, 0); if (cfd == -1 || lfd == -1) { - close(cfd); - close(lfd); + anope_close(cfd); + anope_close(lfd); return -1; } if (bind(lfd, &localhost.sa, localhost.size()) == -1) { - close(cfd); - close(lfd); + anope_close(cfd); + anope_close(lfd); return -1; } if (listen(lfd, 1) == -1) { - close(cfd); - close(lfd); + anope_close(cfd); + anope_close(lfd); return -1; } @@ -39,16 +40,16 @@ int pipe(int fds[2]) if (connect(cfd, &lfd_addr.sa, lfd_addr.size())) { - close(cfd); - close(lfd); + anope_close(cfd); + anope_close(lfd); return -1; } int afd = accept(lfd, NULL, NULL); - close(lfd); + anope_close(lfd); if (afd == -1) { - close(cfd); + anope_close(cfd); return -1; } |