Removed race condition from CheckIfAlreadySeen()
[citadel.git] / citadel / modules / network / serv_netspool.c
index ab0aa9f9963dd6032d632c6261607f89d953b343..0cb7c902a428f6f22c19a61932bda59f83f7cffb 100644 (file)
@@ -2,7 +2,7 @@
  * This module handles shared rooms, inter-Citadel mail, and outbound
  * mailing list processing.
  *
- * Copyright (c) 2000-2016 by the citadel.org team
+ * Copyright (c) 2000-2017 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License, version 3.
@@ -498,8 +498,6 @@ void network_spoolout_room(SpoolControl *sc)
 int network_usetable(struct CtdlMessage *msg)
 {
        StrBuf *msgid;
-       struct CitContext *CCC = CC;
-       time_t now;
 
        /* Bail out if we can't generate a message ID */
        if ((msg == NULL) || CM_IsEmpty(msg, emessageId))
@@ -519,13 +517,7 @@ int network_usetable(struct CtdlMessage *msg)
                        return(0);
                }
        }
-       now = time(NULL);
-       if (CheckIfAlreadySeen("Networker Import",
-                              msgid,
-                              now, 0,
-                              eUpdate,
-                              CCC->cs_pid, 0) != 0)
-       {
+       if (CheckIfAlreadySeen(msgid)) {
                FreeStrBuf(&msgid);
                return(1);
        }