[PATCH] When setting the serial port, the previous settings need to be preserved.
Ryan Raasch
ryan.raasch at gmail.com
Tue Oct 20 08:51:20 PDT 2009
Denis Kenzior wrote:
> Hi Ryan,
>
>> Sorry. I have had a long few days. The last patch was just COMPLETELY
>> wrong :(
>>
>> I think i got it right this time...
>
> So the patch is still wrong :)
>
> memset(&ti, 0, sizeof(ti));
> cfmakeraw(&ti);
>
> + fd = open(tty, O_RDWR | O_NOCTTY | O_NONBLOCK);
> + if (fd < 0)
> + return -1;
> +
> + tcgetattr(fd,&ti);
> +
>
> You're blowing away the result of cfmakeraw. Most of the devices are not true
> serial devices and so do not need any of the special options. Passing a NULL
> options GHashTable should result in cfmakeraw. Why don't you just pass all
> the options you need instead of using tcgetattr?
>
Should i just move the tcgetattr() to happen before cfmakeraw()?
> The other parts of the patch look good to me.
Ok. Why don't i just add the string options ("read", others...) in gattty.c?
Thanks,
Ryan
>
> Regards,
> -Denis
> _______________________________________________
> ofono mailing list
> ofono at ofono.org
> http://lists.ofono.org/listinfo/ofono
More information about the ofono
mailing list