MXS-1220: Limit /sessions/ to client sessions

The /sessions/ resource should only contain client sessions as the
information is about the sessions, not the connections themselves.
This commit is contained in:
Markus Mäkelä
2017-06-27 10:39:52 +03:00
parent 27d8212c51
commit 5fd690eb1f

View File

@ -1156,8 +1156,12 @@ struct SessionListData
bool seslist_cb(DCB* dcb, void* data) bool seslist_cb(DCB* dcb, void* data)
{ {
SessionListData* d = (SessionListData*)data; if (dcb->dcb_role == DCB_ROLE_CLIENT_HANDLER)
json_array_append_new(d->json, session_json_data(dcb->session, d->host)); {
SessionListData* d = (SessionListData*)data;
json_array_append_new(d->json, session_json_data(dcb->session, d->host));
}
return true; return true;
} }