X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxser.c;h=41beaf0e75699866efe5f9080e572ad5f791df9d;hb=095072fa46b2d7b8beafaddb2f873d2f500a1e10;hp=8f4955c4e74c76c03574288f57f4f903c39b91f9;hpb=a1f3b7a358adaa7c2a98359cd0373aa823eeb14b;p=PuTTY.git diff --git a/unix/uxser.c b/unix/uxser.c index 8f4955c4..41beaf0e 100644 --- a/unix/uxser.c +++ b/unix/uxser.c @@ -289,8 +289,8 @@ static const char *serial_configure(Serial serial, Conf *conf) */ static const char *serial_init(void *frontend_handle, void **backend_handle, Conf *conf, - char *host, int port, char **realhost, int nodelay, - int keepalive) + const char *host, int port, char **realhost, + int nodelay, int keepalive) { Serial serial; const char *err; @@ -308,6 +308,7 @@ static const char *serial_init(void *frontend_handle, void **backend_handle, { char *msg = dupprintf("Opening serial device %s", line); logevent(serial->frontend, msg); + sfree(msg); } serial->fd = open(line, O_RDWR | O_NOCTTY | O_NDELAY | O_NONBLOCK); @@ -461,7 +462,7 @@ static void serial_try_write(Serial serial) /* * 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; @@ -590,6 +591,7 @@ Backend serial_backend = { serial_provide_logctx, serial_unthrottle, serial_cfg_info, + NULL /* test_for_upstream */, "serial", PROT_SERIAL, 0