Changeset 10861
- Timestamp:
- 05/27/11 13:36:07 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilderWrapper.h
r10856 r10861 79 79 } 80 80 81 void Start(const map<int,string> &addr)81 void Start(const vector<string> &addr) 82 82 { 83 83 if (IsThreadRunning()) … … 89 89 fMsg.Message("Starting EventBuilder thread"); 90 90 91 int cnt = 0; 92 for (int i=0; i<40; i++) 91 for (size_t i=0; i<addr.size(); i++) 93 92 { 94 //g_ip[i].port = 5000; 95 memset(g_ip[cnt].addr, 0, sizeof(g_ip[cnt].addr)); 96 //strncpy(g_ip[i].addr, it->c_str(), 99); 97 98 const map<int,string>::const_iterator it = addr.find(i); 99 if (it==addr.end()) 100 continue; 101 102 const string &dest = it->second; 103 104 size_t pos = dest.find_first_of(':'); 105 if (pos==string::npos) 106 continue; 107 108 string a = dest.substr(0, pos); 109 string p = dest.substr(pos+1); 110 111 strcpy(g_ip[cnt].addr, "127.0.0.1"); 112 g_ip[cnt].port = atoi(p.c_str()); 113 114 cnt++; 93 memset(g_ip[i].addr, 0, sizeof(g_ip[i].addr)); 94 95 const size_t pos = addr[i].find_first_of(':'); 96 97 const string a = addr[i].substr(0, pos); 98 const string p = addr[i].substr(pos+1); 99 100 strcpy(g_ip[i].addr, "127.0.0.1"); 101 g_ip[i].port = atoi(p.c_str()); 115 102 } 116 103 117 g_maxBoards = cnt;118 g_actBoards = cnt;104 g_maxBoards = addr.size(); 105 g_actBoards = addr.size(); 119 106 120 107 g_runStat = kModeRun;
Note:
See TracChangeset
for help on using the changeset viewer.