Ticket #100: museekd-newnet2-configuration.diff

File museekd-newnet2-configuration.diff, 765 bytes (added by SeeSchloss, 3 years ago)

this patch restores museekd's old behaviour

  • museekd/main.cpp

     
    104104  /* Load the configuration from %APPDIR%\Museekd\newnet.xml. */ 
    105105  std::string configPath(getConfigPath("Museekd") + "\\newnet.xml"); 
    106106#endif // WIN32 
     107 
     108  for (int i = 1 ; i < argc ; i++) { 
     109    std::string arg(argv[i]); 
     110    if (arg == "--config" || arg == "-c") { 
     111      if (i + 1 != argc) { 
     112        configPath = argv[i+1]; 
     113      } else { 
     114        NNLOG("museek.warn", "Missing config path, bailing out."); 
     115        return -1; 
     116      } 
     117    } 
     118  } 
     119 
    107120  if(! museekd->config()->load(configPath)) 
    108121  { 
    109122    NNLOG("museek.warn", "Failed to load configuration, bailing out.");