[xiph-cvs] cvs commit: icecast/win32 Icecast2winDlg.cpp
Ed
oddsock at xiph.org
Fri Oct 31 11:24:00 PST 2003
oddsock 03/10/31 14:24:00
Modified: win32 Icecast2winDlg.cpp
Log:
fixed some display bugs when showing stats
Revision Changes Path
1.7 +24 -13 icecast/win32/Icecast2winDlg.cpp
Index: Icecast2winDlg.cpp
===================================================================
RCS file: /usr/local/cvsroot/icecast/win32/Icecast2winDlg.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Icecast2winDlg.cpp 17 Apr 2003 03:37:16 -0000 1.6
+++ Icecast2winDlg.cpp 31 Oct 2003 19:24:00 -0000 1.7
@@ -484,25 +484,35 @@
strcpy(tempSource, event->source);
}
+ if (strlen(tempSource) == 0) {
+ strcpy(tempSource, "Global Stat");
+ }
int foundit = 0;
for (int i=0;i<numMainStats;i++) {
- if (!strcmp(gStats[i].source, tempSource)) {
- int foundit2 = 0;
- gStats[i].populated = 1;
- for (int j=0;j<gStats[i].numStats;j++) {
- if (gStats[i].stats[j].name == tempElement.name) {
- gStats[i].stats[j].value = tempElement.value;
+ if (!strcmp(tempSource, "Global Stat")) {
+ if (gStats[i].stats[0].name == tempElement.name) {
+ gStats[i].stats[0].value = tempElement.value;
+ }
+ }
+ else {
+ if (!strcmp(gStats[i].source, tempSource)) {
+ int foundit2 = 0;
+ gStats[i].populated = 1;
+ for (int j=0;j<gStats[i].numStats;j++) {
+ if (gStats[i].stats[j].name == tempElement.name) {
+ gStats[i].stats[j].value = tempElement.value;
- foundit2 = 1;
+ foundit2 = 1;
+ }
}
+ if (!foundit2) {
+ gStats[i].stats[j].name = tempElement.name;
+ gStats[i].stats[j].value = tempElement.value;
+ gStats[i].numStats++;
+ }
+ foundit = 1;
}
- if (!foundit2) {
- gStats[i].stats[j].name = tempElement.name;
- gStats[i].stats[j].value = tempElement.value;
- gStats[i].numStats++;
- }
- foundit = 1;
}
}
if (!foundit) {
@@ -871,6 +881,7 @@
lvi.iSubItem = 2;
lvi.pszText = (LPTSTR)(LPCTSTR)gStats[i].stats[k].value;
statusTab.m_GlobalStatList.SetItem(&lvi);
+ break;
}
if (gStats[i].stats[k].titleFlag) {
CString windowTitle = gStats[i].source + " - " + gStats[i].stats[k].name + " - " + gStats[i].stats[k].value;
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list