Porting some stuff to modern git version

From the original patch by hawken93 <hawken@thehawken.org> 3 Oct 2014
This commit is contained in:
Bob Mottram 2016-04-14 11:47:57 +01:00
commit 646d17d9d4
5 changed files with 11 additions and 6 deletions

View file

@ -565,7 +565,8 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, int port, SERVER_
return gchan; return gchan;
} }
GIOChannel *net_connect_proxy_ssl(struct network_proxy const *proxy, char const *host, int port, IPADDR *ip, IPADDR *my_ip, const char *cert, const char *pkey, const char *cafile, const char *capath, gboolean verify) GIOChannel *net_connect_proxy_ssl(struct network_proxy const *proxy, char const *host, int port,
IPADDR *ip, IPADDR *my_ip, SERVER_REC *server)
{ {
GIOChannel *handle, *ssl_handle; GIOChannel *handle, *ssl_handle;

View file

@ -41,7 +41,7 @@ int net_ip_compare(IPADDR *ip1, IPADDR *ip2);
GIOChannel *net_connect(const char *addr, int port, IPADDR *my_ip); GIOChannel *net_connect(const char *addr, int port, IPADDR *my_ip);
/* Connect to socket with ip address and SSL*/ /* Connect to socket with ip address and SSL*/
GIOChannel *net_connect_ip(IPADDR const *ip, int port, IPADDR *my_ip); GIOChannel *net_connect_ip(IPADDR const *ip, int port, IPADDR *my_ip);
GIOChannel *net_connect_proxy_ssl(struct network_proxy const *proxy, char const *host, int port, IPADDR *ip, IPADDR *my_ip, const char *cert, const char *pkey, const char *cafile, const char *capath, gboolean verify); GIOChannel *net_connect_proxy_ssl(struct network_proxy const *proxy, char const *host, int port, IPADDR *ip, IPADDR *my_ip, SERVER_REC *server);
int irssi_ssl_handshake(GIOChannel *handle); int irssi_ssl_handshake(GIOChannel *handle);
/* Connect to socket with ip address */ /* Connect to socket with ip address */

View file

@ -225,10 +225,7 @@ static void server_real_connect(SERVER_REC *server, IPADDR *ip,
net_connect_proxy_ssl(server->connrec->proxy, net_connect_proxy_ssl(server->connrec->proxy,
server->connrec->address, port, server->connrec->address, port,
ip, own_ip, ip, own_ip,
server->connrec->ssl_cert, server->connrec) :
server->connrec->ssl_pkey,
server->connrec->ssl_cafile,
server->connrec->ssl_capath, server->connrec->ssl_verify) :
net_connect_proxy(server->connrec->proxy, net_connect_proxy(server->connrec->proxy,
server->connrec->address, port, server->connrec->address, port,
ip, own_ip); ip, own_ip);

View file

@ -341,6 +341,11 @@ void irc_server_connect(SERVER_REC *server)
} }
} }
void irc_send_cmd_now_wrapper(void *server, const char *cmd)
{
return irc_send_cmd_now((IRC_SERVER_REC *)server, cmd);
}
/* Returns TRUE if `command' is sent to `target' */ /* Returns TRUE if `command' is sent to `target' */
static int command_has_target(const char *cmd, const char *target) static int command_has_target(const char *cmd, const char *target)
{ {

View file

@ -136,6 +136,8 @@ void irc_server_send_away(IRC_SERVER_REC *server, const char *reason);
void irc_server_send_data(IRC_SERVER_REC *server, const char *data, int len); void irc_server_send_data(IRC_SERVER_REC *server, const char *data, int len);
void irc_server_init_isupport(IRC_SERVER_REC *server); void irc_server_init_isupport(IRC_SERVER_REC *server);
void irc_send_cmd_now_wrapper(void *server, const char *cmd);
void irc_servers_start_cmd_timeout(void); void irc_servers_start_cmd_timeout(void);
void irc_servers_init(void); void irc_servers_init(void);