Changeset 11146
- Timestamp:
- 06/23/11 18:54:26 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilderWrapper.h
r11145 r11146 878 878 bool IsIgnored(int i) const { return g_port[i].sockDef==-1; } 879 879 880 void SetDebugStream(bool b) { fDebugStream = b; if (!b) for (int i=0; i<40; i++) fDumpStream[i].close(); } 881 void SetDebugRead(bool b) { fDebugRead = b; if (!b) fDumpRead.close(); } 880 void SetDebugStream(bool b) 881 { 882 fDebugStream = b; 883 if (b) 884 return; 885 886 for (int i=0; i<40; i++) 887 { 888 if (!fDumpStream[i].is_open()) 889 continue; 890 891 fDumpStream[i].close(); 892 893 ostringstream name; 894 name << "socket_dump-" << setfill('0') << setw(2) << i << ".bin"; 895 fMsg.Message("Closed file '"+name.str()+"'"); 896 } 897 } 898 899 void SetDebugRead(bool b) 900 { 901 fDebugRead = b; 902 if (b || !fDumpRead.is_open()) 903 return; 904 905 fDumpRead.close(); 906 fMsg.Message("Closed file 'socket_events.txt'"); 907 } 882 908 883 909 size_t GetUsedMemory() const { return gi_usedMem; } … … 1030 1056 if (!fDumpStream[slot]) 1031 1057 { 1032 //ostringstream str;1033 //str << "Open file " << name << ": " << strerror(errno) << " (errno=" << errno << ")";1034 //Error(str);1058 ostringstream str; 1059 str << "Open file '" << name << "': " << strerror(errno) << " (errno=" << errno << ")"; 1060 fMsg.Error(str); 1035 1061 1036 1062 return; 1037 1063 } 1064 1065 fMsg.Message("Opened file '"+name.str()+"' for writing."); 1038 1066 } 1039 1067 … … 1048 1076 // ibyte = #bytes gelesen 1049 1077 // event = eventId (oder 0 wenn noch nicht bekannt) 1050 // state : 0=reading data1051 // 1=finishedreading data1078 // state : 1=finished reading data 1079 // 0=reading data 1052 1080 // -1=start reading data (header) 1053 1081 // -2=start reading data, … … 1063 1091 if (!fDumpRead) 1064 1092 { 1065 //ostringstream str;1066 //str << "Open file " << name << ": " << strerror(errno) << " (errno=" << errno << ")";1067 //Error(str);1093 ostringstream str; 1094 str << "Open file 'socket_events.txt': " << strerror(errno) << " (errno=" << errno << ")"; 1095 fMsg.Error(str); 1068 1096 1069 1097 return; 1070 1098 } 1099 1100 fMsg.Message("Opened file 'socket_events.txt' for writing."); 1071 1101 } 1072 1102
Note:
See TracChangeset
for help on using the changeset viewer.