aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_calendar.c
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-24 18:21:20 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-24 18:21:20 +0000
commit7ac4eac5c8be37e424f8ab6d6538bc28f10fd173 (patch)
treeeca5478a1d89cadc9ebfe0a73e6c4d530de11ad9 /res/res_calendar.c
parente6aec778a5a582a7ce9770274773d02c92274167 (diff)
Calendaring support for Exchange Server 2007+ via EWS
This commit adds support for calendaring with Exchange Server 2007+ via Exchange Web Services. Full write support and for querying attendees. Many thanks to Jan Kaláb for the feature. (closes issue #17022) Reported by: pitel Patches: res_calendar_ews.c uploaded by pitel (license 1008) Tested by: pitel, twilson Review: https://reviewboard.asterisk.org/r/557/ Review: https://reviewboard.asterisk.org/r/668/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@265317 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_calendar.c')
-rw-r--r--res/res_calendar.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/res/res_calendar.c b/res/res_calendar.c
index a8c5ee784..2e3c8e4a1 100644
--- a/res/res_calendar.c
+++ b/res/res_calendar.c
@@ -1260,6 +1260,7 @@ static int calendar_write_exec(struct ast_channel *chan, const char *cmd, char *
char *val_dup = NULL;
struct ast_calendar *cal = NULL;
struct ast_calendar_event *event = NULL;
+ struct timeval tv = ast_tvnow();
AST_DECLARE_APP_ARGS(fields,
AST_APP_ARG(field)[10];
);
@@ -1325,6 +1326,14 @@ static int calendar_write_exec(struct ast_channel *chan, const char *cmd, char *
}
}
+ if (!event->start) {
+ event->start = tv.tv_sec;
+ }
+
+ if (!event->end) {
+ event->end = tv.tv_sec;
+ }
+
if((ret = cal->tech->write_event(event))) {
ast_log(LOG_WARNING, "Writing event to calendar '%s' failed!\n", cal->name);
}