Ignore:
Timestamp:
02/24/12 20:43:27 (13 years ago)
Author:
ogrimm
Message:
History handling in Edd faster, improved drag and drop functionality, version of Edd for La Palma
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/Evidence/History.cc

    r12910 r12940  
    5252       
    5353        DimInfo *ServerList;
     54        DimService *Service;
    5455        char *Directory;
    5556
     
    7273                                                         EvidenceServer(SERVER_NAME),
    7374                                                         Directory(Dir) {
    74 
    7575  // Get/initialize configuration
    7676  GetConfig("minchange", " ");
     
    8080  GetConfig("exclude", "");
    8181
     82  // Create services for information about subscribed services
     83  Service = new DimService(SERVER_NAME "/Subscriptions", "C", NULL, 0);
     84
    8285  // Subscribe to top-level server list
    8386  ServerList = new DimInfo((char *) "DIS_DNS/SERVER_LIST", NO_LINK, this);
     
    9093  delete ServerList;
    9194  while (Map.size() != 0) RemoveService((*Map.begin()).first);
     95 
     96  delete Service;
    9297}
    9398
     
    96101void History::infoHandler() {
    97102
     103  static string List;
     104
    98105  DimInfo *I = getInfo();
    99106
    100107  // Check if service available
    101108  if (!ServiceOK(I)) return;
    102  
     109
    103110  // ====== Part A: Handle service subscriptions ===
    104111 
     
    138145          Name = strtok(NULL, "|");
    139146        }
     147       
     148        // Update service subscription list
     149        static stringstream Stream;
     150       
     151        for (map<string, struct Item>::const_iterator i=Map.begin(); i!=Map.end(); i++) {
     152          Stream << i->first << ':' << i->second.MinAbsChange << '|';
     153        }
     154        List = Stream.str();
     155        Service->updateService((void *) List.c_str(), List.size()+1);
     156       
    140157        return;
    141158  }
Note: See TracChangeset for help on using the changeset viewer.