~ubuntu-dev/ubuntu/lucid/zabbix/lucid-201002110857

« back to all changes in this revision

Viewing changes to src/libs/zbxsysinfo/win32/pdhmon.c

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Haas
  • Date: 2009-10-10 12:21:16 UTC
  • mfrom: (1.1.10 upstream) (8.2.6 sid)
  • Revision ID: james.westby@ubuntu.com-20091010122116-44k2zdq57rb40i6z
Tags: 1:1.6.6-2
* debian/po/ja.po updated (Closes: #548651)
* debian/po/cs.po updated (Closes: #548675)
* debian/po/sv.po updated (Closes: #548796)
* debian/po/de.po updated (Closes: #549248)
* debian/po/it.po updated (Closes: #549579)
* debian/po/pt.po updated (Closes: #550087)
* debian/po/ru.po updated (Closes: #550102)
* debian/po/es.po updated (Closes: #550173)
* debian/po/fr.po updated (Closes: #550315)
* Manpages for zabbix_server and zabbix_agent added (Closes: #496696)
* Added hint about the difference of the zabbix_agent.conf and
  zabbix_agentd.conf in each config file as a comment. (Closes: #548701)

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
        for(perfs = collector->perfs.pPerfCounterList; perfs; perfs=perfs->next)
42
42
        {
43
 
                if ( 0 == strcmp(perfs->name, param) )
 
43
                if (NULL != perfs->name && 0 == strcmp(perfs->name, param) )
44
44
                {
45
 
                        SET_DBL_RESULT(result, perfs->lastValue);
 
45
                        if (ITEM_STATUS_NOTSUPPORTED == perfs->status)
 
46
                                SET_MSG_RESULT(result, strdup(perfs->error))
 
47
                        else
 
48
                                SET_DBL_RESULT(result, perfs->lastValue)
46
49
                        ret = SYSINFO_RET_OK;
47
50
                        break;
48
51
                }
90
93
                }
91
94
 
92
95
                for (perfs = collector->perfs.pPerfCounterList; perfs != NULL; perfs = perfs->next) {
93
 
                        if (0 == strcmp(perfs->counterPath, counter_path) && perfs->interval == interval) {
94
 
                                SET_DBL_RESULT(result, perfs->lastValue);
 
96
                        if (NULL == perfs->name && 0 == strcmp(perfs->counterPath, counter_path) && perfs->interval == interval) {
 
97
                                if (ITEM_STATUS_NOTSUPPORTED == perfs->status)
 
98
                                        SET_MSG_RESULT(result, strdup(perfs->error))
 
99
                                else
 
100
                                        SET_DBL_RESULT(result, perfs->lastValue)
95
101
                                return SYSINFO_RET_OK;
96
102
                        }
97
103
                }
98
104
 
99
 
                if (FAIL == add_perf_counter("", counter_path, interval))
 
105
                if (FAIL == add_perf_counter(NULL, counter_path, interval))
100
106
                        return SYSINFO_RET_FAIL;
101
107
        }
102
108