1
0
forked from bip/bip

Merge branch 'wording_and_typo'

This commit is contained in:
Pierre-Louis Bonicoli 2021-10-08 11:48:18 +02:00
commit 1732209c70
Signed by untrusted user: pilou
GPG Key ID: 06914C4A5EDAA6DD
2 changed files with 11 additions and 11 deletions

View File

@ -1235,7 +1235,7 @@ static void irc_copy_cli(struct link_client *src, struct link_client *dest,
return; return;
} }
static int irc_dispatch_loging_client(bip_t *bip, struct link_client *ic, static int irc_dispatch_logging_client(bip_t *bip, struct link_client *ic,
struct line *line) struct line *line)
{ {
if (irc_line_count(line) == 0) if (irc_line_count(line) == 0)
@ -1260,8 +1260,8 @@ int irc_dispatch(bip_t *bip, struct link_any *l, struct line *line)
case IRC_TYPE_CLIENT: case IRC_TYPE_CLIENT:
return irc_dispatch_client(bip, (struct link_client*)l, line); return irc_dispatch_client(bip, (struct link_client*)l, line);
break; break;
case IRC_TYPE_LOGING_CLIENT: case IRC_TYPE_LOGGING_CLIENT:
return irc_dispatch_loging_client(bip, (struct link_client*)l, return irc_dispatch_logging_client(bip, (struct link_client*)l,
line); line);
break; break;
#ifdef HAVE_LIBSSL #ifdef HAVE_LIBSSL
@ -1984,7 +1984,7 @@ static struct link_client *irc_accept_new(connection_t *conn)
ircc = bip_calloc(sizeof(struct link_client), 1); ircc = bip_calloc(sizeof(struct link_client), 1);
CONN(ircc) = newconn; CONN(ircc) = newconn;
TYPE(ircc) = IRC_TYPE_LOGING_CLIENT; TYPE(ircc) = IRC_TYPE_LOGGING_CLIENT;
CONN(ircc)->user_data = ircc; CONN(ircc)->user_data = ircc;
return ircc; return ircc;
} }
@ -2036,7 +2036,7 @@ void irc_client_close(struct link_client *ic)
} else if (TYPE(ic) == IRC_TYPE_TRUST_CLIENT) { } else if (TYPE(ic) == IRC_TYPE_TRUST_CLIENT) {
unbind_from_link(ic); unbind_from_link(ic);
irc_client_free(ic); irc_client_free(ic);
} else if (TYPE(ic) == IRC_TYPE_LOGING_CLIENT) { } else if (TYPE(ic) == IRC_TYPE_LOGGING_CLIENT) {
irc_client_free(ic); irc_client_free(ic);
} }
} }
@ -2481,8 +2481,8 @@ void bip_on_event(bip_t *bip, connection_t *conn)
line = irc_line_new_from_string(line_s); line = irc_line_new_from_string(line_s);
if (!line) { if (!line) {
mylog(LOG_ERROR, "[%s] Error in protocol, closing...", mylog(LOG_ERROR, "[%s] Can not parse line. Link type: %d. "
link_name(lc)); "closing...", link_name(lc), TYPE(lc));
free(line_s); free(line_s);
goto prot_err_lines; goto prot_err_lines;
} }
@ -2491,8 +2491,8 @@ void bip_on_event(bip_t *bip, connection_t *conn)
irc_line_free(line); irc_line_free(line);
free(line_s); free(line_s);
if (r == ERR_PROTOCOL) { if (r == ERR_PROTOCOL) {
mylog(LOG_ERROR, "[%s] Error in protocol, closing...", mylog(LOG_ERROR, "[%s] Error in protocol. Link type: %d closing...",
link_name(lc)); link_name(lc), TYPE(lc));
goto prot_err_lines; goto prot_err_lines;
} }
if (r == ERR_AUTH) if (r == ERR_AUTH)
@ -2512,7 +2512,7 @@ prot_err:
if (linel) if (linel)
list_free(linel); list_free(linel);
if (lc) { if (lc) {
if (TYPE(lc) == IRC_TYPE_LOGING_CLIENT || TYPE(lc) == if (TYPE(lc) == IRC_TYPE_LOGGING_CLIENT || TYPE(lc) ==
IRC_TYPE_TRUST_CLIENT) IRC_TYPE_TRUST_CLIENT)
list_remove(&bip->connecting_client_list, lc); list_remove(&bip->connecting_client_list, lc);
irc_close(lc); irc_close(lc);

View File

@ -51,7 +51,7 @@ struct channel {
#define IRC_TYPE_CLIENT (0) #define IRC_TYPE_CLIENT (0)
#define IRC_TYPE_SERVER (1) #define IRC_TYPE_SERVER (1)
#define IRC_TYPE_LOGING_CLIENT (2) #define IRC_TYPE_LOGGING_CLIENT (2)
#define IRC_TYPE_TRUST_CLIENT (3) #define IRC_TYPE_TRUST_CLIENT (3)
struct bipuser { struct bipuser {