Code

Updated autonet completition for systems
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Oct 2010 12:13:44 +0000 (12:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Oct 2010 12:13:44 +0000 (12:13 +0000)
-Display error message if rpc communication failed.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20044 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_termDNS.inc

index 0c7fb3f42d2d9e39e590f65258e474c1254280d0..70deaaa06c9ad9a1f8bc1590bdf7a256e9334435 100644 (file)
@@ -310,9 +310,12 @@ class termDNS extends plugin
             if ($this->config->get_cfg_value("core","gosaRpcServer") != ""){
                 $rpc = $this->config->getRpcHandle();
                 $res = $rpc->networkCompletion($this->cn);
-                if(isset($res['ip']) && tests::is_ip($res['ip'])) $this->ipHostNumber= $res['ip'];
-                if(isset($res['mac']) && tests::is_mac($res['mac'])) $this->macAddress= $res['mac'];
-
+                if(!$rpc->success()){
+                    msg_dialog::display(_("Error"), msgPool::rpcError($rpc->get_error()), ERROR_DIALOG);
+                }else{
+                    if(isset($res['ip']) && tests::is_ip($res['ip'])) $this->ipHostNumber= $res['ip'];
+                    if(isset($res['mac']) && tests::is_mac($res['mac'])) $this->macAddress= $res['mac'];
+                }
             }elseif ($config->get_cfg_value("core","gosaSupportURI") != ""){
 
                 $d= new gosaSupportDaemon(TRUE, 0.5);