From: Kisub Song Date: Wed, 29 Aug 2012 02:03:55 +0000 (+0900) Subject: Update change log and spec for wrt-plugins-tizen_0.2.74 X-Git-Tag: 2.0_alpha~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e5aca95f3b4250d6000e44934b87d52cc6d669e;p=framework%2Fweb%2Fwrt-plugins-tizen.git Update change log and spec for wrt-plugins-tizen_0.2.74 Changed Modules : Messaging [Version] 0.2.74 [Project] GT-I8800, Public [Title] SEL Verification [Team] WebAPI [BinType] PDA [Customer] Open [Issue#] N_SE-7085 [Problem] email account initialize fail with Active sync mail account [Cause] incoming user name is not exist but it is not checked [Solution] check incoming user name when initialize accounts [SCMRequest] N/A Change-Id: Icc0c38193ccd44f29d7a6705929acf334f1d925c --- diff --git a/debian/changelog b/debian/changelog index b7a836c..571ebd9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +wrt-plugins-tizen (0.2.74) unstable; urgency=low + + * Bug fix on Messaging + * Git : slp/pkgs/w/wrt-plugins-tizen + * Tag : wrt-plugins-tizen_0.2.74 + + -- Kisub Song Wed, 29 Aug 2012 10:59:18 +0900 + wrt-plugins-tizen (0.2.73) unstable; urgency=low * Bug fix on Messaging diff --git a/packaging/wrt-plugins-tizen.spec b/packaging/wrt-plugins-tizen.spec index 31f4269..df7cae6 100755 --- a/packaging/wrt-plugins-tizen.spec +++ b/packaging/wrt-plugins-tizen.spec @@ -1,6 +1,6 @@ Name: wrt-plugins-tizen Summary: JavaScript plugins for WebRuntime -Version: 0.2.73 +Version: 0.2.74 Release: 0 Group: TO_BE_FILLED License: TO_BE_FILLED diff --git a/src/platform/API/Messaging/ReqReceiverMessage.cpp b/src/platform/API/Messaging/ReqReceiverMessage.cpp index b812fda..7553418 100644 --- a/src/platform/API/Messaging/ReqReceiverMessage.cpp +++ b/src/platform/API/Messaging/ReqReceiverMessage.cpp @@ -429,8 +429,6 @@ void ReqReceiverMessage::OnRequestReceived(const EventQueryMessagesPtr& event) } else { -// LogDebug("enter"); -// tmp = IMessaging::getInstance().findMessages(event->getFilter(), event->getSortMode(), event->getLimit(), event->getOffset()); Throw(WrtDeviceApis::Commons::InvalidArgumentException); } @@ -444,6 +442,10 @@ void ReqReceiverMessage::OnRequestReceived(const EventQueryMessagesPtr& event) MsgLogError("InvalidArgumentException"); event->setExceptionCode(WrtDeviceApis::Commons::ExceptionCodes::InvalidArgumentException); } + Catch (exception) { + MsgLogError("platform exception"); + event->setExceptionCode(WrtDeviceApis::Commons::ExceptionCodes::UnknownException); + } } void ReqReceiverMessage::OnRequestReceived(const EventGetConversationIdPtr& event) diff --git a/src/platform/Tizen/Messaging/Messaging.cpp b/src/platform/Tizen/Messaging/Messaging.cpp index 9edf411..65bb885 100644 --- a/src/platform/Tizen/Messaging/Messaging.cpp +++ b/src/platform/Tizen/Messaging/Messaging.cpp @@ -855,38 +855,62 @@ vector Messaging::getEmailIds(FolderType folder) */ vector Messaging::getEmailAccounts() const { - email_account_t* accounts = NULL; - int count = 0; - Try { - if (!email_get_account_list(&accounts, &count)) { - ThrowMsg(WrtDeviceApis::Commons::PlatformException, - "Couldn't get e-mail accounts."); - } + LogError("enter"); + email_account_t* accounts = NULL; + int count = 0; + Try { + if (!email_get_account_list(&accounts, &count)) { + ThrowMsg(WrtDeviceApis::Commons::PlatformException, "Couldn't get e-mail accounts."); + } - if (0 == count) { - ThrowMsg(WrtDeviceApis::Commons::PlatformException, "No e-mail account found."); - } + LogError( "count : " << count); - vector result; - for (int i = 0; i < count; ++i) { - Api::Messaging::EmailAccountInfo account(accounts[i].account_id, - accounts[i].incoming_server_user_name, - accounts[i].user_email_address); - result.push_back(account); - } + if (0 == count) { + ThrowMsg(WrtDeviceApis::Commons::PlatformException, "No e-mail account found."); + } - if (accounts != NULL) { - email_free_account(&accounts, count); - } + vector result; + for (int i = 0; i < count; ++i) + { + if(accounts[i].incoming_server_user_name != NULL) + { + LogError("server user name is NULL"); + Api::Messaging::EmailAccountInfo account(accounts[i].account_id, + accounts[i].incoming_server_user_name, + accounts[i].user_email_address); + result.push_back(account); + } + else + { + LogError("normal case"); + std::string Unknown = "UNKNOWN"; + Api::Messaging::EmailAccountInfo account(accounts[i].account_id, + Unknown, + accounts[i].user_email_address); + result.push_back(account); + } + } - return result; - } - Catch(WrtDeviceApis::Commons::PlatformException) { - if (accounts != NULL) { - email_free_account(&accounts, count); - } - throw; - } + if (accounts != NULL) { + email_free_account(&accounts, count); + } + LogError("end"); + return result; + } + Catch(WrtDeviceApis::Commons::PlatformException) { + if (accounts != NULL) { + email_free_account(&accounts, count); + } + LogError("PlatformException"); + ThrowMsg(WrtDeviceApis::Commons::PlatformException, "No e-mail account found."); + } + Catch(WrtDeviceApis::Commons::UnknownException) { + if (accounts != NULL) { + email_free_account(&accounts, count); + } + LogError("UnknownException"); + ThrowMsg(WrtDeviceApis::Commons::PlatformException, "Couldn't convert e-mail account id"); + } } int Messaging::getEmailAccountId(const std::string& account)