Changeset 17915 for fact/Evidence/DColl.cc
- Timestamp:
- 07/18/14 10:08:12 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/Evidence/DColl.cc
r12910 r17915 45 45 float DataSizeMB, LogSizeMB; 46 46 int DataSizeLastUpdate, LogSizeLastUpdate; 47 DimService *LogSizeService, *DataSizeService, *DataFilename; 47 DimService *LogSizeService, *DataSizeService, *DataFilename, *SubscriptionService; 48 48 49 int TimeForNextFile; 49 50 … … 113 114 LogCommand = new DimCommand("DColl/Log", (char *) "C", this); 114 115 115 // Subsribe to top-level server list (not via AddService() due to thread issue) 116 // Create services for information about subscribed services 117 SubscriptionService = new DimService(SERVER_NAME "/Subscriptions", "C", NULL, 0); 118 119 // Subscribe to top-level server list (not via AddService() due to thread issue) 116 120 ServerList = new DimInfo((char *) "DIS_DNS/SERVER_LIST", NO_LINK, this); 117 121 } … … 132 136 delete LogSizeService; 133 137 delete DataSizeService; 138 delete SubscriptionService; 134 139 135 140 // Close files … … 151 156 // no mutex is needed to serialize writing to the file 152 157 void DataHandler::infoHandler() { 158 159 static string SubscriptionList; 153 160 154 161 // Check if service available … … 192 199 Name = strtok(NULL, "|"); 193 200 } 201 202 // Update service subscription list 203 stringstream Stream; 204 205 for (unsigned int i=0; i<List.size(); i++) Stream << List[i].DataItem->getName() << '|'; 206 207 SubscriptionList = Stream.str(); 208 SubscriptionService->updateService((void *) SubscriptionList.c_str(), SubscriptionList.size()+1); // Note that Subscription is a static variable 209 194 210 return; 195 211 }
Note:
See TracChangeset
for help on using the changeset viewer.