summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsung.goo.kim <sung.goo.kim@samsung.com>2015-12-23 20:15:58 +0900
committerYoungjae Shin <yj99.shin@samsung.com>2015-12-24 08:56:34 +0900
commit92f74ac69a9192d82a0c0dc0b8754bfd2658d24a (patch)
treebf0a14e8fe628c84d2d38026b3cca49e7491b8ec
parente60b3e76b687e48f7e621dfeeb191e68683fa139 (diff)
downloadiotcon-92f74ac69a9192d82a0c0dc0b8754bfd2658d24a.tar.gz
iotcon-92f74ac69a9192d82a0c0dc0b8754bfd2658d24a.tar.bz2
iotcon-92f74ac69a9192d82a0c0dc0b8754bfd2658d24a.zip
Change-Id: I5bfc055e6face56acb4f24a78be68fb752738778
-rw-r--r--daemon/icd-dbus.c2
-rw-r--r--daemon/icd-ioty-ocprocess.c1
-rw-r--r--daemon/icd-payload.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/daemon/icd-dbus.c b/daemon/icd-dbus.c
index 57b2a63..b16f619 100644
--- a/daemon/icd-dbus.c
+++ b/daemon/icd-dbus.c
@@ -92,7 +92,7 @@ int icd_dbus_client_list_get_resource_info(OCResourceHandle handle,
rsrc_handle = cur_hd->data;
if (rsrc_handle->handle == handle) {
- DBG("signal_number(%u) for resource handle(%u) found",
+ DBG("signal_number(%x) for resource handle(%p) found",
rsrc_handle->signal_number, handle);
*signal_number = rsrc_handle->signal_number;
*bus_name = ic_utils_strdup(client->bus_name);
diff --git a/daemon/icd-ioty-ocprocess.c b/daemon/icd-ioty-ocprocess.c
index 235bc1c..e992a3e 100644
--- a/daemon/icd-ioty-ocprocess.c
+++ b/daemon/icd-ioty-ocprocess.c
@@ -455,6 +455,7 @@ static int _worker_find_cb(void *context)
struct icd_find_context *ctx = context;
RETV_IF(NULL == ctx, IOTCON_ERROR_INVALID_PARAMETER);
+ RETV_IF(NULL == ctx->payload, IOTCON_ERROR_INVALID_PARAMETER);
for (i = 0; ctx->payload[i]; i++) {
value = g_variant_new("(vi)", ctx->payload[i], ctx->conn_type);
diff --git a/daemon/icd-payload.c b/daemon/icd-payload.c
index 003566e..8d8377f 100644
--- a/daemon/icd-payload.c
+++ b/daemon/icd-payload.c
@@ -64,7 +64,7 @@ GVariant** icd_payload_res_to_gvariant(OCPayload *payload, OCDevAddr *dev_addr)
res_count = OCDiscoveryPayloadGetResourceCount(discovered);
- value = calloc(res_count, sizeof(GVariant*));
+ value = calloc(res_count + 1, sizeof(GVariant*));
if (NULL == value) {
ERR("calloc() Fail(%d)", errno);
return NULL;