Commit Graph

1137 Commits (d6d3e49158ec6b569e5c0db4d98efb3b7e3a4747)

Author SHA1 Message Date
Enrique J. Hernández 2dcb8fa732 Merge pull request #75 from Zentyal/ejhernandez/move-mail-folder-with-reserved-chars
oc-mail: Move mail folders with reserved chars
2015-01-26 23:39:15 +01:00
Enrique J. Hernández Blasco 0e8bf0d239 oc-mail: Move mail folders with reserved chars
The URL was incorrectly set when any of ;/?:@&=+$,# was used
in the folder name.

We have to mimetise what it is done in createFolder message selector.
That is, perform the IMAP4 encoding + URL encoding without CSS
encoding. The IMAP4 + CSS encoding (without URL encoding) is used to store the folder
in SOGo and OpenChange Indexing database as we do right now.
2015-01-26 15:55:22 +01:00
Jesús García Sáez 312084243b oc: improve modseqFromMessageChangeNumber to return an approximation.
Only for scenarios where we hadn't store the cn <-> modseq relationship
2015-01-23 18:19:24 +01:00
Jesús García Sáez 47be392d4f oc: avoid request change number until necessary
Minor changenumber leak, but avoid it anyway
2015-01-23 18:18:25 +01:00
Jesús García Sáez 34efcfee4e oc: synchroniseCache store modseq for last delete change number.
This will be the more frequent change number used to obtain updates
on the folder related with deleted messages
2015-01-23 18:17:45 +01:00
Jesús García Sáez 8e7f6d1aec oc: avoid change number leaking when refreshing folder.
Everytime a folder where its last operation was delete some email was
requesting change numbers that were not used.
2015-01-23 18:15:44 +01:00
Enrique J. Hernández Blasco 99a36be034 oc: Remove a source folder on move folder operation
Calling deleteFolder message to actually remove it from DB/IMAP
depending on the class.
2015-01-21 12:44:31 +01:00
Jesús García Sáez 8e41e5d665 Merge pull request #71 from Zentyal/ejhernandez/filetime-utc
Use PT_SYSTIME as absolute timestamp
2015-01-20 16:54:56 +01:00
Jesús García Sáez b1dfe47f01 Merge pull request #70 from Zentyal/jgarcia/working-encoding-parse
Outlook can view mails with non-ascii characters in their body (II)
2015-01-20 14:36:50 +01:00
Jesús García Sáez 014632fddb Merge pull request #72 from Zentyal/ejhernandez/wedding-anniversary
oc-contacts: Implement Wedding Anniversary
2015-01-20 14:36:14 +01:00
Enrique J. Hernández Blasco 8b44c08a32 oc-calendar: Remove unnecessary shifts on start,end and replace time props
As the data is sent in UTC, no shifts are longer required.
2015-01-20 14:35:32 +01:00
Enrique J. Hernández Blasco c893963da5 oc-tasks: Set right start, due and complete dates
As explained in [MS-OXOTASK], we have to shift the given date
to store the right point in time with the correct timezone.
2015-01-20 14:35:32 +01:00
Enrique J. Hernández Blasco c6b976a830 oc-mail: Remove unnecessary time shift in date for new mails
The MIME type can store the date in UTC and the clients are
responsible on showing correctly to the client as it does.
2015-01-20 14:35:32 +01:00
Enrique J. Hernández Blasco d5d97db8e8 oc: PT_SYSTIME is an absolute timestamp
As the epoch is in UTC timezone, we set this timezone for NSCalendarDate.
2015-01-20 14:35:32 +01:00
Carlos Pérez-Aradros Herce 00cef845b7 Restore multitenancy changes for OpenChange 2015-01-19 19:04:06 +01:00
Jesús García Sáez f9550b9181 oc: several uninitialized variables 2015-01-19 15:35:44 +01:00
Enrique J. Hernández Blasco b35fee8efc oc-contacts: Implement Wedding Anniversary
As specified by Microsoft using x-ms-anniversary custom vcard element
[MS-OXVCARD] Section 2.1.3.9.6
2015-01-16 01:34:16 +01:00
Jesús García Sáez 7e7d302165 oc: warning if codepage not found from headerCharset 2015-01-15 13:50:26 +01:00
Jesús García Sáez d052356724 oc: encoding names must be case insensitive 2015-01-15 13:27:37 +01:00
Jesús García Sáez 838ae8995f oc: ignore unhandled properties instead of abort
When setting a row with properties not handled right now, ignore them
like they were never there instead of abort()
2014-12-29 19:20:27 +01:00
Jesús García Sáez 3ef28b390d Merge pull request #66 from Zentyal/ejhernandez/guessing-recipients-from-import-PST
oc: Guess recipients from some properties while importing PST
2014-12-24 13:16:46 +01:00
Jesús García Sáez 501ee79766 oc-rtf: fix parse \pict tag with \bin data 2014-12-23 11:14:54 +01:00
Enrique J. Hernández Blasco a56fc93a9a oc: Guess recipients from some properties while importing PST
This is happening when importing a PST file.

From -> PidTagSenderEntryId
To   -> PidTagOriginalDisplayTo
CC   -> PidTagOriginalDisplayCc

The tested EntryID are the local users and OneOffEntries
when the users are not from the directory.

It requires https://github.com/openchange/openchange/pull/175 to work.
2014-12-23 00:59:29 +01:00
Enrique J. Hernández Blasco dba17fbcbc Create child folder objects using parent context for real
We activate the user for the context using the root folder
context as there are times where the active user is not
matching with the one stored in the application context
and SOGo object is storing cached data with the wrong user
leading to create folders in wrong mailboxes, etc.

As this application is single-threaded, no problems are expected.
Indeed, the same code is available at getting the root folder (ie INBOX).
2014-12-16 23:43:57 +01:00
Jesús García Sáez ba79234ceb Merge pull request #64 from Zentyal/ejhernandez/store-change-number-subfolders-cache
Store changeNumber maps with modseq in cache for subfolders
2014-12-03 16:05:51 +01:00
Enrique J. Hernández Blasco 067809ef1c Store changeNumber maps with modseq in cache for subfolders
By getting the root folder/container whose properties
are stored in OpenChange DB.

This makes the synchronisation of sub-folders faster as
when we evaluate restrictions for this folder, we are able
to get the modseq from where to get the latest messages
unseen by the client.
2014-12-01 23:19:38 +01:00
Jesús García Sáez bdf12e5c01 Merge pull request #62 from Zentyal/ejhernandez/fix-space-temporal-crash-setChangeKey
Attempt to sync an UID in setChangeKey to avoid crashing
2014-12-01 19:45:51 +01:00
Jesús García Sáez 97201c56a4 abort if attemp to sync an UID in setChangekey fails 2014-12-01 10:47:16 +01:00
Enrique J. Hernández Blasco 7691d616a9 Attempt to sync an UID in setChangeKey to avoid crashing
This may happen if between sync cache and setChangeKey a modSeq
is making synchroniseCache not retrieve the newly stored message.

This should fix the following crash:

https://tracker.zentyal.org/issues/2673
2014-11-29 08:07:41 +01:00
Enrique J. Hernández Blasco f4e15e2db8 Fix memory leak on getPidTagSubject
Valgrind crafted report:

