Changed Modules : Messaging and Download
[Version] 0.2.73
[Project] GT-I8800, Public
[Title] SEL Verification
[Team] WebAPI
[BinType] PDA
[Customer] Open
[Issue#] WEB-1723
[Problem] Messaging - empty message body is return after
loadMessageBody()
[Cause] email body updated but old message body is returned
[Solution] update email body for updated one
[Issue#] WEB-1243
[Problem] Messaging - loadMessageAttachment callback error
[Cause] throw exception on loadMessageAttachment
[Solution] loadMessageAttachment exception bug fix
[SCMRequest] N/A
+wrt-plugins-tizen (0.2.73) unstable; urgency=low
+
+ * Bug fix on Messaging
+ * Git : slp/pkgs/w/wrt-plugins-tizen
+ * Tag : wrt-plugins-tizen_0.2.73
+
+ -- Kisub Song <kisubs.song@samsung.com> Tue, 28 Aug 2012 18:37:01 +0900
+
wrt-plugins-tizen (0.2.72) unstable; urgency=low
* Bug fix on Messaging, Notification, Alarm, LBS and Contact
wrt-plugins-tizen (0.2.72) unstable; urgency=low
* Bug fix on Messaging, Notification, Alarm, LBS and Contact
Name: wrt-plugins-tizen
Summary: JavaScript plugins for WebRuntime
Name: wrt-plugins-tizen
Summary: JavaScript plugins for WebRuntime
Release: 0
Group: TO_BE_FILLED
License: TO_BE_FILLED
Release: 0
Group: TO_BE_FILLED
License: TO_BE_FILLED
OnDownloadStateChanged(){
m_downloadId = -1;
m_downloadState = "";
OnDownloadStateChanged(){
m_downloadId = -1;
m_downloadState = "";
m_receivedSize = 0;
m_totalSize = 0;
}
m_receivedSize = 0;
m_totalSize = 0;
}
static void on_url_download_completed(url_download_h download, const char * path, void *user_data)
{
static void on_url_download_completed(url_download_h download, const char * path, void *user_data)
{
- LogInfo("Download completed with handle: "<<download<<", path: "<<path);
+ LogInfo("Download completed with handle: "<<download);
ThrowMsg(PlatformException, "Platform error while unsetting progress cb: "<<ret);
}
ThrowMsg(PlatformException, "Platform error while unsetting progress cb: "<<ret);
}
- std::string fullPath(path);
- found = fullPath.find_last_of("/\\");
- eventPtr->setFileName(fullPath.substr(found+1));
+ if( path ) {
+ std::string fullPath(path);
+ found = fullPath.find_last_of("/\\");
+ eventPtr->setFileName(fullPath.substr(found+1));
+ LogInfo("Full path: "<<path<<", file name: "<<eventPtr->getFileName());
+ }
eventPtr->setDownloadId((long) download);
eventPtr->setDownloadState(TIZEN_ENUM_DOWNLOAD_STATE_COMPLETED);
eventPtr->setResult(true);
thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
eventPtr->setDownloadId((long) download);
eventPtr->setDownloadState(TIZEN_ENUM_DOWNLOAD_STATE_COMPLETED);
eventPtr->setResult(true);
thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
- //thisDownloadManager->m_changeEmitters.erase(download);
+ thisDownloadManager->m_changeEmitters.erase(download);
- /*ret = url_download_destroy(download);
+ ret = url_download_destroy(download);
if (ret != URL_DOWNLOAD_ERROR_NONE) {
ThrowMsg(PlatformException, "Platform error while destroying download handle: "<<ret);
if (ret != URL_DOWNLOAD_ERROR_NONE) {
ThrowMsg(PlatformException, "Platform error while destroying download handle: "<<ret);
}
thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
}
thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
- //thisDownloadManager->m_changeEmitters.erase(download);
+ thisDownloadManager->m_changeEmitters.erase(download);
- /*ret = url_download_destroy(download);
+ ret = url_download_destroy(download);
if (ret != URL_DOWNLOAD_ERROR_NONE) {
LogWarning("Platform error while destroying download handle: "<<ret);
if (ret != URL_DOWNLOAD_ERROR_NONE) {
LogWarning("Platform error while destroying download handle: "<<ret);
}
static void on_url_download_progress(url_download_h download, unsigned long long received, unsigned long long total, void *user_data)
}
static void on_url_download_progress(url_download_h download, unsigned long long received, unsigned long long total, void *user_data)
// TODO Copied from former solution, refactor it.
void MailSync::OnEventReceived(const DBus::MessageEvent& event)
{
// TODO Copied from former solution, refactor it.
void MailSync::OnEventReceived(const DBus::MessageEvent& event)
{
- LogDebug("OnEventReceived");
- SyncNetworkStatusPtr syncNetworkStatus(new SyncNetworkStatus(event.GetArg0()));
- int mailId = syncNetworkStatus->getMailId(); //if email body download mode.
- int status = syncNetworkStatus->getStatus();
- int handle = syncNetworkStatus->getHandle();
+ LogDebug("OnEventReceived");
+ SyncNetworkStatusPtr syncNetworkStatus(new SyncNetworkStatus(event.GetArg0()));
+ int mailId = syncNetworkStatus->getMailId(); //if email body download mode.
+ int status = syncNetworkStatus->getStatus();
+ int handle = syncNetworkStatus->getHandle();
- if ( status == NOTI_DOWNLOAD_ATTACH_FINISH ||
- status == NOTI_DOWNLOAD_ATTACH_FAIL )
- {
+ if ( status == NOTI_DOWNLOAD_ATTACH_FINISH ||status == NOTI_DOWNLOAD_ATTACH_FAIL )
+ {
int nth = handle;
LogDebug(" Debus mailID = " << mailId << " , Nth = " << nth );
int nth = handle;
LogDebug(" Debus mailID = " << mailId << " , Nth = " << nth );
SyncRequestIterator it = m_SyncRequests.begin();
for ( ; it != m_SyncRequests.end(); it++ )
{
const Api::Messaging::IEmailPtr& mail = it->second.mail;
SyncRequestIterator it = m_SyncRequests.begin();
for ( ; it != m_SyncRequests.end(); it++ )
{
const Api::Messaging::IEmailPtr& mail = it->second.mail;
LogDebug(" request mailID = " << mail->getUID() << " , Nth = " << (it->second.attachment)->getNth() );
if ( mail->getUID() == mailId && nth == (it->second.attachment)->getNth())
LogDebug(" request mailID = " << mail->getUID() << " , Nth = " << (it->second.attachment)->getNth() );
if ( mail->getUID() == mailId && nth == (it->second.attachment)->getNth())
Api::Messaging::EventMessagingServiceReqReceiver* requestReceiver = mail->getRequestReceiver();
if ( mail && requestReceiver )
{
Api::Messaging::EventMessagingServicePtr event = mail->getMessagingServiceEvent();
Api::Messaging::EventMessagingServiceReqReceiver* requestReceiver = mail->getRequestReceiver();
if ( mail && requestReceiver )
{
Api::Messaging::EventMessagingServicePtr event = mail->getMessagingServiceEvent();
if (status == NOTI_DOWNLOAD_ATTACH_FINISH)
{
LogDebug(" Attachment Finish " );
if (status == NOTI_DOWNLOAD_ATTACH_FINISH)
{
LogDebug(" Attachment Finish " );
email_attachment_data_t* attachment_data = NULL;
int attachmentId = attachment->getAttachmentID();
LogDebug("Attachment ID = " << attachmentId);
email_attachment_data_t* attachment_data = NULL;
int attachmentId = attachment->getAttachmentID();
LogDebug("Attachment ID = " << attachmentId);
int err = email_get_attachment_data(attachmentId, &attachment_data);
if (err == EMAIL_ERROR_NONE) {
LogDebug("attachment Name : " << attachment_data->attachment_name);
int err = email_get_attachment_data(attachmentId, &attachment_data);
if (err == EMAIL_ERROR_NONE) {
LogDebug("attachment Name : " << attachment_data->attachment_name);
{
LogDebug("fail to email_get_attachment_data - err : " << err);
}
{
LogDebug("fail to email_get_attachment_data - err : " << err);
}
event->setExceptionCode( WrtDeviceApis::Commons::ExceptionCodes::UnknownException);
LogDebug(" Attachment Failed " );
}
requestReceiver->ManualAnswer(event);
event->setExceptionCode( WrtDeviceApis::Commons::ExceptionCodes::UnknownException);
LogDebug(" Attachment Failed " );
}
requestReceiver->ManualAnswer(event);
- m_SyncRequests.erase( handle );
-
- }
+ m_SyncRequests.erase( handle );
- else if ( status == NOTI_DOWNLOAD_ATTACH_START )
+ else if ( status == NOTI_DOWNLOAD_ATTACH_START )
{
LogDebug("DownLoading... attachment : size = " << syncNetworkStatus->getErrorCode());
return;
}
{
LogDebug("DownLoading... attachment : size = " << syncNetworkStatus->getErrorCode());
return;
}
- SyncRequestIterator it = m_SyncRequests.find(handle);
- if ( m_SyncRequests.end() != it)
- {
+ SyncRequestIterator it = m_SyncRequests.find(handle);
+ if ( m_SyncRequests.end() != it)
+ {
int syncType = it->second.syncType;
LogDebug(" Sync ... handle : " << handle << " status : " << status << " SyncType: " << syncType);
switch(syncType)
{
case MESSAGING_SERVICE_SYNC_TYPE_SYNC:
int syncType = it->second.syncType;
LogDebug(" Sync ... handle : " << handle << " status : " << status << " SyncType: " << syncType);
switch(syncType)
{
case MESSAGING_SERVICE_SYNC_TYPE_SYNC:
LogDebug(" Sync Account");
const Api::Messaging::IMessagingServicePtr& messagingService = it->second.messagingService;
Api::Messaging::EventMessagingServiceReqReceiver* requestReceiver = messagingService->getRequestReceiver();
LogDebug(" Sync Account");
const Api::Messaging::IMessagingServicePtr& messagingService = it->second.messagingService;
Api::Messaging::EventMessagingServiceReqReceiver* requestReceiver = messagingService->getRequestReceiver();
if ( messagingService && requestReceiver)
if ( messagingService && requestReceiver)
Api::Messaging::EventMessagingServicePtr event = messagingService->getMessagingServiceEvent();
if ( status == NOTI_DOWNLOAD_FINISH )
Api::Messaging::EventMessagingServicePtr event = messagingService->getMessagingServiceEvent();
if ( status == NOTI_DOWNLOAD_FINISH )
LogDebug("Sync Success");
LogDebug("Sync Success");
- requestReceiver->ManualAnswer(event);
- m_SyncRequests.erase( handle );
+ requestReceiver->ManualAnswer(event);
+ m_SyncRequests.erase( handle );
}
else if ( status == NOTI_DOWNLOAD_FAIL )
}
else if ( status == NOTI_DOWNLOAD_FAIL )
- event->setExceptionCode( WrtDeviceApis::Commons::ExceptionCodes::UnknownException );
+ event->setExceptionCode( WrtDeviceApis::Commons::ExceptionCodes::UnknownException );
requestReceiver->ManualAnswer(event);
m_SyncRequests.erase( handle );
requestReceiver->ManualAnswer(event);
m_SyncRequests.erase( handle );
}
else
{
ThrowMsg(WrtDeviceApis::Commons::PlatformException, "request Receiver is NULL. ");
}
}
else
{
ThrowMsg(WrtDeviceApis::Commons::PlatformException, "request Receiver is NULL. ");
}
break;
}
case MESSAGING_SERVICE_SYNC_TYPE_SYNC_FOLDER:
break;
}
case MESSAGING_SERVICE_SYNC_TYPE_SYNC_FOLDER:
LogDebug("Sync Folder");
const Api::Messaging::IMessagingServicePtr& messagingService = it->second.messagingService;
Api::Messaging::EventMessagingServiceReqReceiver* requestReceiver = messagingService->getRequestReceiver();
LogDebug("Sync Folder");
const Api::Messaging::IMessagingServicePtr& messagingService = it->second.messagingService;
Api::Messaging::EventMessagingServiceReqReceiver* requestReceiver = messagingService->getRequestReceiver();
if ( messagingService && requestReceiver)
if ( messagingService && requestReceiver)
Api::Messaging::EventMessagingServicePtr event = messagingService->getMessagingServiceEvent();
if ( status == NOTI_DOWNLOAD_FINISH )
Api::Messaging::EventMessagingServicePtr event = messagingService->getMessagingServiceEvent();
if ( status == NOTI_DOWNLOAD_FINISH )
LogDebug("Sync Success");
LogDebug("Sync Success");
- requestReceiver->ManualAnswer(event);
- m_SyncRequests.erase( handle );
+ requestReceiver->ManualAnswer(event);
+ m_SyncRequests.erase( handle );
}
else if ( status == NOTI_DOWNLOAD_FAIL )
}
else if ( status == NOTI_DOWNLOAD_FAIL )
- event->setExceptionCode( WrtDeviceApis::Commons::ExceptionCodes::UnknownException );
+ event->setExceptionCode( WrtDeviceApis::Commons::ExceptionCodes::UnknownException );
requestReceiver->ManualAnswer(event);
m_SyncRequests.erase( handle );
}
requestReceiver->ManualAnswer(event);
m_SyncRequests.erase( handle );
}
break;
}
case MESSAGING_SERVICE_SYNC_TYPE_DOWNLOAD_BODY:
break;
}
case MESSAGING_SERVICE_SYNC_TYPE_DOWNLOAD_BODY:
LogDebug(" DownLoad Body");
const Api::Messaging::IEmailPtr& mail = it->second.mail; // IEmailPtr
Api::Messaging::EventMessagingServiceReqReceiver* requestReceiver = mail->getRequestReceiver();
LogDebug(" DownLoad Body");
const Api::Messaging::IEmailPtr& mail = it->second.mail; // IEmailPtr
Api::Messaging::EventMessagingServiceReqReceiver* requestReceiver = mail->getRequestReceiver();
Api::Messaging::EventMessagingServicePtr event = mail->getMessagingServiceEvent();
if ( status == NOTI_DOWNLOAD_BODY_FINISH )
{
Api::Messaging::EventMessagingServicePtr event = mail->getMessagingServiceEvent();
if ( status == NOTI_DOWNLOAD_BODY_FINISH )
{
+ event->m_message->readAllData();
requestReceiver->ManualAnswer(event);
m_SyncRequests.erase( handle );
}
requestReceiver->ManualAnswer(event);
m_SyncRequests.erase( handle );
}
event->setExceptionCode( WrtDeviceApis::Commons::ExceptionCodes::UnknownException);
requestReceiver->ManualAnswer(event);
m_SyncRequests.erase( handle );
event->setExceptionCode( WrtDeviceApis::Commons::ExceptionCodes::UnknownException);
requestReceiver->ManualAnswer(event);
m_SyncRequests.erase( handle );
else
{
ThrowMsg(WrtDeviceApis::Commons::PlatformException, "request Receiver is NULL. ");
}
else
{
ThrowMsg(WrtDeviceApis::Commons::PlatformException, "request Receiver is NULL. ");
}
}
int MailSync::downloadBodyInternal( const Api::Messaging::IEmailPtr& mail, int account_id)
}
int MailSync::downloadBodyInternal( const Api::Messaging::IEmailPtr& mail, int account_id)
int mailId = mail->convertId(mail->getIdRef());
unsigned email_handle = 0;
int mailId = mail->convertId(mail->getIdRef());
unsigned email_handle = 0;
-// email_mail_data_t* result = NULL;
+ email_mail_data_t* result = NULL;
-// error = email_get_mail_data(mailId, &result);
+ error = email_get_mail_data(mailId, &result);
if (EMAIL_ERROR_NONE != error) {
ThrowMsg(WrtDeviceApis::Commons::PlatformException,
"Couldn't find message " << mailId << ". [" << error << "]");
if (EMAIL_ERROR_NONE != error) {
ThrowMsg(WrtDeviceApis::Commons::PlatformException,
"Couldn't find message " << mailId << ". [" << error << "]");
{
LogDebug("Insert downloadAttachment request");
LogDebug("handle : " << email_handle);
{
LogDebug("Insert downloadAttachment request");
LogDebug("handle : " << email_handle);
- SyncRequestData data = SyncRequestData( email_handle,
+ SyncRequestData data = SyncRequestData( email_handle,
MESSAGING_SERVICE_SYNC_TYPE_DOWNLOAD_ATTACHMENT, mail, attachment );
MESSAGING_SERVICE_SYNC_TYPE_DOWNLOAD_ATTACHMENT, mail, attachment );
- m_SyncRequests.insert(std::make_pair(email_handle, data));
+ m_SyncRequests.insert(std::make_pair(email_handle, data));
-// if ( result )
-// if ( EMAIL_ERROR_NONE != email_free_mail_data( &result , 1) )
-// LogDebug("fail to email_free_mail_data - err ");
+ if ( result )
+ if ( EMAIL_ERROR_NONE != email_free_mail_data( &result , 1) )
+ LogDebug("fail to email_free_mail_data - err ");