summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/zabbix_server/expression.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/zabbix_server/expression.c b/src/zabbix_server/expression.c
index 5f94fc16..61109f2f 100644
--- a/src/zabbix_server/expression.c
+++ b/src/zabbix_server/expression.c
@@ -703,7 +703,7 @@ void substitute_simple_macros(DB_TRIGGER *trigger, DB_ACTION *action, char *data
}
else if( (s = strstr(str,"{IPADDRESS}")) != NULL )
{
- snprintf(sql,sizeof(sql)-1,"select distinct h.ip from triggers t, functions f,items i, hosts h where t.triggerid=%d and f.triggerid=t.triggerid and f.itemid=i.itemid and h.hostid=i.hostid and i.useip=1", trigger->triggerid);
+ snprintf(sql,sizeof(sql)-1,"select distinct h.ip from triggers t, functions f,items i, hosts h where t.triggerid=%d and f.triggerid=t.triggerid and f.itemid=i.itemid and h.hostid=i.hostid and h.useip=1", trigger->triggerid);
result = DBselect(sql);
if(DBnum_rows(result) == 0)