From 1996305eb1a813db6d8cccfe12caaec5c185ebe1 Mon Sep 17 00:00:00 2001 From: "roberto@debian32" Date: Sun, 28 Aug 2011 07:55:54 +0200 Subject: [PATCH] allows multiple --ini options --- plugins/python/python_plugin.c | 8 +-- uwsgi.c | 108 ++++++++++++++++++--------------- uwsgi.h | 2 +- 3 files changed, 65 insertions(+), 53 deletions(-) diff --git a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c index 3b95bcc2..e2059ec4 100644 --- a/plugins/python/python_plugin.c +++ b/plugins/python/python_plugin.c @@ -793,12 +793,12 @@ int uwsgi_python_manage_options(int i, char *optarg) { #ifdef UWSGI_INI case LONG_ARGS_INI_PASTE: - uwsgi.ini = optarg; - if (uwsgi.ini[0] != '/') { - up.paste = uwsgi_concat4("config:", uwsgi.cwd, "/", uwsgi.ini); + uwsgi_string_new_list(&uwsgi.ini,optarg); + if (optarg[0] != '/') { + up.paste = uwsgi_concat4("config:", uwsgi.cwd, "/", optarg); } else { - up.paste = uwsgi_concat2("config:", uwsgi.ini); + up.paste = uwsgi_concat2("config:", optarg); } return 1; #endif diff --git a/uwsgi.c b/uwsgi.c index 964ca131..05e1118d 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -1002,72 +1002,80 @@ int main(int argc, char *argv[], char *envp[]) { uwsgi.option_index = -1; } +#ifdef UWSGI_DEBUG + uwsgi_log("optind:%d argc:%d\n", optind,argc); +#endif + if (optind < argc) { - char *lazy = argv[optind]; - if (lazy[0] != '[') { - if (0) { - } + for(i=optind;i