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
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