fix Service.* filter on non-windows

This commit is contained in:
Doug MacEachern 2008-03-12 06:44:33 +00:00
parent cf351c458c
commit 6e4013b190
1 changed files with 4 additions and 2 deletions

View File

@ -854,15 +854,17 @@ static int ptql_pid_list_get(sigar_t *sigar,
int status, i; int status, i;
sigar_pid_t match_pid; sigar_pid_t match_pid;
#ifdef WIN32
if (branch->flags >= PTQL_PID_SERVICE) { if (branch->flags >= PTQL_PID_SERVICE) {
if ((branch->flags > PTQL_PID_SERVICE) || if ((branch->flags > PTQL_PID_SERVICE) ||
(branch->op_name != PTQL_OP_EQ)) (branch->op_name != PTQL_OP_EQ))
{ {
#ifdef WIN32
return ptql_pid_service_list_get(sigar, branch, proclist); return ptql_pid_service_list_get(sigar, branch, proclist);
#else
return SIGAR_OK; /* no matches */
#endif
} }
} }
#endif
status = ptql_pid_get(sigar, branch, &match_pid); status = ptql_pid_get(sigar, branch, &match_pid);