head 1.4; access; symbols pkgsrc-2013Q4:1.3.0.12 pkgsrc-2013Q4-base:1.3 pkgsrc-2013Q3:1.3.0.10 pkgsrc-2013Q3-base:1.3 pkgsrc-2013Q2:1.3.0.8 pkgsrc-2013Q2-base:1.3 pkgsrc-2013Q1:1.3.0.6 pkgsrc-2013Q1-base:1.3 pkgsrc-2012Q4:1.3.0.4 pkgsrc-2012Q4-base:1.3 pkgsrc-2012Q3:1.3.0.2 pkgsrc-2012Q3-base:1.3 pkgsrc-2012Q2:1.2.0.8 pkgsrc-2012Q2-base:1.2 pkgsrc-2012Q1:1.2.0.6 pkgsrc-2012Q1-base:1.2 pkgsrc-2011Q4:1.2.0.4 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q3:1.2.0.2 pkgsrc-2011Q3-base:1.2 pkgsrc-2011Q2:1.1.0.60 pkgsrc-2011Q2-base:1.1 pkgsrc-2011Q1:1.1.0.58 pkgsrc-2011Q1-base:1.1 pkgsrc-2010Q4:1.1.0.56 pkgsrc-2010Q4-base:1.1 pkgsrc-2010Q3:1.1.0.54 pkgsrc-2010Q3-base:1.1 pkgsrc-2010Q2:1.1.0.52 pkgsrc-2010Q2-base:1.1 pkgsrc-2010Q1:1.1.0.50 pkgsrc-2010Q1-base:1.1 pkgsrc-2009Q4:1.1.0.48 pkgsrc-2009Q4-base:1.1 pkgsrc-2009Q3:1.1.0.46 pkgsrc-2009Q3-base:1.1 pkgsrc-2009Q2:1.1.0.44 pkgsrc-2009Q2-base:1.1 pkgsrc-2009Q1:1.1.0.42 pkgsrc-2009Q1-base:1.1 pkgsrc-2008Q4:1.1.0.40 pkgsrc-2008Q4-base:1.1 pkgsrc-2008Q3:1.1.0.38 pkgsrc-2008Q3-base:1.1 cube-native-xorg:1.1.0.36 cube-native-xorg-base:1.1 pkgsrc-2008Q2:1.1.0.34 pkgsrc-2008Q2-base:1.1 cwrapper:1.1.0.32 pkgsrc-2008Q1:1.1.0.30 pkgsrc-2008Q1-base:1.1 pkgsrc-2007Q4:1.1.0.28 pkgsrc-2007Q4-base:1.1 pkgsrc-2007Q3:1.1.0.26 pkgsrc-2007Q3-base:1.1 pkgsrc-2007Q2:1.1.0.24 pkgsrc-2007Q2-base:1.1 pkgsrc-2007Q1:1.1.0.22 pkgsrc-2007Q1-base:1.1 pkgsrc-2006Q4:1.1.0.20 pkgsrc-2006Q4-base:1.1 pkgsrc-2006Q3:1.1.0.18 pkgsrc-2006Q3-base:1.1 pkgsrc-2006Q2:1.1.0.16 pkgsrc-2006Q2-base:1.1 pkgsrc-2006Q1:1.1.0.14 pkgsrc-2006Q1-base:1.1 pkgsrc-2005Q4:1.1.0.12 pkgsrc-2005Q4-base:1.1 pkgsrc-2005Q3:1.1.0.10 pkgsrc-2005Q3-base:1.1 pkgsrc-2005Q2:1.1.0.8 pkgsrc-2005Q2-base:1.1 pkgsrc-2005Q1:1.1.0.6 pkgsrc-2005Q1-base:1.1 pkgsrc-2004Q4:1.1.0.4 pkgsrc-2004Q4-base:1.1 pkgsrc-2004Q3:1.1.0.2 pkgsrc-2004Q3-base:1.1; locks; strict; comment @# @; 1.4 date 2014.03.05.13.52.29; author he; state dead; branches; next 1.3; commitid GtpXQGzW7Hj8Xvrx; 1.3 date 2012.08.21.21.54.19; author marino; state Exp; branches; next 1.2; 1.2 date 2011.09.02.08.06.55; author he; state Exp; branches; next 1.1; 1.1 date 2004.07.07.14.39.33; author he; state Exp; branches; next ; desc @@ 1.4 log @Make tcl-scotty build with minimal warnings and install again. This change is the result of a large sweep triggered by the new Tcl which has const'ified many interfaces -- this follows suit with many corresponding changes internally in scotty => lots of new patches. Also, change so as to not access interp->errorLine and interp->result directly, use the accessor functions instead, and turn off the corresponding compatibility defines. The old patch files have been renamed and expanded, the new scheme for naming patch files is used. Only minimal functionality testing is done, but what has been done shows that it basically works again. PKGREVISION bumped. @ text @$NetBSD: patch-ag,v 1.3 2012/08/21 21:54:19 marino Exp $ Provide more robustness for the straps helper program. --- tnm/snmp/straps.c.orig 1999-03-09 17:06:10.000000000 +0000 +++ tnm/snmp/straps.c @@@@ -246,6 +246,17 @@@@ main(argc, argv) #endif /* + * If there is a steady stream of traps bound for this + * host, we need to allow some time for the client (scotty) + * to connect to us. Otherwise, straps will just exit when + * the first trap message arrives. The client does 5 retries + * with 1 second in-between, so sleeping for 3 should be enough + * to let the client connect. There really ought to be a better + * way to do this. + */ + sleep(3); + + /* * Fine everything is ready; lets listen for events: * the for(;;) loop aborts, if the last client went away. */ @@@@ -271,7 +282,25 @@@@ main(argc, argv) perror("straps: select failed"); } - if (FD_ISSET(trap_s, &fds)) { + /* + * Check for new clients before handling any traps. + * If a trap arrived while we were sleeping above, + * we would set go_on to zero before the first client + * had a chance to connect. + */ + if (FD_ISSET(serv_s, &fds)) { + /* accept a new client: */ + memset((char *) &daddr, 0, sizeof(daddr)); + dlen = sizeof(daddr); + + rc = accept(serv_s, (struct sockaddr *) &daddr, &dlen); + if (rc < 0) { + perror("straps: accept failed"); + continue; + } + cl_addr [rc] = 1; + + } else if (FD_ISSET(trap_s, &fds)) { /* read trap message and forward to clients: */ llen = sizeof(laddr); if ((rc = recvfrom(trap_s, buf, sizeof(buf), 0, @@@@ -329,24 +358,6 @@@@ main(argc, argv) go_on += cl_addr [i] > 0; } - } else if (FD_ISSET(serv_s, &fds)) { - memset((char *) &daddr, 0, sizeof(daddr)); - dlen = sizeof(daddr); - - rc = accept(serv_s, (struct sockaddr *) &daddr, &dlen); - if (rc < 0) { - perror("straps: accept failed"); - continue; - } - /* Check for a potential buffer overflow if the accept() - call returns a file descriptor larger than FD_SETSIZE */ - if (rc >= FD_SETSIZE) { - fprintf(stderr, "straps: too many clients\n"); - close(rc); - continue; - } - cl_addr [rc] = 1; - } else { /* fd's connected from clients. (XXX: should check for EOF): */ for (i = 0; i < FD_SETSIZE; i++) { @ 1.3 log @net/tcl-scotty: Insert rpath into libtnm.so This is not a tcl/tk 8.5 fix. The libtnm.so couldn't be found during the build due to an omitted runpath. Two other patches were regenerated because they didn't match the source exactly. @ text @d1 1 a1 1 $NetBSD: patch-ag,v 1.2 2011/09/02 08:06:55 he Exp $ @ 1.2 log @Several changes rolled into one: o Wedge in DESTDIR support. This is a little tricky since the installation procedure wants to run scotty to parse and dump the MIB files, and this needs to be done in DESTDIR. Therefore we use the post-install target, to fix things up before packaging and the real install. o Fix the "dns" functionality not to use _res, since this program is linked with libpthread that won't work on NetBSD (aborts the program). Though the modified version still uses a global static variable. o Add comments to all the patch files. o Eliminate use of ${WRKSRC}/.., since pkglint objects to it. Instead use BUILD_DIRS and CONFIGURE_DIRS. o Add a LICENSE setting, 2-clause-bsd appears most similar. o Bump PKGREVISION for the above changes. @ text @d1 1 a1 1 $NetBSD: patch-ag,v 1.1 2004/07/07 14:39:33 he Exp $ d5 1 a5 1 --- tnm/snmp/straps.c.orig Tue Mar 9 18:06:10 1999 d52 1 a52 2 @@@@ -328,24 +357,6 @@@@ main(argc, argv) for (go_on = 0, i = 0; i < FD_SETSIZE; i++) { d55 1 a55 1 - d73 1 a73 1 d76 1 @ 1.1 log @Add a patch to fix a race condition in the straps program. If traps arrive in a steady stream, straps will exit before the client (scotty) manages to connect, because traps are handled before new client connections in straps. Adds a sleep(3) first, and rearranges the order of handling of these events, so that scotty can get around to connecting as a client before the first trap is handled by straps. Bump pkgrevision to 3. @ text @d1 1 a1 1 $NetBSD$ d3 4 a6 2 --- ../tnm/snmp/straps.c.orig Tue Mar 9 18:06:10 1999 +++ ../tnm/snmp/straps.c @