Changeset 23721 in vbox for trunk/src/VBox/Main
- Timestamp:
- Oct 13, 2009 1:04:29 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl-LiveMigration.cpp
r23719 r23721 166 166 167 167 AssertReturn(cchBuf > 1, VERR_INTERNAL_ERROR); 168 169 /* dead simple (stupid) approach. */ 168 *pszBuf = '\0'; 169 170 /* dead simple approach. */ 170 171 for (;;) 171 172 { … … 174 175 if (RT_FAILURE(rc)) 175 176 { 176 *pszBuf = '\0';177 177 LogRel(("Migration: RTTcpRead -> %Rrc while reading string ('%s')\n", rc, pszStart)); 178 178 return rc; … … 180 180 if ( ch == '\n' 181 181 || ch == '\0') 182 {183 *pszBuf = '\0';184 182 return VINF_SUCCESS; 185 }186 183 if (cchBuf <= 1) 187 184 { 188 *pszBuf = '\0';189 185 LogRel(("Migration: String buffer overflow: '%s'\n", pszStart)); 190 186 return VERR_BUFFER_OVERFLOW; 191 187 } 192 188 *pszBuf++ = ch; 189 *pszBuf = '\0'; 193 190 cchBuf--; 194 191 } … … 953 950 } 954 951 952 /* The EOS might not have been read, make sure it is. */ 953 pState->mfStopReading = false; 954 size_t cbRead; 955 vrc = migrationTcpOpRead(pvUser, pState->moffStream, szCmd, 1, &cbRead); 956 if (vrc != VERR_EOF) 957 { 958 LogRel(("Migration: Draining migrationTcpOpRead -> %Rrc\n", vrc)); 959 migrationTcpWriteNACK(pState, vrc); 960 break; 961 } 962 955 963 vrc = migrationTcpWriteACK(pState); 956 964 if (RT_FAILURE(vrc))
Note:
See TracChangeset
for help on using the changeset viewer.