home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.x
- From: subbarao@concorde.fc.hp.com (Kartik Subbarao)
- Subject: v20i025: xroute - Route X-Protocol through Internet gateways, Patch02
- Message-ID: <1993Jun15.134831.16428@sparky.imd.sterling.com>
- X-Md4-Signature: 567cf1210ad21eb2bc472ba834146544
- Sender: chris@sparky.imd.sterling.com (Chris Olson)
- Organization: Sterling Software
- Date: Tue, 15 Jun 1993 13:48:31 GMT
- Approved: chris@sparky.imd.sterling.com
-
- Submitted-by: subbarao@concorde.fc.hp.com (Kartik Subbarao)
- Posting-number: Volume 20, Issue 25
- Archive-name: xroute/patch02
- Environment: X11, net
- Patch-To: xroute: Volume 19, Issue 89
-
- Patch 2, 6/3/93: Thanks to Klamer Schutte <klamer@mi.el.utwente.nl> for
- pointing this out.
- + Moved the writeability checks into a separate select() after the
- readability checks. This is because writeability is almost always a sure
- thing, and the program ends up in a spin loop, burning unnecessary CPU cycles.
-
- This latest version of xroute is also available on
- export.lcs.mit.edu:/contrib/xroute.6.3.93.tar.Z.
-
- -Kartik
-
- #!/bin/sh
- # This is a shell archive (produced by shar 3.49)
- # To extract the files from this archive, save it to a file, remove
- # everything above the "!/bin/sh" line above, and type "sh file_name".
- #
- # made 06/03/1993 20:02 UTC by subbarao@concorde
- # Source directory /nfs/phoenix/users/subbarao/x/xroute
- #
- # existing files will NOT be overwritten unless -c is specified
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 722 -rw------- patch2
- #
- # ============= patch2 ==============
- if test -f 'patch2' -a X"$1" != X"-c"; then
- echo 'x - skipping patch2 (File already exists)'
- else
- echo 'x - extracting patch2 (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'patch2' &&
- *** xroute.5.28.c Thu Jun 3 10:34:30 1993
- --- xroute.c Thu Jun 3 10:43:47 1993
- ***************
- *** 89,95 ****
- X trdset = rdset; twrset = wrset;
- X
- X for (;; rdset = trdset, wrset = twrset) {
- ! if (select(maxfds, &rdset, &wrset, NULL, NULL) == -1) exit(1);
- X
- X if (FD_ISSET(ls, &rdset) && FD_ISSET(rs, &wrset)) {
- X if ((n = read(ls, buf, sizeof buf)) <= 0) exit(n);
- --- 89,96 ----
- X trdset = rdset; twrset = wrset;
- X
- X for (;; rdset = trdset, wrset = twrset) {
- ! if (select(maxfds, &rdset, NULL, NULL, NULL) == -1) exit(1);
- ! if (select(maxfds, NULL, &wrset, NULL, NULL) == -1) exit(1);
- X
- X if (FD_ISSET(ls, &rdset) && FD_ISSET(rs, &wrset)) {
- X if ((n = read(ls, buf, sizeof buf)) <= 0) exit(n);
- SHAR_EOF
- chmod 0600 patch2 ||
- echo 'restore of patch2 failed'
- Wc_c="`wc -c < 'patch2'`"
- test 722 -eq "$Wc_c" ||
- echo 'patch2: original size 722, current size' "$Wc_c"
- fi
- exit 0
-
- exit 0 # Just in case...
- --
- // chris@IMD.Sterling.COM | Send comp.sources.x submissions to:
- \X/ Amiga - The only way to fly! | sources-x@imd.sterling.com
- "It's intuitively obvious to the |
- most casual observer..." | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
-