summaryrefslogtreecommitdiff
path: root/lib/details/ct-detail-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/details/ct-detail-main.c')
-rwxr-xr-xlib/details/ct-detail-main.c66
1 files changed, 35 insertions, 31 deletions
diff --git a/lib/details/ct-detail-main.c b/lib/details/ct-detail-main.c
index d91ea66..9d05c66 100755
--- a/lib/details/ct-detail-main.c
+++ b/lib/details/ct-detail-main.c
@@ -123,7 +123,6 @@ static int __detail_parse_bundle_by_operation(service_h service, char* operation
free(val);
return -1;
}
-
free(val);
val = NULL;
@@ -160,8 +159,8 @@ static int __detail_parse_bundle_by_operation(service_h service, char* operation
return -1;
}
- service_get_extra_data(service, CT_OPERATION_PHONE, &val);
- if(val)
+ service_get_extra_data(service, CT_OPERATION_PHONE, &val1);
+ if(val1)
{
if (NULL == cdetail_d->contact) {
err = contacts_record_create(_contacts_contact._uri, &(cdetail_d->contact));
@@ -171,13 +170,14 @@ static int __detail_parse_bundle_by_operation(service_h service, char* operation
}
}
- __detail_set_contact_data(cdetail_d->contact, CT_OPERATION_PHONE, val);
+ __detail_set_contact_data(cdetail_d->contact, CT_OPERATION_PHONE, val1);
- free(val);
- val = NULL;
+ free(val1);
+ val1 = NULL;
}
- service_get_extra_data(service, CT_OPERATION_EMAIL, &val);
- if(val)
+
+ service_get_extra_data(service, CT_OPERATION_EMAIL, &val1);
+ if(val1)
{
if (NULL == cdetail_d->contact) {
err = contacts_record_create(_contacts_contact._uri, &(cdetail_d->contact));
@@ -187,13 +187,14 @@ static int __detail_parse_bundle_by_operation(service_h service, char* operation
}
}
- __detail_set_contact_data(cdetail_d->contact, CT_OPERATION_EMAIL, val);
+ __detail_set_contact_data(cdetail_d->contact, CT_OPERATION_EMAIL, val1);
- free(val);
- val = NULL;
+ free(val1);
+ val1 = NULL;
}
- service_get_extra_data(service, CT_OPERATION_URL, &val);
- if(val)
+
+ service_get_extra_data(service, CT_OPERATION_URL, &val1);
+ if(val1)
{
if (NULL == cdetail_d->contact) {
err = contacts_record_create(_contacts_contact._uri, &(cdetail_d->contact));
@@ -202,10 +203,10 @@ static int __detail_parse_bundle_by_operation(service_h service, char* operation
return -1;
}
}
- __detail_set_contact_data(cdetail_d->contact, CT_OPERATION_URL, val);
+ __detail_set_contact_data(cdetail_d->contact, CT_OPERATION_URL, val1);
- free(val);
- val = NULL;
+ free(val1);
+ val1 = NULL;
}
return CT_UG_REQUEST_ADD;
@@ -224,6 +225,7 @@ static int __detail_parse_bundle_by_operation(service_h service, char* operation
PH_DBG("person id %s", val1);
cdetail_d->person_id = atoi(val1);
free(val1);
+ val1 = NULL;
if (cdetail_d->person_id) { // From OSP
Eina_List *list_contact = ctui_person_get_writable_contact_list(cdetail_d->person_id);
@@ -246,29 +248,31 @@ static int __detail_parse_bundle_by_operation(service_h service, char* operation
return -1;
}
- service_get_extra_data(service, CT_OPERATION_PHONE, &val);
- if(val)
+ service_get_extra_data(service, CT_OPERATION_PHONE, &val1);
+ if(val1)
{
- __detail_set_contact_data(cdetail_d->contact, CT_OPERATION_PHONE, val);
+ __detail_set_contact_data(cdetail_d->contact, CT_OPERATION_PHONE, val1);
- free(val);
- val = NULL;
+ free(val1);
+ val1 = NULL;
}
- service_get_extra_data(service, CT_OPERATION_EMAIL, &val);
- if(val)
+
+ service_get_extra_data(service, CT_OPERATION_EMAIL, &val1);
+ if(val1)
{
- __detail_set_contact_data(cdetail_d->contact, CT_OPERATION_EMAIL, val);
+ __detail_set_contact_data(cdetail_d->contact, CT_OPERATION_EMAIL, val1);
- free(val);
- val = NULL;
+ free(val1);
+ val1 = NULL;
}
- service_get_extra_data(service, CT_OPERATION_URL, &val);
- if(val)
+
+ service_get_extra_data(service, CT_OPERATION_URL, &val1);
+ if(val1)
{
- __detail_set_contact_data(cdetail_d->contact, CT_OPERATION_URL, val);
+ __detail_set_contact_data(cdetail_d->contact, CT_OPERATION_URL, val1);
- free(val);
- val = NULL;
+ free(val1);
+ val1 = NULL;
}
return CT_UG_REQUEST_EDIT;
}