diff --git a/install.php b/install.php index 4837826..4668f02 100644 --- a/install.php +++ b/install.php @@ -474,11 +474,11 @@ function InstallDB_updateSchema($db_config) outn("
  • " . _("Modifying table ") . $tabl_name ."
  • "); $sql_modify = "ALTER TABLE `" . $tabl_name . "` " . substr($sql_modify, 0, -2) . ';'; - $check = $db->query($sql_modify); - if (DB::IsError($check)) { - out("
  • " . print_r($check, 1) . "
  • "); - die("Can not modify " . $tabl_name . " table sql: " . $sql_modify . "n"); - die_freepbx("Can not modify " . $tabl_name . " table sql: " . $sql_modify . "n"); + try { + $check = $db->query($sql_modify); + } catch (\Exception $e) { + dbug('exception is', $e); + die_freepbx("Can not modify {$tabl_name}. SQL: {$sql_create} \n"); } } } diff --git a/module.xml b/module.xml index cd5c29f..57723fe 100644 --- a/module.xml +++ b/module.xml @@ -1,7 +1,7 @@ sccp_manager SCCP Manager - 14.3.0.0 + 14.3.0.1 setup SCCP Connectivity Steve Lad, Alex GP diff --git a/sccpManTraits/helperFunctions.php b/sccpManTraits/helperFunctions.php index 6019262..5a2e138 100644 --- a/sccpManTraits/helperFunctions.php +++ b/sccpManTraits/helperFunctions.php @@ -180,12 +180,12 @@ trait helperfunctions { // fetch file content $numbytes = socket_recvfrom($socket, $buffer, 84, MSG_WAITALL, $host, $port); - + // unpack the returned buffer and discard the first two bytes $pkt = unpack("nopcode/nblockno/a*data", $buffer); - + // send ack - $packet = chr(4) . chr(pkt["blockno"]); + $packet = chr(4) . chr($pkt["blockno"]); socket_sendto($socket, $packet, strlen($packet), MSG_EOR, $host, $port); socket_close($socket);