#define MAX_STDIN_BACKLOG 4096
+void *logctx;
+
void fatalbox(char *p, ...)
{
va_list ap;
vfprintf(stderr, p, ap);
va_end(ap);
fputc('\n', stderr);
+ if (logctx) {
+ log_free(logctx);
+ logctx = NULL;
+ }
cleanup_exit(1);
}
void modalfatalbox(char *p, ...)
vfprintf(stderr, p, ap);
va_end(ap);
fputc('\n', stderr);
+ if (logctx) {
+ log_free(logctx);
+ logctx = NULL;
+ }
cleanup_exit(1);
}
void connection_fatal(void *frontend, char *p, ...)
vfprintf(stderr, p, ap);
va_end(ap);
fputc('\n', stderr);
+ if (logctx) {
+ log_free(logctx);
+ logctx = NULL;
+ }
cleanup_exit(1);
}
void cmdline_error(char *p, ...)
/*
* Handle data from a local tty in PARMRK format.
*/
-static void from_tty(void *buf, unsigned len)
+static void from_tty(void *vbuf, unsigned len)
{
- char *p, *q, *end;
+ char *p, *q, *end, *buf = vbuf;
static enum {NORMAL, FF, FF00} state = NORMAL;
p = buf; end = buf + len;
printf(" -m file read remote command(s) from file\n");
printf(" -s remote command is an SSH subsystem (SSH-2 only)\n");
printf(" -N don't start a shell/command (SSH-2 only)\n");
+ printf(" -nc host:port\n");
+ printf(" open tunnel in place of session (SSH-2 only)\n");
exit(1);
}
int exitcode;
int errors;
int use_subsystem = 0;
- void *ldisc, *logctx;
+ void *ldisc;
long now;
fdlist = NULL;