pidgin/pidgin

Require silc >= 1.1.1.

2019-11-03, Elliott Sales de Andrade
cfe7bb06fd11
Parents b8cba5cc6498
Children 349e6643afae
Require silc >= 1.1.1.

All distros (of which there are less and less) that have silc have a
much newer version, so raising the minimum allows dropping a few
preprocessor conditions.
--- a/libpurple/protocols/silc/silc.c Fri Nov 01 01:39:33 2019 -0400
+++ b/libpurple/protocols/silc/silc.c Sun Nov 03 03:42:59 2019 -0500
@@ -135,15 +135,6 @@
NULL, 0);
}
-#if __SILC_TOOLKIT_VERSION < SILC_VERSION(1,1,1)
-static gboolean
-silcpurple_scheduler(gpointer *context)
-{
- SilcClient client = (SilcClient)context;
- silc_client_run_one(client);
- return TRUE;
-}
-#else
typedef struct {
SilcPurple sg;
SilcUInt32 fd;
@@ -241,7 +232,6 @@
}
}
}
-#endif /* __SILC_TOOLKIT_VERSION */
static void
silcpurple_connect_cb(SilcClient client, SilcClientConnection conn,
@@ -644,16 +634,11 @@
return;
}
-#if __SILC_TOOLKIT_VERSION < SILC_VERSION(1,1,1)
- /* Schedule SILC using Glib's event loop */
- sg->scheduler = g_timeout_add(300, (GSourceFunc)silcpurple_scheduler, client);
-#else
/* Run SILC scheduler */
sg->tasks = silc_dlist_init();
silc_schedule_set_notify(client->schedule, silcpurple_scheduler,
client);
silc_client_run_one(client);
-#endif /* __SILC_TOOLKIT_VERSION */
}
static int
@@ -677,9 +662,7 @@
silcpurple_close(PurpleConnection *gc)
{
SilcPurple sg = purple_connection_get_protocol_data(gc);
-#if __SILC_TOOLKIT_VERSION >= SILC_VERSION(1,1,1)
SilcPurpleTask task;
-#endif /* __SILC_TOOLKIT_VERSION */
GHashTable *ui_info;
const char *ui_name = NULL, *ui_website = NULL;
char *quit_msg;
@@ -709,7 +692,6 @@
if (sg->conn)
silc_client_close_connection(sg->client, sg->conn);
-#if __SILC_TOOLKIT_VERSION >= SILC_VERSION(1,1,1)
if (sg->conn)
silc_client_run_one(sg->client);
silc_schedule_set_notify(sg->client->schedule, NULL, NULL);
@@ -720,7 +702,6 @@
silc_free(task);
}
silc_dlist_uninit(sg->tasks);
-#endif /* __SILC_TOOLKIT_VERSION */
if (sg->scheduler)
g_source_remove(sg->scheduler);
--- a/libpurple/protocols/silc/silcpurple.h Fri Nov 01 01:39:33 2019 -0400
+++ b/libpurple/protocols/silc/silcpurple.h Sun Nov 03 03:42:59 2019 -0500
@@ -37,9 +37,6 @@
#include "server.h"
#include "util.h"
-#undef SILC_VERSION
-#define SILC_VERSION(a, b, c) (((a) << 24) + ((b) << 16) + ((c) << 8))
-
#define SILCPURPLE_TYPE_PROTOCOL (silcpurple_protocol_get_type())
#define SILCPURPLE_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SILCPURPLE_TYPE_PROTOCOL, SilcProtocol))
#define SILCPURPLE_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SILCPURPLE_TYPE_PROTOCOL, SilcProtocolClass))
--- a/meson.build Fri Nov 01 01:39:33 2019 -0400
+++ b/meson.build Sun Nov 03 03:42:59 2019 -0500
@@ -455,7 +455,7 @@
#######################################################################
# Check for SILC client includes and libraries
#######################################################################
-silc = dependency('silcclient', version : '>= 1.1', required : get_option('silc'))
+silc = dependency('silcclient', version : '>= 1.1.1', required : get_option('silc'))
#######################################################################
# Check for Gadu-Gadu protocol library (libgadu)