diff options
author | yunju06lee <yunju06.lee@samsung.com> | 2013-04-23 14:38:41 +0900 |
---|---|---|
committer | yunju06lee <yunju06.lee@samsung.com> | 2013-04-23 14:38:41 +0900 |
commit | 359e8479f41d09d5ecfb311a01a2e58be4345aa4 (patch) | |
tree | 52d7a104e06e75bdd32bc87538eb9bf55145fde2 /lib/common/ph-common.c | |
parent | 5217346640ac68b46c829d5a89c7b417bfe33e50 (diff) | |
download | phone-contacts-359e8479f41d09d5ecfb311a01a2e58be4345aa4.tar.gz phone-contacts-359e8479f41d09d5ecfb311a01a2e58be4345aa4.tar.bz2 phone-contacts-359e8479f41d09d5ecfb311a01a2e58be4345aa4.zip |
apply tizen2.1 appcontrolsubmit/tizen_2.1/20130424.223508accepted/tizen_2.1/20130425.0227262.1b_release
Change-Id: Ib2fa3e9cb827298906abaf0521e9dd41a14502c7
Diffstat (limited to 'lib/common/ph-common.c')
-rwxr-xr-x | lib/common/ph-common.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/lib/common/ph-common.c b/lib/common/ph-common.c index fc5ba6c..21ba393 100755 --- a/lib/common/ph-common.c +++ b/lib/common/ph-common.c @@ -1029,7 +1029,7 @@ void phone_ug_return_id(ui_gadget_h ug, int ct_id, int num_id, int email_id) service_destroy(service); } -void phone_ug_return_value(service_h service, int person_id, int num_id, int email_id) +void phone_ug_return_value(service_h service, int person_id, int num_id, int email_id, int result_id) { service_h reply; char buf[16]; @@ -1055,6 +1055,8 @@ void phone_ug_return_value(service_h service, int person_id, int num_id, int ema free(result_array[0]); free(result_array); + + return; } if (num_id) { @@ -1082,6 +1084,8 @@ void phone_ug_return_value(service_h service, int person_id, int num_id, int ema free(result_array[0]); free(result_array); + + return; } if (email_id) { @@ -1109,6 +1113,21 @@ void phone_ug_return_value(service_h service, int person_id, int num_id, int ema free(result_array[0]); free(result_array); + + return; + } + + if (result_id) { + snprintf(buf, sizeof(buf), "%d", person_id); + PH_DBG("person id %s", buf); + + service_add_extra_data(reply, CT_OPERATION_ITEM_ID, buf); + + service_reply_to_launch_request(reply, service, SERVICE_RESULT_SUCCEEDED); + + service_destroy(reply); + + return; } } @@ -1116,21 +1135,16 @@ void phone_ug_return_value(service_h service, int person_id, int num_id, int ema void phone_ug_operation_return_vcard(service_h service, int ct_id, char *vcard) { service_h reply; - char **result_array = NULL; - result_array = calloc(1, sizeof(char *)); service_create(&reply); if (vcard) { - result_array[0] = vcard; - service_add_extra_data_array(reply, CT_OPERATION_PATH, (const char **)result_array, 1); + service_add_extra_data(reply, CT_OPERATION_PATH, vcard); } service_reply_to_launch_request(reply, service, SERVICE_RESULT_SUCCEEDED); service_destroy(reply); - - free(result_array); } void phone_ug_return_vcard(ui_gadget_h ug, int ct_id, char *vcard) |