summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bc9f267)
raw | patch | inline | side by side (parent: bc9f267)
author | Sebastian Harl <sh@tokkee.org> | |
Mon, 6 Jan 2014 10:26:21 +0000 (11:26 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 6 Jan 2014 10:26:21 +0000 (11:26 +0100) |
This function executes the return value of sdb_fe_parse().
src/frontend/query.c | patch | blob | history | |
src/include/frontend/connection.h | patch | blob | history |
diff --git a/src/frontend/query.c b/src/frontend/query.c
index 675a002eaea897ece7dc4301c5fcd00f2660081a..ffec03aef40bc406a2619cc1972f9630dc5a8505 100644 (file)
--- a/src/frontend/query.c
+++ b/src/frontend/query.c
* public API
*/
+int
+sdb_fe_exec(sdb_conn_t *conn, sdb_conn_node_t *node)
+{
+ if (! node)
+ return -1;
+
+ switch (node->cmd) {
+ case CONNECTION_LIST:
+ return sdb_fe_list(conn);
+
+ default:
+ sdb_log(SDB_LOG_ERR, "frontend: Unknown command %i", node->cmd);
+ return -1;
+ }
+ return -1;
+} /* sdb_fe_exec */
+
int
sdb_fe_list(sdb_conn_t *conn)
{
index c4478fb327116774114f07ac0e21515b811ecef0..06f52435eeb76fe2e0a5a0d1d870e127ba946a9b 100644 (file)
/*
* sdb_fe_exec:
- * Execute the command identified by 'node'.
+ * Execute the command identified by 'node' on the specified connection.
*
* Returns:
* - 0 on success
* - a negative value else
*/
int
-sdb_fe_exec(sdb_conn_node_t *node);
+sdb_fe_exec(sdb_conn_t *conn, sdb_conn_node_t *node);
/*
* session handling