projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New timing infrastructure. There's a new function schedule_timer()
[u/mdw/putty]
/
raw.c
diff --git
a/raw.c
b/raw.c
index
c493649
..
8b1b1e9
100644
(file)
--- 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;
if (raw->s) {
sk_close(raw->s);
raw->s = NULL;
+ notify_remote_exit(raw->frontend);
}
if (error_msg) {
/* A socket error has occurred. */
}
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,
*/
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,
{
static const struct plug_function_table fn_table = {
raw_closing,
@@
-97,8
+99,10
@@
static const char *raw_init(void *frontend_handle, void **backend_handle,
sfree(buf);
}
addr = name_lookup(host, port, realhost, cfg);
sfree(buf);
}
addr = name_lookup(host, port, realhost, cfg);
- if ((err = sk_addr_error(addr)) != NULL)
+ if ((err = sk_addr_error(addr)) != NULL) {
+ sk_addr_free(addr);
return err;
return err;
+ }
if (port < 0)
port = 23; /* default telnet port */
if (port < 0)
port = 23; /* default telnet port */
@@
-113,13
+117,11
@@
static const char *raw_init(void *frontend_handle, void **backend_handle,
logevent(raw->frontend, buf);
sfree(buf);
}
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;
(Plug) raw, cfg);
if ((err = sk_socket_error(raw->s)) != NULL)
return err;
- sk_addr_free(addr);
-
return NULL;
}
return NULL;
}