| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
client_defer_output() was designed to add new buffers to an existing
deferred_send buffer. Tweak it and allow it to create a new buffer
list.
|
|
|
|
|
| |
Exit the function when an error occurs, and move the rest of the
following code one indent level left.
|
|
|
|
|
| |
Split the large function client_write_output() into two parts; this is
the first code moving patch.
|
|
|
|
|
|
| |
All of the client's resources are freed in client_close(). It is
enough to set the "expired" flag, no need to duplicate lots of
destruction code again and again.
|
|
|
|
|
|
| |
Due to the large buffers in the client struct, the static client array
eats several megabytes of RAM with a maximum of only 10 clients. Stop
this waste and allocate each client struct from the heap.
|
|
|
|
|
| |
The code becomes less complex and more readable when we move this
linear search into a separate mini function.
|
|
|
|
| |
This saves one level of indent.
|
|
|
|
|
|
| |
Functions which operate on the whole client list are prefixed with
"client_manager_", and functions which handle just one client just get
"client_".
|
|
|
|
|
| |
Rename all static functions, variables and macros which have
"interface" in their name to something nicer prefixed with "client_".
|
|
|
|
|
|
|
| |
Second patch: rename the internal struct name. We will eventually
export this type as an opaque forward-declared struct later, so we
can pass a struct pointer instead of a file descriptor, which would
save us an expensive linear lookup.
|
|
I don't believe "interface" is a good name for something like
"connection by a client to MPD", let's call it "client". This is the
first patch in the series which changes the name, beginning with the
file name.
|