• Strange behaviour with PERL

    From Fabio Bizzi@2:335/364.1 to All on Thu Apr 22 14:53:54 2021
    Hello All!

    I'm trying to run the Stas's PING robot, but it doesn't list the Links, so I digged about it and some strange things appeared.

    This is my filter.pl file:

    8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--

    #!/usr/bin/perl
    #
    use warnings;
    #
    BEGIN { require "/home/husky/bin/pong.pl";
    require "/home/husky/bin/netcheck.pl";
    require "/home/husky/bin/netpoint.pl";
    # require "/home/husky/bin/echocleaner.pl";
    require "/home/husky/bin/pingpong.pm";
    }
    sub filter{
    w_log( "CheckPoint 1" );
    w_log( "$config{name}" );
    w_log( "CheckPoint 2" );
    w_log( "$config{sysop}" );
    w_log( "CheckPoint 3" );
    w_log( "$config{origin}" );
    w_log( "CheckPoint 4" );
    w_log( "$hpt_version" );
    w_log( "CheckPoint 5" );
    w_log( "$links{'2:221/6'}{'password'}" );
    w_log( "CheckPoint 6" );
    w_log( "$links{'2:221/6'}{'password'}" );
    w_log( "CheckPoint 7" );
    if ( !defined( $area ) ) {
    ping_pong( $fromname, $fromaddr, $toname, $toaddr, $subject, $text, $PVT+$K_S, 100 );
    }
    sub route{
    return route_to();
    }
    &pong;
    &netcheck;
    &netpoint;
    # &echocleaner;
    }

    8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--

    And this is the log of HPT:

    8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--

    ---------- Thu 22 Apr 21, hpt/lnx 1.9.0-cur 2020-11-09
    1 13:58:43 Start
    1 13:58:43 Start tossing...
    7 13:58:43 pkt: /home/husky/in.sec/79520570.tos [2:335/364.1]
    6 13:58:43 CheckPoint 1
    6 13:58:43 ]\/[imac Rebirth
    6 13:58:43 CheckPoint 2
    6 13:58:43 e riservate
    6 13:58:43 CheckPoint 3
    6 13:58:43 ]\/[imac Rebirth
    6 13:58:43 CheckPoint 4
    6 13:58:43 hpt/lnx 1.9.0-cur 2020-11-09
    6 13:58:43 CheckPoint 5
    6 13:58:43 Tommy Koivula
    6 13:58:43 CheckPoint 6
    6 13:58:43 6 13:58:43 CheckPoint 7
    6 13:58:43 Ping message detected.
    6 13:58:43 Perl(): Make PONG to PING reqiest: area=netmail; toname=PPING; toaddr=2:335/364 fromname=Fabio Bizzi; fromaddr=2:335/364.1
    4 13:58:44 Statistics:
    4 13:58:44 arc: 0 netMail: 1 echoMail: 0 CC: 1 4 13:58:44 pkt's: 1 dupe: 0 passthru: 0 exported: 0 4 13:58:44 msgs: 1 bad: 0 saved: 0 empty: 0 4 13:58:44 Input: 0.76 mails/sec Output: 0.00 mails/sec
    4 13:58:44 0.27 kb/sec
    4 13:58:44 0.35 kb total, processed in 1.318 seconds
    4 13:58:44 Areas summary:
    4 13:58:44 netmail area NetMailArea - 1 msgs
    4 13:58:44 netmail area NetArchive - 1 msgs
    1 13:58:44 End tossing
    C 13:58:44 Start areafix...
    C 13:58:44 Scanning NetMailArea
    C 13:58:44 End areafix...
    1 13:58:44 End

    8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--

    As you can see, the output between Checpoints 2 and 3 is garbage, like the output between Checkpoints 6 and 7

    P.S. I have changed the To: from PING to PPING so I can test it safely from the PING Warriors. :P

    The system is a Devuan Beowulf 64bit, HPT version is 1.9.0-cur 2020-11-09

    Meanwhile, on this point (Ubuntu 20.04LTS 64bit) When I call w_log("$links{'2:221/6'}{'password'}" );
    and
    w_log( "$links{'2:221/6'}{'password'}" );

    I get this:

    6 14:52:43 CheckPoint 5
    6 14:52:43 PERL: Use of uninitialized value in string at /home/bizzi/husky/bin/filter.pl line 29.
    6 14:52:43 6 14:52:43 CheckPoint 6
    6 14:52:43 PERL: Use of uninitialized value in string at /home/bizzi/husky/bin/filter.pl line 31.

    The filter.pl is similar, but this HPT is hpt/lnx 1.9.0-cur 2019-01-08

    Any ideas/suggestion? :)

    I'm going mad!

    Many thanks!!!

    Ciao!
    Fabio

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: ]\/[imac Rebirth Boss Point (2:335/364.1)
  • From Fabio Bizzi@2:335/364.1 to All on Thu Apr 22 16:07:54 2021
    Hello All!

    22 Apr 21 14:53, I wrote to you:

    [...]
    w_log( "CheckPoint 5" );
    w_log( "$links{'2:221/6'}{'password'}" );

    The second field is 'name', sorry for the wrong paste. :)
    Also in the last log.

    Ciao!
    Fabio

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: ]\/[imac Rebirth Boss Point (2:335/364.1)
  • From Brother Rabbit@2:460/58.10 to Fabio Bizzi on Thu Apr 22 22:29:12 2021
    Hi, Fabio!

    22 21 14:53, Fabio Bizzi -> All:

    6 13:58:43 hpt/lnx 1.9.0-cur 2020-11-09

    The problem is --------------------^^^^^^^^^^
    You should take version 2020-04-19.

    Have nice nights.
    Brother Rabbit.

    --- - . - ࠧ 㭨쭥.
    * Origin: Lame Users Breeding. Simferopol, Crimea. (2:460/58.10)
  • From Brother Rabbit@2:460/58.10 to Fabio Bizzi on Thu Apr 22 22:48:04 2021
    Hi, Fabio!

    22 21 22:29, Brother Rabbit -> Fabio Bizzi:

    6 13:58:43 hpt/lnx 1.9.0-cur 2020-11-09

    The problem is --------------------^^^^^^^^^^
    You should take version 2020-04-19.

    Sorry. I mean 2021-04-19.

    Have nice nights.
    Brother Rabbit.

    --- 뢠 쪨. 㦭 , ⮦ ࠢ
    * Origin: Lame Users Breeding. Simferopol, Crimea. (2:460/58.10)
  • From Brother Rabbit@2:460/58.10 to Fabio Bizzi on Thu Apr 22 23:30:52 2021
    Hi, Fabio!

    22 21 14:53, Fabio Bizzi -> All:

    This is my filter.pl file:

    8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<

    #!/usr/bin/perl
    #
    use warnings;
    #
    BEGIN { require "/home/husky/bin/pong.pl";

    Perhaps they are in conflict.

    require "/home/husky/bin/pingpong.pm";
    }

    You have to do it differently ...

    [fido@host-187 perl]$ perldoc ./pingpong.pm

    Put pingpong.pm somewhere in the @INC path. It's strongly recommended for
    Windows users to put it in the same directory with filter.pl.

    place to filter.pl something like this:

    use pingpong;


    Have nice nights.
    Brother Rabbit.

    --- ᯮ - , ⠪ ᮡ 祣 .
    * Origin: Lame Users Breeding. Simferopol, Crimea. (2:460/58.10)
  • From Tommi Koivula@2:221/1.6 to Brother Rabbit on Fri Apr 23 08:40:40 2021
    Hi Brother.

    22 Apr 21 22:48:04, you wrote to Fabio Bizzi:

    6 13:58:43 hpt/lnx 1.9.0-cur 2020-11-09

    The problem is ----------------^^^^^^^^^^
    You should take version 2020-04-19.

    Sorry. I mean 2021-04-19.

    Works here in hpt/w64-mvcdll 1.9.0-cur 2020-11-09.

    You may try 2:221/1.6.

    'Tommi

    ---
    * Origin: - rbb.fidonet.fi - Finland - (2:221/1.6)
  • From Brother Rabbit@2:460/58.10 to Tommi Koivula on Fri Apr 23 17:07:44 2021
    Hi, Tommi!

    23 21 08:40, Tommi Koivula -> Brother Rabbit:

    6 13:58:43 hpt/lnx 1.9.0-cur 2020-11-09

    The problem is ----------------^^^^^^^^^^
    You should take version 2020-04-19.

    Sorry. I mean 2021-04-19.

    Works here in hpt/w64-mvcdll 1.9.0-cur 2020-11-09.

    You may try 2:221/1.6.

    BUGS
    ping_pong uses the $config{origin} variable. If the Origin variable is not
    defined in the HPT configuration file, then this leads to the crash of the
    whole Perl hook.

    This has been fixed in version 2021-04-19.
    However, in the described case, the conflict of two pings is most likely to blame.

    Have nice nights.
    Brother Rabbit.

    --- ⪫뢠 ﭪ , ᥪ .
    * Origin: Lame Users Breeding. Simferopol, Crimea. (2:460/58.10)
  • From Fabio Bizzi@2:335/364.1 to Brother Rabbit on Sun Apr 25 17:48:06 2021
    Hello Brother!

    22 Apr 21 22:29, you wrote to me:

    The problem is --------------------^^^^^^^^^^
    You should take version 2020-04-19.

    Thank you for your help Stas! :)

    I cloned the hpt tree from GIY HUB, and tryied to build it against the 20210213 environment on the Devuan ascii, but I found a lot of perl compile errors like this:

    8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--

    ftn@balabam:~/src/husky-20210213/hpt$ make all
    gcc -Ih -I/home/husky/husky-20210213/include -c -s -O3 -fomit-frame-pointer -fstrength-reduce -fPIC -Wall -DDO_PERL `perl -MExtUtils::Embed -e ccopts` -DUNIX src/perl.c
    In file included from /usr/lib/x86_64-linux-gnu/perl/5.24/CORE/perl.h:5615:0,
    from src/perl.c:76:
    src/perl.c: In function ‘perl_myaddr’:
    src/perl.c:1220:43: error: incompatible type for argument 1 of ‘aka2str’
    sv_setpv((SV *)ST(naddr), aka2str(&config->addr[naddr]));^ /usr/lib/x86_64-linux-gnu/perl/5.24/CORE/embed.h:659:46: note: in definition of macro ‘sv_setpv’
    #define sv_setpv(a,b) Perl_sv_setpv(aTHX_ a,b)
    ^
    In file included from src/perl.c:53:0: /home/husky/husky-20210213/include/fidoconf/common.h:171:17: note: expected ‘hs_addr {aka const struct _netaddr}’ but argument is of type ‘ps_addr {aka struct _netaddr *}’
    HUSKYEXT char * aka2str(const hs_addr aka);
    ^~~~~~~
    In file included from /usr/lib/x86_64-linux-gnu/perl/5.24/CORE/perl.h:5615:0,
    from src/perl.c:76:
    src/perl.c: In function ‘perl_setvars’:
    src/perl.c:1651:38: error: incompatible type for argument 1 of ‘aka2str’
    if((sv = newSVpv(aka2str(&config->addr[i]), 0)) != NULL)

    8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<-- ^
    and so on....

    Did I have to build all the environment from GIT?

    P.S. Sorry for the late answer, lot of issue in my life... :)

    Ciao!
    Fabio
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: ]\/[imac Rebirth Boss Point (2:335/364.1)
  • From Fabio Bizzi@2:335/364.1 to Brother Rabbit on Sun Apr 25 17:54:42 2021
    Hello Brother!

    22 Apr 21 23:30, you wrote to me:

    Perhaps they are in conflict.

    Ok, I'll disable the former PING and enable only pingpong.

    require "/home/husky/bin/pingpong.pm";
    }

    You have to do it differently ...

    [fido@host-187 perl]$ perldoc ./pingpong.pm

    Put pingpong.pm somewhere in the @INC path. It's strongly
    recommended for
    Windows users to put it in the same directory with filter.pl.

    place to filter.pl something like this:

    use pingpong;

    Ok, but how I can rewrite the filer.pl to run also the other modules?

    Actually I have three other modules that run on my filter.pl:

    8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--

    #!/usr/bin/perl
    #
    use warnings;
    #
    BEGIN { require "/home/husky/bin/pong.pl";
    require "/home/husky/bin/netcheck.pl";
    require "/home/husky/bin/netpoint.pl";
    # require "/home/husky/bin/echocleaner.pl";
    require "/home/husky/bin/pingpong.pm";
    }
    sub filter{
    # w_log( "CheckPoint 1" );
    # w_log( "$config{name}" );
    # w_log( "CheckPoint 2" );
    # w_log( "$config{sysop}" );
    # w_log( "CheckPoint 3" );
    # w_log( "$config{origin}" );
    # w_log( "CheckPoint 4" );
    # w_log( "$hpt_version" );
    # w_log( "CheckPoint 5" );
    # w_log( "$links{'2:221/6'}{'name'}" );
    # w_log( "CheckPoint 6" );
    # w_log( "$links{'2:221/6'}{'password'}" );
    # w_log( "CheckPoint 7" );
    if ( !defined( $area ) ) {
    ping_pong( $fromname, $fromaddr, $toname, $toaddr, $subject, $text, $PVT+$K_S, 100 );
    }
    sub route{
    return route_to();
    }
    &pong;
    &netcheck;
    &netpoint;
    # &echocleaner;
    }
    #

    8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--

    Please Stas, can you suggest me how to rewrite it? :)

    May thanks!

    Ciao!
    Fabio
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: ]\/[imac Rebirth Boss Point (2:335/364.1)
  • From Michael Dukelsky@2:5020/1042 to Fabio Bizzi on Sun Apr 25 22:07:32 2021
    Hello Fabio,

    Sunday April 25 2021, Fabio Bizzi wrote to Brother Rabbit:

    I cloned the hpt tree from GIY HUB, and tryied to build it against the 20210213

    How did you manage this? You cloned hpt from GitHub and obtained the two-month-old version? The latest hpt version is 20210418.

    [...skipped...]
    Did I have to build all the environment from GIT?

    Yes, you have to update everything using `git pull` and then build and install everything:

    $ cat build_all
    #!/bin/sh

    build()
    {
    git pull
    make
    sudo make install
    make distclean
    }

    for subproject in huskylib smapi fidoconf areafix hpt
    do
    pushd $subproject
    build
    popd
    done

    Michael

    ... node (at) f1042 (dot) ru
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Moscow, Russia (2:5020/1042)
  • From Brother Rabbit@2:460/58.10 to Fabio Bizzi on Mon Apr 26 03:51:50 2021
    Hi, Fabio!

    25 21 17:54, Fabio Bizzi -> Brother Rabbit:

    Ok, but how I can rewrite the filer.pl to run also the other modules?

    Actually I have three other modules that run on my filter.pl:

    8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8< --

    #!/usr/bin/perl
    #
    use warnings;
    #

    use pingpong.pm;
    require "/home/husky/bin/netcheck.pl";
    require "/home/husky/bin/netpoint.pl";

    sub filter{

    if ( !defined( $area ) ) {
    ping_pong( $fromname, $fromaddr, $toname, $toaddr, $subject,
    $text, $PVT+$K_S, 100 );
    }

    &netcheck;
    &netpoint;
    }

    #

    sub route{
    return route_to();
    }

    8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8< --

    Please Stas, can you suggest me how to rewrite it? :)

    I think so.

    Have nice nights.
    Brother Rabbit.
    --- 뢠 쪨. 㦭 , ⮦ ࠢ
    * Origin: Lame Users Breeding. Simferopol, Crimea. (2:460/58.10)
  • From Fabio Bizzi@2:335/364.1 to Michael Dukelsky on Mon Apr 26 07:11:20 2021
    Hello Michael!

    25 Apr 21 22:07, you wrote to me:

    I cloned the hpt tree from GIY HUB, and tryied to build it
    against the 20210213

    How did you manage this? You cloned hpt from GitHub and obtained the two-month-old version? The latest hpt version is 20210418.

    I cloned the hpt tree in the 20210213 directory (unzipped form the husky source website) and I tried to build it up.

    [...skipped...]
    Did I have to build all the environment from GIT?

    Yes, you have to update everything using `git pull` and then build and install everything:

    $ cat build_all
    #!/bin/sh

    build()
    {
    git pull
    make
    sudo make install
    make distclean
    }

    for subproject in huskylib smapi fidoconf areafix hpt
    do
    pushd $subproject
    build
    popd
    done

    Thank you Michael, I'll try it as soon as I can. :)

    Ciao!
    Fabio
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: ]\/[imac Rebirth Boss Point (2:335/364.1)
  • From Fabio Bizzi@2:335/364.1 to Brother Rabbit on Mon Apr 26 07:13:22 2021
    Hello Brother!

    26 Apr 21 03:51, you wrote to me:

    #!/usr/bin/perl
    [...]
    I think so.

    Thank you Stas, I'll try it as soon an I can! :)

    Ciao!
    Fabio
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: ]\/[imac Rebirth Boss Point (2:335/364.1)