X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windows%2Fwinser.c;h=de9e61b480f91b6a9a5f6ccab81bf5142956f2bf;hb=9f9d72ec58642e91b4f93ee4405a8086ee2fb2f0;hp=e0fc20e7f8988ba2332a9766e7ccd9556b8c050f;hpb=a1f3b7a358adaa7c2a98359cd0373aa823eeb14b;p=PuTTY.git diff --git a/windows/winser.c b/windows/winser.c index e0fc20e7..de9e61b4 100644 --- a/windows/winser.c +++ b/windows/winser.c @@ -199,7 +199,7 @@ static const char *serial_configure(Serial serial, HANDLE serport, Conf *conf) * freed by the caller. */ static const char *serial_init(void *frontend_handle, void **backend_handle, - Conf *conf, char *host, int port, + Conf *conf, const char *host, int port, char **realhost, int nodelay, int keepalive) { Serial serial; @@ -302,7 +302,7 @@ static void serial_reconfig(void *handle, Conf *conf) /* * Called to send data down the serial connection. */ -static int serial_send(void *handle, char *buf, int len) +static int serial_send(void *handle, const char *buf, int len) { Serial serial = (Serial) handle; @@ -331,11 +331,11 @@ static void serial_size(void *handle, int width, int height) return; } -static void serbreak_timer(void *ctx, long now) +static void serbreak_timer(void *ctx, unsigned long now) { Serial serial = (Serial)ctx; - if (now >= serial->clearbreak_time && serial->port) { + if (now == serial->clearbreak_time && serial->port) { ClearCommBreak(serial->port); serial->break_in_progress = FALSE; logevent(serial->frontend, "Finished serial break"); @@ -453,6 +453,7 @@ Backend serial_backend = { serial_provide_logctx, serial_unthrottle, serial_cfg_info, + NULL /* test_for_upstream */, "serial", PROT_SERIAL, 0