Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
Add flags accessor
Browse files Browse the repository at this point in the history
- just added a new function for fetching the currently set flags
  for the 3 main structures.
  • Loading branch information
NathanFrench committed May 26, 2017
1 parent 0abc96f commit e0f04aa
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion evhtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4508,7 +4508,7 @@ evhtp_request_get_bev(evhtp_request_t * request)
struct bufferevent *
evhtp_request_take_ownership(evhtp_request_t * request)
{
return evhtp_connection_take_ownership(evhtp_request_get_connection(request));
return evhtp_connection_take_ownership(request->conn);
}

void
Expand Down Expand Up @@ -4681,6 +4681,15 @@ evhtp_set_parser_flags(evhtp_t * htp, int flags)
evhtp ## NAME ## _disable_flag(TYPE v, int flag) \
{ \
HTP_FLAG_OFF(v, flag); \
} \
\
int \
evhtp ## NAME ## _get_flags(TYPE v) \
{ \
if (v) \
{ \
return v->flags; \
} \
}

HTP_FLAG_FNGEN(, evhtp_t *);
Expand Down

0 comments on commit e0f04aa

Please sign in to comment.