Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash fix and remove hard-coded path from PiWebServer #3478

Merged
merged 4 commits into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion arch/portduino/portduino.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; The Portduino based sim environment on top of any host OS, all hardware will be simulated
[portduino_base]
platform = https://github.com/meshtastic/platform-native.git#a28dd5a9ccd5c48a9bede46037855ff83915d74b
platform = https://github.com/meshtastic/platform-native.git#1b8a32c60ab7495026033858d53c737f7d1cb34a
framework = arduino

build_src_filter =
Expand Down
12 changes: 6 additions & 6 deletions src/mesh/raspihttp/PiWebServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ int handleAPIv1ToRadio(const struct _u_request *req, struct _u_response *res, vo

// FIXME* Problem with portdunio loosing mountpoint maybe because of running in a real sep. thread

portduinoVFS->mountpoint("/home/marc/.portduino/default");
portduinoVFS->mountpoint(configWeb.rootPath);

LOG_DEBUG("Received %d bytes from PUT request\n", s);
webAPI.handleToRadio(buffer, s);
Expand Down Expand Up @@ -279,17 +279,17 @@ int handleAPIv1FromRadio(const struct _u_request *req, struct _u_response *res,
const char *tmpa = (const char *)txBuf;
ulfius_set_string_body_response(res, 200, tmpa);
// LOG_DEBUG("\n----webAPI response all:----\n");
LOG_DEBUG(tmpa);
LOG_DEBUG("\n");
// LOG_DEBUG(tmpa);
// LOG_DEBUG("\n");
}
// Otherwise, just return one protobuf
} else {
len = webAPI.getFromRadio(txBuf);
const char *tmpa = (const char *)txBuf;
ulfius_set_binary_body_response(res, 200, tmpa, len);
// LOG_DEBUG("\n----webAPI response:\n");
LOG_DEBUG(tmpa);
LOG_DEBUG("\n");
// LOG_DEBUG(tmpa);
// LOG_DEBUG("\n");
}

// LOG_DEBUG("end radio->web\n", len);
Expand Down Expand Up @@ -508,7 +508,7 @@ PiWebServerThread::PiWebServerThread()
LOG_INFO("Web Server framework started on port: %i \n", webservport);
LOG_INFO("Web Server root %s\n", (char *)webrootpath.c_str());
} else {
LOG_ERROR("Error starting Web Server framework\n");
LOG_ERROR("Error starting Web Server framework, error number: %d\n", retssl);
}
}
}
Expand Down
Loading