Re: Champ cancel-lock multiligne

Liste des GroupesRevenir à fcu serveurs 
Sujet : Re: Champ cancel-lock multiligne
De : yamo (at) *nospam* beurdin.invalid (yamo')
Groupes : fr.comp.usenet.serveurs
Date : 19. May 2022, 13:16:09
Autres entêtes
Organisation : <http://pasdenom.info/news.html>
Message-ID : <t658tq$8tj$1@rasp.pasdenom.info>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 SeaMonkey/2.53.12
Marc SCHAEFER a tapoté le 19/05/2022 13:12:
yamo' <yamo@beurdin.invalid> wrote:
Tu peux.
 
Le diff ressemble à quoi?
 
J'avais fait une erreur de nom de variable dans une des premières
versions du patch, et comme le script n'est pas en use strict; use
warnings; c'était invisible.
 
Depuis, avec la version:
 
   https://nnrp.alphanet.ch/newsgroup/fr.comp.usenet.serveurs/%3Ct5u0k3$5op$1@shakotay.alphanet.ch%3E
 
Le bug était d'utiliser une variable inexistante $art plutôt que
$headers dans le for ou le foreach.
 
Pas de souci me semble-t-il désormais.
 


J'ai :

sub verify_cancel($$$) {
   my $r_hdr = shift || die;
   my $target = shift;
   my $descr = shift;

   my $headers = INN::head($target);
   if (!$headers){
#          saveart('log.cancel',"$descr of non-existing ID $target");
#          return undef;
           return "$descr of non-existing ID";
   }
   my %headers;
#   for my $line(split(/\s*\n/, $headers))    {
   my $previous;
   foreach my $line (split(/\s*\n/, $headers)) {
      if ($line =~ m/^([[:alnum:]-]+):\s+(.*)/) {
                $previous = $1;
      } elsif ($line =~ m/^\s+(.*)/) {
          if (defined($previous)) {
             $headers{$previous} .= " " . $1;
          }
          else {
             INN::syslog('notice', 'garbled line: ' . $line);
          }
      }
   }
   my $lock = $headers{'Cancel-Lock'};
   if (defined($lock)) {
      my $key = $r_hdr->{'Cancel-Key'} || return "$descr of $target
without Cancel-Key";
      return verify_cancel_key($key, $lock, $target);
   } else {
    # saveart('log.cancel',"$descr of $target without Cancel-Key and
Cancel-Lock");
    # -thh
    # no cancel-lock: go ahead and cancel anyway!
    # You refuse the cancel here...
    # local stuff...
    INN::syslog("info", "No Cancel-Key for $descr $target");
        saveart('bad.cancel','No Cancel-Key');
        return reject('No Cancel-Key');
    #return "$descr of $target without Cancel-key";
    # INN::cancel($target);
   }

   return undef;
}



--
Stéphane

Date Sujet#  Auteur
16 May 22 * Re: viré de eternal-september.org ?52M.V.
16 May 22 +* Re: viré de eternal-september.org ?3Marc SCHAEFER
16 May 22 i`* Cancel-Lock multiligne (was Re: viré de eternal-september.org ?)2Marc SCHAEFER
19 May 22 i `- Re: Cancel-Lock multiligne (was Re: viré de eternal-september.org ?)1yamo'
16 May 22 `* Re: viré de eternal-september.org ?48Marc SCHAEFER
16 May 22  `* Re: viré de eternal-september.org ?47M.V.
17 May 22   `* Champ cancel-lock multiligne (was: Re: viré de eternal-september.org ?)46M.V.
17 May 22    `* Re: Champ cancel-lock multiligne45Marc SCHAEFER
17 May 22     +* Re: Champ cancel-lock multiligne4M.V.
17 May 22     i`* Re: Champ cancel-lock multiligne3Marc SCHAEFER
17 May 22     i `* Re: Champ cancel-lock multiligne2M.V.
17 May 22     i  `- Re: Champ cancel-lock multiligne1M.V.
17 May 22     +* Re: Champ cancel-lock multiligne2M.V.
17 May 22     i`- Re: Champ cancel-lock multiligne1Marc SCHAEFER
18 May 22     `* Re: Champ cancel-lock multiligne38yamo'
18 May 22      `* Re: Champ cancel-lock multiligne37M.V.
18 May 22       +- Re: Champ cancel-lock multiligne1M.V.
18 May 22       `* Re: Champ cancel-lock multiligne35yamo'
18 May 22        +* Re: Champ cancel-lock multiligne6M.V.
18 May 22        i`* Re: Champ cancel-lock multiligne5yamo'
18 May 22        i +* Re: Champ cancel-lock multiligne2M.V.
18 May 22        i i`- Re: Champ cancel-lock multiligne1yamo'
18 May 22        i `* Re: Champ cancel-lock multiligne2Marc SCHAEFER
18 May 22        i  `- Re: Champ cancel-lock multiligne1M.V.
18 May 22        `* Re: Champ cancel-lock multiligne28DV
18 May 22         `* Re: Champ cancel-lock multiligne27Gilbert OLIVIER
18 May 22          `* Re: Champ cancel-lock multiligne26M.V.
18 May 22           `* Re: Champ cancel-lock multiligne25yamo'
18 May 22            `* Re: Champ cancel-lock multiligne24M.V.
19 May 22             `* Re: Champ cancel-lock multiligne23yamo'
19 May 22              `* Re: Champ cancel-lock multiligne22M.V.
19 May 22               `* Re: Champ cancel-lock multiligne21yamo'
19 May 22                `* Re: Champ cancel-lock multiligne20yamo'
19 May 22                 `* Re: Champ cancel-lock multiligne19M.V.
19 May 22                  `* Re: Champ cancel-lock multiligne18yamo'
19 May 22                   `* Re: Champ cancel-lock multiligne17M.V.
19 May 22                    `* Re: Champ cancel-lock multiligne16yamo'
19 May 22                     `* Re: Champ cancel-lock multiligne15Marc SCHAEFER
19 May 22                      `* Re: Champ cancel-lock multiligne14yamo'
19 May 22                       `* Re: Champ cancel-lock multiligne13Marc SCHAEFER
19 May 22                        +* Re: Champ cancel-lock multiligne2Marc SCHAEFER
19 May 22                        i`- Re: Champ cancel-lock multiligne1yamo'
19 May 22                        `* Re: Champ cancel-lock multiligne10yamo'
19 May 22                         +- Re: Champ cancel-lock multiligne1Marc SCHAEFER
19 May 22                         +- Re: Champ cancel-lock multiligne1Marc SCHAEFER
19 May 22                         `* Re: Champ cancel-lock multiligne7M.V.
19 May 22                          +- Re: Champ cancel-lock multiligne1M.V.
19 May 22                          `* Re: Champ cancel-lock multiligne5Marc SCHAEFER
20 May 22                           `* Re: Champ cancel-lock multiligne4yamo'
20 May 22                            `* Re: Champ cancel-lock multiligne3Marc SCHAEFER
20 May 22                             `* Re: Champ cancel-lock multiligne2yamo'
20 May 22                              `- Re: Champ cancel-lock multiligne1Marc SCHAEFER

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal