[Sphere-axis-commits] CVS: Axis/AxisLib AxisServerInterface.cpp,1.2,1.3
Brought to you by:
pesterle
From: Philip E. <pes...@us...> - 2003-06-17 22:32:54
|
Update of /cvsroot/sphere-axis/Axis/AxisLib In directory sc8-pr-cvs1:/tmp/cvs-serv2665/AxisLib Modified Files: AxisServerInterface.cpp Log Message: no message Index: AxisServerInterface.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AxisLib/AxisServerInterface.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** AxisServerInterface.cpp 23 May 2003 05:44:27 -0000 1.2 --- AxisServerInterface.cpp 17 Jun 2003 22:32:51 -0000 1.3 *************** *** 158,161 **** --- 158,162 ---- Log(sMessage); AfxMessageBox(sMessage, MB_OK | MB_ICONSTOP); + Disconnect(); return FALSE; } *************** *** 224,234 **** return FALSE; - CComBSTR bFiles, bDirectories; - bFiles.Attach(*files); - bDirectories.Attach(*directories); - CString sMessage; sMessage.Format(_T(IDS_REMOTE_DIRLIST), (TCHAR*)path); Log(sMessage); if ( m_pProgress ) --- 225,232 ---- return FALSE; CString sMessage; sMessage.Format(_T(IDS_REMOTE_DIRLIST), (TCHAR*)path); Log(sMessage); + BOOL bStatus = TRUE; if ( m_pProgress ) *************** *** 275,315 **** iSize += iBytes; } ! if ( iSize == 0 ) { ! // We never got anything ! if ( pBuffer ) ! delete [] pBuffer; // We shouldn't ever get here, but just in case ! return FALSE; ! } ! // Parse the data we got from the remote server ! BYTE * ptr = pBuffer; ! ! while ( ptr < (pBuffer + iSize) ) ! { ! int iType; ! memcpy(&iType, ptr, sizeof(int)); ! ptr += sizeof(int); ! if ( iType != 0 ) { ! TCHAR szFile[MAX_PATH]; ! _stprintf(szFile, (TCHAR*)ptr); ! ptr += (_tcslen(szFile) + 1); ! CString sFile(szFile); ! if ( iType & FILE_ATTRIBUTE_DIRECTORY ) { ! if ( bDirectories.Length() > 0 ) ! bDirectories.Append(':'); ! bDirectories.Append(sFile); } else ! { ! if ( bFiles.Length() > 0 ) ! bFiles.Append(':'); ! bFiles.Append(sFile); ! } } - else - break; } if ( pBuffer ) --- 273,311 ---- iSize += iBytes; } ! CComBSTR bFiles, bDirectories; ! //bFiles.Attach(*files); ! //bDirectories.Attach(*directories); ! if ( iSize > 0 ) { ! // Parse the data we got from the remote server ! BYTE * ptr = pBuffer; ! while ( ptr < (pBuffer + iSize) ) { ! int iType; ! memcpy(&iType, ptr, sizeof(int)); ! ptr += sizeof(int); ! if ( iType != 0 ) { ! TCHAR szFile[MAX_PATH]; ! _stprintf(szFile, (TCHAR*)ptr); ! ptr += (_tcslen(szFile) + 1); ! CString sFile(szFile); ! if ( iType & FILE_ATTRIBUTE_DIRECTORY ) ! { ! if ( bDirectories.Length() > 0 ) ! bDirectories.Append(':'); ! bDirectories.Append(sFile); ! } ! else ! { ! if ( bFiles.Length() > 0 ) ! bFiles.Append(':'); ! bFiles.Append(sFile); ! } } else ! break; } } if ( pBuffer ) |