Merge pull request #951 from tokkee/sh/debian-patches
authorMarc Fournier <marc.fournier@camptocamp.com>
Tue, 3 Mar 2015 23:08:37 +0000 (00:08 +0100)
committerMarc Fournier <marc.fournier@camptocamp.com>
Tue, 3 Mar 2015 23:08:37 +0000 (00:08 +0100)
plugin: Use strcasecmp rather than strncasecmp to find a plugin.

src/powerdns.c

index a140a12..f3d4083 100644 (file)
@@ -259,9 +259,6 @@ static void submit (const char *plugin_instance, /* {{{ */
     if (strcmp (lookup_table[i].name, pdns_type) == 0)
       break;
 
-  if (lookup_table[i].type == NULL)
-    return;
-
   if (i >= lookup_table_length)
   {
     INFO ("powerdns plugin: submit: Not found in lookup table: %s = %s;",
@@ -269,6 +266,9 @@ static void submit (const char *plugin_instance, /* {{{ */
     return;
   }
 
+  if (lookup_table[i].type == NULL)
+    return;
+
   type = lookup_table[i].type;
   type_instance = lookup_table[i].type_instance;