зеркало из https://github.com/github/putty.git
Colin's and my fixes to connection_fatal().
[originally from svn r3161]
This commit is contained in:
Родитель
135abf2445
Коммит
0bfe876b57
2
raw.c
2
raw.c
|
@ -41,7 +41,7 @@ static int raw_closing(Plug plug, char *error_msg, int error_code,
|
|||
if (error_msg) {
|
||||
/* A socket error has occurred. */
|
||||
logevent(raw->frontend, error_msg);
|
||||
connection_fatal("%s", error_msg);
|
||||
connection_fatal(raw->frontend, "%s", error_msg);
|
||||
} /* Otherwise, the remote side closed the connection normally. */
|
||||
return 0;
|
||||
}
|
||||
|
|
2
rlogin.c
2
rlogin.c
|
@ -43,7 +43,7 @@ static int rlogin_closing(Plug plug, char *error_msg, int error_code,
|
|||
if (error_msg) {
|
||||
/* A socket error has occurred. */
|
||||
logevent(rlogin->frontend, error_msg);
|
||||
connection_fatal("%s", error_msg);
|
||||
connection_fatal(rlogin->frontend, "%s", error_msg);
|
||||
} /* Otherwise, the remote side closed the connection normally. */
|
||||
return 0;
|
||||
}
|
||||
|
|
2
ssh.c
2
ssh.c
|
@ -2085,7 +2085,7 @@ static int ssh_closing(Plug plug, char *error_msg, int error_code,
|
|||
if (error_msg) {
|
||||
/* A socket error has occurred. */
|
||||
logevent(error_msg);
|
||||
connection_fatal(ssh->frontend, error_msg);
|
||||
connection_fatal(ssh->frontend, "%s", error_msg);
|
||||
} else {
|
||||
/* Otherwise, the remote side closed the connection normally. */
|
||||
}
|
||||
|
|
2
telnet.c
2
telnet.c
|
@ -643,7 +643,7 @@ static int telnet_closing(Plug plug, char *error_msg, int error_code,
|
|||
if (error_msg) {
|
||||
/* A socket error has occurred. */
|
||||
logevent(telnet->frontend, error_msg);
|
||||
connection_fatal("%s", error_msg);
|
||||
connection_fatal(telnet->frontend, "%s", error_msg);
|
||||
} /* Otherwise, the remote side closed the connection normally. */
|
||||
return 0;
|
||||
}
|
||||
|
|
21
window.c
21
window.c
|
@ -930,13 +930,15 @@ void set_raw_mouse_mode(void *frontend, int activate)
|
|||
void connection_fatal(void *frontend, char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char stuff[200], morestuff[100];
|
||||
char *stuff, morestuff[100];
|
||||
|
||||
va_start(ap, fmt);
|
||||
vsprintf(stuff, fmt, ap);
|
||||
stuff = dupvprintf(fmt, ap);
|
||||
va_end(ap);
|
||||
sprintf(morestuff, "%.70s Fatal Error", appname);
|
||||
MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
|
||||
sfree(stuff);
|
||||
|
||||
if (cfg.close_on_exit == FORCE_ON)
|
||||
PostQuitMessage(1);
|
||||
else {
|
||||
|
@ -953,13 +955,14 @@ void connection_fatal(void *frontend, char *fmt, ...)
|
|||
void cmdline_error(char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char stuff[200], morestuff[100];
|
||||
char *stuff, morestuff[100];
|
||||
|
||||
va_start(ap, fmt);
|
||||
vsprintf(stuff, fmt, ap);
|
||||
stuff = dupvprintf(fmt, ap);
|
||||
va_end(ap);
|
||||
sprintf(morestuff, "%.70s Command Line Error", appname);
|
||||
MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
|
||||
sfree(stuff);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -4302,13 +4305,14 @@ void optimised_move(void *frontend, int to, int from, int lines)
|
|||
void fatalbox(char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char stuff[200], morestuff[100];
|
||||
char *stuff, morestuff[100];
|
||||
|
||||
va_start(ap, fmt);
|
||||
vsprintf(stuff, fmt, ap);
|
||||
stuff = dupvprintf(fmt, ap);
|
||||
va_end(ap);
|
||||
sprintf(morestuff, "%.70s Fatal Error", appname);
|
||||
MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
|
||||
sfree(stuff);
|
||||
cleanup_exit(1);
|
||||
}
|
||||
|
||||
|
@ -4318,14 +4322,15 @@ void fatalbox(char *fmt, ...)
|
|||
void modalfatalbox(char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char stuff[200], morestuff[100];
|
||||
char *stuff, morestuff[100];
|
||||
|
||||
va_start(ap, fmt);
|
||||
vsprintf(stuff, fmt, ap);
|
||||
stuff = dupvprintf(fmt, ap);
|
||||
va_end(ap);
|
||||
sprintf(morestuff, "%.70s Fatal Error", appname);
|
||||
MessageBox(hwnd, stuff, morestuff,
|
||||
MB_SYSTEMMODAL | MB_ICONERROR | MB_OK);
|
||||
sfree(stuff);
|
||||
cleanup_exit(1);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче