extras/wificfg: use #if when checking for configUSE_TRACE_FACILITY
FreeRTOS/Source/include/FreeRTOSConfig.h makes sure configUSE_TRACE_FACILITY is always defined. But it's defined to 0 when TRACE_FACILITY is disabled. When #ifdef is used, the guarded blocks of code are always compiled and this results in link failure when TRACE_FACILITY is in fact not enabled.
This commit is contained in:
parent
58b9932ec3
commit
5f6ccbd1be
1 changed files with 2 additions and 2 deletions
|
@ -1540,7 +1540,7 @@ static int handle_wificfg_challenge_post(int s, wificfg_method method,
|
||||||
return wificfg_write_string(s, http_redirect_header);
|
return wificfg_write_string(s, http_redirect_header);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef configUSE_TRACE_FACILITY
|
#if configUSE_TRACE_FACILITY
|
||||||
static const char *http_tasks_content[] = {
|
static const char *http_tasks_content[] = {
|
||||||
#include "content/tasks.html"
|
#include "content/tasks.html"
|
||||||
};
|
};
|
||||||
|
@ -1638,7 +1638,7 @@ static const wificfg_dispatch wificfg_dispatch_list[] = {
|
||||||
{"/challenge.html", HTTP_METHOD_POST, handle_wificfg_challenge_post, false},
|
{"/challenge.html", HTTP_METHOD_POST, handle_wificfg_challenge_post, false},
|
||||||
{"/wificfg/restart.html", HTTP_METHOD_POST, handle_restart_post, true},
|
{"/wificfg/restart.html", HTTP_METHOD_POST, handle_restart_post, true},
|
||||||
{"/wificfg/erase.html", HTTP_METHOD_POST, handle_erase_post, true},
|
{"/wificfg/erase.html", HTTP_METHOD_POST, handle_erase_post, true},
|
||||||
#ifdef configUSE_TRACE_FACILITY
|
#if configUSE_TRACE_FACILITY
|
||||||
{"/tasks", HTTP_METHOD_GET, handle_tasks, false},
|
{"/tasks", HTTP_METHOD_GET, handle_tasks, false},
|
||||||
{"/tasks.html", HTTP_METHOD_GET, handle_tasks, false},
|
{"/tasks.html", HTTP_METHOD_GET, handle_tasks, false},
|
||||||
#endif /* configUSE_TRACE_FACILITY */
|
#endif /* configUSE_TRACE_FACILITY */
|
||||||
|
|
Loading…
Reference in a new issue