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
This commit is contained in:
Terry Wilson
2012-01-27 15:57:40 +00:00
parent e0ca02fe21
commit 5bfea5fdbf
3 changed files with 41 additions and 12 deletions

View File

@@ -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);