X-Git-Url: http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=blobdiff_plain;f=tcp_conn.h;h=7ae829d7bfffe5648d31bd4d57cfaecdbf805b53;hp=f806dcbb4e80b825d8aec37bab8f49fe6b295afe;hb=0051630c26890169e9061c82f1ae56d38c479062;hpb=e2c4ed6b23b7180e9d255ecd7d7cea6867cb54b5 diff --git a/tcp_conn.h b/tcp_conn.h index f806dcbb4e..7ae829d7bf 100644 --- a/tcp_conn.h +++ b/tcp_conn.h @@ -114,13 +114,18 @@ struct tcp_req{ char* body; /* body position */ unsigned int b_size; /* buffer size-1 (extra space for 0-term)*/ int content_len; - int has_content_len; /* 1 if content_length was parsed ok*/ - int complete; /* 1 if one req has been fully read, 0 otherwise*/ + unsigned short flags; /* F_TCP_REQ_HAS_CLEN | F_TCP_REQ_COMPLETE */ int bytes_to_go; /* how many bytes we have still to read from the body*/ enum tcp_req_errors error; enum tcp_req_states state; }; +/* tcp_req flags */ +#define F_TCP_REQ_HAS_CLEN 1 +#define F_TCP_REQ_COMPLETE 2 + +#define TCP_REQ_HAS_CLEN(tr) ((tr)->flags & F_TCP_REQ_HAS_CLEN) +#define TCP_REQ_COMPLETE(tr) ((tr)->flags & F_TCP_REQ_COMPLETE) struct tcp_connection;