From 5bfea5fdbfca835b29e14ec9a28345c6095431b5 Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Fri, 27 Jan 2012 15:57:40 +0000 Subject: Add aresult variable for CALENDAR_WRITE This patch adds a CALENDAR_SUCCESS=1/0 variable that is set to show whether or not CALENDAR_WRITE has passed. This patch also adds some debugging for caldav PUT responses and no longer treats responses with no body as an error (as a PUT gets a 201 Created with no body). (closes issue ASTERISK-16903) Reported by: Clod Patry Tested by: Terry Wilson Patches: calendarstatus.diff uploaded by Clod Patry (License #5138), slightly modified by Terry Wilson Review: https://reviewboard.asterisk.org/r/1692/ - This line, and those below, will be ignored-- M res/res_calendar.c M res/res_calendar_exchange.c M res/res_calendar_caldav.c git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352916 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_calendar_exchange.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'res/res_calendar_exchange.c') diff --git a/res/res_calendar_exchange.c b/res/res_calendar_exchange.c index 4a2df1822..6c0982a63 100644 --- a/res/res_calendar_exchange.c +++ b/res/res_calendar_exchange.c @@ -505,9 +505,10 @@ static int exchangecal_write_event(struct ast_calendar_event *event) ast_verb(0, "\n\n%s\n\n", ast_str_buffer(body)); ast_str_set(&subdir, 0, "/Calendar/%s.eml", ast_str_buffer(uid)); - response = exchangecal_request(event->owner->tech_pvt, "PROPPATCH", body, subdir); + if ((response = exchangecal_request(event->owner->tech_pvt, "PROPPATCH", body, subdir))) { + ret = 0; + } - ret = 0; write_cleanup: if (uid) { ast_free(uid); -- cgit v1.2.3