Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dataxfer.c: Fix some bugs with ordering of banners and devstr
On UDP ports (or TCP, too), the first packet's data could be written before devstr and the read data from the device could go out before the banner. So delay the device writing until devstr is written, and delay the network writing until the banner is written. As part of this, make the device read handling consistent, it had some issue being called incorrectly in some places. So add a single function to do it. Thise changes could cause empty packets to be send on UDP. So add code to avoid that. Also, fix some minor style issues and lock the new port's lock when calling startup port from readconfig, as the lock is required. Signed-off-by: Corey Minyard <cminyard@mvista.com>
- Loading branch information
Showing
1 changed file
with
49 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters