mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-13 21:48:25 +08:00
send_http(status)
This commit is contained in:
@@ -77,6 +77,7 @@ static int http_get_tc1_status(httpd_request_t *req)
|
|||||||
send_http(tc1_status, strlen(tc1_status), exit, &err);
|
send_http(tc1_status, strlen(tc1_status), exit, &err);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
if (tc1_status) free(tc1_status);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,15 +103,8 @@ exit:
|
|||||||
static int http_get_wifi_config(httpd_request_t *req)
|
static int http_get_wifi_config(httpd_request_t *req)
|
||||||
{
|
{
|
||||||
OSStatus err = kNoErr;
|
OSStatus err = kNoErr;
|
||||||
|
|
||||||
const unsigned char* status = get_socket_status();
|
const unsigned char* status = get_socket_status();
|
||||||
|
send_http(status, strlen(status), exit, &err);
|
||||||
err = httpd_send_all_header(req, HTTP_RES_200, strlen(socket_status), HTTP_CONTENT_HTML_STR);
|
|
||||||
require_noerr_action(err, exit, app_httpd_log("ERROR: Unable to send http socket_status headers."));
|
|
||||||
|
|
||||||
err = httpd_send_body(req->sock, status, strlen(socket_status));
|
|
||||||
require_noerr_action(err, exit, app_httpd_log("ERROR: Unable to send http socket_status body."));
|
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user