Skip to content

Commit 9876155

Browse files
author
spikelin
committed
fix coap bug
1 parent 41e7d21 commit 9876155

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sdk_src/protocol/coap/coap_client.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ int qcloud_iot_coap_init(CoAPClient *pClient, CoAPInitParams *pParams)
298298
qcloud_iot_utils_base64decode(sg_psk_str, sizeof( sg_psk_str ), &len, (unsigned char *)pParams->device_secret, src_len );
299299
pClient->network_stack.ssl_connect_params.psk = (char *)sg_psk_str;
300300
pClient->network_stack.ssl_connect_params.psk_length = len;
301-
pClient->network_stack.ssl_connect_params.ca_crt = iot_ca_get();
302-
pClient->network_stack.ssl_connect_params.ca_crt_len = strlen(pClient->network_stack.ssl_connect_params.ca_crt);
301+
pClient->network_stack.ssl_connect_params.ca_crt = NULL;
302+
pClient->network_stack.ssl_connect_params.ca_crt_len = 0;
303303
} else {
304304
Log_e("psk is empty!");
305305
IOT_FUNC_EXIT_RC(QCLOUD_ERR_INVAL);

sdk_src/protocol/coap/coap_client_message.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
extern "C" {
1818
#endif
1919

20-
#include <memory.h>
20+
#include <string.h>
2121

2222
#include "qcloud_iot_export.h"
2323
#include "qcloud_iot_import.h"

0 commit comments

Comments
 (0)