mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
Don't perform a realtime lookup with a NULL keyword
Previously, a call to ast_load_realtime_multientry could get away with passing a NULL parameter to the function, even though it really isn't supposed to do that. After the change over to using ast_variable instead of variadic arguments, the realtime engine gets unhappy if you do this. This was always an unintended function call in app_directory anyway - now, we just don't call into the realtime function calls if we don't have anything to query on. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -440,7 +440,7 @@ AST_THREADSTORAGE(commonbuf);
|
||||
static struct ast_config *realtime_directory(char *context)
|
||||
{
|
||||
struct ast_config *cfg;
|
||||
struct ast_config *rtdata;
|
||||
struct ast_config *rtdata = NULL;
|
||||
struct ast_category *cat;
|
||||
struct ast_variable *var;
|
||||
char *mailbox;
|
||||
@@ -475,7 +475,7 @@ static struct ast_config *realtime_directory(char *context)
|
||||
rtdata = ast_load_realtime_multientry("voicemail", "mailbox LIKE", "%", "context", "default", SENTINEL);
|
||||
context = "default";
|
||||
}
|
||||
} else {
|
||||
} else if (!ast_strlen_zero(context)) {
|
||||
rtdata = ast_load_realtime_multientry("voicemail", "mailbox LIKE", "%", "context", context, SENTINEL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user