Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
20f06162
Commit
20f06162
authored
Aug 28, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: return early on error in client_defer_output()
Exit the function when an error occurs, and move the rest of the following code one indent level left.
parent
7774cd27
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
client.c
src/client.c
+7
-5
No files found.
src/client.c
View file @
20f06162
...
@@ -722,7 +722,7 @@ int client_print(int fd, const char *buffer, size_t buflen)
...
@@ -722,7 +722,7 @@ int client_print(int fd, const char *buffer, size_t buflen)
static
void
client_defer_output
(
struct
client
*
client
,
static
void
client_defer_output
(
struct
client
*
client
,
const
void
*
data
,
size_t
length
)
const
void
*
data
,
size_t
length
)
{
{
struct
sllnode
*
buf
=
client
->
deferred_send
;
struct
sllnode
*
buf
;
assert
(
client
->
deferred_send
!=
NULL
);
assert
(
client
->
deferred_send
!=
NULL
);
...
@@ -735,11 +735,13 @@ static void client_defer_output(struct client *client,
...
@@ -735,11 +735,13 @@ static void client_defer_output(struct client *client,
(
unsigned
long
)
client_max_output_buffer_size
);
(
unsigned
long
)
client_max_output_buffer_size
);
/* cause client to close */
/* cause client to close */
client
->
expired
=
1
;
client
->
expired
=
1
;
}
else
{
return
;
while
(
buf
->
next
)
buf
=
buf
->
next
;
buf
->
next
=
new_sllnode
(
data
,
length
);
}
}
buf
=
client
->
deferred_send
;
while
(
buf
->
next
)
buf
=
buf
->
next
;
buf
->
next
=
new_sllnode
(
data
,
length
);
}
}
static
void
client_write_output
(
struct
client
*
client
)
static
void
client_write_output
(
struct
client
*
client
)
...
...
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