[Com0com-cvs] hub4com/plugins/awakseq filter.cpp,1.5,1.6
The virtual serial port driver for Windows.
Brought to you by:
vfrolov
From: Vyacheslav F. <vf...@us...> - 2008-08-27 11:38:33
|
Update of /cvsroot/com0com/hub4com/plugins/awakseq In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8901 Modified Files: filter.cpp Log Message: Fixed CONNECT(FALSE) losing Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/awakseq/filter.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** filter.cpp 20 Aug 2008 09:26:40 -0000 1.5 --- filter.cpp 27 Aug 2008 11:38:29 -0000 1.6 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.6 2008/08/27 11:38:29 vfrolov + * Fixed CONNECT(FALSE) losing + * * Revision 1.5 2008/08/20 09:26:40 vfrolov * Fixed typo *************** *** 63,67 **** class State { public: ! State(const BYTE *pAwakSeq) : connectionCounter(0) { StartAwakSeq(pAwakSeq); } void StartAwakSeq(const BYTE *pAwakSeq) { --- 66,71 ---- class State { public: ! State(const BYTE *pAwakSeq) ! : connectSent(FALSE), connectionCounter(0) { StartAwakSeq(pAwakSeq); } void StartAwakSeq(const BYTE *pAwakSeq) { *************** *** 72,81 **** BOOL waitAwakSeq; const BYTE *pAwakSeqNext; int connectionCounter; }; /////////////////////////////////////////////////////////////// - typedef map<int, State*> PortsMap; - typedef pair<int, State*> PortPair; - class Filter { public: --- 76,83 ---- BOOL waitAwakSeq; const BYTE *pAwakSeqNext; + BOOL connectSent; int connectionCounter; }; /////////////////////////////////////////////////////////////// class Filter { public: *************** *** 86,89 **** --- 88,95 ---- private: + + typedef map<int, State*> PortsMap; + typedef pair<int, State*> PortPair; + PortsMap portsMap; }; *************** *** 254,257 **** --- 260,265 ---- pInMsg = pMsgReplaceVal(pInMsg, HUB_MSG_TYPE_CONNECT, TRUE); } + + pState->connectSent = TRUE; } else { pInMsg->u.buf.size = 0; *************** *** 272,276 **** // discard CONNECT(FALSE) from the input stream // if CONNECT(TRUE) was not added yet ! if (pState->waitAwakSeq) pMsgReplaceNone(pInMsg, HUB_MSG_TYPE_EMPTY); --- 280,286 ---- // discard CONNECT(FALSE) from the input stream // if CONNECT(TRUE) was not added yet ! if (pState->connectSent) ! pState->connectSent = FALSE; ! else pMsgReplaceNone(pInMsg, HUB_MSG_TYPE_EMPTY); |