#include "ctsvc_db_query.h"
#include "ctsvc_list.h"
#include "ctsvc_notification.h"
+#include "ctsvc_notify.h"
static int __ctsvc_db_image_get_default_image_id(int contact_id)
break;
case CTSVC_PROPERTY_IMAGE_PATH:
temp = ctsvc_stmt_get_text(stmt, i);
- free(image->path);
- image->path = SAFE_STRDUP(temp);
+ if (temp) {
+ char full_path[CTSVC_IMG_FULL_PATH_SIZE_MAX] = {0};
+ snprintf(full_path, sizeof(full_path), "%s/%s", CTSVC_CONTACT_IMG_FULL_LOCATION, temp);
+ free(image->path);
+ image->path = strdup(full_path);
+ }
break;
case CTSVC_PROPERTY_IMAGE_IS_DEFAULT:
image->is_default = ctsvc_stmt_get_int(stmt, i);