Commit Graph

972 Commits (0e56527e05566e78ac8fe4687d19423de78b0276)

Author SHA1 Message Date
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