From: Martin H. <mh...@us...> - 2005-03-21 01:40:38
|
Update of /cvsroot/opengtoolkit/serial/c_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6571/c_source Modified Files: lvserial.cpp Log Message: The lvCommGetUserData function allways returned zero. Some functions did not set the requested data to a default value in case of an error. Added and changed some comments Index: lvserial.cpp =================================================================== RCS file: /cvsroot/opengtoolkit/serial/c_source/lvserial.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lvserial.cpp 18 Mar 2005 23:13:48 -0000 1.2 --- lvserial.cpp 21 Mar 2005 01:40:13 -0000 1.3 *************** *** 41,45 **** //function prototypes ! //helper function for the serial port read and write operations inline long __CommRead( PCOMM pComm, --- 41,47 ---- //function prototypes ! //helper function for the serial port read and write operations. Before these ! //functions can be used the parameters should be validated, the serial port [...3151 lines suppressed...] //clean up the incoming array *************** *** 4675,4681 **** (**halsPorts)->elt[0] = NULL; ! bo = ListPorts(lvListPortsCB, halsPorts); ! if (bo == FALSE) lv_WinErrBld(GetLastError(), __FUNCTION__, pError); } --- 5050,5058 ---- (**halsPorts)->elt[0] = NULL; ! //get the serial port names ! boResult = ListPorts(lvListPortsCB, halsPorts); ! //update the error cluster if the ListPorts function has failed. ! if (boResult == FALSE) lv_WinErrBld(GetLastError(), __FUNCTION__, pError); } |