Skip to content

Commit

Permalink
dispatcher: init attrs value when param not given to rpc add
Browse files Browse the repository at this point in the history
- GH #2854
  • Loading branch information
miconda committed Sep 16, 2021
1 parent f2b133e commit 7894fb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/dispatcher/dispatcher.c
Expand Up @@ -1854,15 +1854,15 @@ static void dispatcher_rpc_add(rpc_t *rpc, void *ctx)
{
int group, flags, nparams;
str dest;
str attrs;
str attrs = STR_NULL;

flags = 0;

nparams = rpc->scan(ctx, "dS*dS", &group, &dest, &flags, &attrs);
if(nparams < 2) {
rpc->fault(ctx, 500, "Invalid Parameters");
return;
} else if (nparams < 3) {
} else if (nparams <= 3) {
attrs.s = 0;
attrs.len = 0;
}
Expand Down

0 comments on commit 7894fb4

Please sign in to comment.