Changeset 51888 in vbox
- Timestamp:
- Jul 6, 2014 7:38:04 PM (11 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/MediumImpl.h
r49866 r51888 283 283 Utf8Str i_vdError(int aVRC); 284 284 285 bool i_isPropertyForFilter(const com::Utf8Str &aName); 286 285 287 static DECLCALLBACK(void) i_vdErrorCall(void *pvUser, int rc, RT_SRC_POS_DECL, 286 288 const char *pszFormat, va_list va); -
trunk/src/VBox/Main/src-server/MediumImpl.cpp
r51414 r51888 2197 2197 2198 2198 settings::StringsMap::iterator it = m->mapProperties.find(aName); 2199 if (!aName.startsWith("Special/")) 2199 if ( !aName.startsWith("Special/") 2200 && !i_isPropertyForFilter(aName)) 2200 2201 { 2201 2202 if (it == m->mapProperties.end()) … … 2263 2264 Utf8Str strName(aNames[i]); 2264 2265 if ( !strName.startsWith("Special/") 2266 && !i_isPropertyForFilter(strName) 2265 2267 && m->mapProperties.find(strName) == m->mapProperties.end()) 2266 2268 return setError(VBOX_E_OBJECT_NOT_FOUND, … … 2276 2278 Utf8Str strValue(aValues[i]); 2277 2279 settings::StringsMap::iterator it = m->mapProperties.find(strName); 2278 if (!strName.startsWith("Special/")) 2280 if ( !strName.startsWith("Special/") 2281 && !i_isPropertyForFilter(strName)) 2279 2282 { 2280 2283 AssertReturn(it != m->mapProperties.end(), E_FAIL); … … 6244 6247 6245 6248 return devType; 6249 } 6250 6251 /** 6252 * Internal method which checks whether a property name is for a filter plugin. 6253 */ 6254 bool Medium::i_isPropertyForFilter(const com::Utf8Str &aName) 6255 { 6256 /* If the name contains "/" use the part before as a filter name and lookup the filter. */ 6257 size_t offSlash; 6258 if ((offSlash = aName.find("/", 0)) != aName.npos) 6259 { 6260 com::Utf8Str strFilter; 6261 com::Utf8Str strKey; 6262 6263 HRESULT rc = strFilter.assignEx(aName, 0, offSlash); 6264 if (FAILED(rc)) 6265 return false; 6266 6267 rc = strKey.assignEx(aName, offSlash + 1, aName.length() - offSlash - 1); /* Skip slash */ 6268 if (FAILED(rc)) 6269 return false; 6270 6271 VDFILTERINFO FilterInfo; 6272 int vrc = VDFilterInfoOne(strFilter.c_str(), &FilterInfo); 6273 if (RT_SUCCESS(vrc)) 6274 { 6275 /* Check that the property exists. */ 6276 PCVDCONFIGINFO paConfig = FilterInfo.paConfigInfo; 6277 while (paConfig->pszKey) 6278 { 6279 if (strKey.equals(paConfig->pszKey)) 6280 return true; 6281 paConfig++; 6282 } 6283 } 6284 } 6285 6286 return false; 6246 6287 } 6247 6288 -
trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
r50914 r51888 112 112 113 113 HRESULT rc = S_OK; 114 115 # ifdef VBOX_WITH_EXTPACK 116 /* Load all VD plugins from all extension packs first. */ 117 /** @todo: Make generic for 4.4 (requires interface changes). */ 118 static const Utf8Str strExtPackPuel("Oracle VM VirtualBox Extension Pack"); 119 static const char *s_pszVDPlugin = "VDPluginCrypt"; 120 if (mParent->i_getExtPackManager()->i_isExtPackUsable(strExtPackPuel.c_str())) 121 { 122 Utf8Str strPlugin; 123 rc = mParent->i_getExtPackManager()->i_getLibraryPathForExtPack(s_pszVDPlugin, &strExtPackPuel, &strPlugin); 124 if (SUCCEEDED(rc)) 125 { 126 int vrc = VDPluginLoadFromFilename(strPlugin.c_str()); 127 NOREF(vrc); /** @todo: Don't ignore errors. */ 128 } 129 else 130 rc = S_OK; /* ignore errors */ 131 } 132 # endif 114 133 115 134 /* Fetch info of all available hd backends. */ -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r51745 r51888 432 432 unconst(m->pAutostartDb) = new AutostartDb; 433 433 434 #ifdef VBOX_WITH_EXTPACK 435 /* 436 * Initialize extension pack manager before system properties because 437 * it is required for the VD plugins. 438 */ 439 rc = unconst(m->ptrExtPackManager).createObject(); 440 if (SUCCEEDED(rc)) 441 rc = m->ptrExtPackManager->initExtPackManager(this, VBOXEXTPACKCTX_PER_USER_DAEMON); 442 if (FAILED(rc)) 443 throw rc; 444 #endif 445 434 446 /* create the system properties object, someone may need it too */ 435 447 unconst(m->pSystemProperties).createObject(); … … 507 519 rc = m->pEventSource->init(); 508 520 if (FAILED(rc)) throw rc; 509 510 #ifdef VBOX_WITH_EXTPACK511 /* extension manager */512 rc = unconst(m->ptrExtPackManager).createObject();513 if (SUCCEEDED(rc))514 rc = m->ptrExtPackManager->initExtPackManager(this, VBOXEXTPACKCTX_PER_USER_DAEMON);515 if (FAILED(rc))516 throw rc;517 #endif518 521 } 519 522 catch (HRESULT err)
Note:
See TracChangeset
for help on using the changeset viewer.