projects
/
cascardo
/
rnetproxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename iochannel to hcconn.
[cascardo/rnetproxy.git]
/
ssl.c
diff --git
a/ssl.c
b/ssl.c
index
fff8e63
..
7c75483
100644
(file)
--- a/
ssl.c
+++ b/
ssl.c
@@
-19,7
+19,6
@@
*/
#include <gnutls/gnutls.h>
*/
#include <gnutls/gnutls.h>
-#include <gnet.h>
#include <glib.h>
#include <string.h>
#include <errno.h>
#include <glib.h>
#include <string.h>
#include <errno.h>
@@
-33,11
+32,13
@@
ssl_connect (net_hook_t *hook)
static void
ssl_close (net_hook_t *hook)
{
static void
ssl_close (net_hook_t *hook)
{
-}
-
-static void
-ssl_write (net_hook_t *hook)
-{
+ if (hook->peer)
+ {
+ hook->peer->peer = NULL;
+ hc_conn_close (hook->peer->conn);
+ }
+ hc_conn_close (hook->conn);
+ g_slice_free (net_hook_t, hook);
}
static void
}
static void
@@
-53,7
+54,7
@@
ssl_error (net_hook_t *hook)
}
net_hook_t *
}
net_hook_t *
-ssl_hook_new (
GConn *conn, char *server
)
+ssl_hook_new (
HCConn *conn, char *server, char *port
)
{
net_hook_t *hook;
hook = g_slice_new (net_hook_t);
{
net_hook_t *hook;
hook = g_slice_new (net_hook_t);
@@
-62,11
+63,10
@@
ssl_hook_new (GConn *conn, char *server)
hook->server = FALSE;
hook->connect = ssl_connect;
hook->close = ssl_close;
hook->server = FALSE;
hook->connect = ssl_connect;
hook->close = ssl_close;
- hook->write = ssl_write;
hook->read = ssl_read;
hook->data = NULL;
hook->read = ssl_read;
hook->data = NULL;
- hook->peer = ssl_server_hook_new (hook, server);
-
gnet
_conn_set_callback (hook->conn, nethook_event, hook);
+ hook->peer = ssl_server_hook_new (hook, server
, port
);
+
hc
_conn_set_callback (hook->conn, nethook_event, hook);
return hook;
}
return hook;
}