sc.setParameters("ping", oldPingTime);
sc.setParameters("msid", host.getManagementServerId());
}
long newUpdateCount = host.incrUpdated();
UpdateBuilder ub = getUpdateBuilder(host);
ub.set(host, _statusAttr, newStatus);
if (newStatus.updateManagementServer()) {
if (newStatus.lostConnection()) {
ub.set(host, _msIdAttr, null);
} else {
ub.set(host, _msIdAttr, host.getManagementServerId());
}
if (event.equals(Event.Ping) || event.equals(Event.AgentConnected)) {
ub.set(host, _pingTimeAttr, System.currentTimeMillis() >> 10);
}
}
if (event.equals(Event.ManagementServerDown)) {
ub.set(host, _pingTimeAttr, ((System.currentTimeMillis() >> 10) - (10 * 60)));
}
int result = update(ub, sc, null);
assert result <= 1 : "How can this update " + result + " rows? ";
if (status_logger.isDebugEnabled() && result == 0) {