=40967== 128,927 (53,750 direct, 75,177 indirect) bytes in 383 blocks are definitely lost in loss record 10,104 of 10,179
==40967==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==40967==    by 0x86EDE3D: talloc_strndup (talloc.c:613)
==40967==    by 0x34D2BB9E: _i_NSString_MAPIStoreDataTypes_asUnicodeInMemCtx_ (in /usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore/SOGoBackend)
==40967==    by 0x34D2025B: _i_MAPIStoreMailMessage__getPidTagNormalizedSubject_inMemCtx_ (in /usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore/SOGoBackend)
==40967==    by 0x34CFCD40: _i_MAPIStoreObject__getProperty_withTag_inMemCtx_ (in /usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore/SOGoBackend)
==40967==    by 0x34CFBE21: _i_MAPIStoreMessage__getPidTagSubject_inMemCtx_ (in /usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore/SOGoBackend)
==40967==    by 0x34CFBEB6: _i_MAPIStoreMessage__getPidTagOriginalSubject_inMemCtx_ (in /usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore/SOGoBackend)
==40967==    by 0x34CFCD40: _i_MAPIStoreObject__getProperty_withTag_inMemCtx_ (in /usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore/SOGoBackend)
==40967==    by 0x34CFD07E: _i_MAPIStoreObject__getProperties_withTags_andCount_inMemCtx_ (in /usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore/SOGoBackend)
2014-11-28 10:04:10 +01:00
Enrique J. Hernández Blasco a8b716fbaa oc: sync old messages as last resort if there are not in cache
This is happening when the lastModSeq is greater than the modseq
from an old message and that message is not in cache.

This is used as last resort before crashing and it is only used
in objectVersion as it is the first place to call on sync. Other
related properties would work.
2014-11-19 17:16:45 +01:00
Enrique J. Hernández Blasco ef7b919175 Return MAPISTORE_ERR_NOT_FOUND when a mail is indexed but not in IMAP server
And remove that entry from the indexing table.

This avoids to crash getting properties from a no longer available message
in the IMAP server, for instance, the `PidTagPredecessorChangeList` attribute.
2014-11-19 17:12:32 +01:00
Jesús García Sáez 973ab78761 oc: synchronize folders ChangeNumber <-> modseq 2014-11-19 17:12:32 +01:00
Jesús García Sáez 41320a4813 oc: NGImap4Connection:fetchUids changed error messages 2014-11-19 17:12:32 +01:00
Jesús García Sáez c410a9fc3f oc: NGImap4Connection:fetchUids don't delete RawResponse 2014-11-19 17:12:31 +01:00
Jesús García Sáez 24e35103ff oc: monkeypatched NGImap4Connection class from sope
To improve fetchUids method so we can retrieve uids in batches.
Otherwise we will face an error 'too long request' kind
2014-11-19 17:12:31 +01:00
Enrique J. Hernández Blasco 616f2abbb2 Fix compilation when samba file is not others readable
This happens when any smb.conf or included file is not others readable,
thus we are fallbacking to the default installation path.
2014-11-19 17:12:31 +01:00
Enrique J. Hernández Blasco 3910769ae8 oc-folder: Uniform call to deleteMessageWithMID
To make sure flags argument is used accordingly with the specs
and not working by chance.
2014-11-19 17:12:31 +01:00
Enrique J. Hernández Blasco b67e1deda5 oc-folder: Make deleted items synched when shared
By keeping mid on moving messages by soft deleting and
only if srcMid is different from targetMid.

This makes restore/shared deleted items work.

It also requires to do the following to work smoothly:

* Do not add soft-deleted messages in ensureIDsForChildKeys
* Return soft-deleted messages on getDeletedFMIDs
* Do not register a new mid if the URL is matched with soft deleted messages
2014-11-19 17:12:31 +01:00
Enrique J. Hernández Blasco 35ca313c37 oc-calendar: Fix PidLidClipStart on recurrent events
The midnight value must be in user's timezone and returned back in UTC.
2014-11-19 17:12:31 +01:00
Enrique J. Hernández Blasco c631689975 oc-calendar: getPidLidClipEnd now follows [MS-OXOCAL]
On recurrent events when there is no end, the time to set is
31 August 4500, 11:59 P.M ([MS-OXOCAL] Section 2.2.1.15)
2014-11-19 17:12:30 +01:00
Enrique J. Hernández Blasco cd64ca199a oc-calendar: wDay field cannot be negative
Furthermore, [MS-OXOCAL] Section 2.2.1.41.1 indicates:

   The wDay field is set to indicate
   the occurrence of the day of the week within the month
   (1 to 5, where 5 indicates the final occurrence during
   the month if that day of the week does not occur 5 times).

[rule firstOccurrence] may return negative values according to iCal spec for
recurrent rules iCal 4.8.5.4 Recurrence Rule. For instance, for defining
a timezone whose recurrent rule is done using this rule:

   RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU

This fixes the problem when editing a recurrent appointment in
Outlook were incorrectly shifted when SOGo provides back the event.
2014-11-19 17:12:30 +01:00
Enrique J. Hernández Blasco be60fdebcc oc-folder: Flags are now used in indexing db when deleting a msg
Unregistering the URL in indexing db accordingly to the flags (SOFT or HARD)
2014-11-19 17:12:30 +01:00
Enrique J. Hernández Blasco d076e04ad4 oc-mailfolder: Get seen flag directly from message in preloading
To avoid a loop and a server-call.

We are not using body.peek[text] directly because bodyContentPart message
is explicitly avoiding it.
2014-11-19 17:12:30 +01:00
Enrique J. Hernández Blasco 7e0cddc06b oc-mailfolder: Avoid setting seen flag on preloading message bodies
Fetching a body[text] property using IMAP makes IMAP server set seen flag.

This commit fetches the flag beforehand to restore the previous state
once the body has been fetched.
2014-11-19 17:12:30 +01:00
Enrique J. Hernández Blasco 258444bb93 oc-rtf: Be more resilient to spaces while parsing font tables
This avoids to crash on this example:

  \f0\fibi \fcharset0
   -------^

Or:

  \f0 \fibi\fcharset0
   --^

Take into account that I found lots of RTF documents with this format:

  \f0\fbidi \froman\fcharset0
  \f0\froman\fprq2 \fcharset0

Which are not unsupported by this handler.
2014-11-19 17:12:30 +01:00
Enrique J. Hernández Blasco 75ce59d010 oc-rtf: Fix current position to match where _bytes pointer is
This avoids to have extra unknown bytes at the end of the RTF document
as _len would have been reached but _current_pos had incorrect less value.
2014-11-19 17:12:29 +01:00
Enrique J. Hernández Blasco cbfcd54858 oc-rtf: Use what RTF Spec 1.9.1 for control words
This reverts 7581c0a.
2014-11-19 17:12:29 +01:00
Enrique J. Hernández Blasco 415fb6034e oc-calendar: Retrieve properly event description created on SOGo
As it is stored as plain text without triming string.

The correct comparison here is NSNotFound as stated in Apple documentation.
2014-11-19 17:12:29 +01:00
Jesús García Sáez 445a1fb2d6 oc: MailMessages return correct codepage 2014-11-19 17:12:29 +01:00
Enrique J. Hernández Blasco c866bce8e8 Store FreeBusySimple and FreeBusyDetailed rights as roles
Map: FreeBusySimple -> PublicDAndTViewer
     FreeBusyDetailed -> ConfidentialDAndTViewer

Although SOGo is not really used AFAIK, we can now keep it and
keep Calendar permission issues consistent.
2014-11-19 17:12:29 +01:00
Jesús García Sáez ed4ca3bd1b oc: add talloc reference to indexing context
We have a cache with user contexts (objc) which have mapping contexts (objc)
where we store the indexing context (c) which will be freed by openchange
code once the connection is closed.

Right now all indexing context created for an user are the same,
independently when in time was created or by which connection, etc...
So this is a valid workaround, but this has to be refactored to used the
indexing context of the current connection that is performing the
call to SOGo backend.
2014-11-19 17:12:29 +01:00
Jesús García Sáez bb9764bc6b Revert "oc: cached usercontext updates indexing_context"
This reverts commit 0750f64b787db088e944756b66fbd0883cf44cbf.
2014-11-19 17:12:28 +01:00
Jesús García Sáez 05578bfcb6 oc-rtf: control words can also have a space before next tag
This was causing to parse a single space as an empty control
word with length 0, which was the source of several crashes.

Example:

  \f0\fbidi \fcharset0
   --------^

font index is 0, font family is bidi but when parsing charset we were
assuming control word was '' instead of 'charset0'.

This only fixes the crashes, the parseFontTable function works quite
awful right now.
2014-11-19 17:12:28 +01:00
Jesús García Sáez a7c2054cce oc: cached usercontext updates indexing_context
Instead of use always the one given on initialization
2014-11-19 17:12:28 +01:00
Julien Kerihuel 52ad0e0e5b Prevent SOGo backend from crashing when mapistore_set_connection_info is
not called beforehand and connInfo is not initialized.
2014-11-19 17:12:28 +01:00
Kamen Mazdrashki dc8b73b12b oc/MailFolder: Add more logging so we can trace invalid message kyes 2014-11-19 17:12:28 +01:00
Kamen Mazdrashki 18acdf20a6 oc: Make sure we always use NSString keys in 'messages' dictionary
Different types for keys in Dictionaries leads to not finding
expected entry - we should make sure that everythime we set/get
entry from a dictionary, key object type is same
2014-11-19 17:12:27 +01:00
Kamen Mazdrashki 0a23f18fc9 oc: Set log level to 0 in samba-get-config script - it is very chatty during builds
This script is very "chatty" when "log level" is set to a high number
(usual scenario on developer machine)
2014-11-19 17:12:27 +01:00
Kamen Mazdrashki b8366d796d oc/util: Tune dbmsgreader for new caching classes names 2014-11-19 17:12:27 +01:00
Jesús García Sáez 5ee8cb3a3f oc-rtf: check valid font name when generating <font> tag 2014-11-19 17:12:27 +01:00
Jesús García Sáez 4e3a242f2f oc-rtf: Don't crash when we don't know the specified font 2014-11-19 17:12:27 +01:00
Jesús García Sáez 68c38e2b5c openchange: return proper url for folders with non-ascii chars
toManyRelationshipKeysWithNamespaces applies asCSSIdentifier function
to the names which are already "Imap4Encoded". So we need to remove the
CSSIdentifier function first and then "Imap4Decode" to get the real name.

Once we have the real name, to create the url we have to use the same
logic as the function that creates the folder and creates this url for
the first time (this function is createRootSecondaryFolderWithFID)
which is to apply, in this order:

- asCSSIdentifier
- stringByEncodingImap4FolderName
- stringByAddingPercentEscapesUsingEncoding
2014-11-19 17:12:27 +01:00
Jesús García Sáez f1d14fdeca multitenancy: adapt openchangedb_* calls 2014-11-19 17:12:26 +01:00
Jesús García Sáez a5550cff18 avoid decode @ from url with username on it 2014-11-19 17:12:26 +01:00
Jeroen Dekkers 6ded9e95b3 Put private libraries in /usr/lib/sogo 2014-10-01 20:36:42 +02:00
extrafu a263939d8a Merge pull request #49 from Zentyal/Contrib
Several patches for the OpenChange integration
2014-09-29 09:07:36 -04:00
extrafu 8cdaac6300 Merge pull request #35 from dekkers/link-libraries-correctly
Link correctly against libraries used
2014-09-11 21:02:08 -04:00
Jesús García Sáez 1a2fe8908b Revert "Merge pull request #2 from Zentyal/jgarcia/fix-encoding-of-mapistoreuris" 2014-08-01 15:50:17 +02:00
Ludovic Marcotte b05fcc7d82 Fat commit to refactor the quick record generation 2014-07-30 14:51:00 -04:00
Jesús García Sáez 3eba5f940e increase log level of debug message 2014-07-29 18:25:46 +02:00
Jesús García Sáez 7f2ee7be89 Error message only when initialization hadn't been done
In a multithread environment, sogo_backend_init is registering the thread
only for the first one that calls this function, then the others threads
(even if they call sogo_backend_init) won't be registered because
moduleInitialized was YES.

We just want to ensure sogo_backend_init is called at least once (per process,
not per thread).
2014-07-29 18:25:28 +02:00
Miguel Julián 41f2e917e7 Removed development tip comment 2014-07-29 18:22:34 +02:00
Miguel Julián 65ece61273 Removing some trail characters at event description
* They are sometimes present after a \r\n\n
2014-07-29 18:22:32 +02:00
Kamen Mazdrashki 1846e1ee5d oc/TallocWrapper: don't handle Threading initialization here
It is SOGo backend module responsibility to setup/teardonw all
ObjC specific initialization

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 15:20:51 +02:00
Kamen Mazdrashki 1fc3a57210 oc: Protect backend initialization to happen only once 2014-07-02 15:20:31 +02:00
Kamen Mazdrashki 5b75c817e2 oc: Log when mapistore backend is successfully initialized 2014-07-02 15:20:19 +02:00
Kamen Mazdrashki c91741ad1f oc/dbmsgreader: Fix to work again this time basen on BSON format for msg data
Also, implement reading for message data in case only 1 param is passed.
This could be usefull when have msg data by other means than by
reading it directly from DB

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 15:19:59 +02:00
Kamen Mazdrashki 86e54989fb oc/utils: Make "plext" category publicly visible
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 15:19:47 +02:00
Kamen Mazdrashki 116e738e63 oc/utils: Move OCDumpPListData() function into plreader - this is the only user for this function
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 15:19:31 +02:00
Kamen Mazdrashki bf0f2a76d5 oc/MAPIStoreSOGo: Do not destroy current thread context after any API call
We have thread context already in place during *_init() function.
Thus guarding every API call with TreadInit/Destroy is:
- a bit redundand
- makes SOGo backend not reentrant even on single thread and leads
  to hard to find use-after-free crashes

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 15:19:19 +02:00
Kamen Mazdrashki 6de298d202 oc/MAPIStoreMapping: Split the check for existing entry so we have better error message
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 15:18:49 +02:00
Kamen Mazdrashki 98505c1b6b oc/MAPIStoreContext: Fix log messages to actually print 64bit FMIDs
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>

Conflicts:
	OpenChange/MAPIStoreContext.m
2014-07-02 15:18:33 +02:00
Miguel Julián 51df0adb79 Removed development tip comment 2014-07-02 15:00:24 +02:00
Miguel Julián 5d43513dd9 Removing some trail characters at event description
* They are sometimes present after a \r\n\n
2014-07-02 14:59:16 +02:00
Miguel Julián 2458af1a43 All day events deladyed one day if user timezone is +XX:XX
* Those events were not shown properly in SOGo web UI
2014-07-02 14:59:06 +02:00
Kamen Mazdrashki 2792baac02 openchange: don't overflow possible recipient type while creating message headers
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:58:57 +02:00
Kamen Mazdrashki 4b383705ff openchange: Fix submitWithFlags to submit to BCC-ed recipients also
this reintroduces commit 7efb263c659451d2c781547a5b38cb5d01ed837f

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:58:47 +02:00
Kamen Mazdrashki dd7200e00f openchange/MAPIStoreFolder: Add private selector for actual folder delete action
Usually, it is a bad idea for an object to call its own public methods
(just like in this case). Thus separating impelementation for deleteFolder:
would allow MAPIStoreFolder to call only private implementation when needed

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:58:33 +02:00
Kamen Mazdrashki 27851ef428 openchange: FillMessageHeadersFromProperties fix skipping of last value in
possible range of recepients

