- Timestamp:
- Jun 7, 2010 3:34:06 PM (15 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxService
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h
r29858 r30082 200 200 /** The client ID for HGCM communication. */ 201 201 uint32_t uClientID; 202 /** List of VBOXSERVICEVEPROPCACHEENTRY nodes. */203 RTLISTNODE ListEntries;202 /** Head node of list. */ 203 RTLISTNODE NodeHead; 204 204 /** Critical section for thread-safe use. */ 205 205 RTCRITSECT CritSect; … … 213 213 typedef struct VBOXSERVICEVEPROPCACHEENTRY 214 214 { 215 /** Node . */216 RTLISTNODE Node ;215 /** Node to successor. */ 216 RTLISTNODE NodeSucc; 217 217 /** Name (and full path) of guest property. */ 218 218 char *pszName; -
trunk/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.cpp
r30013 r30082 49 49 if (RT_SUCCESS(RTCritSectEnter(&pCache->CritSect))) 50 50 { 51 RTListForEach(&pCache-> ListEntries, pNodeIt, VBOXSERVICEVEPROPCACHEENTRY, Node)51 RTListForEach(&pCache->NodeHead, pNodeIt, VBOXSERVICEVEPROPCACHEENTRY, NodeSucc) 52 52 { 53 53 if (strcmp(pNodeIt->pszName, pszName) == 0) … … 78 78 if (RT_SUCCESS(rc)) 79 79 { 80 /*rc =*/ RTListAppend(&pCache-> ListEntries, &pNode->Node);80 /*rc =*/ RTListAppend(&pCache->NodeHead, &pNode->NodeSucc); 81 81 rc = RTCritSectLeave(&pCache->CritSect); 82 82 } … … 98 98 /** @todo Prevent init the cache twice! 99 99 * r=bird: Use a magic. */ 100 RTListInit(&pCache-> ListEntries);100 RTListInit(&pCache->NodeHead); 101 101 pCache->uClientID = uClientId; 102 102 return RTCritSectInit(&pCache->CritSect); … … 279 279 if (RT_SUCCESS(RTCritSectEnter(&pCache->CritSect))) 280 280 { 281 RTListForEach(&pCache-> ListEntries, pNodeIt, VBOXSERVICEVEPROPCACHEENTRY, Node)281 RTListForEach(&pCache->NodeHead, pNodeIt, VBOXSERVICEVEPROPCACHEENTRY, NodeSucc) 282 282 { 283 283 rc = VBoxServiceWritePropF(pCache->uClientID, pNodeIt->pszName, pNodeIt->pszValue); … … 305 305 if (RT_SUCCESS(rc)) 306 306 { 307 PVBOXSERVICEVEPROPCACHEENTRY pNode = RTListNodeGetFirst(&pCache-> ListEntries, VBOXSERVICEVEPROPCACHEENTRY, Node);307 PVBOXSERVICEVEPROPCACHEENTRY pNode = RTListNodeGetFirst(&pCache->NodeHead, VBOXSERVICEVEPROPCACHEENTRY, NodeSucc); 308 308 while (pNode) 309 309 { … … 317 317 pNode->fFlags = 0; 318 318 319 PVBOXSERVICEVEPROPCACHEENTRY pNext = RTListNodeGetNext(&pNode->Node , VBOXSERVICEVEPROPCACHEENTRY, Node);320 RTListNodeRemove(&pNode->Node );319 PVBOXSERVICEVEPROPCACHEENTRY pNext = RTListNodeGetNext(&pNode->NodeSucc, VBOXSERVICEVEPROPCACHEENTRY, NodeSucc); 320 RTListNodeRemove(&pNode->NodeSucc); 321 321 RTMemFree(pNode); 322 322 323 if (pNext && RTListNodeIsLast(&pCache-> ListEntries, &pNext->Node))323 if (pNext && RTListNodeIsLast(&pCache->NodeHead, &pNext->NodeSucc)) 324 324 break; 325 325 pNode = pNext;
Note:
See TracChangeset
for help on using the changeset viewer.