[asterisk-commits] res calendar caldav: Add support reading gmail calendar (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 1 15:27:49 CST 2016


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/4518 )

Change subject: res_calendar_caldav: Add support reading gmail calendar
......................................................................


res_calendar_caldav: Add support reading gmail calendar

The response from gmail calendar includes the string name
"caldav:calendar-data". res_calendar_caldav implements
the example included in RFC 4791: string "C:calendar-data".
When reading the calendar, res_calendar_caldav compare the
string and if does not match just discards the event.
This commit compares the response to both strings,
successfully loading gmail calendar events.
Writing to gmail calendar is working prior to this fix.

ASTERISK-26624
Reported by: Eduardo S. Libardi

Change-Id: Ia1eef10552ae616efb645d390f5ffe81260d7d4a
---
M res/res_calendar_caldav.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  George Joseph: Looks good to me, approved
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/res/res_calendar_caldav.c b/res/res_calendar_caldav.c
index 1165037..8a603cf 100644
--- a/res/res_calendar_caldav.c
+++ b/res/res_calendar_caldav.c
@@ -480,7 +480,7 @@
 {
 	struct xmlstate *state = data;
 
-	if (!xmlStrcasecmp(fullname, BAD_CAST "C:calendar-data")) {
+	if (!xmlStrcasecmp(fullname, BAD_CAST "C:calendar-data") || !xmlStrcasecmp(fullname, BAD_CAST "caldav:calendar-data")) {
 		state->in_caldata = 1;
 		ast_str_reset(state->cdata);
 	}
@@ -494,7 +494,7 @@
 	icalcomponent *iter;
 	icalcomponent *comp;
 
-	if (xmlStrcasecmp(name, BAD_CAST "C:calendar-data")) {
+	if (xmlStrcasecmp(name, BAD_CAST "C:calendar-data") && xmlStrcasecmp(name, BAD_CAST "caldav:calendar-data")) {
 		return;
 	}
 

-- 
To view, visit https://gerrit.asterisk.org/4518
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia1eef10552ae616efb645d390f5ffe81260d7d4a
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Eduardo Scudeller Libardi <eslibardi at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list