#endif
#include <windows.h>
#include <stdio.h>
+#include <stdlib.h>
#include <stdarg.h>
#define PUTTY_DO_GLOBALS /* actually _define_ globals */
void fatalbox (char *p, ...) {
va_list ap;
- fprintf(stderr, "FATAL ERROR: ", p);
+ fprintf(stderr, "FATAL ERROR: ");
va_start(ap, p);
vfprintf(stderr, p, ap);
va_end(ap);
}
void connection_fatal (char *p, ...) {
va_list ap;
- fprintf(stderr, "FATAL ERROR: ", p);
+ fprintf(stderr, "FATAL ERROR: ");
va_start(ap, p);
vfprintf(stderr, p, ap);
va_end(ap);
/*
* One string.
*/
- do_defaults (p, &cfg);
- if (cfg.host[0] == '\0') {
+ Config cfg2;
+ do_defaults (p, &cfg2);
+ if (cfg2.host[0] == '\0') {
/* No settings for this host; use defaults */
strncpy(cfg.host, p, sizeof(cfg.host)-1);
cfg.host[sizeof(cfg.host)-1] = '\0';
cfg.port = 22;
- }
+ } else
+ cfg = cfg2;
} else {
*r++ = '\0';
strncpy(cfg.username, p, sizeof(cfg.username)-1);
socket = sklist[i];
wp = (WPARAM)socket;
if (!WSAEnumNetworkEvents(socket, netevent, &things)) {
+ noise_ultralight(socket);
+ noise_ultralight(things.lNetworkEvents);
if (things.lNetworkEvents & FD_READ)
connopen &= select_result(wp, (LPARAM)FD_READ);
if (things.lNetworkEvents & FD_CLOSE)
}
}
} else if (n == 1) {
+ noise_ultralight(idata.len);
if (idata.len > 0) {
back->send(idata.buffer, idata.len);
} else {