Skip to content
Snippets Groups Projects
Commit 9729b334 authored by Aleksandr Lysikov's avatar Aleksandr Lysikov
Browse files

added key field for authorisation of vpn-client

parent f6c1c2cd
No related branches found
No related tags found
No related merge requests found
......@@ -168,6 +168,9 @@ void stream_headers_read(dap_http_client_t * cl_ht, void * arg)
if(dap_stream_session_open(ss)==0){ // Create new stream
dap_stream_t * sid = stream_new(cl_ht);
sid->session=ss;
dap_http_header_t *header = dap_http_header_find(cl_ht->in_headers, "Service-Key");
if (header)
sid->service_key = strdup(header->value);
size_t count_channels = strlen(ss->active_channels);
for(size_t i = 0; i < count_channels; i++) {
dap_stream_ch_new(sid, ss->active_channels[i]);
......
......@@ -83,6 +83,8 @@ typedef struct dap_stream {
dap_stream_ch_t * channel[255]; // TODO reduce channels to 16 to economy memory
size_t channel_count;
char *service_key;
size_t frame_sent; // Frame counter
size_t seq_id;
......
......@@ -111,6 +111,7 @@ void stream_ctl_proc(struct dap_http_simple *cl_st, void * arg)
l_new_session = true;
}
else if(strcmp(dg->url_path, "socket_forward" ) == 0) {
l_channels_str[0] = '\0';
l_new_session = true;
}
/* }else if (strcmp(dg->url_path,"stream_ctl")==0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment