aboutsummaryrefslogtreecommitdiffstats
path: root/src/posix-io.c
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/posix-io.c
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 'src/posix-io.c')
-rw-r--r--src/posix-io.c28
1 files changed, 28 insertions, 0 deletions
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);
+}