Skip to content

Commit ea9f29a

Browse files
authored
Merge pull request #823 from david-cermak/fix/eppp_without_pppos
[eppp]: Fix NETIF_PPP_STATUS link issue if PPP disabled in lwip
2 parents a74b01e + 217e6d9 commit ea9f29a

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

components/eppp_link/.cz.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ commitizen:
33
bump_message: 'bump(eppp): $current_version -> $new_version'
44
pre_bump_hooks: python ../../ci/changelog.py eppp_link
55
tag_format: eppp-v$version
6-
version: 0.3.0
6+
version: 0.3.1
77
version_files:
88
- idf_component.yml

components/eppp_link/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [0.3.1](https://github.com/espressif/esp-protocols/commits/eppp-v0.3.1)
4+
5+
### Bug Fixes
6+
7+
- Fix NETIF_PPP_STATUS link issue if PPP disabled in lwip ([077ea0bb](https://github.com/espressif/esp-protocols/commit/077ea0bb))
8+
39
## [0.3.0](https://github.com/espressif/esp-protocols/commits/eppp-v0.3.0)
410

511
### Features

components/eppp_link/eppp_link.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ static int get_netif_num(esp_netif_t *netif)
163163
return netif_cnt;
164164
}
165165

166+
#ifdef CONFIG_EPPP_LINK_USES_PPP
166167
static void on_ppp_event(void *arg, esp_event_base_t base, int32_t event_id, void *data)
167168
{
168169
esp_netif_t **netif = data;
@@ -172,6 +173,7 @@ static void on_ppp_event(void *arg, esp_event_base_t base, int32_t event_id, voi
172173
h->netif_stop = true;
173174
}
174175
}
176+
#endif // CONFIG_EPPP_LINK_USES_PPP
175177

176178
static void on_ip_event(void *arg, esp_event_base_t base, int32_t event_id, void *data)
177179
{
@@ -222,7 +224,9 @@ static void remove_handlers(void)
222224
vEventGroupDelete(s_event_group);
223225
s_event_group = NULL;
224226
esp_event_handler_unregister(IP_EVENT, ESP_EVENT_ANY_ID, on_ip_event);
227+
#ifdef CONFIG_EPPP_LINK_USES_PPP
225228
esp_event_handler_unregister(NETIF_PPP_STATUS, ESP_EVENT_ANY_ID, on_ppp_event);
229+
#endif
226230
}
227231
}
228232

@@ -296,11 +300,13 @@ esp_netif_t *eppp_open(eppp_type_t role, eppp_config_t *config, int connect_time
296300
remove_handlers();
297301
return NULL;
298302
}
303+
#ifdef CONFIG_EPPP_LINK_USES_PPP
299304
if (esp_event_handler_register(NETIF_PPP_STATUS, ESP_EVENT_ANY_ID, on_ppp_event, NULL) != ESP_OK) {
300305
ESP_LOGE(TAG, "Failed to register PPP status handler");
301306
remove_handlers();
302307
return NULL;
303308
}
309+
#endif // CONFIG_EPPP_LINK_USES_PPP
304310
}
305311
esp_netif_t *netif = eppp_init(role, config);
306312
if (!netif) {

components/eppp_link/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 0.3.0
1+
version: 0.3.1
22
url: https://github.com/espressif/esp-protocols/tree/master/components/eppp_link
33
description: The component provides a general purpose PPP connectivity, typically used as WiFi-PPP router
44
dependencies:

0 commit comments

Comments
 (0)