]> Git [git.vados.ru] :: Repos - Mikrotiks/ros.vados.ru.git/commitdiff
Autocommit in repo: ros.vados.ru, generated by owner: root, in 19:10:02 30.04.2026.
authorvados-dev <192440777+vados-dev@users.noreply.github.com>
Thu, 30 Apr 2026 16:10:02 +0000 (19:10 +0300)
committervados-dev <192440777+vados-dev@users.noreply.github.com>
Thu, 30 Apr 2026 16:10:02 +0000 (19:10 +0300)
html/AM-GlobalFunc.rsc

index a134d70e87ad166083b02ee39d4a64cf215413e6..63a949d3b0e150ad9e3150a83d28d5158882b947 100644 (file)
@@ -17,9 +17,9 @@
 :global GlobalFuncReady false;
 
 # Git commit id & info, expected configuration version
-:global CommitId "main/293/c17fc8f9";
+:global CommitId "main/298/26df33a0";
 :global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 16:15:02 30.04.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 19:10:02 30.04.2026.";
 
 # The variables are received right here.
 :global GlobalConfVersion 138;
 :set GetPubIp do={
     :global DetectIpAddrDefault;
     :global DetectIpAddrFallback;
-    :global LogPrint;
-    
+
     :local PubIpAddr false;
     :local Url $DetectIpAddrDefault;
 
-#   :retry command={abc} delay=1 max=2 on-error={:put "got error"} 
     :do {
-      $LogPrint debug $0 ("Trying to detect public IP using default service: " . $Url . "...");
+      :log debug $0 ("Trying to detect public IP using default service: " . $Url . "...");
        :retry command={:set PubIpAddr ([ /tool/fetch http-method="get" check-certificate=yes-without-crl $Url output=user as-value ]->"data")} \
-        delay=50ms max=5 on-error={$LogPrint error [ :jobname ] ("Failed to detect public IP using default service: " . $Url . ".")}
-       #:error "Failed to detect public IP using default service: $Url."};
+        delay=50ms max=5 on-error={:log error [ :jobname ] ("Failed to detect public IP using default service: " . $Url . ".")}
      } on-error={
-      $LogPrint error $0 ("Failed to detect public IP using default service: " . $Url . ".");
+      :log error $0 ("Failed to detect public IP using default service: " . $Url . ".");
       :set Url $DetectIpAddrFallBack;
-      $LogPrint debug $0 ("Trying to detect public IP using fallback service: " . $Url . "...");
+      :log debug $0 ("Trying to detect public IP using fallback service: " . $Url . "...");
        :retry command={:set PubIpAddr ([ /tool/fetch http-method="get" check-certificate=yes-without-crl $Url output=user as-value ]->"data")} \
-        delay=200ms max=5 on-error={$LogPrint error [ :jobname ] ("Failed to detect public IP using fallback service: " . $Url . ".")}
+        delay=200ms max=5 on-error={:log error [ :jobname ] ("Failed to detect public IP using fallback service: " . $Url . ".")}
     };
     :if ($PubIpAddr = false) do={
       :set PubIpAddr "not-detected";
     } else={
       :set PubIpAddr [ :pick $PubIpAddr 0 15];
     }
-  :put [ $PubIpAddr ];
-#  :return $PubIpAddr;
+  :local Return [:put [ $PubIpAddr ]];
+  :return $Return;
 }
 
 :set FormatLine do={