From: Marko Kreen Date: Fri, 7 Dec 2007 14:45:28 +0000 (+0000) Subject: reorder SBuf fields to get better alignment for buffer X-Git-Tag: pgbouncer_1_1_2~1 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=ad313fc6b83b8ffa71738c7d4fd0ab6808c0690a;p=pgbouncer.git reorder SBuf fields to get better alignment for buffer --- diff --git a/src/sbuf.h b/src/sbuf.h index 1d57b5b..68f23bb 100644 --- a/src/sbuf.h +++ b/src/sbuf.h @@ -42,16 +42,20 @@ struct SBuf { /* libevent handle */ struct event ev; + unsigned pkt_skip:1; /* if current packet should be skipped */ + unsigned is_unix:1; /* is it unix socket */ + unsigned wait_send:1; /* debug var, otherwise useless */ + /* protocol callback function */ sbuf_proto_cb_t proto_handler; void *arg; - /* fd for this socket */ - int sock; - /* dest SBuf for current packet */ SBuf *dst; + /* fd for this socket */ + int sock; + int recv_pos; int pkt_pos; int send_pos; @@ -59,10 +63,6 @@ struct SBuf { int pkt_remain; /* total packet length remaining */ int send_remain; /* total data to be sent remaining */ - unsigned pkt_skip:1; /* if current packet should be skipped */ - unsigned is_unix:1; /* is it unix socket */ - unsigned wait_send:1; /* debug var, otherwise useless */ - uint8 buf[0]; };