- turn off interactivity for pipe-oriented mode (colondump)

- convert ASN table from static to alloc()ed to reduce memory
  footprint
- bump PORTREVISION

PR:		ports/67117
Submitted by:	maintainer
This commit is contained in:
Kirill Ponomarev 2004-05-24 09:06:37 +00:00
parent 242b54da9f
commit 2bcc01a77c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=109843
3 changed files with 44 additions and 7 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= ehnt
PORTVERSION= 0.3
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= net-mgmt
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

View file

@ -1,8 +1,25 @@
--- ehnt_lookup.c.orig Wed Jul 18 00:47:37 2001
+++ ehnt_lookup.c Fri Aug 3 19:54:34 2001
@@ -36,7 +36,7 @@
memset(ASNs,0,sizeof(ASNs));
$FreeBSD$
--- ehnt_lookup.c.orig Thu Oct 4 22:18:29 2001
+++ ehnt_lookup.c Mon May 24 12:01:50 2004
@@ -25,7 +25,7 @@
#define ASNCOUNT 65536
-char * ASNs[ASNCOUNT];
+char ** ASNs;
int Init_ASN_Lookups(void) {
@@ -34,9 +34,11 @@
int asn;
char line[100],asnname[100];
- memset(ASNs,0,sizeof(ASNs));
+ ASNs = calloc(ASNCOUNT, sizeof(char *));
+ if (ASNs == NULL)
+ perror("out of memory");
- if ( ! (f=fopen ("asnc.txt","r")) ) {
+ if ( ! (f=fopen (ASNCDIR "/asnc.txt","r")) ) {

View file

@ -2,8 +2,28 @@
$FreeBSD$
--- ehnt_client.c.orig Thu Oct 4 22:18:29 2001
+++ ehnt_client.c Thu Nov 14 22:12:07 2002
@@ -89,7 +89,7 @@
+++ ehnt_client.c Mon May 24 11:59:17 2004
@@ -69,7 +69,8 @@
printf("Warning: can't catch interrupt signal\n");
}
fflush(stdout);
- set_term(SET_TERM_RAW);
+ if (e_cfg->mode != EM_COLONDUMP)
+ set_term(SET_TERM_RAW);
setbuf(stdout,NULL);
for ( ; ; ) {
@@ -78,7 +79,8 @@
int maxfd=sockfd;
FD_ZERO(&read_fds);
- FD_SET(STDIN_FILENO,&read_fds);
+ if (e_cfg->mode != EM_COLONDUMP)
+ FD_SET(STDIN_FILENO,&read_fds);
FD_SET(sockfd,&read_fds);
fflush(stdout);
@@ -89,7 +91,7 @@
if (FD_ISSET(sockfd,&read_fds)) {
ehnt_client_processmessage(sockfd,routeraddr,my_ehnt_struct);
}