static Backend *back;
static void *backhandle;
+static Config cfg;
int term_ldisc(Terminal *term, int mode)
{
}
}
-int from_backend(void *frontend_handle, int is_stderr, char *data, int len)
+int from_backend(void *frontend_handle, int is_stderr,
+ const char *data, int len)
{
int osize, esize;
printf(" -batch disable all interactive prompts\n");
printf("The following options only apply to SSH connections:\n");
printf(" -pw passw login with specified password\n");
+ printf(" -D listen-port Dynamic SOCKS-based port forwarding\n");
printf(" -L listen-port:host:port Forward local port to "
"remote address\n");
printf(" -R listen-port:host:port Forward remote port to"
while (*p) {
if (cmdlen >= cmdsize) {
cmdsize = cmdlen + 512;
- command = srealloc(command, cmdsize);
+ command = sresize(command, cmdsize, char);
}
command[cmdlen++]=*p++;
}
if (cmdlen >= cmdsize) {
cmdsize = cmdlen + 512;
- command = srealloc(command, cmdsize);
+ command = sresize(command, cmdsize, char);
}
command[cmdlen++]=' '; /* always add trailing space */
if (--argc) p = *++argv;
}
logctx = log_init(NULL, &cfg);
back->provide_logctx(backhandle, logctx);
+ console_provide_logctx(logctx);
sfree(realhost);
}
connopen = 1;
/* Expand the buffer if necessary. */
if (i > sksize) {
sksize = i + 16;
- sklist = srealloc(sklist, sksize * sizeof(*sklist));
+ sklist = sresize(sklist, sksize, SOCKET);
}
/* Retrieve the sockets into sklist. */