This is a discussion on Re: [Code study]should we remove if (motd && *motd) section? within the Rsync forums, part of the Networking and Network Related category; On Mon, Apr 27, 2009 at 07:27:38PM +0800, Daniel.Li wrote: > On Mon, 2009-04-27 at ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Mon, Apr 27, 2009 at 07:27:38PM +0800, Daniel.Li wrote:
> On Mon, 2009-04-27 at 19:21 +0800, Daniel.Li wrote: > > On Mon, 2009-04-27 at 12:41 +0200, Paul Slootman wrote: > > > On Mon 27 Apr 2009, Daniel.Li wrote: > > > > > > > > I'm confused when we will run into "if (motd && *motd)"? > > > > > > > > As I have found that Globals is set 0 during initialization, and I > > > > didn't find anywhere else assign the value. > > > > > > > clientserver.c #line 147~160 > > > > > if (!am_client) { > > > > > motd = lp_motd_file(); > > > ^^^^^^^^^^^^^^^^^^^^^^ > > > > > if (motd && *motd) { > > > > > > It's being assigned the line above the (motd && *motd) part! > > > > Sorry, I forgot to paste below macros. Yes, it's assigned, but this > > function just returns default("") or global values. But it seems never > > assigned. > > What I mean is "Globals.motd_file is NEVER assigned". When we use > default "". Then we still will NOT go into "if (motd && *motd)", as > *motd == 0. I'd guess it is assigned in the code that parses configuration file (rsyncd.conf). What if you set 'motd file = /etc/rsync.motd' in /etc/rsyncd.conf? -- Best regards / s pozdravem Petr Uzel, Packages maintainer --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: puzel@suse.cz Lihovarská 1060/12 tel: +420 284 028 964 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html |