Index: trunk/FACT++/src/DimState.cc
===================================================================
--- trunk/FACT++/src/DimState.cc	(revision 14874)
+++ trunk/FACT++/src/DimState.cc	(revision 14876)
@@ -69,9 +69,16 @@
     for (auto it=tok.begin(); it!=tok.end(); it++)
     {
-        if (it->at(0)=='-')
+        string str = *it;
+
+        if (str[0]=='-')
             continue;
 
+        if (str[0]=='+')
+            str = str.substr(1);
+
+        const size_t last_pipe = str.find_last_of('|');
+
         // Get the type and compare it with fType
-        const string type = it->substr(it->find_last_of('|')+1);
+        const string type = str.substr(last_pipe+1);
         if (type=="RPC")
             continue;
@@ -81,31 +88,14 @@
         //    continue;
 
-        const size_t first_pipe  = it->find_first_of('|');
-        const size_t first_slash = it->find_first_of('/');
-        const size_t last_pipe   = it->find_last_of('|');
+        const size_t first_pipe  = str.find_first_of('|');
+        const size_t first_slash = str.find_first_of('/');
 
         // Get format, name and command name
         Service service;
-        service.server  = it->substr(0, first_slash);
-        service.name    = it->substr(0, first_pipe);
-        service.service = it->substr(first_slash+1, first_pipe-first_slash-1);
-        service.format  = it->substr(first_pipe +1, last_pipe -first_pipe -1);
+        service.server  = str.substr(0, first_slash);
+        service.name    = str.substr(0, first_pipe);
+        service.service = str.substr(first_slash+1, first_pipe-first_slash-1);
+        service.format  = str.substr(first_pipe +1, last_pipe -first_pipe -1);
         service.iscmd   = type=="CMD";
-
-        //if (it->at(0)=='+')
-        //{
-        //    // Check if this server is not found in the list.
-        //    // This should never happen if Dim works reliable
-        //    const TypeList::iterator v = list.find(name);
-        //    if (v!=list.end())
-        //    {
-        //        stringstream err;
-        //        err << "DimServiceInfoList: Service '" << server << "/" << name << "' already in list not as it ought to be.";
-        //        throw runtime_error(err.str());
-        //    }
-        //
-        //    list[name] = make_pair(fmt, iscmd);
-        //    fList->AddService(server, name, fmt, iscmd);
-        //}
 
         const auto v = find(fServiceList.begin(), fServiceList.end(), service.name);
