From 1f42e9d93329e035215b9ec1394941599318528a Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Fri, 17 Aug 2007 14:21:32 +0000 Subject: serial: proxy cleanup - it is not necessary apply the TTY settings at proxy registration --- serial/manager.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'serial/manager.c') diff --git a/serial/manager.c b/serial/manager.c index 9043cc0c..15e0fca8 100644 --- a/serial/manager.c +++ b/serial/manager.c @@ -1577,16 +1577,14 @@ static int proxy_register(DBusConnection *conn, bdaddr_t *src, const char *path, memset(&sys_ti, 0, sizeof(sys_ti)); tcgetattr(sk, &sys_ti); memcpy(&prx->sys_ti, &sys_ti, sizeof(sys_ti)); - if (!ti) { - /* Keep the current settings */ + close(sk); + + if (!ti) + /* Use current settings */ memcpy(&prx->proxy_ti, &sys_ti, sizeof(sys_ti)); - } else { + else /* New TTY settings: user provided */ memcpy(&prx->proxy_ti, ti, sizeof(*ti)); - tcsetattr(sk, TCSANOW, ti); - } - - close(sk); if (!dbus_connection_register_interface(conn, path, SERIAL_PROXY_INTERFACE, -- cgit