--- a/src/sock_gnutls.c Tue Mar 10 01:11:12 2009 +0200
+++ b/src/sock_gnutls.c Tue Mar 10 01:46:09 2009 +0200
@@ -67,6 +67,9 @@
static void sock_gnutls_event_handler (int fd, short what, void *arg)
{
struct sock_gnutls *sock = arg;
+
+ (void) fd;
+ (void) what;
// gnutls might be able to proceed now, so ask user to try what didn't work before now, using the mask given to
// event_enable().
@@ -126,10 +129,12 @@
* Our sock_stream_Type
*/
struct sock_stream_type sock_gnutls_type = {
- .methods.read = &sock_gnutls_read,
- .methods.write = &sock_gnutls_write,
- .methods.event_init = &sock_gnutls_event_init,
- .methods.event_enable = &sock_gnutls_event_enable,
+ .methods = {
+ .read = &sock_gnutls_read,
+ .write = &sock_gnutls_write,
+ .event_init = &sock_gnutls_event_init,
+ .event_enable = &sock_gnutls_event_enable,
+ },
};
/*
@@ -153,7 +158,7 @@
// XXX: log func
void _log (int level, const char *msg)
{
- printf("gnutls: %s\n", msg);
+ printf("gnutls: %d: %s", level, msg);
}
err_t sock_gnutls_global_init (struct error_info *err)
@@ -204,7 +209,7 @@
JUMP_SET_ERROR_INFO(err, SOCK_GNUTLS_ERR(sock));
// bind default transport functions (recv/send) to use the TCP fd
- gnutls_transport_set_ptr(sock->session, (gnutls_transport_ptr_t) sock->base_tcp.fd);
+ gnutls_transport_set_ptr(sock->session, (gnutls_transport_ptr_t) (long int) sock->base_tcp.fd);
// perform the handshake
if ((ERROR_EXTRA(err) = gnutls_handshake(sock->session)) < 0)