Skip to content

Commit

Permalink
dispatcher: ds_select_dst/domain - fast emty slot detection
Browse files Browse the repository at this point in the history
  • Loading branch information
ovidiusas committed Mar 4, 2014
1 parent 650a60b commit 7c171aa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/dispatcher/dispatcher.c
Expand Up @@ -493,8 +493,9 @@ static void destroy(void)
}while(0)

#define CHECK_INVALID_PARAM(param) do{ \
if ((param).s[(param).len-1]==',') { \
LM_ERR("invalid param [%.*s]\n", (param).len, (param).s); \
str_trim_spaces_lr(param); \
if ((param).s[0] == ',' || (param).s[(param).len-1]==',') { \
LM_ERR("Empty slot in param [%.*s]\n", (param).len, (param).s); \
return -1; \
} \
}while(0)
Expand Down

0 comments on commit 7c171aa

Please sign in to comment.