🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.lang.perl
2 messages
2 total messages Started by antyspamerWYTNIJTO Mon, 15 Jun 2009 09:15
postgrey - postgrey client dump - dziwny komunikat
#51440
Author: antyspamerWYTNIJTO
Date: Mon, 15 Jun 2009 09:15
14 lines
1365 bytes
jest sobie skrypt
http://www.lipek.pl/postgrey_clients_dump
jednak po odpaleniu pojawia sie komunikat:
Use of uninitialized value in gethostbyaddr at /bin/postgrey_clients_dump line 21

w tejze 21 lini skryptu, jest:
return gethostbyaddr($iaddr, AF_INET) || $host;

Brakuje mi jakiegoś modułu perla czy co ?



-- 
Wysłano z serwisu OnetNiusy: http://niusy.onet.pl
Re: postgrey - postgrey client dump - dziwny komunikat
#51443
Author: Szymon Sokół
Date: Mon, 15 Jun 2009 14:15
30 lines
2516 bytes
On Mon, 15 Jun 2009 11:15:34 +0200, antyspamerWYTNIJTO@poczta.onet.pl wrote:

> jest sobie skrypt
> http://www.lipek.pl/postgrey_clients_dump
> jednak po odpaleniu pojawia sie komunikat:
> Use of uninitialized value in gethostbyaddr at /bin/postgrey_clients_dump line 21
> 
> w tejze 21 lini skryptu, jest:
> return gethostbyaddr($iaddr, AF_INET) || $host;
> 
> Brakuje mi jakiegoś modułu perla czy co ?

Raczej nie; obstawiam, że po prostu wartość przekazana do funkcji resolv() 
(i następnie do inet_aton()) nie może zostać rozwinięta na adres IP -
zgodnie z perldoc Socket:

inet_aton HOSTNAME
Takes a string giving the name of a host, and translates that to an opaque
string (if programming in C, struct in_addr). Takes arguments of both the
’rtfm.mit.edu’ type and ’18.181.0.24’. If the host name cannot be resolved,
returns undef.  For multi-homed hosts (hosts with more than one address),
the first address found is returned.

Więc w $iaddr dostajesz undef, i ten undef trafia do gethostbyaddr, co daje
komunikat jak zacytowałeś. 
-- 
Szymon Sokół (SS316-RIPE) -- Network Manager                                 B
Computer Center, AGH - University of Science and Technology, Cracow, Poland  O
http://home.agh.edu.pl/szymon/ PGP key id: RSA: 0x2ABE016B, DSS: 0xF9289982  F
Free speech includes the right not to listen, if not interested -- Heinlein  H
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads