[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]

Re: 8.1.x -b option fails to bind to port with more than 15 ports?

nathan r. hruby nhruby@uga.edu
Tue, 6 Apr 2004 17:28:03 -0700 (PDT)


On Tue, 6 Apr 2004, nathan r. hruby wrote:

> 
> Thanks trying it now :)
> 
> Will report back...
> 

Works awesomely!  Thanks much!  If You're in New Orleans this weekend or
in the Atlanta metro area ever, I owe you dinner!  Thanks so much!

For those building RPM's here's a patch that you can drop in easily:

----BEGIN
--- conserver/group-pre_base_fix.c      2004-04-06 20:00:15.000000000-0400
+++ conserver/group.c   2004-04-06 20:00:34.000000000 -0400
@@ -4509,7 +4509,7 @@
 #if defined(EADDRINUSE)
                                (errno == EADDRINUSE) ||
 #endif
-                               (errno == EACCES)) && portInc++) {
+                               (errno == EACCES)) && ++portInc) {
            lstn_port.sin_port = htons(bindBasePort + portInc);
        } else {
            Error("Spawn(): bind(%hu): %s", ntohs(lstn_port.sin_port),
----END

I also have a few other odd things and some rpm specfile patches to submit
back up, they just need some cleaning.  I'll try to get those posted next
week :)

> -n
> 
> 
> On Tue, 6 Apr 2004, Bryan Stansell wrote:
> 
> > On Tue, Apr 06, 2004 at 05:39:44PM -0400, nathan r. hruby wrote:
> > > So, uhh.. is this a buglet? If so is there a workaround or am I just
> > > doing something dumb?  
> > 
> > thanks for providing all the info, and, yep, you've got yourself a
> > buglet.  congrats!  ;-)
> > 
> > luckily, it's an easy fix.  and sorry it was hangin' around all this
> > time...guess not many folks use -b in the 8.x.x world (with a bunch of
> > consoles).
> > 
> > for conserver-8.1.3 go to line 4512 of conserver/group.c:
> > 
> >   4510                                  (errno == EADDRINUSE) ||
> >   4511  #endif
> >   4512                                  (errno == EACCES)) && portInc++) {
> >   4513              lstn_port.sin_port = htons(bindBasePort + portInc);
> >   4514          } else {
> > 
> > and change that "portInc++" to a "++portInc".  the same can be applied
> > to conserver-8.1.1 on line 4406 (but if you've got 8.1.3 going, i'd
> > certainly stick with it).
> > 
> > hmmm...the 7.2.7 code appears to be the same.  i haven't tried it, but
> > it probably doesn't work either (doesn't look like it should).  anyone
> > out there trying to use that can apply the same fix to line 3316.
> > 
> > > Please help!  I'm *supposed* to be on vacation starting tomorrow
> > > morning and I'd really like to be!
> > 
> > hopefully this makes everything well and you can have a great vacation.
> > 
> > Bryan
> > _______________________________________________
> > users mailing list
> > users@conserver.com
> > https://www.conserver.com/mailman/listinfo/users
> > 
> 
> 

-- 
-------------------------------------------
nathan hruby <nhruby@uga.edu>
uga enterprise information technology services
production systems support
metaphysically wrinkle-free
-------------------------------------------