Rebuild HTML docs
[privoxy.git] / client-tags.c
index 165f820..0bcbf35 100644 (file)
@@ -28,6 +28,8 @@
 
 #include "config.h"
 
+#ifdef FEATURE_CLIENT_TAGS
+
 #include <stdio.h>
 #include <sys/types.h>
 #include <stdlib.h>
@@ -363,6 +365,13 @@ static void remove_tag_for_client(const char *client_address, const char *tag)
       clients_with_tags = clients_with_tags->next;
    }
 
+   assert(clients_with_tags != NULL);
+   if (clients_with_tags == NULL)
+   {
+      log_error(LOG_LEVEL_ERROR,
+         "Tried to remove tag %s for tag-less client %s",
+         tag, client_address);
+   }
    enabled_tags = clients_with_tags->tags;
    while (enabled_tags != NULL)
    {
@@ -586,3 +595,6 @@ int client_tag_match(const struct pattern_spec *pattern,
    return 0;
 
 }
+#else
+#error Compiling client-tags.c without FEATURE_CLIENT_TAGS
+#endif /* def FEATURE_CLIENT_TAGS */