mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-11 16:25:38 +00:00
Warnings in OpenBK7231T_App fixed. (#1098)
* Warnings in AppT fixed. * Remove ota include file added by mistake in drv_sm2235.
This commit is contained in:
@ -754,6 +754,7 @@ int http_obk_json_dps(int id, void* request, jsonCb_t printer);
|
||||
|
||||
int JSON_ProcessCommandReply(const char* cmd, const char* arg, void* request, jsonCb_t printer, int flags) {
|
||||
int i;
|
||||
long int* pAllGenericFlags = (long int*)&g_cfg.genericFlags;
|
||||
|
||||
if (!wal_strnicmp(cmd, "POWER", 5)) {
|
||||
|
||||
@ -1029,7 +1030,7 @@ int JSON_ProcessCommandReply(const char* cmd, const char* arg, void* request, js
|
||||
}
|
||||
else if (!wal_strnicmp(cmd, "Flags", 5)) {
|
||||
printer(request, "{");
|
||||
printer(request, "\"Flags\":\"%ld\"", *((long int*)&g_cfg.genericFlags));
|
||||
printer(request, "\"Flags\":\"%ld\"", *pAllGenericFlags);
|
||||
printer(request, "}");
|
||||
}
|
||||
else if (!wal_strnicmp(cmd, "Ch", 2)) {
|
||||
|
||||
@ -862,12 +862,14 @@ static int http_rest_post_logconfig(http_request_t* request) {
|
||||
|
||||
static int http_rest_get_info(http_request_t* request) {
|
||||
char macstr[3 * 6 + 1];
|
||||
long int* pAllGenericFlags = (long int*)&g_cfg.genericFlags;
|
||||
|
||||
http_setup(request, httpMimeTypeJson);
|
||||
hprintf255(request, "{\"uptime_s\":%d,", g_secondsElapsed);
|
||||
hprintf255(request, "\"build\":\"%s\",", g_build_str);
|
||||
hprintf255(request, "\"ip\":\"%s\",", HAL_GetMyIPString());
|
||||
hprintf255(request, "\"mac\":\"%s\",", HAL_GetMACStr(macstr));
|
||||
hprintf255(request, "\"flags\":\"%ld\",", *((long int*)&g_cfg.genericFlags));
|
||||
hprintf255(request, "\"flags\":\"%ld\",", *pAllGenericFlags);
|
||||
hprintf255(request, "\"mqtthost\":\"%s:%d\",", CFG_GetMQTTHost(), CFG_GetMQTTPort());
|
||||
hprintf255(request, "\"mqtttopic\":\"%s\",", CFG_GetMQTTClientId());
|
||||
hprintf255(request, "\"chipset\":\"%s\",", PLATFORM_MCU_NAME);
|
||||
|
||||
Reference in New Issue
Block a user