- Timestamp:
- Jun 27, 2008 9:42:47 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 32464
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r10000 r10007 2537 2537 VBOXHGCMSVCPARM parm[2]; 2538 2538 Utf8Str Utf8Key = aKey; 2539 Utf8Str Utf8Value = aValue;2539 int rc = VINF_SUCCESS; 2540 2540 2541 2541 parm[0].type = VBOX_HGCM_SVC_PARM_PTR; … … 2544 2544 /* The + 1 is the null terminator */ 2545 2545 parm[0].u.pointer.size = Utf8Key.length() + 1; 2546 parm[1].type = VBOX_HGCM_SVC_PARM_PTR; 2547 /* To save doing a const cast, we use the mutableRaw() member. */ 2548 parm[1].u.pointer.addr = Utf8Value.mutableRaw(); 2549 if (parm[1].u.pointer.addr != NULL) 2546 if (aValue != NULL) 2547 { 2548 Utf8Str Utf8Value = aValue; 2549 parm[1].type = VBOX_HGCM_SVC_PARM_PTR; 2550 /* To save doing a const cast, we use the mutableRaw() member. */ 2551 parm[1].u.pointer.addr = Utf8Value.mutableRaw(); 2550 2552 /* The + 1 is the null terminator */ 2551 2553 parm[1].u.pointer.size = Utf8Value.length() + 1; 2554 rc = mVMMDev->hgcmHostCall ("VBoxSharedInfoSvc", SET_CONFIG_KEY_HOST, 2, &parm[0]); 2555 } 2552 2556 else 2553 parm[1].u.pointer.size = 0; 2554 int rc = mVMMDev->hgcmHostCall ("VBoxSharedInfoSvc", SET_CONFIG_KEY_HOST, 2, &parm[0]); 2557 rc = mVMMDev->hgcmHostCall ("VBoxSharedInfoSvc", DEL_CONFIG_KEY_HOST, 1, &parm[0]); 2555 2558 if (RT_SUCCESS(rc)) 2556 2559 hrc = S_OK; -
trunk/src/VBox/Main/MachineImpl.cpp
r10000 r10007 2701 2701 using namespace svcInfo; 2702 2702 2703 if (NULL == aKey) 2704 return setError (E_INVALIDARG, tr ("Called with a NULL key argument")); 2703 2705 HRESULT hrc = E_FAIL; 2704 2706 AutoWriteLock alock (this); … … 2769 2771 using namespace svcInfo; 2770 2772 2773 if (NULL == aKey) 2774 return setError (E_INVALIDARG, tr ("Called with a NULL key argument")); 2771 2775 HRESULT hrc = E_FAIL; 2772 2776 AutoWriteLock alock (this);
Note:
See TracChangeset
for help on using the changeset viewer.