From 926eee8b15472ae025a29855854a5d5749fa3ea6 Mon Sep 17 00:00:00 2001 From: yuanjm Date: Fri, 26 Jul 2019 16:15:54 +0800 Subject: [PATCH] fix(smartconfig): fix AIRKISS callback data not have ip data value User can't get the remote ip address in struct sc_callback_data when SC_STATUS_LINK_OVER event comes --- components/smartconfig_ack/smartconfig_ack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/smartconfig_ack/smartconfig_ack.c b/components/smartconfig_ack/smartconfig_ack.c index 3a022556..4a18fda6 100644 --- a/components/smartconfig_ack/smartconfig_ack.c +++ b/components/smartconfig_ack/smartconfig_ack.c @@ -120,6 +120,7 @@ static void sc_ack_send_task(void *pvParameters) recvfrom(send_sock, &data, 1, 0, (struct sockaddr *)&from, &sockadd_len); if (from.sin_addr.s_addr != INADDR_ANY) { memcpy(remote_ip, &from.sin_addr, 4); + memcpy(sc_callback_data.ip, &from.sin_addr, sizeof(sc_callback_data.ip)); server_addr.sin_addr.s_addr = from.sin_addr.s_addr; } else { if (ack->cb) {