Fix a couple of compiler warnings in irc.c - two places where the address
of an array was tested (always not-NULL) and one unused variable (first_time in io()). The user-visible change here is that the emergency exit QUIT messages (eg "User abort with 5 Ctrl-C's") will be correctly relayed to the local terminal now. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@321 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
[Changes 1.2c01]
|
[Changes 1.2c01]
|
||||||
|
|
||||||
|
* Show same message on local terminal as used in emergency exit QUIT. (caf)
|
||||||
|
|
||||||
* Remove unused XLINK CTCP reply handler. (caf)
|
* Remove unused XLINK CTCP reply handler. (caf)
|
||||||
|
|
||||||
* Ensure add_socketread() doesn't leak file descriptors. (caf)
|
* Ensure add_socketread() doesn't leak file descriptors. (caf)
|
||||||
|
|||||||
36
source/irc.c
36
source/irc.c
@@ -437,8 +437,7 @@ void BX_irc_exit (int really_quit, char *reason, char *format, ...)
|
|||||||
|
|
||||||
close_all_servers(reason ? reason : buffer);
|
close_all_servers(reason ? reason : buffer);
|
||||||
|
|
||||||
put_it("%s", buffer ? buffer : reason ? reason : empty_string);
|
put_it("%s", !format && reason ? reason : buffer);
|
||||||
|
|
||||||
|
|
||||||
clean_up_processes();
|
clean_up_processes();
|
||||||
if (!dumb_mode && term_initialized)
|
if (!dumb_mode && term_initialized)
|
||||||
@@ -1138,7 +1137,7 @@ static char *parse_args (char *argv[], int argc, char **envp)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!nickname || !*nickname)
|
if (!*nickname)
|
||||||
strlcpy(nickname, username, sizeof nickname);
|
strlcpy(nickname, username, sizeof nickname);
|
||||||
|
|
||||||
if (!check_nickname(nickname))
|
if (!check_nickname(nickname))
|
||||||
@@ -1201,23 +1200,19 @@ extern void set_screens (fd_set *, fd_set *);
|
|||||||
|
|
||||||
void BX_io (const char *what)
|
void BX_io (const char *what)
|
||||||
{
|
{
|
||||||
static int first_time = 1,
|
static int level = 0;
|
||||||
level = 0;
|
long clock_timeout = 0,
|
||||||
long clock_timeout = 0,
|
timer_timeout = 0,
|
||||||
timer_timeout = 0,
|
server_timeout = 0,
|
||||||
server_timeout = 0,
|
real_timeout = 0;
|
||||||
real_timeout = 0;
|
static struct timeval my_now,
|
||||||
static struct timeval my_now,
|
my_timer,
|
||||||
my_timer,
|
*time_ptr = &my_timer;
|
||||||
*time_ptr = &my_timer;
|
int hold_over, rc;
|
||||||
|
fd_set rd, wd;
|
||||||
int hold_over,
|
static int old_level = 0;
|
||||||
rc;
|
static const char *caller[51] = { NULL }; /* XXXX */
|
||||||
fd_set rd,
|
static int last_warn = 0;
|
||||||
wd;
|
|
||||||
static int old_level = 0;
|
|
||||||
static const char *caller[51] = { NULL }; /* XXXX */
|
|
||||||
static int last_warn = 0;
|
|
||||||
|
|
||||||
level++;
|
level++;
|
||||||
|
|
||||||
@@ -1304,7 +1299,6 @@ static const char *caller[51] = { NULL }; /* XXXX */
|
|||||||
case -1:
|
case -1:
|
||||||
{
|
{
|
||||||
/* if we just got a sigint */
|
/* if we just got a sigint */
|
||||||
first_time = 0;
|
|
||||||
if (cntl_c_hit)
|
if (cntl_c_hit)
|
||||||
{
|
{
|
||||||
edit_char('\003');
|
edit_char('\003');
|
||||||
|
|||||||
Reference in New Issue
Block a user