From a17321c5c8f45619b8ce048082467729357e92dd Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 26 Aug 2002 23:34:55 +0000 Subject: fixes to work with glib2 (untested...) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2897 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/network-openssl.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/network-openssl.c b/src/core/network-openssl.c index 7a4e974d..3d091200 100644 --- a/src/core/network-openssl.c +++ b/src/core/network-openssl.c @@ -37,8 +37,12 @@ GIOError irssi_ssl_write(GIOChannel *, gchar *, guint, guint*); GIOError irssi_ssl_seek(GIOChannel *, gint, GSeekType); /* ssl close */ void irssi_ssl_close(GIOChannel *); +#if GLIB_MAJOR_VERSION < 2 /* ssl create watch */ guint irssi_ssl_create_watch(GIOChannel *, gint, GIOCondition, GIOFunc, gpointer, GDestroyNotify); +#else +guint irssi_ssl_create_watch(GIOChannel *, GIOCondition); +#endif /* ssl free */ void irssi_ssl_free(GIOChannel *); @@ -178,12 +182,22 @@ void irssi_ssl_close(GIOChannel *handle) g_io_channel_close(chan->giochan); } +#if GLIB_MAJOR_VERSION < 2 guint irssi_ssl_create_watch(GIOChannel *handle, gint priority, GIOCondition cond, - GIOFunc func, gpointer data, GDestroyNotify notify) + GIOFunc func, gpointer data, GDestroyNotify notify) { GIOSSLChannel *chan = (GIOSSLChannel *)handle; + return chan->giochan->funcs->io_add_watch(handle, priority, cond, func, data, notify); } +#else +guint irssi_ssl_create_watch(GIOChannel *handle, GIOCondition cond) +{ + GIOSSLChannel *chan = (GIOSSLChannel *)handle; + + return chan->giochan->funcs->io_create_watch(handle, cond); +} +#endif void irssi_ssl_free(GIOChannel *handle) { -- cgit v1.2.3