From 4f4c667d6ea96134d9216fcec11ca940e4693abb Mon Sep 17 00:00:00 2001 From: Axel Kittenberger Date: Thu, 20 May 2010 12:42:58 +0000 Subject: [PATCH] commited wrong file :-/ --- lsyncd.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/lsyncd.c b/lsyncd.c index 434bf92..69350e4 100644 --- a/lsyncd.c +++ b/lsyncd.c @@ -730,16 +730,13 @@ bool action(struct dir_conf * dir_conf, argv[argc++] = parse_option_text(optp->text, recursive); continue; case CO_EXCLUDE : - printf("!!!!\n"); // --exclude-from and the exclude file // insert only when the exclude file is present otherwise skip it. - if (dir_conf->exclude_file == NULL && default_exclude_file == NULL) { //AXK - printf("??\n"); + if (dir_conf->exclude_file == NULL && default_exclude_file == NULL) { continue; } - printf("?!!\n"); argv[argc++] = s_strdup("--exclude-from"); - argv[argc++] = s_strdup(dir_conf->exclude_file ? dir_conf->exclude_file : default_exclude_file); //AXK + argv[argc++] = s_strdup(dir_conf->exclude_file ? dir_conf->exclude_file : default_exclude_file); continue; case CO_SOURCE : argv[argc++] = s_strdup(src); @@ -760,9 +757,9 @@ bool action(struct dir_conf * dir_conf, argv[argc++] = NULL; /* debug dump of command-line options */ - for (i=0; i\n"); terminate(LSYNCD_BADCONFIGFILE); } - dc->binary = s_strdup((char *) xc); //AXK + dc->binary = s_strdup((char *) xc); } else if (!xmlStrcmp(dnode->name, BAD_CAST "callopts")) { if (dc->callopts) { printlogf(ERROR, "error in config file: there is more than one in a \n"); @@ -1447,6 +1443,7 @@ bool parse_directory(xmlNodePtr node) { } dc->callopts = parse_callopts(dnode); } else { + // TODO missing sourcespecific exclude files? printlogf(ERROR, "error in config file: unknown node in \"%s\"\n", dnode->name); terminate(LSYNCD_BADCONFIGFILE); } @@ -1764,7 +1761,7 @@ bool parse_exclude_file(char *filename) { terminate(LSYNCD_FILENOTFOUND); } - printf("eread %s\n", line); + sl = strlen(line); if (sl == 0) { @@ -1827,19 +1824,13 @@ void write_pidfile() { int main(int argc, char **argv) { int i; - printf("1\n"); openlog("lsyncd", LOG_CONS | LOG_PID, LOG_DAEMON); - printf("2\n"); parse_options(argc, argv); - printf("3\n"); - if (default_exclude_file) { parse_exclude_file(default_exclude_file); } - printf("4\n"); - inotf = inotify_init(); if (inotf == -1) { @@ -1847,7 +1838,6 @@ int main(int argc, char **argv) errno, strerror(errno)); return LSYNCD_NOINOTIFY; } - printf("4\n"); if (!flag_nodaemon) { // this will make this process child of init