correct wrong function prefixes: g_input -> i_input

This commit is contained in:
Ailin Nemui 2021-01-04 12:57:23 +01:00
commit edb2f699d1
17 changed files with 72 additions and 103 deletions

View file

@ -491,10 +491,8 @@ static void irc_init_server(IRC_SERVER_REC *server)
if (!IS_IRC_SERVER(server))
return;
server->readtag =
g_input_add(net_sendbuffer_handle(server->handle),
G_INPUT_READ,
(GInputFunction) irc_parse_incoming, server);
server->readtag = i_input_add(net_sendbuffer_handle(server->handle), I_INPUT_READ,
(GInputFunction) irc_parse_incoming, server);
}
void irc_irc_init(void)

View file

@ -355,8 +355,7 @@ static void dcc_chat_listen(CHAT_DCC_REC *dcc)
memcpy(&dcc->addr, &ip, sizeof(IPADDR));
net_ip2host(&dcc->addr, dcc->addrstr);
dcc->port = port;
dcc->tagread = g_input_add(handle, G_INPUT_READ,
(GInputFunction) dcc_chat_input, dcc);
dcc->tagread = i_input_add(handle, I_INPUT_READ, (GInputFunction) dcc_chat_input, dcc);
signal_emit("dcc connected", 1, dcc);
}
@ -379,8 +378,7 @@ static void sig_chat_connected(CHAT_DCC_REC *dcc)
dcc->starttime = time(NULL);
dcc->sendbuf = net_sendbuffer_create(dcc->handle, 0);
dcc->tagread = g_input_add(dcc->handle, G_INPUT_READ,
(GInputFunction) dcc_chat_input, dcc);
dcc->tagread = i_input_add(dcc->handle, I_INPUT_READ, (GInputFunction) dcc_chat_input, dcc);
signal_emit("dcc connected", 1, dcc);
}
@ -397,9 +395,8 @@ static void dcc_chat_connect(CHAT_DCC_REC *dcc)
dcc->handle = dcc_connect_ip(&dcc->addr, dcc->port);
if (dcc->handle != NULL) {
dcc->tagconn = g_input_add(dcc->handle,
G_INPUT_WRITE | G_INPUT_READ,
(GInputFunction) sig_chat_connected, dcc);
dcc->tagconn = i_input_add(dcc->handle, I_INPUT_WRITE | I_INPUT_READ,
(GInputFunction) sig_chat_connected, dcc);
} else {
/* error connecting */
signal_emit("dcc error connect", 1, dcc);
@ -428,8 +425,8 @@ static void dcc_chat_passive(CHAT_DCC_REC *dcc)
cmd_return_error(CMDERR_ERRNO);
dcc->handle = handle;
dcc->tagconn = g_input_add(dcc->handle, G_INPUT_READ,
(GInputFunction) dcc_chat_listen, dcc);
dcc->tagconn =
i_input_add(dcc->handle, I_INPUT_READ, (GInputFunction) dcc_chat_listen, dcc);
/* Let's send the reply to the other client! */
dcc_ip2str(&own_ip, host);
@ -508,8 +505,7 @@ static void cmd_dcc_chat(const char *data, IRC_SERVER_REC *server)
dcc->handle = handle;
dcc->tagconn =
g_input_add(dcc->handle, G_INPUT_READ,
(GInputFunction) dcc_chat_listen, dcc);
i_input_add(dcc->handle, I_INPUT_READ, (GInputFunction) dcc_chat_listen, dcc);
/* send the chat request */
signal_emit("dcc request send", 1, dcc);

View file

@ -112,9 +112,8 @@ void dcc_get_send_received(GET_DCC_REC *dcc)
last 1-3 bytes should be sent later. these happen probably
never, but I just want to do it right.. :) */
if (dcc->tagwrite == -1) {
dcc->tagwrite = g_input_add(dcc->handle, G_INPUT_WRITE,
(GInputFunction) sig_dccget_send,
dcc);
dcc->tagwrite =
i_input_add(dcc->handle, I_INPUT_WRITE, (GInputFunction) sig_dccget_send, dcc);
}
}
@ -285,8 +284,8 @@ void sig_dccget_connected(GET_DCC_REC *dcc)
dcc_close(DCC(dcc));
return;
}
dcc->tagread = g_input_add(dcc->handle, G_INPUT_READ,
(GInputFunction) sig_dccget_receive, dcc);
dcc->tagread =
i_input_add(dcc->handle, I_INPUT_READ, (GInputFunction) sig_dccget_receive, dcc);
signal_emit("dcc connected", 1, dcc);
if (dcc->from_dccserver) {
@ -311,11 +310,8 @@ void dcc_get_connect(GET_DCC_REC *dcc)
dcc->handle = dcc_connect_ip(&dcc->addr, dcc->port);
if (dcc->handle != NULL) {
dcc->tagconn =
g_input_add(dcc->handle,
G_INPUT_WRITE | G_INPUT_READ,
(GInputFunction) sig_dccget_connected,
dcc);
dcc->tagconn = i_input_add(dcc->handle, I_INPUT_WRITE | I_INPUT_READ,
(GInputFunction) sig_dccget_connected, dcc);
} else {
/* error connecting */
signal_emit("dcc error connect", 1, dcc);
@ -344,8 +340,8 @@ static void dcc_get_listen(GET_DCC_REC *dcc)
net_ip2host(&dcc->addr, dcc->addrstr);
dcc->port = port;
dcc->tagconn = g_input_add(handle, G_INPUT_READ | G_INPUT_WRITE,
(GInputFunction) sig_dccget_connected, dcc);
dcc->tagconn = i_input_add(handle, I_INPUT_READ | I_INPUT_WRITE,
(GInputFunction) sig_dccget_connected, dcc);
}
void dcc_get_passive(GET_DCC_REC *dcc)
@ -361,8 +357,7 @@ void dcc_get_passive(GET_DCC_REC *dcc)
cmd_return_error(CMDERR_ERRNO);
dcc->handle = handle;
dcc->tagconn = g_input_add(dcc->handle, G_INPUT_READ,
(GInputFunction) dcc_get_listen, dcc);
dcc->tagconn = i_input_add(dcc->handle, I_INPUT_READ, (GInputFunction) dcc_get_listen, dcc);
/* Let's send the reply to the other client! */
dcc_ip2str(&own_ip, host);

View file

@ -336,10 +336,8 @@ static void dcc_send_connected(SEND_DCC_REC *dcc)
net_ip2host(&dcc->addr, dcc->addrstr);
dcc->port = port;
dcc->tagread = g_input_add(handle, G_INPUT_READ,
(GInputFunction) dcc_send_read_size, dcc);
dcc->tagwrite = g_input_add(handle, G_INPUT_WRITE,
(GInputFunction) dcc_send_data, dcc);
dcc->tagread = i_input_add(handle, I_INPUT_READ, (GInputFunction) dcc_send_read_size, dcc);
dcc->tagwrite = i_input_add(handle, I_INPUT_WRITE, (GInputFunction) dcc_send_data, dcc);
signal_emit("dcc connected", 1, dcc);
}
@ -352,12 +350,10 @@ static void dcc_send_connect(SEND_DCC_REC *dcc)
if (dcc->handle != NULL) {
dcc->starttime = time(NULL);
dcc->tagread = g_input_add(dcc->handle, G_INPUT_READ,
(GInputFunction) dcc_send_read_size,
dcc);
dcc->tagwrite = g_input_add(dcc->handle, G_INPUT_WRITE,
(GInputFunction) dcc_send_data,
dcc);
dcc->tagread = i_input_add(dcc->handle, I_INPUT_READ,
(GInputFunction) dcc_send_read_size, dcc);
dcc->tagwrite =
i_input_add(dcc->handle, I_INPUT_WRITE, (GInputFunction) dcc_send_data, dcc);
signal_emit("dcc connected", 1, dcc);
} else {
/* error connecting */
@ -436,9 +432,8 @@ static int dcc_send_one_file(int queue, const char *target, const char *fname,
dcc->queue = queue;
dcc->file_quoted = strchr(fname, ' ') != NULL;
if (!passive) {
dcc->tagconn = g_input_add(handle, G_INPUT_READ,
(GInputFunction) dcc_send_connected,
dcc);
dcc->tagconn =
i_input_add(handle, I_INPUT_READ, (GInputFunction) dcc_send_connected, dcc);
}
/* Generate an ID for this send if using passive protocol */

View file

@ -183,8 +183,8 @@ static void dcc_server_listen(SERVER_DCC_REC *dcc)
memcpy(&newdcc->addr, &ip, sizeof(IPADDR));
net_ip2host(&newdcc->addr, newdcc->addrstr);
newdcc->port = port;
newdcc->tagread = g_input_add(handle, G_INPUT_READ,
(GInputFunction) dcc_server_input, newdcc);
newdcc->tagread =
i_input_add(handle, I_INPUT_READ, (GInputFunction) dcc_server_input, newdcc);
signal_emit("dcc connected", 1, newdcc);
}
@ -210,8 +210,8 @@ static void dcc_server_msg(SERVER_DCC_REC *dcc, const char *msg)
memcpy(&dccchat->addr, &dcc->addr, sizeof(IPADDR));
net_ip2host(&dccchat->addr, dccchat->addrstr);
dccchat->port = dcc->port;
dccchat->tagread = g_input_add(dccchat->handle, G_INPUT_READ,
(GInputFunction) dcc_chat_input, dccchat);
dccchat->tagread = i_input_add(dccchat->handle, I_INPUT_READ,
(GInputFunction) dcc_chat_input, dccchat);
dcc->connection_established = 1;
signal_emit("dcc connected", 1, dccchat);
@ -347,8 +347,8 @@ static void cmd_dcc_server(const char *data, IRC_SERVER_REC *server)
dcc = dcc_server_create(server, flags);
dcc->handle = handle;
dcc->port = atoi(port);
dcc->tagconn = g_input_add(dcc->handle, G_INPUT_READ,
(GInputFunction) dcc_server_listen, dcc);
dcc->tagconn =
i_input_add(dcc->handle, I_INPUT_READ, (GInputFunction) dcc_server_listen, dcc);
signal_emit("dcc server started", 1, dcc);

View file

@ -470,8 +470,7 @@ static void sig_listen(LISTEN_REC *listen)
rec->server = servers == NULL ? NULL :
IRC_SERVER(server_find_chatnet(listen->ircnet));
}
rec->recv_tag = g_input_add(handle, G_INPUT_READ,
(GInputFunction) sig_listen_client, rec);
rec->recv_tag = i_input_add(handle, I_INPUT_READ, (GInputFunction) sig_listen_client, rec);
proxy_clients = g_slist_prepend(proxy_clients, rec);
listen->clients = g_slist_prepend(listen->clients, rec);
@ -739,8 +738,7 @@ static void add_listen(const char *ircnet, int port, const char *port_or_path)
rec->port = port;
rec->port_or_path = g_strdup(port_or_path);
rec->tag = g_input_add(rec->handle, G_INPUT_READ,
(GInputFunction) sig_listen, rec);
rec->tag = i_input_add(rec->handle, I_INPUT_READ, (GInputFunction) sig_listen, rec);
proxy_listens = g_slist_append(proxy_listens, rec);
}