summaryrefslogtreecommitdiffstats
path: root/src/web/rtc/webrtc.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 12:08:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 12:08:18 +0000
commit5da14042f70711ea5cf66e034699730335462f66 (patch)
tree0f6354ccac934ed87a2d555f45be4c831cf92f4a /src/web/rtc/webrtc.c
parentReleasing debian version 1.44.3-2. (diff)
downloadnetdata-5da14042f70711ea5cf66e034699730335462f66.tar.xz
netdata-5da14042f70711ea5cf66e034699730335462f66.zip
Merging upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/web/rtc/webrtc.c (renamed from web/rtc/webrtc.c)12
1 files changed, 7 insertions, 5 deletions
diff --git a/web/rtc/webrtc.c b/src/web/rtc/webrtc.c
index 80fff7e94..027b168b3 100644
--- a/web/rtc/webrtc.c
+++ b/src/web/rtc/webrtc.c
@@ -248,7 +248,7 @@ static size_t webrtc_send_in_chunks(WEBRTC_DC *chan, const char *data, size_t si
message_size,
chunk,
total_chunks,
- web_content_type_to_string(content_type)
+ content_type_id2string(content_type)
);
internal_fatal((size_t)len != strlen(send_buffer), "WEBRTC compressed header line mismatch");
@@ -292,16 +292,18 @@ static void webrtc_execute_api_request(WEBRTC_DC *chan, const char *request, siz
w->statistics.received_bytes = size;
w->interrupt.callback = web_client_stop_callback;
w->interrupt.callback_data = chan;
+ web_client_set_conn_webrtc(w);
- w->acl = WEB_CLIENT_ACL_WEBRTC;
+ w->port_acl = HTTP_ACL_WEBRTC | HTTP_ACL_ALL_FEATURES;
+ w->acl = w->port_acl;
char *path = (char *)request;
if(strncmp(request, "POST ", 5) == 0) {
- w->mode = WEB_CLIENT_MODE_POST;
+ w->mode = HTTP_REQUEST_MODE_POST;
path += 10;
}
else if(strncmp(request, "GET ", 4) == 0) {
- w->mode = WEB_CLIENT_MODE_GET;
+ w->mode = HTTP_REQUEST_MODE_GET;
path += 4;
}
@@ -503,7 +505,7 @@ static void cleanupConnections() {
spinlock_unlock(&webrtc_base.unsafe.spinlock);
}
-static WEBRTC_CONN *webrtc_create_connection(void) {
+static WEBRTC_CONN * webrtc_create_connection(void) {
WEBRTC_CONN *conn = callocz(1, sizeof(WEBRTC_CONN));
spinlock_init(&conn->response.spinlock);