Commit 5f8bedfa authored by 尹佳钦's avatar 尹佳钦

添加 接收回复打印json信息

parent 799fe95b
......@@ -89,12 +89,12 @@ static int send_result_resp(cJSON * result,
int return_value = 0;
cJSON *result_root = rpc_cJSON_CreateObject();
if (result)
rpc_cJSON_AddItemToObject(result_root, "result", result);
rpc_cJSON_AddItemToObject(result_root, "id", id);
rpc_cJSON_AddItemToObject(result_root, "code", result);
rpc_cJSON_AddItemToObject(result_root, "msgId", id);
char * str_result = rpc_cJSON_Print(result_root);
printf("send json:\n%s\n",str_result);
return_value = kk_ipc_send(IPC_PLAT2MID, str_result, strlen(result_root)+1);
return_value = kk_ipc_send(IPC_PLAT2MID, str_result, strlen(str_result)+1);
free(str_result);
rpc_cJSON_Delete(result_root);
return return_value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment