Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-server
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-server
Commits
40693154
Commit
40693154
authored
5 years ago
by
dmitriy.gerasimov
Browse files
Options
Downloads
Patches
Plain Diff
[*] Some renames and bugfix
parent
2cc113d3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
http_server/dap_http_simple.c
+15
-15
15 additions, 15 deletions
http_server/dap_http_simple.c
with
15 additions
and
15 deletions
http_server/dap_http_simple.c
+
15
−
15
View file @
40693154
...
...
@@ -111,8 +111,8 @@ static pthread_mutex_t mutex_on_queue_http_response = PTHREAD_MUTEX_INITIALIZER;
static
pthread_t
http_simple_loop_thread
;
static
bool
bSimpleLoopThreadQuitSignal
=
false
;
static
dap_http_simple_t
**
pR
equests
Buffer
=
NULL
;
static
uint32_t
ui32TotalR
equests
=
0
;
static
dap_http_simple_t
**
s_r
equests
=
NULL
;
static
uint32_t
s_r
equests
_count
=
0
;
// uint64_t s_TTL_session_key=3600;
...
...
@@ -120,14 +120,14 @@ static void _free_user_agents_list( void );
int
dap_http_simple_module_init
(
)
{
pR
equests
Buffer
=
(
dap_http_simple_t
*
)
malloc
(
sizeof
(
dap_http_simple_t
*
)
*
DAP_HTTP_SIMPLE_REQUEST_MAX
);
if
(
!
pR
equests
Buffer
)
{
s_r
equests
=
DAP_NEW_Z_SIZE
(
dap_http_simple_t
*
,
sizeof
(
dap_http_simple_t
*
)
*
DAP_HTTP_SIMPLE_REQUEST_MAX
);
if
(
!
s_r
equests
)
{
log_it
(
L_ERROR
,
"Out of memory"
);
return
-
1
;
}
ui32TotalR
equests
=
0
;
s_r
equests
_count
=
0
;
// http_simple_loop = ev_loop_new(0);
...
...
@@ -154,9 +154,9 @@ void dap_http_simple_module_deinit( void )
// ev_loop_destroy( http_simple_loop );
_free_user_agents_list
(
);
if
(
pR
equests
Buffer
)
{
free
(
pR
equests
Buffer
);
pR
equests
Buffer
=
NULL
;
if
(
s_r
equests
)
{
free
(
s_r
equests
);
s_r
equests
=
NULL
;
}
}
...
...
@@ -166,13 +166,13 @@ static void async_control_proc( void )
{
pthread_mutex_lock
(
&
mutex_on_queue_http_response
);
for
(
uint32_t
i
=
0
;
i
<
ui32TotalR
equests
;
++
i
)
{
for
(
uint32_t
i
=
0
;
i
<
s_r
equests
_count
;
++
i
)
{
dap_http_simple_proc
(
pR
equests
Buffer
[
i
]
);
free
(
pR
equests
Buffer
[
i
]
);
dap_http_simple_proc
(
s_r
equests
[
i
]
);
free
(
s_r
equests
[
i
]
);
}
ui32TotalR
equests
=
0
;
s_r
equests
_count
=
0
;
// tailq_entry_t *item;
...
...
@@ -564,16 +564,16 @@ inline void queue_http_request_put( dap_http_simple_t *cl_sh )
// item->cl_sh = cl_sh;
// TAILQ_INSERT_TAIL(&tailq_head, item, entries);
if
(
ui32TotalR
equests
>=
DAP_HTTP_SIMPLE_REQUEST_MAX
)
{
if
(
s_r
equests
_count
>=
DAP_HTTP_SIMPLE_REQUEST_MAX
)
{
log_it
(
L_NOTICE
,
"Requests Buffer is FULL( %u ) ignore request"
);
pthread_mutex_unlock
(
&
mutex_on_queue_http_response
);
return
;
}
log_it
(
L_WARNING
,
"queue_http_request_put >>> %u"
,
ui32TotalR
equests
);
log_it
(
L_WARNING
,
"queue_http_request_put >>> %u"
,
s_r
equests
_count
);
pR
equests
Buffer
[
ui32TotalR
equests
++
]
=
cl_sh
;
s_r
equests
[
s_r
equests
_count
++
]
=
cl_sh
;
pthread_mutex_unlock
(
&
mutex_on_queue_http_response
);
...
...
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