Skip to content

Commit

Permalink
w
Browse files Browse the repository at this point in the history
  • Loading branch information
openshwprojects committed Jan 7, 2025
1 parent 323e1f6 commit 9c6b502
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/cmnds/cmd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ static commandResult_t CMD_StartupCommand(const void* context, const char* cmd,
// so we know arguments count in Tokenizer. 'cmd' argument is
// only for warning display
if (Tokenizer_CheckArgsCountAndPrintWarning(cmd, 1)) {
ADDLOG_INFO(LOG_FEATURE_CMD, "Cmd is %s",g_cfg.initCommandLine);
return CMD_RES_NOT_ENOUGH_ARGUMENTS;
}
cmdToSet = Tokenizer_GetArg(0);
Expand Down
7 changes: 6 additions & 1 deletion src/httpserver/http_fns.c
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ int http_fn_cfg_mqtt(http_request_t* request) {
poststr(request, NULL);
return 0;
}

#if ENABLE_HTTP_IP
int http_fn_cfg_ip(http_request_t* request) {
char tmp[64];
int g_changes = 0;
Expand Down Expand Up @@ -1119,6 +1119,7 @@ int http_fn_cfg_ip(http_request_t* request) {
poststr(request, NULL);
return 0;
}
#endif

int http_fn_cfg_mqtt_set(http_request_t* request) {
char tmpA[128];
Expand Down Expand Up @@ -2154,6 +2155,7 @@ int http_fn_ha_discovery(http_request_t* request) {
return 0;
}

#if ENABLE_OLD_YAML_GENERATOR
void http_generate_singleColor_cfg(http_request_t* request, const char* clientId) {
hprintf255(request, " command_topic: \"cmnd/%s/led_enableAll\"\n", clientId);
hprintf255(request, " state_topic: \"%s/led_enableAll/get\"\n", clientId);
Expand Down Expand Up @@ -2186,6 +2188,7 @@ void hprintf_qos_payload(http_request_t* request, const char* clientId) {
hprintf255(request, " availability:\n");
hprintf255(request, " - topic: \"%s/connected\"\n", clientId);
}
#endif
int http_fn_ha_cfg(http_request_t* request) {
int relayCount;
int pwmCount;
Expand Down Expand Up @@ -2432,7 +2435,9 @@ int http_fn_cfg(http_request_t* request) {
postFormAction(request, "cfg_dgr", "Configure Device Groups");
#endif
postFormAction(request, "cfg_wifi", "Configure WiFi & Web");
#if ENABLE_HTTP_IP
postFormAction(request, "cfg_ip", "Configure IP");
#endif
postFormAction(request, "cfg_mqtt", "Configure MQTT");
#if ENABLE_HTTP_NAMES
postFormAction(request, "cfg_name", "Configure Names");
Expand Down
4 changes: 3 additions & 1 deletion src/httpserver/new_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,8 +766,10 @@ int HTTP_ProcessPacket(http_request_t* request) {
if (http_checkUrlBase(urlStr, "about")) return http_fn_about(request);

if (http_checkUrlBase(urlStr, "cfg_mqtt")) return http_fn_cfg_mqtt(request);
if (http_checkUrlBase(urlStr, "cfg_ip")) return http_fn_cfg_ip(request);
if (http_checkUrlBase(urlStr, "cfg_mqtt_set")) return http_fn_cfg_mqtt_set(request);
#if ENABLE_HTTP_IP
if (http_checkUrlBase(urlStr, "cfg_ip")) return http_fn_cfg_ip(request);
#endif

#if ENABLE_HTTP_WEBAPP
if (http_checkUrlBase(urlStr, "cfg_webapp")) return http_fn_cfg_webapp(request);
Expand Down

0 comments on commit 9c6b502

Please sign in to comment.