NULL_CHECK_RET(info);
http_msg = info->http_msg;
+ NULL_CHECK_RET(http_msg);
DA_LOGD("curl [%p]", http_msg->curl);
NULL_CHECK_RET(http_msg->curl);
DA_MUTEX_LOCK(&(http_msg->mutex));
int connect_retry = 3;
g_dp_client->channel = -1;
+ g_dp_client->notify = -1;
while (g_dp_client->channel < 0 && connect_retry-- > 0) {
int ret = __create_socket();
if (ret == -1) {
break;
}
// notification
- if (dp_notification_manager_push_notification((void *)&clients[slot_index], (void *)request, DP_NOTIFICATION_ONGOING) < 0)
+ if (request->noti_type != DP_NOTIFICATION_TYPE_COMPLETE_ONLY
+ && dp_notification_manager_push_notification((void *)&clients[slot_index], (void *)request, DP_NOTIFICATION_ONGOING) < 0)
TRACE_ERROR("failed to register notification for id:%d", request->id);
}
#else
pkgname = strdup(buffer);
#endif
- if ((pkg_len = strlen(pkgname)) <= 0) {
+ if (!pkgname || (pkg_len = strlen(pkgname)) <= 0) {
TRACE_ERROR("[CRITICAL] pkgname:%s", pkgname);
free(pkgname);
return DP_ERROR_INVALID_PARAMETER;
}
// feedback
if (dp_ipc_query(client->channel, ipc_info->id, DP_SEC_SET,
- ipc_info->property, errorcode, 0) < 0) {
+ ipc_info->property, errorcode, 0) < 0)
TRACE_ERROR("check ipc sock:%d", client->channel);
- }
return errorcode;
}