Skip to content

Commit

Permalink
Merge pull request #55 from glts/fix-miltertest-data
Browse files Browse the repository at this point in the history
miltertest: Fix broken mt.data() function
  • Loading branch information
martinbogo authored Oct 16, 2020
2 parents cb5f3bc + 6611185 commit 266fcb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions miltertest/miltertest.c
Original file line number Diff line number Diff line change
Expand Up @@ -2566,7 +2566,7 @@ mt_data(lua_State *l)
ctx = (struct mt_context *) lua_touserdata(l, 1);
lua_pop(l, 1);

if (!mt_assert_state(ctx, STATE_DATA))
if (!mt_assert_state(ctx, STATE_ENVRCPT))
lua_error(l);

if (CHECK_MPOPTS(ctx, SMFIP_NODATA))
Expand Down Expand Up @@ -2663,7 +2663,7 @@ mt_header(lua_State *l)
#endif /* SMFIP_HDR_LEADSPC */
memcpy(bp, value, strlen(value) + 1);

if (!mt_assert_state(ctx, STATE_ENVRCPT))
if (!mt_assert_state(ctx, STATE_DATA))
lua_error(l);

if (CHECK_MPOPTS(ctx, SMFIP_NOHDRS))
Expand Down

0 comments on commit 266fcb9

Please sign in to comment.