--- a/src/sock.c Sun Feb 22 06:44:16 2009 +0200
+++ b/src/sock.c Sun Feb 22 06:52:55 2009 +0200
@@ -4,14 +4,14 @@
#include <assert.h>
-err_t sock_init (void)
+err_t sock_init (struct error_info *err)
{
- err_t err;
+ // XXX: just call these all directly for now
+ if (sock_gnutls_init(err))
+ return ERROR_CODE(err);
- // XXX: just call these all directly for now
-
- if ((err = sock_gnutls_init()))
- return err;
+ // done
+ return SUCCESS;
}
void sock_stream_init (struct sock_stream *sock, struct sock_stream_type *type)
@@ -38,5 +38,5 @@
void sock_stream_error (struct sock_stream *sock, struct error_info *err)
{
// copy from SOCK_ER
- *err = SOCK_ERR(sock);
+ *err = *SOCK_ERR(sock);
}