1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-01 04:14:16 -04:00

correct wrong function prefixes: g_io_channel -> i_io_channel

This commit is contained in:
Ailin Nemui 2021-01-04 15:42:20 +01:00
parent 9181796472
commit 50ed476623
8 changed files with 25 additions and 25 deletions

View File

@ -62,9 +62,9 @@ int net_gethostbyname_nonblock(const char *addr, GIOChannel *pipe, int reverse_l
rec.errlen = errorstr == NULL ? 0 : strlen(errorstr)+1;
}
g_io_channel_write_block(pipe, &rec, sizeof(rec));
i_io_channel_write_block(pipe, &rec, sizeof(rec));
if (rec.errlen != 0)
g_io_channel_write_block(pipe, (void *) errorstr, rec.errlen);
i_io_channel_write_block(pipe, (void *) errorstr, rec.errlen);
if (pid == 0)
_exit(99);
@ -82,7 +82,7 @@ int net_gethostbyname_return(GIOChannel *pipe, RESOLVED_IP_REC *rec)
fcntl(g_io_channel_unix_get_fd(pipe), F_SETFL, O_NONBLOCK);
/* get ip+error */
if (g_io_channel_read_block(pipe, rec, sizeof(*rec)) == -1) {
if (i_io_channel_read_block(pipe, rec, sizeof(*rec)) == -1) {
rec->errorstr = g_strdup_printf("Host name lookup: %s",
g_strerror(errno));
return -1;
@ -92,7 +92,7 @@ int net_gethostbyname_return(GIOChannel *pipe, RESOLVED_IP_REC *rec)
/* read error string, if we can't read everything for some
reason, just ignore it. */
rec->errorstr = g_malloc0(rec->errlen+1);
g_io_channel_read_block(pipe, rec->errorstr, rec->errlen);
i_io_channel_read_block(pipe, rec->errorstr, rec->errlen);
}
return 0;

View File

@ -39,7 +39,7 @@ union sockaddr_union {
#define SIZEOF_SOCKADDR(so) ((so).sa.sa_family == AF_INET6 ? \
sizeof(so.sin6) : sizeof(so.sin))
GIOChannel *g_io_channel_new(int handle)
GIOChannel *i_io_channel_new(int handle)
{
GIOChannel *chan;
chan = g_io_channel_unix_new(handle);
@ -48,7 +48,7 @@ GIOChannel *g_io_channel_new(int handle)
return chan;
}
int g_io_channel_write_block(GIOChannel *channel, void *data, int len)
int i_io_channel_write_block(GIOChannel *channel, void *data, int len)
{
gsize ret;
int sent;
@ -63,7 +63,7 @@ int g_io_channel_write_block(GIOChannel *channel, void *data, int len)
return sent < len ? -1 : 0;
}
int g_io_channel_read_block(GIOChannel *channel, void *data, int len)
int i_io_channel_read_block(GIOChannel *channel, void *data, int len)
{
time_t maxwait;
gsize ret;
@ -211,7 +211,7 @@ GIOChannel *net_connect_ip(IPADDR *ip, int port, IPADDR *my_ip)
if (handle == -1)
return (NULL);
return g_io_channel_new(handle);
return i_io_channel_new(handle);
}
/* Connect to named UNIX socket */
@ -242,7 +242,7 @@ GIOChannel *net_connect_unix(const char *path)
return NULL;
}
return g_io_channel_new(handle);
return i_io_channel_new(handle);
}
/* Disconnect socket */
@ -298,7 +298,7 @@ GIOChannel *net_listen(IPADDR *my_ip, int *port)
/* start listening */
if (listen(handle, 1) >= 0)
return g_io_channel_new(handle);
return i_io_channel_new(handle);
}
}
@ -327,7 +327,7 @@ GIOChannel *net_accept(GIOChannel *handle, IPADDR *addr, int *port)
if (port != NULL) *port = sin_get_port(&so);
fcntl(ret, F_SETFL, O_NONBLOCK);
return g_io_channel_new(ret);
return i_io_channel_new(ret);
}
/* Read data from socket, return number of bytes read, -1 = error */

