Diffstat (limited to 'libical/src/libicalss/icalmessage.c') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libical/src/libicalss/icalmessage.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libical/src/libicalss/icalmessage.c b/libical/src/libicalss/icalmessage.c index d5c57c1..731a2c7 100644 --- a/libical/src/libicalss/icalmessage.c +++ b/libical/src/libicalss/icalmessage.c @@ -31,25 +31,25 @@ #include <ctype.h> /* for tolower()*/ #include <string.h> /* for strstr */ #include <stdlib.h> /* for free(), malloc() */ icalcomponent* icalmessage_get_inner(icalcomponent* comp) { if (icalcomponent_isa(comp) == ICAL_VCALENDAR_COMPONENT){ return icalcomponent_get_first_real_component(comp); } else { return comp; } } -char* lowercase(const char* str) +static char* lowercase(const char* str) { char* p = 0; char* n = icalmemory_strdup(str); if(str ==0){ return 0; } for(p = n; *p!=0; p++){ *p = tolower(*p); } @@ -149,26 +149,31 @@ icalcomponent *icalmessage_new_reply_base(icalcomponent* c, if (attendee == 0){ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); icalcomponent_free(reply); return 0; } icalcomponent_add_property(inner,icalproperty_new_clone(attendee)); /* Add PRODID and VERSION */ icalcomponent_add_property(reply,icalproperty_new_version("2.0")); +#ifndef WIN32 sprintf(tmp, "-//SoftwareStudio//NONSGML %s %s //EN",PACKAGE,VERSION); +#else + sprintf(tmp, + "-//SoftwareStudio//NONSGML %s %s //EN",ICAL_PACKAGE,ICAL_VERSION); +#endif icalcomponent_add_property(reply,icalproperty_new_prodid(tmp)); return reply; } icalcomponent* icalmessage_new_accept_reply(icalcomponent* c, const char* user, const char* msg) { icalcomponent *reply; @@ -221,29 +226,29 @@ icalcomponent* icalmessage_new_decline_reply(icalcomponent* c, /* New is modified version of old */ icalcomponent* icalmessage_new_counterpropose_reply(icalcomponent* oldc, icalcomponent* newc, const char* user, const char* msg) { icalcomponent *reply; icalerror_check_arg_rz(oldc,"oldc"); icalerror_check_arg_rz(newc,"newc"); - reply = icalcomponent_new_clone(newc); + reply = icalmessage_new_reply_base(newc,user,msg); icalcomponent_set_method(reply,ICAL_METHOD_COUNTER); - return newc; + return reply; } icalcomponent* icalmessage_new_delegate_reply(icalcomponent* c, const char* user, const char* delegatee, const char* msg) { icalcomponent *reply; icalproperty *attendee; |