diff options
author | jusung son <jusung07.son@samsung.com> | 2016-11-07 10:13:46 +0900 |
---|---|---|
committer | jusung son <jusung07.son@samsung.com> | 2016-11-07 10:13:46 +0900 |
commit | 0c406c420f694edb4d2b6000bbc97cc11f11198d (patch) | |
tree | 4f68d80e8562fa033f906d67867a596deb547b4e | |
parent | a332cb9382931276a85605442fd33b4d7ec3c2c5 (diff) | |
download | message-port-submit/tizen_3.0/20161107.015011.tar.gz message-port-submit/tizen_3.0/20161107.015011.tar.bz2 message-port-submit/tizen_3.0/20161107.015011.zip |
Adjust position of exception handlingsubmit/tizen_3.0_common/20161110.084657submit/tizen_3.0/20161107.015011submit/tizen/20161107.015116accepted/tizen/wearable/20161108.000731accepted/tizen/tv/20161108.000711accepted/tizen/mobile/20161108.000657accepted/tizen/ivi/20161108.000751accepted/tizen/common/20161107.072159accepted/tizen/3.0/wearable/20161110.015006accepted/tizen/3.0/tv/20161110.014951accepted/tizen/3.0/mobile/20161110.014932accepted/tizen/3.0/ivi/20161110.015027accepted/tizen/3.0/common/20161114.081054
Change-Id: I4d8a30e7235a5b530980dada2de149aff0c08d45
Signed-off-by: jusung son <jusung07.son@samsung.com>
-rwxr-xr-x | src/message-port.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/message-port.c b/src/message-port.c index 17c4943..523027a 100755 --- a/src/message-port.c +++ b/src/message-port.c @@ -1366,6 +1366,19 @@ int __message_port_send_async(int sockfd, bundle *kb, const char *local_port, unsigned int nb; bundle_raw *kb_data = NULL; + bundle_encode(kb, &kb_data, &data_len); + if (kb_data == NULL) { + _LOGE("bundle encode fail"); + ret = MESSAGEPORT_ERROR_IO_ERROR; + goto out; + } + + if (data_len > MAX_MESSAGE_SIZE) { + _LOGE("bigger than max size\n"); + ret = MESSAGEPORT_ERROR_MAX_EXCEEDED; + goto out; + } + if (local_port != NULL) local_port_len = strlen(local_port) + 1; @@ -1384,19 +1397,6 @@ int __message_port_send_async(int sockfd, bundle *kb, const char *local_port, return MESSAGEPORT_ERROR_IO_ERROR; } - bundle_encode(kb, &kb_data, &data_len); - if (kb_data == NULL) { - _LOGE("bundle encode fail"); - ret = MESSAGEPORT_ERROR_IO_ERROR; - goto out; - } - - if (data_len > MAX_MESSAGE_SIZE) { - _LOGE("bigger than max size\n"); - ret = MESSAGEPORT_ERROR_MAX_EXCEEDED; - goto out; - } - if (__write_string_to_socket(sockfd, (void *)kb_data, data_len) != MESSAGEPORT_ERROR_NONE) { _LOGE("write kb_data fail"); ret = MESSAGEPORT_ERROR_IO_ERROR; |