On Sat, Jun 17, 2006 at 11:46:04AM +0200, Robert Millan wrote: > Package: dhttpd > Version: 1.02a-15 > Severity: wishlist > Tags: patch > > This patch adds -b option for binding to an alternate address.
> --- dhttpd-1.02a.old/src/config.hh 2006-06-17 11:21:50.000000000 +0200 > +++ dhttpd-1.02a/src/config.hh 2006-06-17 11:35:45.791883896 +0200 > @@ -11,6 +11,9 @@ > * root, you must use a value >= 1024, such as 8080. */ > #define DEFAULTPORT 80 > > +/* Set default address to listen to. (0.0.0.0 for any) */ > +#define DEFAULTBINDADDR "0.0.0.0" > + > /* This is the directory where the web pages are located. */ > /* Note: buffer overflow problems may exist if WEBDIRPREFIX is * > * longer than 150 characters or so. */ > diff -ur dhttpd-1.02a.old/src/main.cc dhttpd-1.02a/src/main.cc > --- dhttpd-1.02a.old/src/main.cc 2006-06-17 11:21:50.000000000 +0200 > +++ dhttpd-1.02a/src/main.cc 2006-06-17 11:41:51.657263904 +0200 > @@ -99,11 +99,12 @@ [...] > + printf( " -b Bind to this address > instead of ", DEFAULTBINDADDR, "\n" ); This line is wrong, should be printf( " -b Bind to this address instead of %s\n", DEFAULTBINDADDR ); (I haven't tested rest of the patch, but it looks OK) -- Linux jest darmowy, jeśli twój czas nie przedstawia żadnej wartości. Jeśli jest coś warty(czas), Linux jest po prostu tańszy od innych. Jarek Kamiński gg# 453620
pgpeQ55q7KdqC.pgp
Description: PGP signature