Link Here
|
1 |
From 0d9e5f7f1a0edaea0de312828ce47d11f74ee3dc Mon Sep 17 00:00:00 2001 |
|
|
2 |
From: benaryorg <binary@benary.org> |
3 |
Date: Fri, 20 Jan 2017 06:31:28 +0100 |
4 |
Subject: [PATCH] fix build with irssi 1.0 |
5 |
|
6 |
use_ssl field of SERVER_CONNECT_REC has been renamed to use_tls. |
7 |
|
8 |
Original patch from darix. |
9 |
|
10 |
Signed-off-by: benaryorg <binary@benary.org> |
11 |
--- |
12 |
src/core/xmpp-servers.c | 11 ++++++++--- |
13 |
1 file changed, 8 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/src/core/xmpp-servers.c b/src/core/xmpp-servers.c |
16 |
index 405ecd9..8d0b62d 100644 |
17 |
--- src/core/xmpp-servers.c.orig |
18 |
+++ src/core/xmpp-servers.c |
19 |
@@ -32,6 +32,11 @@ |
20 |
#include "rosters-tools.h" |
21 |
#include "tools.h" |
22 |
|
23 |
+/* IRSSI_ABI_VERSION was introduced in 0.8.18 */ |
24 |
+#if !defined(IRSSI_ABI_VERSION) || IRSSI_ABI_VERSION < 6 |
25 |
+# define use_tls use_ssl |
26 |
+#endif |
27 |
+ |
28 |
static void |
29 |
channels_join(SERVER_REC *server, const char *data, int automatic) |
30 |
{ |
31 |
@@ -151,7 +156,7 @@ xmpp_server_init_connect(SERVER_CONNECT_REC *connrec) |
32 |
server->connect_pid = -1; |
33 |
|
34 |
if (server->connrec->port <= 0) |
35 |
- server->connrec->port = (server->connrec->use_ssl) ? |
36 |
+ server->connrec->port = (server->connrec->use_tls) ? |
37 |
LM_CONNECTION_DEFAULT_PORT_SSL : LM_CONNECTION_DEFAULT_PORT; |
38 |
|
39 |
if (conn->real_jid == NULL) |
40 |
@@ -335,7 +340,7 @@ lm_open_cb(LmConnection *connection, gboolean success, |
41 |
g_free(host); |
42 |
} else |
43 |
signal_emit("server connecting", 1, server); |
44 |
- if (server->connrec->use_ssl) |
45 |
+ if (server->connrec->use_tls) |
46 |
signal_emit("xmpp server status", 2, server, |
47 |
"Using SSL encryption."); |
48 |
else if (lm_ssl_get_use_starttls(lm_connection_get_ssl(server->lmconn))) |
49 |
@@ -470,7 +475,7 @@ xmpp_server_connect(XMPP_SERVER_REC *server) |
50 |
return; |
51 |
error = NULL; |
52 |
err_msg = NULL; |
53 |
- if (server->connrec->use_ssl) { |
54 |
+ if (server->connrec->use_tls) { |
55 |
if (!set_ssl(server->lmconn, &error, server, FALSE)) { |
56 |
err_msg = "Cannot init ssl"; |
57 |
goto err; |