session is in progress.
* tools.c: removed collapsed_strcmp() as it is no longer used anywhere
$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.
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
*
*/
-/*
- * 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.
#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
* 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;
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);
-/*
- * 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
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);