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
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));