X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=raw.c;h=631320c0f8f20376e82f5b955d9a79af552c9a42;hb=49204fe4107d8af3167fc940238f48113173fd92;hp=4c9e5becd773111afcbbe3935a4cd83d80cfafe9;hpb=92db92af5a6b230e876a5f0f34a184612792847d;p=PuTTY.git diff --git a/raw.c b/raw.c index 4c9e5bec..631320c0 100644 --- a/raw.c +++ b/raw.c @@ -37,6 +37,7 @@ static int raw_closing(Plug plug, const char *error_msg, int error_code, if (raw->s) { sk_close(raw->s); raw->s = NULL; + notify_remote_exit(raw->frontend); } if (error_msg) { /* A socket error has occurred. */ @@ -69,7 +70,8 @@ static void raw_sent(Plug plug, int bufsize) */ static const char *raw_init(void *frontend_handle, void **backend_handle, Config *cfg, - char *host, int port, char **realhost, int nodelay) + char *host, int port, char **realhost, int nodelay, + int keepalive) { static const struct plug_function_table fn_table = { raw_closing, @@ -115,7 +117,7 @@ static const char *raw_init(void *frontend_handle, void **backend_handle, logevent(raw->frontend, buf); sfree(buf); } - raw->s = new_connection(addr, *realhost, port, 0, 1, nodelay, + raw->s = new_connection(addr, *realhost, port, 0, 1, nodelay, keepalive, (Plug) raw, cfg); if ((err = sk_socket_error(raw->s)) != NULL) return err; @@ -234,6 +236,14 @@ static int raw_exitcode(void *handle) return 0; } +/* + * cfg_info for Raw does nothing at all. + */ +static int raw_cfg_info(void *handle) +{ + return 0; +} + Backend raw_backend = { raw_init, raw_free, @@ -250,5 +260,6 @@ Backend raw_backend = { raw_provide_ldisc, raw_provide_logctx, raw_unthrottle, + raw_cfg_info, 1 };