From: wolffc Date: Thu, 16 Sep 2010 14:39:43 +0000 (+0000) Subject: When removing no longer reacting gosa-si server from the known_server X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a104e9500a383ec0f2bb2b4f8042bc6babeed543;p=gosa.git When removing no longer reacting gosa-si server from the known_server database, remove clients registered with them from the foreign_clients database as well. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@19722 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/trunk/gosa-si/gosa-si-server b/trunk/gosa-si/gosa-si-server index 091402f96..a2a49db1e 100755 --- a/trunk/gosa-si/gosa-si-server +++ b/trunk/gosa-si/gosa-si-server @@ -953,6 +953,10 @@ sub send_msg_to_target { $sql_statement = "DELETE FROM known_server WHERE hostname='$address'"; $res = $known_server_db->del_dbentry($sql_statement); daemon_log("$session_id WARNING: failed 2x to send a message to host '$address', delete host from known_server", 3); + + # Remove the registered clients of the server as well + $sql_statement = "DELETE FROM foreign_clients WHERE regserver='$address'"; + $res = $foreign_clients_db->del_dbentry($sql_statement); } else { $sql_statement = "UPDATE known_server SET status='$new_status', timestamp='$timestamp' WHERE hostname='$address'";