summaryrefslogtreecommitdiff
path: root/lib/tcp.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2013-01-24 08:32:23 +0100
committerLinus Nordberg <linus@nordberg.se>2013-01-24 08:32:23 +0100
commitfc22159b81c6f9c0649e03ac5be4ccbb7f6520cc (patch)
tree570aee9c709bb493a05b490f3f8f57b85e149ed7 /lib/tcp.c
parentd41b3758b160530490e124d84c32c1721da8d66b (diff)
Rename rs_packet_flags members.
Uppercase to make them appear as the constants they are, as opposed to variables. Remove 'flag' suffix, typically used for variables. Spell out HEADER.
Diffstat (limited to 'lib/tcp.c')
-rw-r--r--lib/tcp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tcp.c b/lib/tcp.c
index 588d046..e2e9feb 100644
--- a/lib/tcp.c
+++ b/lib/tcp.c
@@ -34,7 +34,7 @@ _read_header (struct rs_packet *pkt)
n = bufferevent_read (pkt->conn->bev, pkt->hdr, RS_HEADER_LEN);
if (n == RS_HEADER_LEN)
{
- pkt->flags |= rs_packet_hdr_read_flag;
+ pkt->flags |= RS_PACKET_HEADER_READ;
pkt->rpkt->length = (pkt->hdr[2] << 8) + pkt->hdr[3];
if (pkt->rpkt->length < 20 || pkt->rpkt->length > RS_MAX_PACKET_LEN)
{
@@ -89,7 +89,7 @@ _read_packet (struct rs_packet *pkt)
{
bufferevent_disable (pkt->conn->bev, EV_READ);
rs_debug (("%s: complete packet read\n", __func__));
- pkt->flags &= ~rs_packet_hdr_read_flag;
+ pkt->flags &= ~RS_PACKET_HEADER_READ;
memset (pkt->hdr, 0, sizeof(*pkt->hdr));
/* Checks done by rad_packet_ok:
@@ -155,7 +155,7 @@ tcp_read_cb (struct bufferevent *bev, void *user_data)
Room for improvement: Peek inside buffer (evbuffer_copyout()) to
avoid the extra copying. */
- if ((pkt->flags & rs_packet_hdr_read_flag) == 0)
+ if ((pkt->flags & RS_PACKET_HEADER_READ) == 0)
if (_read_header (pkt))
return; /* Error. */
_read_packet (pkt);