mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
Merge pull request #975 from NattyNarwhal/ibmi
Fix irssi build on IBM i and AIX
This commit is contained in:
commit
dcb412eb8b
@ -6,7 +6,7 @@
|
||||
#define IRSSI_GLOBAL_CONFIG "irssi.conf" /* config file name in /etc/ */
|
||||
#define IRSSI_HOME_CONFIG "config" /* config file name in ~/.irssi/ */
|
||||
|
||||
#define IRSSI_ABI_VERSION 18
|
||||
#define IRSSI_ABI_VERSION 19
|
||||
|
||||
#define DEFAULT_SERVER_ADD_PORT 6667
|
||||
#define DEFAULT_SERVER_ADD_TLS_PORT 6697
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "irc-cap.h"
|
||||
#include "irc-servers.h"
|
||||
|
||||
int cap_toggle (IRC_SERVER_REC *server, char *cap, int enable)
|
||||
int irc_cap_toggle (IRC_SERVER_REC *server, char *cap, int enable)
|
||||
{
|
||||
if (cap == NULL || *cap == '\0')
|
||||
return FALSE;
|
||||
@ -65,7 +65,7 @@ int cap_toggle (IRC_SERVER_REC *server, char *cap, int enable)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void cap_finish_negotiation (IRC_SERVER_REC *server)
|
||||
void irc_cap_finish_negotiation (IRC_SERVER_REC *server)
|
||||
{
|
||||
if (server->cap_complete)
|
||||
return;
|
||||
@ -130,7 +130,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
|
||||
}
|
||||
/* Malformed request, terminate the negotiation */
|
||||
else {
|
||||
cap_finish_negotiation(server);
|
||||
irc_cap_finish_negotiation(server);
|
||||
g_warn_if_reached();
|
||||
return;
|
||||
}
|
||||
@ -177,7 +177,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
|
||||
if (multiline == FALSE) {
|
||||
/* No CAP has been requested */
|
||||
if (server->cap_queue == NULL) {
|
||||
cap_finish_negotiation(server);
|
||||
irc_cap_finish_negotiation(server);
|
||||
}
|
||||
else {
|
||||
cmd = g_string_new("CAP REQ :");
|
||||
@ -204,7 +204,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
|
||||
signal_emit("server cap req", 2, server, cmd->str + sizeof("CAP REQ :") - 1);
|
||||
irc_send_cmd_now(server, cmd->str);
|
||||
} else {
|
||||
cap_finish_negotiation(server);
|
||||
irc_cap_finish_negotiation(server);
|
||||
}
|
||||
|
||||
g_string_free(cmd, TRUE);
|
||||
@ -233,7 +233,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
|
||||
* negotiation, unless sasl was requested. In this case we must not terminate the negotiation
|
||||
* until the sasl handshake is over. */
|
||||
if (got_sasl == FALSE)
|
||||
cap_finish_negotiation(server);
|
||||
irc_cap_finish_negotiation(server);
|
||||
}
|
||||
else if (!g_ascii_strcasecmp(evt, "NAK")) {
|
||||
g_warning("The server answered with a NAK to our CAP request, this should not happen");
|
||||
@ -296,13 +296,13 @@ static void event_invalid_cap (IRC_SERVER_REC *server, const char *data, const c
|
||||
irc_send_cmd_now(server, "CAP END");
|
||||
}
|
||||
|
||||
void cap_init (void)
|
||||
void irc_cap_init (void)
|
||||
{
|
||||
signal_add_first("event cap", (SIGNAL_FUNC) event_cap);
|
||||
signal_add_first("event 410", (SIGNAL_FUNC) event_invalid_cap);
|
||||
}
|
||||
|
||||
void cap_deinit (void)
|
||||
void irc_cap_deinit (void)
|
||||
{
|
||||
signal_remove("event cap", (SIGNAL_FUNC) event_cap);
|
||||
signal_remove("event 410", (SIGNAL_FUNC) event_invalid_cap);
|
||||
|
@ -1,9 +1,9 @@
|
||||
#ifndef __IRC_CAP_H
|
||||
#define __IRC_CAP_H
|
||||
|
||||
void cap_init(void);
|
||||
void cap_deinit(void);
|
||||
int cap_toggle (IRC_SERVER_REC *server, char *cap, int enable);
|
||||
void cap_finish_negotiation (IRC_SERVER_REC *server);
|
||||
void irc_cap_init(void);
|
||||
void irc_cap_deinit(void);
|
||||
int irc_cap_toggle (IRC_SERVER_REC *server, char *cap, int enable);
|
||||
void irc_cap_finish_negotiation (IRC_SERVER_REC *server);
|
||||
|
||||
#endif
|
||||
|
@ -119,7 +119,7 @@ void irc_core_init(void)
|
||||
lag_init();
|
||||
netsplit_init();
|
||||
irc_expandos_init();
|
||||
cap_init();
|
||||
irc_cap_init();
|
||||
sasl_init();
|
||||
|
||||
settings_check();
|
||||
@ -131,7 +131,7 @@ void irc_core_deinit(void)
|
||||
signal_emit("chat protocol deinit", 1, chat_protocol_find("IRC"));
|
||||
|
||||
sasl_deinit();
|
||||
cap_deinit();
|
||||
irc_cap_deinit();
|
||||
irc_expandos_deinit();
|
||||
netsplit_deinit();
|
||||
lag_deinit();
|
||||
|
@ -236,9 +236,9 @@ static void server_init(IRC_SERVER_REC *server)
|
||||
}
|
||||
|
||||
if (conn->sasl_mechanism != SASL_MECHANISM_NONE)
|
||||
cap_toggle(server, "sasl", TRUE);
|
||||
irc_cap_toggle(server, "sasl", TRUE);
|
||||
|
||||
cap_toggle(server, "multi-prefix", TRUE);
|
||||
irc_cap_toggle(server, "multi-prefix", TRUE);
|
||||
|
||||
irc_send_cmd_now(server, "CAP LS");
|
||||
|
||||
|
@ -45,7 +45,7 @@ static gboolean sasl_timeout(IRC_SERVER_REC *server)
|
||||
{
|
||||
/* The authentication timed out, we can't do much beside terminating it */
|
||||
irc_send_cmd_now(server, "AUTHENTICATE *");
|
||||
cap_finish_negotiation(server);
|
||||
irc_cap_finish_negotiation(server);
|
||||
|
||||
server->sasl_timeout = 0;
|
||||
server->sasl_success = FALSE;
|
||||
@ -96,7 +96,7 @@ static void sasl_fail(IRC_SERVER_REC *server, const char *data, const char *from
|
||||
signal_emit("server sasl failure", 2, server, error);
|
||||
|
||||
/* Terminate the negotiation */
|
||||
cap_finish_negotiation(server);
|
||||
irc_cap_finish_negotiation(server);
|
||||
|
||||
g_free(params);
|
||||
}
|
||||
@ -110,7 +110,7 @@ static void sasl_already(IRC_SERVER_REC *server, const char *data, const char *f
|
||||
signal_emit("server sasl success", 1, server);
|
||||
|
||||
/* We're already authenticated, do nothing */
|
||||
cap_finish_negotiation(server);
|
||||
irc_cap_finish_negotiation(server);
|
||||
}
|
||||
|
||||
static void sasl_success(IRC_SERVER_REC *server, const char *data, const char *from)
|
||||
@ -122,7 +122,7 @@ static void sasl_success(IRC_SERVER_REC *server, const char *data, const char *f
|
||||
signal_emit("server sasl success", 1, server);
|
||||
|
||||
/* The authentication succeeded, time to finish the CAP negotiation */
|
||||
cap_finish_negotiation(server);
|
||||
irc_cap_finish_negotiation(server);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -263,7 +263,7 @@ static void sasl_step_complete(IRC_SERVER_REC *server, GString *data)
|
||||
static void sasl_step_fail(IRC_SERVER_REC *server)
|
||||
{
|
||||
irc_send_cmd_now(server, "AUTHENTICATE *");
|
||||
cap_finish_negotiation(server);
|
||||
irc_cap_finish_negotiation(server);
|
||||
|
||||
sasl_timeout_stop(server);
|
||||
|
||||
|
@ -155,6 +155,6 @@ irc_server_cap_toggle(server, cap, enable)
|
||||
char *cap
|
||||
int enable
|
||||
CODE:
|
||||
RETVAL = cap_toggle(server, cap, enable);
|
||||
RETVAL = irc_cap_toggle(server, cap, enable);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
Loading…
Reference in New Issue
Block a user