diff options
author | Terry Wilson <twilson@digium.com> | 2010-05-24 18:21:20 +0000 |
---|---|---|
committer | Terry Wilson <twilson@digium.com> | 2010-05-24 18:21:20 +0000 |
commit | 880cde12ac89b2d8a160416a9ff869befbd0d990 (patch) | |
tree | eca5478a1d89cadc9ebfe0a73e6c4d530de11ad9 /res/res_calendar.c | |
parent | 6f998f06af1ad247139bccf7381bb1184512124e (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: https://origsvn.digium.com/svn/asterisk/trunk@265317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_calendar.c')
-rw-r--r-- | res/res_calendar.c | 9 |
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); } |