two changes:

- fix a hairy bug in BirdWhoisClient::getResponse (how did that ever work?)
- make stripRipeComments more lenient against an APNIC comment style problem
This commit is contained in:
spz 2006-02-15 20:07:40 +00:00
parent b7ba80cac2
commit 4511381241
3 changed files with 32 additions and 3 deletions

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.4 2005/08/26 08:41:46 spz Exp $
# $NetBSD: Makefile,v 1.5 2006/02/15 20:07:40 spz Exp $
#
DISTNAME= IRRToolSet-4.8.2
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= net
MASTER_SITES= ftp://ftp.isc.org/isc/IRRToolSet/IRRToolSet-4.8.2/

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.6 2005/08/26 08:41:46 spz Exp $
$NetBSD: distinfo,v 1.7 2006/02/15 20:07:40 spz Exp $
SHA1 (IRRToolSet-4.8.2.tar.gz) = f60a03cb6585503f1ef0b8b7c0a2ce7c39ce999c
RMD160 (IRRToolSet-4.8.2.tar.gz) = 00332f7fe1144b56c93dc327126ec51aa094b6ab
@ -64,3 +64,4 @@ SHA1 (patch-cg) = 0df548f8a560044b5eaeaaac1b25beadd4850ff0
SHA1 (patch-ch) = 40ee868bdb7ecb73cb279e5e9f1ff546ab4a4ffe
SHA1 (patch-ci) = 2e0104e01b7c8beb9d9feab837520014ad6b63e4
SHA1 (patch-cj) = 86950483f15144510fab6f46cfd36a1759eb3bb4
SHA1 (patch-ck) = 175f93a15bdb000070b80688ab594a38af26e6f0

View file

@ -0,0 +1,28 @@
$NetBSD: patch-ck,v 1.1 2006/02/15 20:07:40 spz Exp $
--- src/irr/birdwhoisc.cc.orig 2004-07-30 12:58:11.000000000 +0200
+++ src/irr/birdwhoisc.cc
@@ -112,10 +112,13 @@ static void stripRipeComments(Buffer &bu
if (eol == NULL)
// no EOL, no comment to strip (yet)
goto out;
- assert(*(eol+1) == '\n' || *(eol+1) == '%');
size -= (eol-cont)+1;
cont = eol + 1;
removedLines = true;
+ if (*(cont) != '\n' && *(cont) != '%')
+ // next line starts not with a comment, so assume comments have
+ // ended the APNIC way
+ goto out;
}
if (*cont == '\n') {
size--;
@@ -197,6 +200,8 @@ bool BirdWhoisClient::getResponse(char *
<< "]"
<< endl;
+ text = result->contents;
+ len = result->size;
return true;
}