Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Squid 0.4.0 set 'Finish transfer if less than x KB remaining' to -1.

    Scheduled Pinned Locked Moved Cache/Proxy
    5 Posts 2 Posters 1.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • technicalT
      technical
      last edited by

      That setting not accept negative string "-1"

      Im dynamicly caching windows update.

      Default settings keeping files all to download that a make alot of download and bandwith.

      Im try set the set 'Finish transfer if less than x KB remaining' to -1. but "-1 not possible"

      The following input errors were detected:

      'Finish when remaining KB' must contain a positive integer or '-1'.

      so what is new value ?

      Necati Selim GÜNER
      IT Technician

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        Use this via System Patches.

        
        @@ -953,7 +967,7 @@
        
                if (!empty($post['quick_abort_min'])) {
                        $value = trim($post['quick_abort_min']);
        -               if ((!is_numericint($value)) && ($value !== -1)) {
        +               if ((!is_numericint($value)) && ($value != "-1")) {
                                $input_errors[] = "'Finish when remaining KB' must contain a positive integer or '-1'.";
                        }
                }
        
        
        1 Reply Last reply Reply Quote 0
        • technicalT
          technical
          last edited by

          @doktornotor:

          Use this via System Patches.

          
          @@ -953,7 +967,7 @@
          
                  if (!empty($post['quick_abort_min'])) {
                          $value = trim($post['quick_abort_min']);
          -               if ((!is_numericint($value)) && ($value !== -1)) {
          +               if ((!is_numericint($value)) && ($value != "-1")) {
                                  $input_errors[] = "'Finish when remaining KB' must contain a positive integer or '-1'.";
                          }
                  }
          
          

          Patch Contents is that code right ?

          Base Directory = ?

          wich directory to patch ? Please explain detaily (it is inside squid_traffic.xml) or ?

          Thank you.

          Necati Selim GÜNER
          IT Technician

          1 Reply Last reply Reply Quote 0
          • D
            doktornotor Banned
            last edited by

            Stick this in there:

            
            --- a/usr/local/pkg/squid.inc       2015-10-12 20:05:23.939006529 +0200
            +++ b/usr/local/pkg/squid.inc    2015-10-14 10:22:42.955506820 +0200
            @@ -953,7 +967,7 @@
            
                    if (!empty($post['quick_abort_min'])) {
                            $value = trim($post['quick_abort_min']);
            -               if ((!is_numericint($value)) && ($value !== -1)) {
            +               if ((!is_numericint($value)) && ($value != "-1")) {
                                    $input_errors[] = "'Finish when remaining KB' must contain a positive integer or '-1'.";
                            }
                    }
            
            

            Leave everything at defaults and use the fine "Test" feature in there if unsure.

            1 Reply Last reply Reply Quote 0
            • technicalT
              technical
              last edited by

              @doktornotor:

              Stick this in there:

              
              --- a/usr/local/pkg/squid.inc       2015-10-12 20:05:23.939006529 +0200
              +++ b/usr/local/pkg/squid.inc    2015-10-14 10:22:42.955506820 +0200
              @@ -953,7 +967,7 @@
              
                      if (!empty($post['quick_abort_min'])) {
                              $value = trim($post['quick_abort_min']);
              -               if ((!is_numericint($value)) && ($value !== -1)) {
              +               if ((!is_numericint($value)) && ($value != "-1")) {
                                      $input_errors[] = "'Finish when remaining KB' must contain a positive integer or '-1'.";
                              }
                      }
              
              

              Leave everything at defaults and use the fine "Test" feature in there if unsure.

              thank you so much.

              Necati Selim GÜNER
              IT Technician

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.