X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fcalendar.c;h=2897ba20188d9a007eeb1623af1fee2709f5e3e7;hb=4b4dc864ede7c5d8d956febe4a0afb422b78e7c4;hp=6861a6a89f3286a5e53632eaca9fcff1c6533ea8;hpb=3599604d6899d781dd2bae07ab50bd254d3d6563;p=citadel.git diff --git a/webcit/calendar.c b/webcit/calendar.c index 6861a6a89..2897ba201 100644 --- a/webcit/calendar.c +++ b/webcit/calendar.c @@ -48,6 +48,7 @@ void cal_process_object(StrBuf *Target, int is_update = 0; char divname[32]; static int divcount = 0; + const char *ch; sprintf(divname, "rsvp%04x", ++divcount); @@ -74,7 +75,7 @@ void cal_process_object(StrBuf *Target, the_method = icalproperty_get_method(method); StrBufAppendPrintf(Target, "
", divname); - StrBufAppendPrintf(Target, ""); + StrBufAppendPrintf(Target, ""); StrBufAppendPrintf(Target, ""); switch(the_method) { case ICAL_METHOD_REQUEST: @@ -182,11 +183,11 @@ void cal_process_object(StrBuf *Target, StrBufAppendPrintf(Target, "
"); StrBufAppendPrintf(Target, _("Attendee:")); StrBufAppendPrintf(Target, "
"); - safestrncpy(buf, icalproperty_get_attendee(p), sizeof buf); - if (!strncasecmp(buf, "MAILTO:", 7)) { + ch = icalproperty_get_attendee(p); + if ((ch != NULL) && !strncasecmp(buf, "MAILTO:", 7)) { /** screen name or email address */ - strcpy(buf, &buf[7]); + safestrncpy(buf, ch + 7, sizeof(buf)); striplt(buf); StrEscAppend(Target, NULL, buf, 0, 0); StrBufAppendPrintf(Target, " "); @@ -328,7 +329,7 @@ void respond_to_request(void) serv_getln(buf, sizeof buf); if (buf[0] == '2') { - wc_printf(""); + wc_printf(""); if (!strcasecmp(bstr("sc"), "accept")) { wc_printf(_("You have accepted this meeting invitation. " "It has been entered into your calendar.") @@ -346,7 +347,7 @@ void respond_to_request(void) wc_printf(_("A reply has been sent to the meeting organizer.")); wc_printf(""); } else { - wc_printf(""); + wc_printf(""); wc_printf("%s\n", &buf[4]); wc_printf(""); } @@ -373,7 +374,7 @@ void handle_rsvp(void) serv_getln(buf, sizeof buf); if (buf[0] == '2') { - wc_printf(""); + wc_printf(""); if (!strcasecmp(bstr("sc"), "update")) { /* Translators: RSVP aka Répondez s'il-vous-plaît Is the term that the recipient of an ical-invitation should please @@ -386,7 +387,7 @@ void handle_rsvp(void) } wc_printf(""); } else { - wc_printf(" %s\n", &buf[4]); + wc_printf(" %s\n", &buf[4]); wc_printf(""); } @@ -672,7 +673,6 @@ void load_ical_object(long msgnum, int unread, char mime_filename[256]; char mime_content_type[256]; char mime_disposition[256]; - int mime_length; char relevant_partnum[256]; char *relevant_source = NULL; int phase = 0; /* 0 = citadel headers, 1 = mime headers, 2 = body */ @@ -702,7 +702,7 @@ void load_ical_object(long msgnum, int unread, extract_token(mime_partnum, &bptr[5], 2, '|', sizeof mime_partnum); extract_token(mime_disposition, &bptr[5], 3, '|', sizeof mime_disposition); extract_token(mime_content_type, &bptr[5], 4, '|', sizeof mime_content_type); - mime_length = extract_int(&bptr[5], 5); + /* do we care? mime_length = */extract_int(&bptr[5], 5); if ( (!strcasecmp(mime_content_type, "text/calendar")) || (!strcasecmp(mime_content_type, "application/ics")) @@ -915,6 +915,7 @@ InitModule_CALENDAR calendar_GetParamsGetServerCall, NULL, NULL, + NULL, calendar_LoadMsgFromServer, calendar_RenderView_or_Tail, calendar_Cleanup); @@ -924,6 +925,7 @@ InitModule_CALENDAR calendar_GetParamsGetServerCall, NULL, NULL, + NULL, calendar_LoadMsgFromServer, calendar_RenderView_or_Tail, calendar_Cleanup);