# HG changeset patch
# User Bruce Tulloch <[EMAIL PROTECTED]>
# Date 1188442183 -36000
# Node ID e19c348a0e2f3c994ed182f369a8f2734db0058d
# Parent 40c364140ee052778653143df49b94ca015e59fd
[SYNASER] fix suspect modem word control.
The TBlockSerial.ModemStatus method is supposed to update
the status of the modem control word but underlying IOCTL
call (TIOCMGET) is not working when compiled with FPC (ie,
it is not retrieving the status of the modem control word).
The argument passed to IOCTL is never changed. Consequently
the existing synaser codebase resets all modem bits to zero
whenever any bit is changed.
When the same codebase is compiled with Kylix the IOCTL call
in TBlockSerial.ModemStatus DOES update its argument to the
correct value and everything works as intended.
I have worked around this problem for now, not solved it.
The work-around made here avoids the problem by maintaining
the modem control value locally. It means that so long as
the modem control word is only ever updated via synaser it
will work regardless.
This is a one line change per the patch below.
Relevant version information:
synaser 6.3.7
FPC 2.0.4
Linux 2.6.22
--- a/synaser.pas Tue Aug 28 12:41:48 2007 +1000
+++ b/synaser.pas Thu Aug 30 12:49:43 2007 +1000
@@ -1915,7 +1915,7 @@ end;
function TBlockSerial.ModemStatus: integer;
begin
- Result := 0;
+ Result := FModemWord;
{$IFDEF LINUX}
SerialCheck(ioctl(integer(FHandle), TIOCMGET, @Result));
{$ELSE}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public