Rename service_add_metadata to count_metadata
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 3 Feb 2014 13:49:38 +0000 (14:49 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 3 Feb 2014 13:49:38 +0000 (14:49 +0100)
src/pazpar2_config.c

index 902c0e6..1aef7b4 100644 (file)
@@ -513,7 +513,7 @@ static int parse_metadata(struct conf_service *service, xmlNode *n,
 }
 
 
-static void service_add_metadata(xmlNode *n, int *num_metadata, int *num_sortkeys)
+static void count_metadata(xmlNode *n, int *num_metadata, int *num_sortkeys)
 {
     xmlChar *sortkey = xmlGetProp(n, (xmlChar *) "sortkey");
     (*num_metadata)++;
@@ -549,11 +549,11 @@ static struct conf_service *service_create_static(struct conf_server *server,
                 {
                     if (m->type == XML_ELEMENT_NODE &&
                             !strcmp((const char *) m->name, "metadata"))
-                        service_add_metadata(m, &num_metadata, &num_sortkeys);
+                        count_metadata(m, &num_metadata, &num_sortkeys);
                 }
             }
             else // This is a metadata-element proper, count it right away.
-                service_add_metadata(n, &num_metadata, &num_sortkeys);
+                count_metadata(n, &num_metadata, &num_sortkeys);
         }
 
     service = service_init(server, num_metadata, num_sortkeys, service_id);