~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Explicitly closing logctx on various kinds of error exit means that
[sgt/putty]
/
unix
/
uxser.c
diff --git
a/unix/uxser.c
b/unix/uxser.c
index
85e9618
..
db98dd8
100644
(file)
--- a/
unix/uxser.c
+++ b/
unix/uxser.c
@@
-2,12
+2,6
@@
* Serial back end (Unix-specific).
*/
* Serial back end (Unix-specific).
*/
-/*
- * TODO:
- *
- * - send break.
- */
-
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
@@
-260,6
+254,11
@@
static const char *serial_init(void *frontend_handle, void **backend_handle,
serial_uxsel_setup(serial);
serial_uxsel_setup(serial);
+ /*
+ * Specials are always available.
+ */
+ update_specials_menu(serial->frontend);
+
return NULL;
}
return NULL;
}
@@
-418,9
+417,13
@@
static void serial_size(void *handle, int width, int height)
*/
static void serial_special(void *handle, Telnet_Special code)
{
*/
static void serial_special(void *handle, Telnet_Special code)
{
- /*
- * FIXME: serial break? XON? XOFF?
- */
+ Serial serial = (Serial) handle;
+
+ if (serial->fd >= 0 && code == TS_BRK) {
+ tcsendbreak(serial->fd, 0);
+ logevent(serial->frontend, "Sending serial break at user request");
+ }
+
return;
}
return;
}
@@
-430,10
+433,11
@@
static void serial_special(void *handle, Telnet_Special code)
*/
static const struct telnet_special *serial_get_specials(void *handle)
{
*/
static const struct telnet_special *serial_get_specials(void *handle)
{
- /*
- * FIXME: serial break? XON? XOFF?
- */
- return NULL;
+ static const struct telnet_special specials[] = {
+ {"Break", TS_BRK},
+ {NULL, TS_EXITMENU}
+ };
+ return specials;
}
static int serial_connected(void *handle)
}
static int serial_connected(void *handle)