Changeset 28972 in vbox for trunk/src/VBox/Additions
- Timestamp:
- May 3, 2010 12:25:23 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.cpp
r28969 r28972 95 95 va_list va; 96 96 va_start(va, pszValueFormat); 97 int rc = VBoxServicePropCacheUpdate(pCache, pszName, 0 /* Not used */, NULL /* Not used */, pszValueFormat, va); 97 char *pszValue; 98 int rc = RTStrAPrintfV(&pszValue, pszValueFormat, va); 99 if (RT_SUCCESS(rc)) 100 { 101 rc = VBoxServicePropCacheUpdateEx(pCache, pszName, 0 /* Not used */, NULL /* Not used */, pszValue); 102 RTStrFree(pszValue); 103 } 98 104 va_end(va); 99 105 return rc; … … 137 143 if (pNode->uFlags & VBOXSERVICEPROPCACHEFLAG_ALWAYS_UPDATE) 138 144 fUpdate = true; 139 else if ( strcmp(pNode->pszValue, pszValue) != 0)145 else if (pNode->pszValue && strcmp(pNode->pszValue, pszValue) != 0) 140 146 fUpdate = true; 141 147 … … 170 176 { 171 177 PVBOXSERVICEVEPROPCACHEENTRY pNewNode = (PVBOXSERVICEVEPROPCACHEENTRY)RTMemAlloc(sizeof(VBOXSERVICEVEPROPCACHEENTRY)); 172 pN ode->pszName = RTStrDup(pszName);178 pNewNode->pszName = RTStrDup(pszName); 173 179 if (pszValue) 174 pN ode->pszValue = RTStrDup(pszValue);180 pNewNode->pszValue = RTStrDup(pszValue); 175 181 else 176 pN ode->pszValue = NULL;182 pNewNode->pszValue = NULL; 177 183 if (pszValueReset) 178 pN ode->pszValueReset = RTStrDup(pszValueReset);184 pNewNode->pszValueReset = RTStrDup(pszValueReset); 179 185 else 180 pN ode->pszValueReset = NULL;186 pNewNode->pszValueReset = NULL; 181 187 pNewNode->uFlags = u32Flags; 182 188 /*rc =*/ RTListAppend(&pCache->Node, &pNewNode->Node);
Note:
See TracChangeset
for help on using the changeset viewer.