mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 04:43:34 +02:00
Merge pull request #1246 from ailin-nemui/wrong-prefixes
correct wrong function prefixes
Module authors will have to adapt these changes:
[M] 'constant I_INPUT_READ' {G_INPUT_READ}
[M] 'constant I_INPUT_WRITE' {G_INPUT_WRITE}
[M] 'function int i_input_add(GIOChannel*, int, GInputFunction, void*)' {g_input_add}
[M] 'function int i_input_add_full(GIOChannel*, int, int, GInputFunction, void*)' {g_input_add_full}
[M] 'function int i_input_add_poll(int, int, int, GInputFunction, void*)' {g_input_add_poll}
[M] 'function GIOChannel* i_io_channel_new(int)' {g_io_channel_new}
[M] 'function int i_io_channel_read_block(GIOChannel*, void*, int)' {g_io_channel_read_block}
[M] 'function int i_io_channel_write_block(GIOChannel*, void*, int)' {g_io_channel_write_block}
[M] 'function int i_istr_cmp(gconstpointer, gconstpointer)' {g_istr_cmp}
[M] 'function int i_istr_equal(gconstpointer, gconstpointer)' {g_istr_equal}
[M] 'function guint i_istr_hash(gconstpointer)' {g_istr_hash}
[M] 'function void i_log_func(const char*, GLogLevelFlags, const char*)' {glog_func}
[M] 'function GSList* i_slist_delete_string(GSList*, const char*, GDestroyNotify)' {gslist_delete_string}
[M] 'function GSList* i_slist_find_icase_string(GSList*, const char*)' {gslist_find_icase_string}
[M] 'function GSList* i_slist_find_string(GSList*, const char*)' {gslist_find_string}
[M] 'function void* i_slist_foreach_find(GSList*, FOREACH_FIND_FUNC, void*)' {gslist_foreach_find}
[M] 'function void i_slist_free_full(GSList*, GDestroyNotify)' {gslist_free_full}
[M] 'function GSList* i_slist_remove_string(GSList*, const char*)' {gslist_remove_string}
[M] 'function char* i_slist_to_string(GSList*, const char*)' {gslist_to_string}
This commit is contained in:
commit
db9aa817d5
46 changed files with 181 additions and 231 deletions
|
|
@ -126,9 +126,8 @@ CHANNEL_REC *channel_find(SERVER_REC *server, const char *name)
|
|||
return channel_find_server(server, name);
|
||||
|
||||
/* find from any server */
|
||||
return gslist_foreach_find(servers,
|
||||
(FOREACH_FIND_FUNC) channel_find_server,
|
||||
(void *) name);
|
||||
return i_slist_foreach_find(servers, (FOREACH_FIND_FUNC) channel_find_server,
|
||||
(void *) name);
|
||||
}
|
||||
|
||||
void channel_change_name(CHANNEL_REC *channel, const char *name)
|
||||
|
|
@ -153,9 +152,8 @@ void channel_change_visible_name(CHANNEL_REC *channel, const char *name)
|
|||
|
||||
static CHANNEL_REC *channel_find_servers(GSList *servers, const char *name)
|
||||
{
|
||||
return gslist_foreach_find(servers,
|
||||
(FOREACH_FIND_FUNC) channel_find_server,
|
||||
(void *) name);
|
||||
return i_slist_foreach_find(servers, (FOREACH_FIND_FUNC) channel_find_server,
|
||||
(void *) name);
|
||||
}
|
||||
|
||||
static GSList *servers_find_chatnet_except(SERVER_REC *server)
|
||||
|
|
|
|||
|
|
@ -431,7 +431,7 @@ static void command_calc_options(COMMAND_REC *rec, const char *options)
|
|||
g_strfreev(optlist);
|
||||
|
||||
/* linked list -> string[] */
|
||||
str = gslist_to_string(list, " ");
|
||||
str = i_slist_to_string(list, " ");
|
||||
rec->options = g_strsplit(str, " ", -1);
|
||||
g_free(str);
|
||||
|
||||
|
|
@ -740,8 +740,7 @@ int cmd_get_params(const char *data, gpointer *free_me, int count, ...)
|
|||
opthash = (GHashTable **) va_arg(args, GHashTable **);
|
||||
|
||||
rec->options = *opthash =
|
||||
g_hash_table_new((GHashFunc) g_istr_hash,
|
||||
(GCompareFunc) g_istr_equal);
|
||||
g_hash_table_new((GHashFunc) i_istr_hash, (GCompareFunc) i_istr_equal);
|
||||
|
||||
ignore_unknown = count & PARAM_FLAG_UNKNOWN_OPTIONS;
|
||||
error = get_cmd_options(&datad, ignore_unknown,
|
||||
|
|
@ -832,7 +831,7 @@ void commands_remove_module(const char *module)
|
|||
COMMAND_REC *rec = tmp->data;
|
||||
|
||||
next = tmp->next;
|
||||
modlist = gslist_find_string(rec->modules, module);
|
||||
modlist = i_slist_find_string(rec->modules, module);
|
||||
if (modlist != NULL)
|
||||
command_module_unbind_all(rec, modlist->data);
|
||||
}
|
||||
|
|
@ -866,8 +865,7 @@ static int cmd_protocol_match(COMMAND_REC *cmd, SERVER_REC *server)
|
|||
#define alias_runstack_pop(alias) \
|
||||
alias_runstack = g_slist_remove(alias_runstack, alias)
|
||||
|
||||
#define alias_runstack_find(alias) \
|
||||
(gslist_find_icase_string(alias_runstack, alias) != NULL)
|
||||
#define alias_runstack_find(alias) (i_slist_find_icase_string(alias_runstack, alias) != NULL)
|
||||
|
||||
static void parse_command(const char *command, int expand_aliases,
|
||||
SERVER_REC *server, void *item)
|
||||
|
|
|
|||
|
|
@ -561,7 +561,7 @@ static void log_read_config(void)
|
|||
if (node != NULL)
|
||||
log_items_read_config(node, log);
|
||||
|
||||
if (log->autoopen || gslist_find_string(fnames, log->fname))
|
||||
if (log->autoopen || i_slist_find_string(fnames, log->fname))
|
||||
log_start_logging(log);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,15 +37,15 @@ static int irssi_io_invoke(GIOChannel *source, GIOCondition condition,
|
|||
if (condition & (G_IO_ERR | G_IO_HUP | G_IO_NVAL)) {
|
||||
/* error, we have to call the function.. */
|
||||
if (rec->condition & G_IO_IN)
|
||||
icond |= G_INPUT_READ;
|
||||
icond |= I_INPUT_READ;
|
||||
else
|
||||
icond |= G_INPUT_WRITE;
|
||||
icond |= I_INPUT_WRITE;
|
||||
}
|
||||
|
||||
if (condition & (G_IO_IN | G_IO_PRI))
|
||||
icond |= G_INPUT_READ;
|
||||
icond |= I_INPUT_READ;
|
||||
if (condition & G_IO_OUT)
|
||||
icond |= G_INPUT_WRITE;
|
||||
icond |= I_INPUT_WRITE;
|
||||
|
||||
if (rec->condition & icond)
|
||||
rec->function(rec->data, source, icond);
|
||||
|
|
@ -53,8 +53,8 @@ static int irssi_io_invoke(GIOChannel *source, GIOCondition condition,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
int g_input_add_full(GIOChannel *source, int priority, int condition,
|
||||
GInputFunction function, void *data)
|
||||
int i_input_add_full(GIOChannel *source, int priority, int condition, GInputFunction function,
|
||||
void *data)
|
||||
{
|
||||
IRSSI_INPUT_REC *rec;
|
||||
unsigned int result;
|
||||
|
|
@ -66,9 +66,9 @@ int g_input_add_full(GIOChannel *source, int priority, int condition,
|
|||
rec->data = data;
|
||||
|
||||
cond = (GIOCondition) (G_IO_ERR|G_IO_HUP|G_IO_NVAL);
|
||||
if (condition & G_INPUT_READ)
|
||||
if (condition & I_INPUT_READ)
|
||||
cond |= G_IO_IN|G_IO_PRI;
|
||||
if (condition & G_INPUT_WRITE)
|
||||
if (condition & I_INPUT_WRITE)
|
||||
cond |= G_IO_OUT;
|
||||
|
||||
result = g_io_add_watch_full(source, priority, cond,
|
||||
|
|
@ -77,19 +77,16 @@ int g_input_add_full(GIOChannel *source, int priority, int condition,
|
|||
return result;
|
||||
}
|
||||
|
||||
int g_input_add(GIOChannel *source, int condition,
|
||||
GInputFunction function, void *data)
|
||||
int i_input_add(GIOChannel *source, int condition, GInputFunction function, void *data)
|
||||
{
|
||||
return g_input_add_full(source, G_PRIORITY_DEFAULT, condition,
|
||||
function, data);
|
||||
return i_input_add_full(source, G_PRIORITY_DEFAULT, condition, function, data);
|
||||
}
|
||||
|
||||
/* easy way to bypass glib polling of io channel internal buffer */
|
||||
int g_input_add_poll(int fd, int priority, int condition,
|
||||
GInputFunction function, void *data)
|
||||
int i_input_add_poll(int fd, int priority, int condition, GInputFunction function, void *data)
|
||||
{
|
||||
GIOChannel *source = g_io_channel_unix_new(fd);
|
||||
int ret = g_input_add_full(source, priority, condition, function, data);
|
||||
int ret = i_input_add_full(source, priority, condition, function, data);
|
||||
g_io_channel_unref(source);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -170,7 +167,7 @@ int strarray_find(char **array, const char *item)
|
|||
return -1;
|
||||
}
|
||||
|
||||
GSList *gslist_find_string(GSList *list, const char *key)
|
||||
GSList *i_slist_find_string(GSList *list, const char *key)
|
||||
{
|
||||
for (; list != NULL; list = list->next)
|
||||
if (g_strcmp0(list->data, key) == 0) return list;
|
||||
|
|
@ -178,7 +175,7 @@ GSList *gslist_find_string(GSList *list, const char *key)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
GSList *gslist_find_icase_string(GSList *list, const char *key)
|
||||
GSList *i_slist_find_icase_string(GSList *list, const char *key)
|
||||
{
|
||||
for (; list != NULL; list = list->next)
|
||||
if (g_ascii_strcasecmp(list->data, key) == 0) return list;
|
||||
|
|
@ -186,7 +183,7 @@ GSList *gslist_find_icase_string(GSList *list, const char *key)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void *gslist_foreach_find(GSList *list, FOREACH_FIND_FUNC func, const void *data)
|
||||
void *i_slist_foreach_find(GSList *list, FOREACH_FIND_FUNC func, const void *data)
|
||||
{
|
||||
void *ret;
|
||||
|
||||
|
|
@ -200,7 +197,7 @@ void *gslist_foreach_find(GSList *list, FOREACH_FIND_FUNC func, const void *data
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void gslist_free_full (GSList *list, GDestroyNotify free_func)
|
||||
void i_slist_free_full(GSList *list, GDestroyNotify free_func)
|
||||
{
|
||||
GSList *tmp;
|
||||
|
||||
|
|
@ -213,7 +210,7 @@ void gslist_free_full (GSList *list, GDestroyNotify free_func)
|
|||
g_slist_free(list);
|
||||
}
|
||||
|
||||
GSList *gslist_remove_string (GSList *list, const char *str)
|
||||
GSList *i_slist_remove_string(GSList *list, const char *str)
|
||||
{
|
||||
GSList *l;
|
||||
|
||||
|
|
@ -224,7 +221,7 @@ GSList *gslist_remove_string (GSList *list, const char *str)
|
|||
return list;
|
||||
}
|
||||
|
||||
GSList *gslist_delete_string (GSList *list, const char *str, GDestroyNotify free_func)
|
||||
GSList *i_slist_delete_string(GSList *list, const char *str, GDestroyNotify free_func)
|
||||
{
|
||||
GSList *l;
|
||||
|
||||
|
|
@ -258,7 +255,7 @@ char *gslistptr_to_string(GSList *list, int offset, const char *delimiter)
|
|||
}
|
||||
|
||||
/* `list' contains char* */
|
||||
char *gslist_to_string(GSList *list, const char *delimiter)
|
||||
char *i_slist_to_string(GSList *list, const char *delimiter)
|
||||
{
|
||||
GString *str;
|
||||
char *ret;
|
||||
|
|
@ -411,17 +408,17 @@ char *convert_home(const char *path)
|
|||
}
|
||||
}
|
||||
|
||||
int g_istr_equal(gconstpointer v, gconstpointer v2)
|
||||
int i_istr_equal(gconstpointer v, gconstpointer v2)
|
||||
{
|
||||
return g_ascii_strcasecmp((const char *) v, (const char *) v2) == 0;
|
||||
}
|
||||
|
||||
int g_istr_cmp(gconstpointer v, gconstpointer v2)
|
||||
int i_istr_cmp(gconstpointer v, gconstpointer v2)
|
||||
{
|
||||
return g_ascii_strcasecmp((const char *) v, (const char *) v2);
|
||||
}
|
||||
|
||||
guint g_istr_hash(gconstpointer v)
|
||||
guint i_istr_hash(gconstpointer v)
|
||||
{
|
||||
const signed char *p;
|
||||
guint32 h = 5381;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
#ifndef IRSSI_CORE_MISC_H
|
||||
#define IRSSI_CORE_MISC_H
|
||||
|
||||
int g_input_add_poll(int fd, int priority, int condition,
|
||||
GInputFunction function, void *data);
|
||||
int i_input_add_poll(int fd, int priority, int condition, GInputFunction function, void *data);
|
||||
|
||||
/* `str' should be type char[MAX_INT_STRLEN] */
|
||||
#define ltoa(str, num) \
|
||||
|
|
@ -20,21 +19,21 @@ int g_timeval_cmp(const GTimeVal *tv1, const GTimeVal *tv2) G_GNUC_DEPRECATED;
|
|||
long get_timeval_diff(const GTimeVal *tv1, const GTimeVal *tv2) G_GNUC_DEPRECATED;
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
GSList *gslist_find_string(GSList *list, const char *key);
|
||||
GSList *gslist_find_icase_string(GSList *list, const char *key);
|
||||
GSList *i_slist_find_string(GSList *list, const char *key);
|
||||
GSList *i_slist_find_icase_string(GSList *list, const char *key);
|
||||
GList *glist_find_string(GList *list, const char *key);
|
||||
GList *glist_find_icase_string(GList *list, const char *key);
|
||||
GSList *gslist_remove_string (GSList *list, const char *str) G_GNUC_DEPRECATED;
|
||||
GSList *gslist_delete_string (GSList *list, const char *str, GDestroyNotify free_func);
|
||||
GSList *i_slist_remove_string(GSList *list, const char *str) G_GNUC_DEPRECATED;
|
||||
GSList *i_slist_delete_string(GSList *list, const char *str, GDestroyNotify free_func);
|
||||
|
||||
void gslist_free_full (GSList *list, GDestroyNotify free_func);
|
||||
void i_slist_free_full(GSList *list, GDestroyNotify free_func);
|
||||
|
||||
void *gslist_foreach_find(GSList *list, FOREACH_FIND_FUNC func, const void *data);
|
||||
void *i_slist_foreach_find(GSList *list, FOREACH_FIND_FUNC func, const void *data);
|
||||
|
||||
/* `list' contains pointer to structure with a char* to string. */
|
||||
char *gslistptr_to_string(GSList *list, int offset, const char *delimiter);
|
||||
/* `list' contains char* */
|
||||
char *gslist_to_string(GSList *list, const char *delimiter);
|
||||
char *i_slist_to_string(GSList *list, const char *delimiter);
|
||||
|
||||
GList *optlist_remove_known(const char *cmd, GHashTable *optlist);
|
||||
|
||||
|
|
@ -42,11 +41,11 @@ GList *optlist_remove_known(const char *cmd, GHashTable *optlist);
|
|||
char *convert_home(const char *path);
|
||||
|
||||
/* Case-insensitive string hash functions */
|
||||
int g_istr_equal(gconstpointer v, gconstpointer v2);
|
||||
unsigned int g_istr_hash(gconstpointer v);
|
||||
int i_istr_equal(gconstpointer v, gconstpointer v2);
|
||||
unsigned int i_istr_hash(gconstpointer v);
|
||||
|
||||
/* Case-insensitive GCompareFunc func */
|
||||
int g_istr_cmp(gconstpointer v, gconstpointer v2);
|
||||
int i_istr_cmp(gconstpointer v, gconstpointer v2);
|
||||
|
||||
/* Find `mask' from `data', you can use * and ? wildcards. */
|
||||
int match_wildcards(const char *mask, const char *data);
|
||||
|
|
|
|||
|
|
@ -97,8 +97,7 @@ void net_disconnect_later(GIOChannel *handle)
|
|||
rec = g_new(NET_DISCONNECT_REC, 1);
|
||||
rec->created = time(NULL);
|
||||
rec->handle = handle;
|
||||
rec->tag = g_input_add(handle, G_INPUT_READ,
|
||||
(GInputFunction) sig_disconnect, rec);
|
||||
rec->tag = i_input_add(handle, I_INPUT_READ, (GInputFunction) sig_disconnect, rec);
|
||||
|
||||
if (timeout_tag == -1) {
|
||||
timeout_tag = g_timeout_add(10000, (GSourceFunc)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -132,8 +132,7 @@ int net_sendbuffer_send(NET_SENDBUF_REC *rec, const void *data, int size)
|
|||
/* everything couldn't be sent. */
|
||||
if (rec->send_tag == -1) {
|
||||
rec->send_tag =
|
||||
g_input_add(rec->handle, G_INPUT_WRITE,
|
||||
(GInputFunction) sig_sendbuffer, rec);
|
||||
i_input_add(rec->handle, I_INPUT_WRITE, (GInputFunction) sig_sendbuffer, rec);
|
||||
}
|
||||
|
||||
return buffer_add(rec, data, size) ? 0 : -1;
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -456,8 +456,7 @@ static void sig_channel_created(CHANNEL_REC *channel)
|
|||
{
|
||||
g_return_if_fail(IS_CHANNEL(channel));
|
||||
|
||||
channel->nicks = g_hash_table_new((GHashFunc) g_istr_hash,
|
||||
(GCompareFunc) g_istr_equal);
|
||||
channel->nicks = g_hash_table_new((GHashFunc) i_istr_hash, (GCompareFunc) i_istr_equal);
|
||||
}
|
||||
|
||||
static void nicklist_remove_hash(gpointer key, NICK_REC *nick,
|
||||
|
|
|
|||
|
|
@ -184,10 +184,9 @@ static void server_connect_callback_init_ssl(SERVER_REC *server, GIOChannel *han
|
|||
if (error & 1) {
|
||||
if (server->connect_tag != -1)
|
||||
g_source_remove(server->connect_tag);
|
||||
server->connect_tag = g_input_add(handle, error == 1 ? G_INPUT_READ : G_INPUT_WRITE,
|
||||
(GInputFunction)
|
||||
server_connect_callback_init_ssl,
|
||||
server);
|
||||
server->connect_tag =
|
||||
i_input_add(handle, error == 1 ? I_INPUT_READ : I_INPUT_WRITE,
|
||||
(GInputFunction) server_connect_callback_init_ssl, server);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -253,11 +252,9 @@ static void server_real_connect(SERVER_REC *server, IPADDR *ip,
|
|||
if (server->connrec->use_tls)
|
||||
server_connect_callback_init_ssl(server, handle);
|
||||
else
|
||||
server->connect_tag =
|
||||
g_input_add(handle, G_INPUT_WRITE | G_INPUT_READ,
|
||||
(GInputFunction)
|
||||
server_connect_callback_init,
|
||||
server);
|
||||
server->connect_tag =
|
||||
i_input_add(handle, I_INPUT_WRITE | I_INPUT_READ,
|
||||
(GInputFunction) server_connect_callback_init, server);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -409,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;
|
||||
|
|
@ -418,10 +415,8 @@ int server_start_connect(SERVER_REC *server)
|
|||
net_gethostbyname_nonblock(connect_address,
|
||||
server->connect_pipe[1], 0);
|
||||
server->connect_tag =
|
||||
g_input_add(server->connect_pipe[0], G_INPUT_READ,
|
||||
(GInputFunction)
|
||||
server_connect_callback_readpipe,
|
||||
server);
|
||||
i_input_add(server->connect_pipe[0], I_INPUT_READ,
|
||||
(GInputFunction) server_connect_callback_readpipe, server);
|
||||
|
||||
server->connect_time = time(NULL);
|
||||
lookup_servers = g_slist_append(lookup_servers, server);
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -613,9 +613,8 @@ void settings_check_module(const char *module)
|
|||
}
|
||||
}
|
||||
if (count > 0) {
|
||||
if (gslist_find_icase_string(last_invalid_modules,
|
||||
module) == NULL) {
|
||||
/* mark this module having invalid settings */
|
||||
if (i_slist_find_icase_string(last_invalid_modules, module) == NULL) {
|
||||
/* mark this module having invalid settings */
|
||||
last_invalid_modules =
|
||||
g_slist_append(last_invalid_modules,
|
||||
g_strdup(module));
|
||||
|
|
@ -876,8 +875,7 @@ static int sig_autosave(void)
|
|||
|
||||
void settings_init(void)
|
||||
{
|
||||
settings = g_hash_table_new((GHashFunc) g_istr_hash,
|
||||
(GCompareFunc) g_istr_equal);
|
||||
settings = g_hash_table_new((GHashFunc) i_istr_hash, (GCompareFunc) i_istr_equal);
|
||||
|
||||
last_errors = NULL;
|
||||
last_invalid_modules = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue