Skip to content

Commit

Permalink
feat(lwip): Added multiple dns ip support
Browse files Browse the repository at this point in the history
  • Loading branch information
espressif-abhikroy committed May 14, 2024
1 parent a1bd9e4 commit f174681
Show file tree
Hide file tree
Showing 4 changed files with 274 additions and 145 deletions.
6 changes: 5 additions & 1 deletion src/api/api_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2198,6 +2198,7 @@ lwip_netconn_do_join_leave_group_netif(void *m)
static void
lwip_netconn_do_dns_found(const char *name, const ip_addr_t *ipaddr, void *arg)
{
u8_t i;
struct dns_api_msg *msg = (struct dns_api_msg *)arg;

/* we trust the internal implementation to be correct :-) */
Expand All @@ -2209,7 +2210,10 @@ lwip_netconn_do_dns_found(const char *name, const ip_addr_t *ipaddr, void *arg)
} else {
/* address was resolved */
API_EXPR_DEREF(msg->err) = ERR_OK;
API_EXPR_DEREF(msg->addr) = *ipaddr;

for (i=0; i<DNS_MAX_HOST_IP; i++) {
API_EXPR_DEREF(msg->addr+i) = *(ipaddr+i);
}
}
/* wake up the application task waiting in netconn_gethostbyname */
sys_sem_signal(API_EXPR_REF_SEM(msg->sem));
Expand Down
Loading

0 comments on commit f174681

Please sign in to comment.