aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--resources/providers.json2
-rwxr-xr-xscripts/prepare-libetpan-ios.sh2
-rwxr-xr-xscripts/prepare-libetpan-macos.sh2
-rw-r--r--src/core/basetypes/MCArray.cc13
-rwxr-xr-xsrc/objc/imap/MCOIMAPSession.h4
-rw-r--r--src/objc/pop/MCOPOPSession.h4
-rw-r--r--src/objc/smtp/MCOSMTPSession.h4
-rw-r--r--src/objc/utils/MCOOperation.h4
-rw-r--r--src/objc/utils/NSArray+MCO.mm3
9 files changed, 23 insertions, 15 deletions
diff --git a/resources/providers.json b/resources/providers.json
index 09ed7628..6435914b 100644
--- a/resources/providers.json
+++ b/resources/providers.json
@@ -371,7 +371,7 @@
"gmail\\.com"
],
"mailboxes":{
- "sentmail":"[Gmail]/Sent",
+ "sentmail":"[Gmail]/Sent Mail",
"allmail":"[Gmail]/All Mail",
"starred":"[Gmail]/Starred",
"trash":"[Gmail]/Trash",
diff --git a/scripts/prepare-libetpan-ios.sh b/scripts/prepare-libetpan-ios.sh
index 031e33e1..e81e1f11 100755
--- a/scripts/prepare-libetpan-ios.sh
+++ b/scripts/prepare-libetpan-ios.sh
@@ -18,7 +18,7 @@ else
fi
url="https://github.com/dinhviethoa/libetpan.git"
-rev=8f5362931453920803a270c6d35ab82f69a02525
+rev=d4929c391042d1b7a98ab577f5514c21da9f7534
pushd `dirname $0` > /dev/null
scriptpath=`pwd`
diff --git a/scripts/prepare-libetpan-macos.sh b/scripts/prepare-libetpan-macos.sh
index dc46e9d5..f360a5b5 100755
--- a/scripts/prepare-libetpan-macos.sh
+++ b/scripts/prepare-libetpan-macos.sh
@@ -1,7 +1,7 @@
#!/bin/sh
url="https://github.com/dinhviethoa/libetpan.git"
-rev=8f5362931453920803a270c6d35ab82f69a02525
+rev=d4929c391042d1b7a98ab577f5514c21da9f7534
pushd `dirname $0` > /dev/null
scriptpath=`pwd`
diff --git a/src/core/basetypes/MCArray.cc b/src/core/basetypes/MCArray.cc
index 038ec022..15e9a2be 100644
--- a/src/core/basetypes/MCArray.cc
+++ b/src/core/basetypes/MCArray.cc
@@ -214,18 +214,7 @@ Array * Array::sortedArray(int (* compare)(void * a, void * b, void * context),
{
struct sortData data;
Array * result = (Array *) this->copy()->autorelease();
- data.compare = compare;
- data.context = context;
-#ifdef __MACH__
- qsort_r(carray_data(result->mArray), carray_count(result->mArray),
- sizeof(* carray_data(result->mArray)), &data,
- (int (*)(void *, const void *, const void *)) sortCompare);
-#else
- qsort_r(carray_data(result->mArray), carray_count(result->mArray),
- sizeof(* carray_data(result->mArray)),
- (int (*)(const void *, const void *, void *)) sortCompare,
- &data);
-#endif
+ result->sortArray(compare, context);
return result;
}
diff --git a/src/objc/imap/MCOIMAPSession.h b/src/objc/imap/MCOIMAPSession.h
index 101f7953..7a35b7e3 100755
--- a/src/objc/imap/MCOIMAPSession.h
+++ b/src/objc/imap/MCOIMAPSession.h
@@ -117,7 +117,11 @@
It will make MCOIMAPSession safe. It will also set all the callbacks of operations to run on this given queue.
Defaults to the main queue.
This property should be used only if there's performance issue using MCOIMAPSession in the main thread. */
+#if OS_OBJECT_USE_OBJC
@property (nonatomic, retain) dispatch_queue_t dispatchQueue;
+#else
+@property (nonatomic, assign) dispatch_queue_t dispatchQueue;
+#endif
/**
The value will be YES when asynchronous operations are running, else it will return NO.
diff --git a/src/objc/pop/MCOPOPSession.h b/src/objc/pop/MCOPOPSession.h
index 74ed216b..719b65b7 100644
--- a/src/objc/pop/MCOPOPSession.h
+++ b/src/objc/pop/MCOPOPSession.h
@@ -66,7 +66,11 @@ See MCOConnectionType for more information.*/
It will make MCOPOPSession safe. It will also set all the callbacks of operations to run on this given queue.
Defaults to the main queue.
This property should be used only if there's performance issue using MCOPOPSession in the main thread. */
+#if OS_OBJECT_USE_OBJC
@property (nonatomic, retain) dispatch_queue_t dispatchQueue;
+#else
+@property (nonatomic, assign) dispatch_queue_t dispatchQueue;
+#endif
/** @name Operations */
diff --git a/src/objc/smtp/MCOSMTPSession.h b/src/objc/smtp/MCOSMTPSession.h
index 8e5deaa3..5c616244 100644
--- a/src/objc/smtp/MCOSMTPSession.h
+++ b/src/objc/smtp/MCOSMTPSession.h
@@ -80,7 +80,11 @@
It will make MCOSMTPSession safe. It will also set all the callbacks of operations to run on this given queue.
Defaults to the main queue.
This property should be used only if there's performance issue using MCOSMTPSession in the main thread. */
+#if OS_OBJECT_USE_OBJC
@property (nonatomic, retain) dispatch_queue_t dispatchQueue;
+#else
+@property (nonatomic, assign) dispatch_queue_t dispatchQueue;
+#endif
/** @name Operations */
diff --git a/src/objc/utils/MCOOperation.h b/src/objc/utils/MCOOperation.h
index b42dfbef..e3aa758a 100644
--- a/src/objc/utils/MCOOperation.h
+++ b/src/objc/utils/MCOOperation.h
@@ -23,7 +23,11 @@
/** The queue this operation dispatches the callback on. Defaults to the main queue.
This property should be used only if there's performance issue creating or calling the callback
in the main thread. */
+#if OS_OBJECT_USE_OBJC
@property (nonatomic, retain) dispatch_queue_t callbackDispatchQueue;
+#else
+@property (nonatomic, assign) dispatch_queue_t callbackDispatchQueue;
+#endif
/** This methods is called on the main thread when the asynchronous operation is finished.
Needs to be overriden by subclasses.*/
diff --git a/src/objc/utils/NSArray+MCO.mm b/src/objc/utils/NSArray+MCO.mm
index 022960f0..061f8429 100644
--- a/src/objc/utils/NSArray+MCO.mm
+++ b/src/objc/utils/NSArray+MCO.mm
@@ -21,6 +21,9 @@
+ (NSArray *) mco_arrayWithMCArray:(mailcore::Array *)array
{
+ if (array == NULL) {
+ return nil;
+ }
NSMutableArray * result = [NSMutableArray array];
for(unsigned int i = 0 ; i < array->count() ; i ++) {
[result addObject:[NSObject mco_objectWithMCObject:array->objectAtIndex(i)]];