Skip to content

Commit

Permalink
bindings/lua: allow f:recvmsg() to receive any message
Browse files Browse the repository at this point in the history
The `match` argument in f:recvmsg() restricts the function to only
receiving response messages. It would be nice to be able to receive
requests with this function for testing, so relax the default match
structure to FLUX_MATCH_ANY.
  • Loading branch information
grondo committed May 16, 2018
1 parent fdae063 commit 146f227
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/bindings/lua/flux-lua.c
Expand Up @@ -895,11 +895,7 @@ static int l_flux_recvmsg (lua_State *L)
flux_t *f = lua_get_flux (L, 1);
flux_msg_t *msg;
int type;
struct flux_match match = {
.typemask = FLUX_MSGTYPE_RESPONSE,
.matchtag = FLUX_MATCHTAG_NONE,
.topic_glob = NULL,
};
struct flux_match match = FLUX_MATCH_ANY;

if (lua_gettop (L) > 1)
match.matchtag = lua_tointeger (L, 2);
Expand Down

0 comments on commit 146f227

Please sign in to comment.