1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 01:18:00 +00:00
putty-source/stubs/null-opener.c
Simon Tatham eec350c38b New facility, platform_start_subprocess.
We already have the ability to start a subprocess and hook it up to a
Socket, for running local proxy commands. Now the same facility is
available as an auxiliary feature, so that a backend can start another
subcommand for a different purpose, and make a separate Socket to
communicate with it.

Just like the local proxy system, this facility captures the
subprocess's stderr, and passes it back to the caller via plug_log. To
make that not look silly, I had to add a system where the "proxy:"
prefix on the usual plug_log messages is reconfigurable, and when you
call platform_start_subprocess(), you get to pass the prefix you want
to use in this case.
2022-09-01 20:43:23 +01:00

21 lines
512 B
C

/*
* Null implementation of DeferredSocketOpener. Doesn't even bother to
* allocate and free itself: there's just one static implementation
* which we hand out to any caller.
*/
#include "putty.h"
static void null_opener_free(DeferredSocketOpener *opener) {}
static const DeferredSocketOpenerVtable NullOpener_vt = {
.free = null_opener_free,
};
static DeferredSocketOpener null_opener = { .vt = &NullOpener_vt };
DeferredSocketOpener *null_deferred_socket_opener(void)
{
return &null_opener;
}