summaryrefslogtreecommitdiff
path: root/src/libwaitress
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2011-12-24 17:27:39 +0100
committerLars-Dominik Braun <lars@6xq.net>2011-12-24 17:27:39 +0100
commita33f98d90779740c49987bd825ceb560c0ffb1f5 (patch)
tree16fdeee33c82ba1d82446953b77bb14d803a1e93 /src/libwaitress
parent357153c25547d0e797bbb3d1390a947c4268273e (diff)
downloadpianobar-a33f98d90779740c49987bd825ceb560c0ffb1f5.tar.gz
pianobar-a33f98d90779740c49987bd825ceb560c0ffb1f5.tar.bz2
pianobar-a33f98d90779740c49987bd825ceb560c0ffb1f5.zip
Avoid struct padding where possible
Pointed out by -Wpadding. Does not decrease memory usage/binary size though.
Diffstat (limited to 'src/libwaitress')
-rw-r--r--src/libwaitress/waitress.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/libwaitress/waitress.h b/src/libwaitress/waitress.h
index b988591..f91985d 100644
--- a/src/libwaitress/waitress.h
+++ b/src/libwaitress/waitress.h
@@ -83,30 +83,37 @@ typedef enum {
/* reusable handle
*/
typedef struct {
- WaitressUrl_t url;
+ int timeout;
WaitressMethod_t method;
+
const char *extraHeaders;
const char *postData;
- WaitressUrl_t proxy;
/* extra data handed over to callback function */
void *data;
WaitressCbReturn_t (*callback) (void *, size_t, void *);
- int timeout;
const char *tlsFingerprint;
+
+ WaitressUrl_t url;
+ WaitressUrl_t proxy;
+
gnutls_certificate_credentials_t tlsCred;
/* per-request data */
struct {
- size_t contentLength, contentReceived, chunkSize;
int sockfd;
+
+ /* temporary return value storage */
+ WaitressReturn_t readWriteRet;
+
+ size_t contentLength, contentReceived, chunkSize;
+
char *buf;
- gnutls_session_t tlsSession;
/* first argument is WaitressHandle_t, but that's not defined yet */
WaitressHandlerReturn_t (*dataHandler) (void *, char *, const size_t);
WaitressReturn_t (*read) (void *, char *, const size_t, size_t *);
WaitressReturn_t (*write) (void *, const char *, const size_t);
- /* temporary return value storage */
- WaitressReturn_t readWriteRet;
+
+ gnutls_session_t tlsSession;
} request;
} WaitressHandle_t;