X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=0003-Allow-having-both-options-and-config-file-on-command.patch;h=25273de608126dc5daced1fe19fa534ae5a1600d;hb=refs%2Fheads%2Fmaster;hp=7eb99b22ee84dcc29b666667ec21c8b132457cb2;hpb=f543dc078806a31fdaf4879693dc575c91f0eb6d;p=packages%2Fpure-ftpd.git diff --git a/0003-Allow-having-both-options-and-config-file-on-command.patch b/0003-Allow-having-both-options-and-config-file-on-command.patch index 7eb99b2..25273de 100644 --- a/0003-Allow-having-both-options-and-config-file-on-command.patch +++ b/0003-Allow-having-both-options-and-config-file-on-command.patch @@ -12,15 +12,15 @@ diff --git a/src/ftpd.c b/src/ftpd.c index c5edac5..b13afc0 100644 --- a/src/ftpd.c +++ b/src/ftpd.c -@@ -5589,7 +5589,7 @@ int pureftpd_start(int argc, char *argv[], const char *home_directory_) - #endif +@@ -5528,7 +5528,7 @@ int pureftpd_start(int argc, char *argv[ + { + static SimpleConfConfig config = { NULL, sc_special_handler }; - #ifndef MINIMAL -- if (argc == 2 && *argv[1] != '-' && -+ if (argc >= 2 && *argv[1] != '-' && - sc_build_command_line_from_file(argv[1], NULL, simpleconf_options, - (sizeof simpleconf_options) / - (sizeof simpleconf_options[0]), +- if (argc == 2 && *argv[1] != '-' && ++ if (argc >= 2 && *argv[1] != '-' && + sc_build_command_line_from_file(argv[1], &config, + simpleconf_options, + (sizeof simpleconf_options) / diff --git a/src/simpleconf.c b/src/simpleconf.c index f296f54..505aee1 100644 --- a/src/simpleconf.c