Somebody broke the build by forgetting to #include "threads.h" in some of
[citadel.git] / citadel / modules / network / serv_network.c
index cf9c9800b2b4a2373619f2654c531441c09cb95c..66bd03692c20f4afc9b03be9233af8aaac42c64a 100644 (file)
@@ -64,6 +64,7 @@
 #include "clientsocket.h"
 #include "file_ops.h"
 #include "citadel_dirs.h"
+#include "threads.h"
 
 #ifndef HAVE_SNPRINTF
 #include "snprintf.h"
@@ -1063,24 +1064,26 @@ int writenfree_spoolcontrol_file(SpoolControl **scc, char *filename)
 int is_recipient(SpoolControl *sc, const char *Name)
 {
        namelist *nptr;
+       size_t len;
 
+       len = strlen(Name);
        nptr = sc->listrecps;
        while (nptr != NULL) {
-               if (strcmp(Name, nptr->name)==0)
+               if (strncmp(Name, nptr->name, len)==0)
                        return 1;
                nptr = nptr->next;
        }
        /* Do the same for digestrecps */
        nptr = sc->digestrecps;
        while (nptr != NULL) {
-               if (strcmp(Name, nptr->name)==0)
+               if (strncmp(Name, nptr->name, len)==0)
                        return 1;
                nptr = nptr->next;
        }
        /* Do the same for participates */
        nptr = sc->participates;
        while (nptr != NULL) {
-               if (strcmp(Name, nptr->name)==0)
+               if (strncmp(Name, nptr->name, len)==0)
                        return 1;
                nptr = nptr->next;
        }