Skip to content

Commit b434960

Browse files
tstennercboulay
authored andcommitted
Print invalid queries, accept empty queries
1 parent fa14ddf commit b434960

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/stream_info_impl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ bool stream_info_impl::matches_query(const string &query, bool nocache) {
180180
}
181181

182182
bool query_cache::matches_query(const xml_document &doc, const std::string query, bool nocache) {
183+
if(query == "") return true;
183184
std::lock_guard<std::mutex> lock(cache_mut_);
184185

185186
decltype(cache)::iterator it;
@@ -221,7 +222,7 @@ bool query_cache::matches_query(const xml_document &doc, const std::string query
221222
}
222223
return matched;
223224
} catch (std::exception &e) {
224-
LOG_F(WARNING, "Query error: %s", e.what());
225+
LOG_F(WARNING, "Query \"%s\" error: %s", query.c_str(), e.what());
225226
return false;
226227
}
227228
}

0 commit comments

Comments
 (0)