Dear List,

Currently, I read this in clientserver.c, line 148.

motd = lp_motd_file();

I have googled, but didn't the definition of char *lp_motd_file(void).
Can anyone help to explain the following code segment. Many thanks.

#line 147 ~ 160, in clientserver.c, version 3.0.5

> if (!am_client) {
> motd = lp_motd_file();
> if (motd && *motd) {
> FILE *f = fopen(motd,"r");
> while (f && !feof(f)) {
> int len = fread(buf, 1, bufsiz - 1, f);
> if (len > 0)
> write_buf(f_out, buf, len);
> }
> if (f)
> fclose(f);
> write_sbuf(f_out, "\n");
> }
> }

$ grep "lp_motd_file" . -R
./proto.h:char *lp_motd_file(void);
./loadparm.c:FN_GLOBAL_STRING(lp_motd_file, &Globals.motd_file)
./clientserver.c:               motd = lp_motd_file();


-- 
Daniel

-- 
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

Reply via email to