]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winser.c
Update documentation for 0.68.
[PuTTY.git] / windows / winser.c
index 086d3e5cd4fcb2b3e7fbe8b767ac36748b0afd38..646cd2546a22597db0083f28d9295552343a11ea 100644 (file)
@@ -122,12 +122,12 @@ static const char *serial_configure(Serial serial, HANDLE serport, Conf *conf)
         * Configurable parameters.
         */
        dcb.BaudRate = conf_get_int(conf, CONF_serspeed);
-       msg = dupprintf("Configuring baud rate %d", dcb.BaudRate);
+       msg = dupprintf("Configuring baud rate %lu", dcb.BaudRate);
        logevent(serial->frontend, msg);
        sfree(msg);
 
        dcb.ByteSize = conf_get_int(conf, CONF_serdatabits);
-       msg = dupprintf("Configuring %d data bits", dcb.ByteSize);
+       msg = dupprintf("Configuring %u data bits", dcb.ByteSize);
        logevent(serial->frontend, msg);
        sfree(msg);
 
@@ -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;
@@ -220,6 +220,7 @@ static const char *serial_init(void *frontend_handle, void **backend_handle,
     {
        char *msg = dupprintf("Opening serial device %s", serline);
        logevent(serial->frontend, msg);
+        sfree(msg);
     }
 
     {
@@ -302,7 +303,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;
 
@@ -453,6 +454,7 @@ Backend serial_backend = {
     serial_provide_logctx,
     serial_unthrottle,
     serial_cfg_info,
+    NULL /* test_for_upstream */,
     "serial",
     PROT_SERIAL,
     0