]> code.citadel.org Git - citadel.git/commitdiff
* Made some changes to the calendar/uuid logic to fix a bug that caused
authorArt Cancro <ajc@citadel.org>
Mon, 6 Jun 2005 23:50:17 +0000 (23:50 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 6 Jun 2005 23:50:17 +0000 (23:50 +0000)
  duplicate entries for an event to appear in some situations

citadel/ChangeLog
citadel/msgbase.c
citadel/serv_calendar.c
citadel/tools.c
webcit/ChangeLog
webcit/calendar.c
webcit/messages.c
webcit/tools.c

index 3c075a6498beaf2fdf2d20d15a0eff90808577d6..7d417c34f093506b65a101b5c1b713e28fb2cd46 100644 (file)
@@ -6764,4 +6764,3 @@ 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 e090cc8f498ea962f43b1a93b316690fc88d66fa..9a58894453e33f3eae874e2ba1e96579ecbf6b0d 100644 (file)
@@ -2078,7 +2078,8 @@ long CtdlSubmitMsg(struct CtdlMessage *msg,       /* message to save */
 
        lprintf(CTDL_DEBUG, "Final selection: %s\n", actual_rm);
        if (strcasecmp(actual_rm, CC->room.QRname)) {
-               getroom(&CC->room, actual_rm);
+               /* getroom(&CC->room, actual_rm); */
+               usergoto(actual_rm, 0, 1, NULL, NULL);
        }
 
        /*
@@ -2242,7 +2243,8 @@ long CtdlSubmitMsg(struct CtdlMessage *msg,       /* message to save */
        /* Go back to the room we started from */
        lprintf(CTDL_DEBUG, "Returning to original room %s\n", hold_rm);
        if (strcasecmp(hold_rm, CC->room.QRname))
-               getroom(&CC->room, hold_rm);
+               /* getroom(&CC->room, hold_rm); */
+               usergoto(hold_rm, 0, 1, NULL, NULL);
 
        /* For internet mail, generate delivery instructions.
         * Yes, this is recursive.  Deal with it.  Infinite recursion does
index aaccccab5a53c16c20f365a3214a0dbbd4287388..26e0b150b1c6725d0effac9f893e9044058f76ea 100644 (file)
@@ -1746,11 +1746,13 @@ int ical_obj_beforesave(struct CtdlMessage *msg)
        /* First determine if this is a calendar or tasks room */
        if ( (CC->curr_view != VIEW_CALENDAR)
           &&(CC->curr_view != VIEW_TASKS) ) {
+               lprintf(CTDL_DEBUG, "*** FIXME FOOFOO NOT SAVING FOOFOO FIXME ***\n");
                return(0);              /* Not a vCalendar-centric room */
        }
 
        /* It must be an RFC822 message! */
        if (msg->cm_format_type != 4) {
+               lprintf(CTDL_DEBUG, "*** FIXME BARBAR NOT SAVING BARBAR FIXME ***\n");
                return 1;       /* You tried to save a non-RFC822 message! */
        }
        
index 4564aa58e454875e509ab0b8d5eb447290e3fb21..8e4b63fe7a956afde163358f3be7478c73872e99 100644 (file)
@@ -630,12 +630,10 @@ char *strcpy(char *dest, const char *src) {
 void generate_uuid(char *buf) {
        static int seq = 0;
 
-       sprintf(buf, "%08x-%04x-%04x-%04x-%012x",
-               (int)time(NULL),
-               (seq++),
+       sprintf(buf, "%lx-%x-%x",
+               time(NULL),
                getpid(),
-               rand(),
-               rand()
+               (seq++)
        );
 }
 
index ea60132d197a3a77df63e57c011f61a4cd2200fa..faab73abfbcb294557ddf1ac0cf5ceaca908af51 100644 (file)
@@ -1,4 +1,8 @@
 $Log$
+Revision 611.4  2005/06/06 23:50:17  ajc
+* Made some changes to the calendar/uuid logic to fix a bug that caused
+  duplicate entries for an event to appear in some situations
+
 Revision 611.3  2005/06/06 16:20:36  ajc
 * GroupDAV URI escape character is now '%' in order to be consistent...
 
@@ -2550,3 +2554,4 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
+
index 13c6869c677b241d4186c2f5b6edb1f79a888357..1be4b6c0fe639e4aab6526c689d20cde31bc7403 100644 (file)
@@ -295,6 +295,7 @@ void cal_process_object(icalcomponent *cal,
                        "<a href=\"/handle_rsvp?msgnum=%ld&cal_partnum=%s&sc=Ignore\">Ignore</a>"
                        "</font>"
                        "</TD></TR>\n",
+                       msgnum, cal_partnum,
                        msgnum, cal_partnum
                );
 
index 75d00be54b89612834c119ed0917238f1bf0f16c..76e16cd2bf9b360d20fc9c2fa5195735102f33de 100644 (file)
@@ -741,7 +741,9 @@ void summarize_message(long msgnum, int is_new) {
                        strcpy(summ.from, &buf[5]);
                }
                if (!strncasecmp(buf, "subj=", 5)) {
-                       strcpy(summ.subj, &buf[5]);
+                       if (strlen(&buf[5]) > 0) {
+                               strcpy(summ.subj, &buf[5]);
+                       }
                }
                /* if (!strncasecmp(buf, "rfca=", 5)) {
                        strcat(summ.from, " <");
index 9b13608c23406cfe68a4ae40f6d38f41df7f7ece..149f48d3fe0c4a123b8f9eb7e26ef6760f7bab56 100644 (file)
@@ -576,18 +576,18 @@ int CtdlDecodeBase64(char *dest, const char *source, size_t length)
 }
 
 
+
 /*
  * Generate a new, globally unique UID parameter for a calendar etc. object
  */
 void generate_uuid(char *buf) {
        static int seq = 0;
 
-       sprintf(buf, "%08x-%04x-%04x-%04x-%012x",
-               (int)time(NULL),
-               (seq++),
+       sprintf(buf, "%s-%lx-%x-%x",
+               serv_info.serv_nodename,
+               time(NULL),
                getpid(),
-               rand(),
-               rand()
+               (seq++)
        );
 }