diff options
| author | David Sommerseth <dazo@users.sourceforge.net> | 2013-03-04 11:57:32 +0100 |
|---|---|---|
| committer | David Sommerseth <dazo@users.sourceforge.net> | 2013-03-04 11:57:32 +0100 |
| commit | e121092323ad2b3e0966da4f12b1636458715efb (patch) | |
| tree | 7aaa79dcc5c664d460afbb74a8f592ab488497c1 /database/sqlite/edb-sqlite.c | |
| parent | 5da59efc978fce7b4da71dc967a22647721f78af (diff) | |
| download | eurephia-e121092323ad2b3e0966da4f12b1636458715efb.tar.gz eurephia-e121092323ad2b3e0966da4f12b1636458715efb.tar.xz eurephia-e121092323ad2b3e0966da4f12b1636458715efb.zip | |
sqlite: Modified eDBget_plugins() to support the new interface for plug-in init
This is needed to provide config data to a configured plug-in when it is loaded
and initialised.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'database/sqlite/edb-sqlite.c')
| -rw-r--r-- | database/sqlite/edb-sqlite.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/database/sqlite/edb-sqlite.c b/database/sqlite/edb-sqlite.c index d544a8c..b35d00d 100644 --- a/database/sqlite/edb-sqlite.c +++ b/database/sqlite/edb-sqlite.c @@ -1288,11 +1288,17 @@ eurephiaVALUES *eDBget_plugins(eurephiaCTX *ctx, const char *plgtype) { DEBUG(ctx, 20, "Function call eDBget_plugins(ctx, '%s')", plgtype); + /* Format of the plug-in information: [<dso-filename>]<config string> */ + res = sqlite_query(ctx, - "SELECT plgid, plgdsofile" + "SELECT plgid, " + "CASE WHEN plgconfig IS NULL" + " THEN '[' || plgdsofile || ']'" + " ELSE '[' || plgdsofile || ']' || plgconfig END" " FROM eurephia_plugins" " WHERE plgenabled = 't' " " AND plgtype = '%q'", plgtype); + if( sqlite_query_status(res) == dbSUCCESS ) { ret = eCreate_value_space(ctx, 21); for( i = 0; i < sqlite_get_numtuples(res); i++ ) { |
