Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added a "socket options" option to rsyncd.conf. This option will
[rsync/rsync.git]
/
clientserver.c
diff --git
a/clientserver.c
b/clientserver.c
index
9cac2ef
..
3647718
100644
(file)
--- a/
clientserver.c
+++ b/
clientserver.c
@@
-266,11
+266,13
@@
static int start_daemon(int fd)
extern char *config_file;
extern int remote_version;
extern char *config_file;
extern int remote_version;
- if (!lp_load(config_file)) {
+ if (!lp_load(config_file
, 0
)) {
exit_cleanup(1);
}
set_socket_options(fd,"SO_KEEPALIVE");
exit_cleanup(1);
}
set_socket_options(fd,"SO_KEEPALIVE");
+ set_socket_options(fd,lp_socket_options());
+
io_printf(fd,"@RSYNCD: %d\n", PROTOCOL_VERSION);
io_printf(fd,"@RSYNCD: %d\n", PROTOCOL_VERSION);
@@
-327,7
+329,7
@@
static int start_daemon(int fd)
int daemon_main(void)
{
int daemon_main(void)
{
-
log_open()
;
+
extern char *config_file
;
if (is_a_socket(STDIN_FILENO)) {
/* we are running via inetd */
if (is_a_socket(STDIN_FILENO)) {
/* we are running via inetd */
@@
-336,6
+338,13
@@
int daemon_main(void)
become_daemon();
become_daemon();
+ if (!lp_load(config_file, 1)) {
+ fprintf(stderr,"failed to load config file %s\n", config_file);
+ exit_cleanup(1);
+ }
+
+ log_open();
+
rprintf(FINFO,"rsyncd version %s starting\n",VERSION);
start_accept_loop(rsync_port, start_daemon);
rprintf(FINFO,"rsyncd version %s starting\n",VERSION);
start_accept_loop(rsync_port, start_daemon);