IMHO, this fixes a bug, that when saving a meessage, it  is saved
without BCC fields.

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:58:16 +02:00
Kamen Mazdrashki 7da8885190 openchange: getMessageData - replace int literals with ulRecipClass values
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:58:06 +02:00
Kamen Mazdrashki fc9dc08045 oc-sogo: pretty print Exceptions in sogo_backend_handle_objc_exception()
Now we have a nice stack trace printed out from [NSException callStackSymbols]

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:53:34 +02:00
Kamen Mazdrashki bcfb674cd1 oc-sogo: Print both [NSException callStackSymbols] and execinfo.h stack trace
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:53:24 +02:00
Kamen Mazdrashki 6be768af42 oc-sogo: Move memory clean up *after* handling the exception
Otherwise the mess is full :)

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:53:10 +02:00
Kamen Mazdrashki 2c94d21f3e oc-sogo: Use [e name] and [e reason] selectors
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:52:59 +02:00
Kamen Mazdrashki cbe616358d oc-sogo: Clean up AutoRelease pool and unregister threads in Catch handler
Most of the time we have "not yet implemented" kind of exceptions,
so it is better to clean up allocated resources

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:52:34 +02:00
Kamen Mazdrashki 09e6fcc3ff oc-sogo: try/catch to guard only the actual impelementation rather than *everything*
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:52:20 +02:00
Jesús García Sáez 3b2174eeec if there is no password file for specific user, try to read global password file
This way we can have a master password for imap access
2014-07-02 14:51:08 +02:00
Jesús García Sáez c6b8be742d use execinfo.h to get backtrace
Really poor backtrace because it will only have the frames from oc side,
I don't know why callStackSymbols is returning null, compilation flags?
2014-07-02 14:50:54 +02:00
Jesús García Sáez a77863947f add try catch to all functions on struct mapistore_backend 2014-07-02 14:50:41 +02:00
Jesús García Sáez d1f54298d2 stringByDecodingImap4FolderName is not neccesary
For russian locale and characters nonexistent in latin1 sogo crashes
2014-07-02 14:48:45 +02:00
Kamen Mazdrashki f8028b5a94 OpenChange: Avoid crashing when creating embedded message in attachment
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
(cherry picked from commit 15a55f9f707247c9164e8fa7a102639744f686e5)
2014-07-02 14:48:27 +02:00
Jesús García Sáez 6bef678114 fix format logging uint64_t 2014-07-02 14:47:57 +02:00
Jesús García Sáez c81476bd04 no need to modify url 2014-07-02 14:47:45 +02:00
Jesús García Sáez a24f009cfe mapistoreURI encoding should be done the same way as listContextForUser
stringByEncodingImap4FolderName is used inside [newFolder create] where is needed
2014-07-02 14:47:31 +02:00
Jesús García Sáez 95298de9f1 avoid infinite loop when trying to update a folder id 2014-07-02 14:45:52 +02:00
Jesús García Sáez f6d1a37127 use properly get_uri function and check ret value 2014-07-02 14:44:23 +02:00
Jesús García Sáez 2aa71cc8a3 check ret value properly 2014-07-02 14:43:42 +02:00
Jesús García Sáez 34b98a563d get_new_folderID functions are now on mapistore_indexing 2014-07-02 14:42:17 +02:00
Carlos Pérez-Aradros Herce fd308b592f Converted all the indexing code to indexing backends 2014-07-02 14:41:51 +02:00
Carlos Pérez-Aradros Herce a6bfb9d5c5 Use indexing generic code instead of tdb private funtions 2014-07-02 14:41:40 +02:00
Carlos Pérez-Aradros Herce 33b353b974 Moved to abstract index_context instead of tdb_wrap 2014-07-02 14:41:25 +02:00
Ludovic Marcotte 1292c191ec Make sure we don't have '-' in table names. 2014-06-10 08:46:35 -04:00
Ludovic Marcotte be72456a9a Renamed folder cache creation method 2014-05-14 09:56:10 -04:00
Ludovic Marcotte a54b3e4289 Renamed the default table name from socfs_ to sogo_cache_folder_ 2014-05-14 08:56:35 -04:00
Ludovic Marcotte 7a4feae8b8 Updated code to reflect cache regorg. 2014-05-14 06:56:05 -04:00
Ludovic Marcotte 99d49b9bd9 Updated code to use the category 2014-05-13 21:14:57 -04:00
Ludovic Marcotte 5f9fb4e1c4 Big refactor for new caching mechanism. 2014-05-13 21:06:59 -04:00
Ludovic Marcotte ef2188962a Renamed cache files for generalization.
The upcoming commit will rename the content.
2014-05-13 19:58:19 -04:00
Ludovic Marcotte 2922f15ca7 More rename 2014-05-13 18:03:37 -04:00
Ludovic Marcotte 41e6fb89d3 Renamed constants in preparation for the big cache cleanup 2014-05-13 17:54:02 -04:00
Ludovic Marcotte c4a3843695 Removed unused configuration parameters 2014-05-13 13:52:20 -04:00
Jeroen Dekkers b5dc2e264d Link correctly against libraries used
Link the mapistore backend against libgnustep-base, libobjc,
libNGObjWeb. Link the SAML code against gobject-2.0.
2014-04-12 20:32:20 +02:00
Jeroen Dekkers c80e222210 Delete generated source files when running "make clean". 2014-04-06 22:44:50 +02:00
Ludovic Marcotte a24d809e40 Minor code/copyright/authors cleanups 2014-01-09 21:06:31 -05:00
Ludovic Marcotte 32ba01315f Init local variable to avoid potential crasher. 2013-11-22 11:29:24 -05:00
Ludovic Marcotte 99d38417cc Fix for bug #2354 2013-09-25 13:51:42 -04:00
Ludovic Marcotte 29eed182a7 Updated the OpenChange code related to UTF-7 changes for IMAP folders 2013-09-25 10:41:07 -04:00
Ludovic Marcotte 5b77c2b724 Stability fix when we're untable to determine the message class type 2013-09-19 10:49:42 -04:00
Ludovic Marcotte 70086e5ee6 Fix for bug #1935 2013-09-19 09:56:28 -04:00
Ludovic Marcotte 7ddc1b9e2d Avoid type-issues generating wrong GlobCnt - leading to OpenChange crashes during the sync process. 2013-09-18 14:03:07 -04:00
Ludovic Marcotte cd4abe4b5b Fix for bug 2398 2013-09-06 13:48:44 -04:00
Ludovic Marcotte b1df03adc7 Fix for old runtimes. 2013-07-24 10:54:55 -04:00
Ludovic Marcotte 9d9a434fdc Avoid crashing when reading fcs crap. 2013-06-20 15:44:35 -04:00
Ludovic Marcotte d28482557f Fix for bug 2285 2013-06-20 13:43:45 -04:00
Ludovic Marcotte 4c97d54939 Fix for bug #2119 2013-06-20 09:10:09 -04:00
Jean Raby 139c14d9e1 save: memCtx
Same fix as for MAPIStoreContactMessage
2013-04-16 12:06:17 -04:00
Jean Raby 5d17414018 [MAPIStoreContactsMessage save] needs memCtx
From extrafu
2013-04-15 14:13:07 -04:00
Jean Raby 3810833e1b remove unrtf leftovers 2013-04-11 10:22:28 -04:00
Ludovic Marcotte 33840c71cd Changed noop by unselect/select. 2013-04-10 10:48:25 -04:00
Ludovic Marcotte 1b983ef691 Fixed a potential timing issue with Dovecot when getting the modseq 2013-04-10 09:56:23 -04:00
Ludovic Marcotte 6a8e6cd762 Fixed the GNUmakfile and const's for charset tables. 2013-03-28 08:32:00 -04:00
Ludovic Marcotte 663351029a Replaced unrtf by our own RTF to HTML converter.
Faster, thread safe, a hell lot cleaner.
2013-03-26 19:32:08 -04:00
Jean Raby c26e5fa7fe semi-colon 2013-03-26 14:01:04 -04:00
Jean Raby 74c01dc448 gen-charset-table.py: script to import ms charmaps
For example: http://msdn.microsoft.com/en-us/goglobal/cc305147
2013-03-26 13:42:22 -04:00
Ludovic Marcotte 93f9a7273e Now handle mem context when saving messages and removed useless debugging. 2013-03-13 15:04:11 -04:00
Jean Raby c79af52b67 Fix BSONCodec.m includes
include objc.h instead of runtime.h so that it works on older gcc objc runtime
2013-03-06 11:03:19 -05:00
Jean Raby 13277bbdb9 c_content TEXT to LONGTEXT for OpenChange tables
Add an script to update existing tables.
Note that if a row already have 65535 char in it,
the data is most likely broken.
2013-03-05 10:47:09 -05:00
Ludovic Marcotte a8d67edb44 Merge branch 'master' of https://github.com/inverse-inc/sogo 2013-02-20 12:11:17 -05:00
Ludovic Marcotte 89766b2e7e Temporary fix for unsigned long long values. 2013-02-20 12:10:34 -05:00