Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Icecast-Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
94
Issues
94
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
Icecast-Server
Commits
bde88f82
Commit
bde88f82
authored
Jun 18, 2018
by
Philipp Schafft
🦁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update: Added debug level logging for client slurping
parent
e9624ef5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
src/client.c
src/client.c
+13
-2
No files found.
src/client.c
View file @
bde88f82
...
...
@@ -578,14 +578,20 @@ client_slurp_result_t client_body_skip(client_t *client)
char
buf
[
2048
];
int
ret
;
if
(
!
client
)
ICECAST_LOG_DEBUG
(
"Slurping client %p"
);
if
(
!
client
)
{
ICECAST_LOG_DEBUG
(
"Slurping client %p ... failed"
);
return
CLIENT_SLURP_ERROR
;
}
if
(
client
->
request_body_length
!=
-
1
)
{
size_t
left
=
(
size_t
)
client
->
request_body_length
-
client
->
request_body_read
;
if
(
!
left
)
if
(
!
left
)
{
ICECAST_LOG_DEBUG
(
"Slurping client %p ... was a success"
);
return
CLIENT_SLURP_SUCCESS
;
}
if
(
left
>
sizeof
(
buf
))
left
=
sizeof
(
buf
);
...
...
@@ -593,8 +599,10 @@ client_slurp_result_t client_body_skip(client_t *client)
client_body_read
(
client
,
buf
,
left
);
if
(
client
->
request_body_length
==
client
->
request_body_read
)
{
ICECAST_LOG_DEBUG
(
"Slurping client %p ... was a success"
);
return
CLIENT_SLURP_SUCCESS
;
}
else
{
ICECAST_LOG_DEBUG
(
"Slurping client %p ... needs more data"
);
return
CLIENT_SLURP_NEEDS_MORE_DATA
;
}
}
else
{
...
...
@@ -604,12 +612,15 @@ client_slurp_result_t client_body_skip(client_t *client)
ret
=
client_body_eof
(
client
);
switch
(
ret
)
{
case
0
:
ICECAST_LOG_DEBUG
(
"Slurping client %p ... needs more data"
);
return
CLIENT_SLURP_NEEDS_MORE_DATA
;
break
;
case
1
:
ICECAST_LOG_DEBUG
(
"Slurping client %p ... was a success"
);
return
CLIENT_SLURP_SUCCESS
;
break
;
default:
ICECAST_LOG_DEBUG
(
"Slurping client %p ... failed"
);
return
CLIENT_SLURP_ERROR
;
break
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment