All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] When setting the serial port, the previous settings need to  be preserved.
@ 2009-10-19 14:28 Ryan Raasch
  2009-10-19 17:32 ` Denis Kenzior
  0 siblings, 1 reply; 11+ messages in thread
From: Ryan Raasch @ 2009-10-19 14:28 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

Hello,

This took a while to locate. Shouldn't it be possible to use stty
outside the daemon, and then daemon would just continue as usual?

In my case, the cread was being removed, so no input data could be read.

Thanks,
Ryan

Signed-off-by: Ryan M. Raasch <ryan.raasch@gmail.com>
---
 gatchat/gattty.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-When-setting-the-serial-port-the-previous-settings-n.patch --]
[-- Type: text/x-patch, Size: 328 bytes --]

diff --git a/gatchat/gattty.c b/gatchat/gattty.c
index 63d26d4..ed0fadf 100644
--- a/gatchat/gattty.c
+++ b/gatchat/gattty.c
@@ -220,6 +220,7 @@ static int open_device(const char *tty, GHashTable *options)
 	if (fd < 0)
 		return -1;
 
+	tcgetattr(fd,&ti);
 	tcflush(fd, TCIOFLUSH);
 	tcsetattr(fd, TCSANOW, &ti);
 

^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [PATCH] When setting the serial port, the previous settings need to  be preserved.
@ 2009-10-19 17:18 Ryan Raasch
  2009-10-19 17:21 ` Ryan Raasch
  0 siblings, 1 reply; 11+ messages in thread
From: Ryan Raasch @ 2009-10-19 17:18 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 548 bytes --]

When setting the serial terminal before starting the daemon, this will
prevent the overwriting of settings.

Ryan

---
 gatchat/gattty.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/gatchat/gattty.c b/gatchat/gattty.c
index 63d26d4..ed0fadf 100644
--- a/gatchat/gattty.c
+++ b/gatchat/gattty.c
@@ -220,6 +220,7 @@ static int open_device(const char *tty, GHashTable *options)
 	if (fd < 0)
 		return -1;

+	tcgetattr(fd,&ti);
 	tcflush(fd, TCIOFLUSH);
 	tcsetattr(fd, TCSANOW, &ti);

-- 
1.6.4.GIT

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-10-22  0:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-19 14:28 [PATCH] When setting the serial port, the previous settings need to be preserved Ryan Raasch
2009-10-19 17:32 ` Denis Kenzior
2009-10-20  7:43   ` Ryan Raasch
2009-10-20  9:10     ` Ryan Raasch
2009-10-20 15:13       ` Denis Kenzior
2009-10-20 15:51         ` Ryan Raasch
2009-10-20 15:36           ` Denis Kenzior
2009-10-21  8:43             ` Ryan Raasch
2009-10-22  0:09               ` Denis Kenzior
  -- strict thread matches above, loose matches on Subject: below --
2009-10-19 17:18 Ryan Raasch
2009-10-19 17:21 ` Ryan Raasch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.