View File

@ -31,13 +31,13 @@ struct _IPADDR {
extern IPADDR ip4_any;
GIOChannel *g_io_channel_new(int handle);
GIOChannel *i_io_channel_new(int handle);
/* Returns 1 if IPADDRs are the same. */
/* Deprecated since it is unused. It will be deleted in a later release. */
int net_ip_compare(IPADDR *ip1, IPADDR *ip2) G_GNUC_DEPRECATED;
int g_io_channel_write_block(GIOChannel *channel, void *data, int len);
int g_io_channel_read_block(GIOChannel *channel, void *data, int len);
int i_io_channel_write_block(GIOChannel *channel, void *data, int len);
int i_io_channel_read_block(GIOChannel *channel, void *data, int len);
int net_connect_ip_handle(const IPADDR *ip, int port, const IPADDR *my_ip);

View File

@ -406,8 +406,8 @@ int server_start_connect(SERVER_REC *server)
return FALSE;
}
server->connect_pipe[0] = g_io_channel_new(fd[0]);
server->connect_pipe[1] = g_io_channel_new(fd[1]);
server->connect_pipe[0] = i_io_channel_new(fd[0]);
server->connect_pipe[1] = i_io_channel_new(fd[1]);
connect_address = server->connrec->proxy != NULL ?
server->connrec->proxy : server->connrec->address;

View File

@ -262,7 +262,7 @@ static void session_restore_server(CONFIG_NODE *node)
chatnet, password, nick);
if (conn != NULL) {
conn->reconnection = TRUE;
conn->connect_handle = g_io_channel_new(handle);
conn->connect_handle = i_io_channel_new(handle);
server = proto->server_init_connect(conn);
server->version = g_strdup(config_node_get_str(node, "version", NULL));

View File

@ -302,9 +302,9 @@ static void process_exec(PROCESS_REC *rec, const char *cmd)
if (rec->pid != 0) {
/* parent process */
GIOChannel *outio = g_io_channel_new(in[1]);
GIOChannel *outio = i_io_channel_new(in[1]);
rec->in = g_io_channel_new(out[0]);
rec->in = i_io_channel_new(out[0]);
rec->out = net_sendbuffer_create(outio, 0);
close(out[1]);

View File

@ -74,7 +74,7 @@ static GIOChannel *net_listen_unix(const char *path)
goto error_unlink;
}
return g_io_channel_new(handle);
return i_io_channel_new(handle);
error_unlink:
unlink(sa.sun_path);
@ -99,7 +99,7 @@ static GIOChannel *net_accept_unix(GIOChannel *handle)
return NULL;
fcntl(ret, F_SETFL, O_NONBLOCK);
return g_io_channel_new(ret);
return i_io_channel_new(ret);
}
static void remove_client(CLIENT_REC *rec)

View File

@ -107,7 +107,7 @@ static void emit_event(GIOChannel *pipe, enum key_gen_status status, gcry_error_
event.status = status;
event.error = error;
g_io_channel_write_block(pipe, &event, sizeof(event));
i_io_channel_write_block(pipe, &event, sizeof(event));
}
/*
@ -137,7 +137,7 @@ static void read_key_gen_status(struct key_gen_worker *worker, GIOChannel *pipe)
fcntl(g_io_channel_unix_get_fd(pipe), F_SETFL, O_NONBLOCK);
if (g_io_channel_read_block(pipe, &event, sizeof(event)) == -1) {
if (i_io_channel_read_block(pipe, &event, sizeof(event)) == -1) {
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
TXT_OTR_KEYGEN_FAILED,
key_gen_state.account_name,
@ -244,8 +244,8 @@ void key_gen_run(struct otr_user_state *ustate, const char *account_name)
return;
}
worker->pipes[0] = g_io_channel_new(fd[0]);
worker->pipes[1] = g_io_channel_new(fd[1]);
worker->pipes[0] = i_io_channel_new(fd[0]);
worker->pipes[1] = i_io_channel_new(fd[1]);
pid = fork();