summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 04f49a8)
raw | patch | inline | side by side (parent: 04f49a8)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 4 Nov 2014 07:34:28 +0000 (08:34 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Tue, 4 Nov 2014 07:34:28 +0000 (08:34 +0100) |
src/frontend/analyzer.c | patch | blob | history |
index 8c6b74de6a0ea74d177b5a43efe2e6eee32d299d..93debf5e4530d800a0ad2dc020c6256934f2c6fd 100644 (file)
--- a/src/frontend/analyzer.c
+++ b/src/frontend/analyzer.c
/* For now, this function checks basic matcher attributes only;
* later, this may be turned into one of multiple AST visitors. */
if (node->cmd == CONNECTION_FETCH) {
- if (CONN_FETCH(node)->filter)
- filter = CONN_FETCH(node)->filter->matcher;
- context = CONN_FETCH(node)->type;
+ conn_fetch_t *fetch = CONN_FETCH(node);
+ if (((fetch->type == SDB_HOST) && fetch->name)
+ || ((fetch->type != SDB_HOST) && (! fetch->name)))
+ return -1;
+ if (fetch->filter)
+ filter = fetch->filter->matcher;
+ context = fetch->type;
}
else if (node->cmd == CONNECTION_LIST) {
if (CONN_LIST(node)->filter)