Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] IO::Socket::IMET does not honour default port value #1812

Closed
p5pRT opened this issue Apr 10, 2000 · 1 comment
Closed

[PATCH] IO::Socket::IMET does not honour default port value #1812

p5pRT opened this issue Apr 10, 2000 · 1 comment

Comments

@p5pRT
Copy link

p5pRT commented Apr 10, 2000

Migrated from rt.perl.org#3074 (status was 'resolved')

Searchable as RT3074$

@p5pRT
Copy link
Author

p5pRT commented Apr 10, 2000

From @gbarr

Created by gbarr@chipper.localdomain

IO​::Socket​::INET will return with an error if passed a service name
that is not known. Even if a default port number is given. THis
patch stops it returning an error if a default port is given.

Inline Patch
--- lib/IO/Socket/INET.pm.orig	Mon Apr 10 17:18:55 2000
+++ lib/IO/Socket/INET.pm	Mon Apr 10 17:19:20 2000
@@ -61,8 +61,10 @@
 
     if ($port =~ m,\D,) {
       unless (@serv = getservbyname($port, $proto[0] || "")) {
-	$@ = "Bad service '$port'";
-	return;
+	unless ($defport) {
+	  $@ = "Bad service '$port'";
+	  return;
+	}
       }
     }
 
Perl Info

Flags:
    category=core
    severity=medium

Site configuration information for perl v5.6.0:

Configured by gbarr at Wed Mar 29 16:49:13 BST 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.2.13, archname=i686-linux
    uname='linux chipper 2.2.13 #1 mon nov 8 15:37:25 cet 1999 i686 unknown '
    config_args='-des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.6.0:
    /home/value/perl
    /usr/local/lib/perl5/5.6.0/i686-linux
    /usr/local/lib/perl5/5.6.0
    /usr/local/lib/perl5/site_perl/5.6.0/i686-linux
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl
    .


Environment for perl v5.6.0:
    HOME=/home/gbarr
    LANG=POSIX
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/gbarr/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games/bin:/usr/games:/opt/gnome/bin:/opt/kde/bin:.
    PERL5LIB=/home/value/perl
    PERL_BADLANG (unset)
    SHELL=/usr/bin/zsh


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant