aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2009-04-15 12:04:21 +0000
committerMarcus Brinkmann <[email protected]>2009-04-15 12:04:21 +0000
commit2dce8370e75119af7c54397b0c8b9956d9a516e9 (patch)
tree0f8be965cdff09983332bbbc348f81e3839c6069 /src
parentassuan/ (diff)
downloadgpgme-2dce8370e75119af7c54397b0c8b9956d9a516e9.tar.gz
gpgme-2dce8370e75119af7c54397b0c8b9956d9a516e9.zip
2009-04-15 Marcus Brinkmann <[email protected]>
* posix-io.c (_gpgme_io_socket, _gpgme_io_connect): New functions. * w32-io.c (_gpgme_io_connect): Fix stupid error.
Diffstat (limited to '')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/posix-io.c28
-rw-r--r--src/w32-io.c3
3 files changed, 34 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3a570f5a..1dcdb218 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-15 Marcus Brinkmann <[email protected]>
+
+ * posix-io.c (_gpgme_io_socket, _gpgme_io_connect): New functions.
+ * w32-io.c (_gpgme_io_connect): Fix stupid error.
+
2009-04-08 Marcus Brinkmann <[email protected]>
* w32-glib-io.c (giochannel_table): New members used, fd, socket.
diff --git a/src/posix-io.c b/src/posix-io.c
index a7047bd2..c85255e7 100644
--- a/src/posix-io.c
+++ b/src/posix-io.c
@@ -653,3 +653,31 @@ _gpgme_io_dup (int fd)
return new_fd;
}
+
+
+int
+_gpgme_io_socket (int domain, int type, int proto)
+{
+ int res;
+
+ TRACE_BEG2 (DEBUG_SYSIO, "_gpgme_io_socket", domain,
+ "type=%i, proto=%i", type, proto);
+
+ res = socket (domain, type, proto);
+
+ return TRACE_SYSRES (res);
+}
+
+
+int
+_gpgme_io_connect (int fd, struct sockaddr *addr, int addrlen)
+{
+ int res;
+
+ TRACE_BEG2 (DEBUG_SYSIO, "_gpgme_io_connect", fd,
+ "addr=%p, addrlen=%i", addr, addrlen);
+
+ res = ath_connect (fd, addr, addrlen);
+
+ return TRACE_SYSRES (res);
+}
diff --git a/src/w32-io.c b/src/w32-io.c
index 1a65e537..69d8a398 100644
--- a/src/w32-io.c
+++ b/src/w32-io.c
@@ -1514,13 +1514,12 @@ _gpgme_io_socket (int domain, int type, int proto)
int
_gpgme_io_connect (int fd, struct sockaddr *addr, int addrlen)
{
- int sockfd;
int res;
TRACE_BEG2 (DEBUG_SYSIO, "_gpgme_io_connect", fd,
"addr=%p, addrlen=%i", addr, addrlen);
- res = connect (sockfd, addr, addrlen);
+ res = connect (fd, addr, addrlen);
if (!res)
{
errno = wsa2errno (WSAGetLastError ());