1
0
mirror of https://github.com/irssi/irssi.git synced 2025-02-02 15:08:01 -05:00

Change coding style

This commit is contained in:
hawken93 2014-10-03 23:41:57 +02:00
parent a35e5b4f9d
commit 714b0241cb
6 changed files with 14 additions and 15 deletions

View File

@ -551,7 +551,7 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, int port, SERVER_
return gchan;
}
GIOChannel *net_connect_proxy_ssl(struct network_proxy const *proxy, char const *host, int port,
GIOChannel *net_connect_proxy_ssl(const struct network_proxy *proxy, const char *host, int port,
IPADDR *ip, IPADDR *my_ip, SERVER_REC *server)
{
GIOChannel *handle, *ssl_handle;

View File

@ -58,9 +58,9 @@ static bool send_connect(struct _network_proxy_http *proxy, GIOChannel *ch,
sprintf(port_str, "%u", port);
if (!_network_proxy_send_all(ch, "CONNECT ", -1) ||
!_network_proxy_send_all(ch, address, -1) ||
!_network_proxy_send_all(ch, ":", -1) ||
!_network_proxy_send_all(ch, port_str, -1) ||
!_network_proxy_send_all(ch, address, -1) ||
!_network_proxy_send_all(ch, ":", -1) ||
!_network_proxy_send_all(ch, port_str, -1) ||
!_network_proxy_send_all(ch, " HTTP/1.0\r\n\r\n", -1) ||
!_network_proxy_flush(ch))
return false;
@ -96,7 +96,7 @@ static int read_response(struct _network_proxy_http *proxy, GIOChannel *ch)
if (state==0) {
if (g_str_has_prefix(line.str, "HTTP/1.0 ")) {
resp = g_strndup(line.str+9, line.len-9-2);
rc = g_ascii_strtoull(resp, NULL, 10);
rc = g_ascii_strtoull(resp, NULL, 10);
} else {
g_warning("unexpected HTTP response: '%s'", line.str);
goto err;

View File

@ -228,8 +228,8 @@ GIOChannel *net_connect_ip(IPADDR *ip, int port, IPADDR *my_ip)
}
/* Connect to socket */
GIOChannel *net_connect_proxy(struct network_proxy const *proxy,
char const *host, int port, IPADDR *ip, IPADDR *my_ip)
GIOChannel *net_connect_proxy(const struct network_proxy *proxy,
const char *host, int port, IPADDR *ip, IPADDR *my_ip)
{
if (proxy)
return proxy->connect(proxy, ip, host, port);

View File

@ -50,12 +50,12 @@ int net_ip_compare(IPADDR *ip1, IPADDR *ip2);
/* Connect to socket */
GIOChannel *net_connect(const char *addr, int port, IPADDR *my_ip);
/* Connect to socket with ip address and SSL*/
GIOChannel *net_connect_proxy_ssl(struct network_proxy const *proxy, char const *host, int port,
GIOChannel *net_connect_proxy_ssl(const struct network_proxy *proxy, const char c*host, int port,
IPADDR *ip, IPADDR *my_ip, SERVER_REC *server);
int irssi_ssl_handshake(GIOChannel *handle);
/* Connect to socket with ip address */
GIOChannel *net_connect_ip(IPADDR *ip, int port, IPADDR *my_ip);
GIOChannel *net_connect_proxy(struct network_proxy const *proxy, char const *host, int port,
GIOChannel *net_connect_proxy(const struct network_proxy *proxy, const char *host, int port,
IPADDR *ip, IPADDR *my_ip);
/* Connect to named UNIX socket */
GIOChannel *net_connect_unix(const char *path);

View File

@ -196,11 +196,11 @@ static void server_init(IRC_SERVER_REC *server)
IRC_SERVER_CONNECT_REC *conn;
char *address, *ptr, *username, *cmd;
GTimeVal now;
struct network_proxy_send_string_info const send_info = {
.host = server->connrec->address,
.port = server->connrec->port,
.func = irc_send_cmd_now_wrapper,
.obj = server
const struct network_proxy_send_string_info send_info = {
.host = server->connrec->address,
.port = server->connrec->port,
.func = irc_send_cmd_now_wrapper,
.obj = server
};
g_return_if_fail(server != NULL);

View File

@ -109,7 +109,6 @@ struct _IRC_SERVER_REC {
SERVER_REC *irc_server_init_connect(SERVER_CONNECT_REC *conn);
void irc_server_connect(SERVER_REC *server);
/* Purge server output, either all or for specified target */
void irc_server_purge_output(IRC_SERVER_REC *server, const char *target);