Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

patch: check for user network interface before reading hostname#984

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
pennam merged 1 commit intoarduino:mainfrompennam:hostname-fix
Oct 29, 2024
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
From 4292f8b7c4aa38b68d22c413f91bdc95192cfad6 Mon Sep 17 00:00:00 2001
From: pennam <m.pennasilico@arduino.cc>
Date: Tue, 29 Oct 2024 11:30:00 +0100
Subject: [PATCH] Add user network interface check before reading hostname

---
connectivity/lwipstack/source/LWIPInterface.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/connectivity/lwipstack/source/LWIPInterface.cpp b/connectivity/lwipstack/source/LWIPInterface.cpp
index 64869a3538..da964543c7 100644
--- a/connectivity/lwipstack/source/LWIPInterface.cpp
+++ b/connectivity/lwipstack/source/LWIPInterface.cpp
@@ -446,9 +446,11 @@ nsapi_error_t LWIP::add_ethernet_interface(EMAC &emac, bool default_if, OnboardN
interface->memory_manager = &memory_manager;
interface->ppp_enabled = false;

- hostname = user_network_interface->get_hostname();
- if (hostname) {
- netif_set_hostname(&interface->netif, hostname);
+ if (user_network_interface) {
+ hostname = user_network_interface->get_hostname();
+ if (hostname) {
+ netif_set_hostname(&interface->netif, hostname);
+ }
}

#if (MBED_MAC_ADDRESS_SUM != MBED_MAC_ADDR_INTERFACE)
--
2.45.2


[8]ページ先頭

©2009-2025 Movatter.jp