Skip to content

Commit

Permalink
Fix a compile error when smoltcp can return more than 1 DNS result (e…
Browse files Browse the repository at this point in the history
…sp-rs#442)

Update the WifiStack::dns_query() return type to match the type returned
by smoltcp, rather than assuming the result size is always 1.
  • Loading branch information
simpkins authored and bjoernQ committed May 24, 2024
1 parent a6d7a90 commit 2891309
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion esp-wifi/src/wifi_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ impl<'a, MODE: WifiDeviceMode> WifiStack<'a, MODE> {
&self,
name: &str,
query_type: DnsQueryType,
) -> Result<heapless::Vec<IpAddress, 1>, WifiStackError> {
) -> Result<heapless::Vec<IpAddress, { smoltcp::config::DNS_MAX_RESULT_COUNT }>, WifiStackError>
{
use smoltcp::socket::dns;

match query_type {
Expand Down

0 comments on commit 2891309

Please sign in to comment.