35 |
|
// apply the filter and return true if successful. |
36 |
|
public boolean runFilter(XMLPacket packet){ |
37 |
|
|
38 |
+ |
// need a special case for heartbeats |
39 |
+ |
if (packet.getParam("packet.attributes.type") == "heartbeat" |
40 |
+ |
&& packet.getParam("packet.attributes.date") != null |
41 |
+ |
&& packet.getParam("packet.attributes.ip") != null |
42 |
+ |
&& packet.getParam("packet.attributes.machine_name") != null){ |
43 |
+ |
return true; |
44 |
+ |
} |
45 |
+ |
|
46 |
|
// return false if any of the essential data is not present. |
47 |
|
if (packet.getParam("packet.attributes.machine_name") == null |
48 |
|
|| packet.getParam("packet.attributes.ip") == null |