+2009-04-15 Marcus Brinkmann <marcus@g10code.de>
+
+ * 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 <marcus@g10code.de>
* w32-glib-io.c (giochannel_table): New members used, fd, socket.
return new_fd;
}
+
+\f
+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);
+}
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 ());