]> code.citadel.org Git - citadel.git/commitdiff
* Do not allow incoming network polls while an outbound network processing
authorArt Cancro <ajc@citadel.org>
Tue, 15 Apr 2003 02:44:03 +0000 (02:44 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 15 Apr 2003 02:44:03 +0000 (02:44 +0000)
  session is in progress.
* tools.c: removed collapsed_strcmp() as it is no longer used anywhere

citadel/ChangeLog
citadel/serv_network.c
citadel/tools.c
citadel/tools.h

index f17e54c9b6eb6ad197a6db259f61750b03b6ca1a..be13967da08180222ca46e11dd57dbdf3f9c6315 100644 (file)
@@ -1,4 +1,9 @@
  $Log$
+ Revision 605.35  2003/04/15 02:44:02  ajc
+ * Do not allow incoming network polls while an outbound network processing
+   session is in progress.
+ * tools.c: removed collapsed_strcmp() as it is no longer used anywhere
+
  Revision 605.34  2003/04/08 04:03:37  ajc
  * Implemented the ".SILENT" protocol option in IMAP STORE.  Certain apps seem
    to want to use it.
@@ -4628,3 +4633,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
+
index c286ecae9a6786f0313ba90e510c39d0b2e07344..f4ea9df3d33bfa8db6be6d7a355befb0129d951d 100644 (file)
  *
  */
 
-/*
- * FIXME
- * Don't allow polls during network processing
- */
-
 /*
  * Duration of time (in seconds) after which pending list subscribe/unsubscribe
  * requests that have not been confirmed will be deleted.
@@ -74,6 +69,8 @@
 #include "snprintf.h"
 #endif
 
+/* Nonzero while we are doing outbound network processing */
+static int doing_queue = 0;
 
 /*
  * When we do network processing, it's accomplished in two passes; one to
@@ -1471,7 +1468,6 @@ void network_poll_other_citadel_nodes(void) {
  * Run through the rooms doing various types of network stuff.
  */
 void network_do_queue(void) {
-       static int doing_queue = 0;
        static time_t last_run = 0L;
        struct RoomProcList *ptr;
 
@@ -1542,6 +1538,11 @@ void cmd_netp(char *cmdbuf)
        char secret[SIZ];
        char nexthop[SIZ];
 
+       if (doing_queue) {
+               cprintf("%d spooling - try again in a few minutes\n", ERROR);
+               return;
+       }
+
        extract(node, cmdbuf, 0);
        extract(pass, cmdbuf, 1);
 
index a241d2907da771f0a2cd455dd57c4390385838b0..7e4228e8b66acbdc215bea9255f24acf153749ce 100644 (file)
@@ -355,41 +355,6 @@ int haschar(const char *st, int ch)
 
 
 
-/*
- * Compare two strings, insensitive to case, punctuation, and non-alnum chars
- */
-int collapsed_strcmp(char *s1, char *s2) {
-       char *c1, *c2;
-       int i, ret, pos;
-
-       c1 = malloc(strlen(s1)+1);
-       c2 = malloc(strlen(s2)+1);
-       c1[0] = 0;
-       c2[0] = 0;
-
-       pos = 0;
-       for (i=0; i<strlen(s1); ++i) {
-               if (isalnum(s1[i])) {
-                       c1[pos] = tolower(s1[i]);
-                       c1[++pos] = 0;
-               }
-       }
-
-       pos = 0;
-       for (i=0; i<strlen(s2); ++i) {
-               if (isalnum(s2[i])) {
-                       c2[pos] = tolower(s2[i]);
-                       c2[++pos] = 0;
-               }
-       }
-
-       ret = strcmp(c1, c2);
-       free(c1);
-       free(c2);
-       return(ret);
-}
-
-
 
 /*
  * Format a date/time stamp for output 
index 1c6320a73e679db3aa61632c82f433ae4d98d87c..3d9390258f6658abf4196905228cf3b2e388bd0a 100644 (file)
@@ -9,7 +9,6 @@ void CtdlEncodeBase64(char *dest, const char *source, size_t sourcelen);
 int CtdlDecodeBase64(char *dest, const char *source, size_t length);
 void striplt(char *);
 int haschar(const char *st, int ch);
-int collapsed_strcmp(char *s1, char *s2);
 void remove_token(char *source, unsigned long parmnum, char separator);
 void fmt_date(char *buf, size_t n, time_t thetime, int seconds);
 int is_msg_in_mset(char *mset, long msgnum);