Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-client
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
cellframe
libdap-client
Commits
70b7f287
Commit
70b7f287
authored
5 years ago
by
dmitriy.gerasimov
Browse files
Options
Downloads
Patches
Plain Diff
[+] set active channels list
parent
b2a861ca
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dap_client.c
+14
-0
14 additions, 0 deletions
dap_client.c
dap_client.h
+1
-0
1 addition, 0 deletions
dap_client.h
dap_client_pvt.c
+7
-1
7 additions, 1 deletion
dap_client_pvt.c
dap_client_pvt.h
+1
-0
1 addition, 0 deletions
dap_client_pvt.h
with
23 additions
and
1 deletion
dap_client.c
+
14
−
0
View file @
70b7f287
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
#include
<unistd.h>
#include
<unistd.h>
#include
"dap_common.h"
#include
"dap_common.h"
#include
"dap_strfuncs.h"
#include
"dap_http_client.h"
#include
"dap_http_client.h"
#include
"dap_client.h"
#include
"dap_client.h"
#include
"dap_client_pvt.h"
#include
"dap_client_pvt.h"
...
@@ -109,6 +110,19 @@ const char* dap_client_get_uplink_addr(dap_client_t * a_client)
...
@@ -109,6 +110,19 @@ const char* dap_client_get_uplink_addr(dap_client_t * a_client)
return
DAP_CLIENT_PVT
(
a_client
)
->
uplink_addr
;
return
DAP_CLIENT_PVT
(
a_client
)
->
uplink_addr
;
}
}
/**
* @brief dap_client_set_active_channels
* @param a_client
* @param a_active_channels
*/
void
dap_client_set_active_channels
(
dap_client_t
*
a_client
,
const
char
*
a_active_channels
)
{
if
(
DAP_CLIENT_PVT
(
a_client
)
->
active_channels
)
DAP_DELETE
(
DAP_CLIENT_PVT
(
a_client
)
->
active_channels
);
DAP_CLIENT_PVT
(
a_client
)
->
active_channels
=
dap_strdup
(
a_active_channels
);
}
/**
/**
* @brief dap_client_get_uplink_port
* @brief dap_client_get_uplink_port
* @param a_client
* @param a_client
...
...
This diff is collapsed.
Click to expand it.
dap_client.h
+
1
−
0
View file @
70b7f287
...
@@ -128,6 +128,7 @@ const char * dap_client_get_auth_cookie(dap_client_t * a_client);
...
@@ -128,6 +128,7 @@ const char * dap_client_get_auth_cookie(dap_client_t * a_client);
dap_stream_t
*
dap_client_get_stream
(
dap_client_t
*
a_client
);
dap_stream_t
*
dap_client_get_stream
(
dap_client_t
*
a_client
);
dap_stream_ch_t
*
dap_client_get_stream_ch
(
dap_client_t
*
a_client
,
uint8_t
a_ch_id
);
dap_stream_ch_t
*
dap_client_get_stream_ch
(
dap_client_t
*
a_client
,
uint8_t
a_ch_id
);
const
char
*
dap_client_get_stream_id
(
dap_client_t
*
a_client
);
const
char
*
dap_client_get_stream_id
(
dap_client_t
*
a_client
);
void
dap_client_set_active_channels
(
dap_client_t
*
a_client
,
const
char
*
a_active_channels
);
dap_client_stage_t
dap_client_get_stage
(
dap_client_t
*
a_client
);
dap_client_stage_t
dap_client_get_stage
(
dap_client_t
*
a_client
);
dap_client_stage_status_t
dap_client_get_stage_status
(
dap_client_t
*
a_client
);
dap_client_stage_status_t
dap_client_get_stage_status
(
dap_client_t
*
a_client
);
...
...
This diff is collapsed.
Click to expand it.
dap_client_pvt.c
+
7
−
1
View file @
70b7f287
...
@@ -114,6 +114,8 @@ void dap_client_pvt_delete(dap_client_pvt_t * a_client_pvt)
...
@@ -114,6 +114,8 @@ void dap_client_pvt_delete(dap_client_pvt_t * a_client_pvt)
{
{
if
(
a_client_pvt
->
session_key_id
)
if
(
a_client_pvt
->
session_key_id
)
DAP_DELETE
(
a_client_pvt
->
session_key_id
);
DAP_DELETE
(
a_client_pvt
->
session_key_id
);
if
(
a_client_pvt
->
active_channels
)
DAP_DELETE
(
a_client_pvt
->
active_channels
);
if
(
a_client_pvt
->
session_key
)
if
(
a_client_pvt
->
session_key
)
dap_enc_key_delete
(
a_client_pvt
->
session_key
);
dap_enc_key_delete
(
a_client_pvt
->
session_key
);
if
(
a_client_pvt
->
session_key_open
)
if
(
a_client_pvt
->
session_key_open
)
...
@@ -247,7 +249,11 @@ static void s_stage_status_after(dap_client_pvt_t * a_client_pvt)
...
@@ -247,7 +249,11 @@ static void s_stage_status_after(dap_client_pvt_t * a_client_pvt)
break
;
break
;
case
STAGE_STREAM_CONNECTED
:
{
case
STAGE_STREAM_CONNECTED
:
{
log_it
(
L_INFO
,
"Go to stage STAGE_STREAM_CONNECTED"
);
log_it
(
L_INFO
,
"Go to stage STAGE_STREAM_CONNECTED"
);
dap_stream_ch_new
(
a_client_pvt
->
stream
,
'N'
);
size_t
count_channels
=
strlen
(
a_client_pvt
->
active_channels
)
;
for
(
size_t
i
=
0
;
i
<
count_channels
;
i
++
)
{
dap_stream_ch_new
(
a_client_pvt
->
stream
,(
uint8_t
)
a_client_pvt
->
active_channels
[
i
]);
//sid->channel[i]->ready_to_write = true;
}
char
*
l_full_path
=
NULL
;
char
*
l_full_path
=
NULL
;
const
char
*
l_path
=
"stream"
;
const
char
*
l_path
=
"stream"
;
...
...
This diff is collapsed.
Click to expand it.
dap_client_pvt.h
+
1
−
0
View file @
70b7f287
...
@@ -54,6 +54,7 @@ typedef struct dap_client_internal
...
@@ -54,6 +54,7 @@ typedef struct dap_client_internal
char
*
last_parsed_node
;
char
*
last_parsed_node
;
char
*
uplink_addr
;
char
*
uplink_addr
;
char
*
active_channels
;
uint16_t
uplink_port
;
uint16_t
uplink_port
;
uint32_t
uplink_protocol_version
;
uint32_t
uplink_protocol_version
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment