Merge branch 'collectd-4.2' into collectd-4.3
[collectd.git] / src / perl.c
index 6d3326f..96e8562 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * collectd - src/perl.c
- * Copyright (C) 2007  Sebastian Harl
+ * Copyright (C) 2007, 2008  Sebastian Harl
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -1478,6 +1478,11 @@ static int perl_config_enabledebugger (pTHX_ oconfig_item_t *ci)
                return 1;
        }
 
+       if (NULL != perl_threads) {
+               log_warn ("EnableDebugger has no effects if used after LoadPlugin.");
+               return 1;
+       }
+
        value = ci->values[0].value.string;
 
        perl_argv = (char **)realloc (perl_argv,
@@ -1514,11 +1519,6 @@ static int perl_config_includedir (pTHX_ oconfig_item_t *ci)
                return 1;
        }
 
-       if (NULL == aTHX) {
-               log_warn ("EnableDebugger has no effects if used after LoadPlugin.");
-               return 1;
-       }
-
        value = ci->values[0].value.string;
 
        if (NULL == aTHX) {