Commit Graph

12 Commits

Author SHA1 Message Date
Matthew Jordan 05cee7b717 Properly extract the Body information of an EWS calendar item
Unlike all other calendar modules, res_calendar_ews fails to extract the Body
information for a calendar item.  This is due, in part, to a quirk in the
schema in the XML - not only does a CalendarItem contain a Body element, but
the CalendarItem exists as a descendant of a different Body element.  The neon
parser was erroneously skipping all Body elements.

This patch fixes that by bypassing Body elements that are not a child of
CalendarItem, and parsing the Body element out if it is a child.

Note that the original patch by Terry Wilson only needed slight modifications
to make it properly pull the Body information out; as such, while I've linked
to the patch that I uploaded for Dmitry, I've attributed the patch to Terry.

(closes issue ASTERISK-19738)
Reported by: Dmitry Burilov
Tested by: Dmitry Burilov
patches:
  calendar_ews_body_2012_10_29.diff uploaded by Terry Wilson (license 6283)
........

Merged revisions 375528 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 375531 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 375532 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-31 14:58:44 +00:00
Matthew Jordan 87113f1a0c Fix checking bounds of array index after using it; improper sizeof
This patch fixes two problems pointed out by a static analysis tool.

* In chan_dahdi, when an event is handled the index of the sub channel is first
  obtained.  In very off nominal cases, the method that determines the index
  can return a negative value.  In the event handling code, whether or not
  the index returned is valid was being checked after that value was used to
  index into an array.  This patch makes it so the value is checked before
  any indexing is done.

* In res_calendar_ews, sizeof was being passed a pointer instead of the struct to
  determine the amount of memory to allocate.

(issue ASTERISK-19651)
Reported by: Matt Jordan

(closes issue ASTERISK-19671)
Reported by: Matt Jordan
........

Merged revisions 366740 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 366741 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-17 13:21:19 +00:00
Matthew Jordan 90226b6fd7 Fix memory leak in res_calendar_ews when event email address node is empty
If the XML calendar data returned by a Microsoft Exchange Web Service
specifies an XML Event E-Mail Address ("EmailAddress"), and no e-mail address
is provided, a condition existed where an ast_calendar_attendee struct would
be allocated but not appended to the list of attendees.  Because of that,
the memory associated with the attendee would never be freed.  This patch
frees the memory if no e-mail address is provided.
........

Merged revisions 361606 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 361607 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-06 22:00:58 +00:00
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:28:54 +00:00
Jan Kalab 526e8fca14 Merged revisions 287269-287271 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r287269 | pitel | 2010-09-17 10:37:49 +0200 (Pá, 17 zář 2010) | 8 lines
  
  Support for HTTP redirects in calendar's URL
  
  libneon does not support HTTP redirects (3xx responses) by default. You must tell it to follow them.
  Also, another little unsigned int fix.
  
  (closes issue #17776)
  Review: https://reviewboard.asterisk.org/r/921/
........
  r287270 | pitel | 2010-09-17 10:42:37 +0200 (Pá, 17 zář 2010) | 6 lines
  
  Asterisk crashing because of double free when EWS request fails
  
  The free is done later in code. I think ast_free() should have built in checks for double free.
  
  (closes issue #17782)
........
  r287271 | pitel | 2010-09-17 10:44:28 +0200 (Pá, 17 zář 2010) | 6 lines
  
  Events are visible after they were removed from EWS calendar
  
  Because we must merge calendar even when it's empty.
  
  (closes issue #17786)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@287272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-17 08:46:45 +00:00
Jan Kalab d908c68606 Merged revisions 286617 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r286617 | pitel | 2010-09-14 08:55:44 +0200 (Út, 14 zář 2010) | 7 lines
  
  Merging events for Exchange web service doesn't work as expected, resulting in only one event in calendar
  
  The solution is to use "global" counter of events, since we do new requests for every event and calendar sync after every request. So now we do sync only after last request.
  
  (closes issue #17877)
  Review: https://reviewboard.asterisk.org/r/916/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@286618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-14 06:58:43 +00:00
Jan Kalab 063d1b72cb Merge of strdupa() fix for calendars categories priorities
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-03 13:09:23 +00:00
Jan Kalab a7505c0b91 Support for calendar events priorities and categories (with ISO C90 fix)
See RFC 5545 ch. 3.8.1.2 and 9.

(closes issue #17837)
Review: https://reviewboard.asterisk.org/r/880/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-03 12:58:52 +00:00
Tilghman Lesher b4e18d5660 Add load priority order, such that preload becomes unnecessary in most cases
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 19:35:02 +00:00
Terry Wilson f1503b9e1d Ensure that libneon > 0.29.0 is installed for res_calendar_ews
This uses a modified version of pabelanger's patch that checks for NTLM support
instead, which was added in 0.29.0 which is what is required for
res_calendar_ews.

(closes issue #17391)
Reported by: loloski
Patches: 
      issue17391.patch.v2 uploaded by pabelanger (license 224)
Tested by: twilson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@265793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-26 05:33:11 +00:00
Tilghman Lesher a7498ae02e Use configure to determine the prefixes and include directories properly.
This ensures cross-platform compatibility, even among Linux distributions,
which don't always put headers in the same place.

(closes issue #17391)
 Reported by: loloski


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@265747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-26 00:29:40 +00:00
Terry Wilson 880cde12ac 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
2010-05-24 18:21:20 +00:00