Changeset 43034 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Aug 28, 2012 12:41:27 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
r43030 r43034 929 929 */ 930 930 AdditionsRunLevelType_T addsRunLevel; 931 if ( 931 if ( FAILED(hr = pGuest->COMGETTER(AdditionsRunLevel)(&addsRunLevel)) 932 932 || ( addsRunLevel != AdditionsRunLevelType_Userland 933 933 && addsRunLevel != AdditionsRunLevelType_Desktop)) 934 934 { 935 hr = setProgressErrorMsg(VBOX_E_NOT_SUPPORTED, 936 Utf8StrFmt(GuestSession::tr("Guest Additions not installed or ready, aborting automatic update"))); 935 if (addsRunLevel == AdditionsRunLevelType_System) 936 hr = setProgressErrorMsg(VBOX_E_NOT_SUPPORTED, 937 Utf8StrFmt(GuestSession::tr("Guest Additions are installed but not fully loaded yet, aborting automatic update"))); 938 else 939 hr = setProgressErrorMsg(VBOX_E_NOT_SUPPORTED, 940 Utf8StrFmt(GuestSession::tr("Guest Additions not installed or ready, aborting automatic update"))); 937 941 rc = VERR_NOT_SUPPORTED; 938 942 } … … 1244 1248 rc = setProgressSuccess(); 1245 1249 } 1246 else if (rc == VERR_CANCELLED) 1247 { 1248 LogRel(("Automatic update of Guest Additions canceled\n")); 1249 } 1250 else 1251 { 1252 Utf8Str strError = Utf8StrFmt("No further error information available (%Rrc)", rc); 1253 if (!mProgress.isNull()) /* Progress object is optional. */ 1254 { 1255 ComPtr<IVirtualBoxErrorInfo> pError; 1256 hr = mProgress->COMGETTER(ErrorInfo)(pError.asOutParam()); 1257 Assert(!pError.isNull()); 1258 if (SUCCEEDED(hr)) 1259 { 1260 Bstr strVal; 1261 hr = pError->COMGETTER(Text)(strVal.asOutParam()); 1262 if ( SUCCEEDED(hr) 1263 && strVal.isNotEmpty()) 1264 strError = strVal; 1265 } 1250 } 1251 } 1252 1253 if (RT_FAILURE(rc)) 1254 { 1255 if (rc == VERR_CANCELLED) 1256 { 1257 LogRel(("Automatic update of Guest Additions was canceled\n")); 1258 1259 hr = setProgressErrorMsg(VBOX_E_IPRT_ERROR, 1260 Utf8StrFmt(GuestSession::tr("Installation was canceled"))); 1261 } 1262 else 1263 { 1264 Utf8Str strError = Utf8StrFmt("No further error information available (%Rrc)", rc); 1265 if (!mProgress.isNull()) /* Progress object is optional. */ 1266 { 1267 ComPtr<IVirtualBoxErrorInfo> pError; 1268 hr = mProgress->COMGETTER(ErrorInfo)(pError.asOutParam()); 1269 Assert(!pError.isNull()); 1270 if (SUCCEEDED(hr)) 1271 { 1272 Bstr strVal; 1273 hr = pError->COMGETTER(Text)(strVal.asOutParam()); 1274 if ( SUCCEEDED(hr) 1275 && strVal.isNotEmpty()) 1276 strError = strVal; 1266 1277 } 1267 1268 LogRel(("Automatic update of Guest Additions failed: %s\n", strError.c_str())); 1269 LogRel(("Please install Guest Additions manually\n")); 1270 } 1271 } 1278 } 1279 1280 LogRel(("Automatic update of Guest Additions failed: %s\n", strError.c_str())); 1281 } 1282 1283 LogRel(("Please install Guest Additions manually\n")); 1272 1284 } 1273 1285
Note:
See TracChangeset
for help on using the changeset viewer.