profile/ivi/murphy.git
11 years agomainloop: epoll management overhaul, delayed destruction fixes.
Krisztian Litkey [Mon, 7 Jan 2013 09:44:38 +0000 (11:44 +0200)]
mainloop: epoll management overhaul, delayed destruction fixes.

Reworked main fdtable and epollfd manipulation to be more consistent
and clearer by separating them out to a set of epoll_* functions of
their own. Planted also quite a number of debug messages to the delete-
code paths.

Also fixed a few delayed destruction corner-case crashes. The code
now uses a dedicated hook for the pending deletion list instead of
reusing the main object hook (which cannot be done in some cases).
This turned the remaining type-specific delete_* functions practically
no-ops (they just unlinked the objects from their repective lists,
also done by the delayed purging code) so they were removed.

Probably we should make delayed destruction readiness more explicit
by putting the common deleted_t fields behind a macro.

11 years agoMerge branch 'master' of github.com:otcshare/policy-internal
Krisztian Litkey [Mon, 14 Jan 2013 15:28:08 +0000 (17:28 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal

11 years agocore: added getters for lua sink fields.
Ismo Puustinen [Mon, 14 Jan 2013 11:32:13 +0000 (13:32 +0200)]
core: added getters for lua sink fields.

11 years agolua-decision: added the sink access functions.
Ismo Puustinen [Fri, 11 Jan 2013 14:47:27 +0000 (16:47 +0200)]
lua-decision: added the sink access functions.

11 years agocommon: can use msg and transport functions from C++.
Ismo Puustinen [Fri, 11 Jan 2013 08:38:00 +0000 (10:38 +0200)]
common: can use msg and transport functions from C++.

11 years agolua-decision: add sink.lua
Janos Kovacs [Fri, 11 Jan 2013 12:27:43 +0000 (14:27 +0200)]
lua-decision: add sink.lua

11 years agolua-decision: add C access routines to mrp_lua_element_t
Janos Kovacs [Thu, 10 Jan 2013 23:04:07 +0000 (01:04 +0200)]
lua-decision: add C access routines to mrp_lua_element_t

11 years agolua-decision: add C access routines to mrp_lua_mdb_select_t
Janos Kovacs [Thu, 10 Jan 2013 23:02:24 +0000 (01:02 +0200)]
lua-decision: add C access routines to mrp_lua_mdb_select_t

11 years agocompilation: get rid of some unused variable warnings
Janos Kovacs [Thu, 10 Jan 2013 23:00:00 +0000 (01:00 +0200)]
compilation: get rid of some unused variable warnings

11 years agoconsole: minor typo fix in debug command help.
Krisztian Litkey [Wed, 9 Jan 2013 07:46:06 +0000 (09:46 +0200)]
console: minor typo fix in debug command help.

11 years agodaemon: omit plugin info from basic command-line help.
Krisztian Litkey [Tue, 8 Jan 2013 11:17:32 +0000 (13:17 +0200)]
daemon: omit plugin info from basic command-line help.

11 years agocommon/msg: handle any-type iterators in a valgrind-kosher way.
Krisztian Litkey [Mon, 7 Jan 2013 09:34:15 +0000 (11:34 +0200)]
common/msg: handle any-type iterators in a valgrind-kosher way.

11 years agocommon: make glib-glue work with C++.
Ismo Puustinen [Tue, 8 Jan 2013 08:31:38 +0000 (10:31 +0200)]
common: make glib-glue work with C++.

11 years agoMerge branch 'master' of github.com:otcshare/policy-internal
Krisztian Litkey [Mon, 7 Jan 2013 16:24:02 +0000 (18:24 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal

11 years agolua-bindings: added open_lualib() for on-demand loading of Lua libs.
Krisztian Litkey [Mon, 7 Jan 2013 16:09:29 +0000 (18:09 +0200)]
lua-bindings: added open_lualib() for on-demand loading of Lua libs.

Use open_lualib to load standard Lua libraries as needed. You can call
it with an argument list consisting of the names of the libraries you
want to load (IOW to luaopen_*()). Eg.
  murphy.get():open_lualib('math', 'string', 'io')
will try to luaopen_math(), luaopen_string(), and luaopen_io().
The available libraries are 'math', 'string', 'io', 'os', 'table',
'debug', 'package', and 'base'.

11 years agocommon: reference counting now plays nice with C++.
Ismo Puustinen [Mon, 7 Jan 2013 15:50:25 +0000 (17:50 +0200)]
common: reference counting now plays nice with C++.

11 years agolua-utils: fixing mrp_lua_to_object() to return NULL instead of panicing
Janos Kovacs [Sun, 6 Jan 2013 04:23:04 +0000 (06:23 +0200)]
lua-utils: fixing mrp_lua_to_object() to return NULL instead of panicing

11 years agoMerge branch 'master' of https://github.com/otcshare/policy-internal
Janos Kovacs [Sun, 6 Jan 2013 03:22:15 +0000 (05:22 +0200)]
Merge branch 'master' of https://github.com/otcshare/policy-internal

11 years agolua-utils: fix mrp_lua_to_object() to not leave garbage on the stack
Janos Kovacs [Sun, 6 Jan 2013 03:10:40 +0000 (05:10 +0200)]
lua-utils: fix mrp_lua_to_object() to not leave garbage on the stack

11 years agoMerge branch 'master' of github.com:otcshare/policy-internal
Krisztian Litkey [Fri, 4 Jan 2013 14:58:16 +0000 (16:58 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal

11 years agodocs: fixed the indentation in the style guide.
Ismo Puustinen [Thu, 3 Jan 2013 12:20:52 +0000 (14:20 +0200)]
docs: fixed the indentation in the style guide.

11 years agoresource-c: remove a compiler warning.
Ismo Puustinen [Fri, 4 Jan 2013 12:53:30 +0000 (14:53 +0200)]
resource-c: remove a compiler warning.

11 years agoresource-c: the preemption logic now appears to work.
Ismo Puustinen [Fri, 4 Jan 2013 12:38:07 +0000 (14:38 +0200)]
resource-c: the preemption logic now appears to work.

11 years agoresource-c: removed printfs.
Ismo Puustinen [Fri, 4 Jan 2013 11:07:56 +0000 (13:07 +0200)]
resource-c: removed printfs.

11 years agoresource-c: make the attribute handling smarter.
Ismo Puustinen [Thu, 3 Jan 2013 14:10:28 +0000 (16:10 +0200)]
resource-c: make the attribute handling smarter.

11 years agoresource-c: guard the header files, internal cleanups.
Ismo Puustinen [Thu, 3 Jan 2013 13:32:39 +0000 (15:32 +0200)]
resource-c: guard the header files, internal cleanups.

11 years agobuild: Generate linker file for resource library.
Ismo Puustinen [Thu, 3 Jan 2013 11:20:27 +0000 (13:20 +0200)]
build: Generate linker file for resource library.

11 years agoresource-c: cleaning up the code.
Ismo Puustinen [Tue, 4 Dec 2012 11:31:36 +0000 (13:31 +0200)]
resource-c: cleaning up the code.

11 years agocommon: don't register direct pointers with epoll events
Krisztian Litkey [Wed, 2 Jan 2013 14:11:16 +0000 (16:11 +0200)]
common: don't register direct pointers with epoll events

At least with unix domain sockets epoll_wait seems to deliver
occasionally pending events for deleted fds. To protect against
this we don't register any more direct pointers to the associated
data structures with epoll. Rather we use an fd-table and either
the fd itself or an index as a key to fetch the associated data
structure from the table. If the event is for a deleted fd, lookup
fails and we ignore the event.

11 years agocommon: removed unused superloop events.
Krisztian Litkey [Wed, 2 Jan 2013 12:23:51 +0000 (14:23 +0200)]
common: removed unused superloop events.

11 years agoresource-c: implemented functions.
Ismo Puustinen [Thu, 29 Nov 2012 12:24:22 +0000 (14:24 +0200)]
resource-c: implemented functions.

11 years agoresource-c: towards great success.
Jaska Uimonen [Thu, 22 Nov 2012 12:52:14 +0000 (14:52 +0200)]
resource-c: towards great success.

11 years agobuild: added external resource API library to build.
Ismo Puustinen [Mon, 12 Nov 2012 09:42:52 +0000 (11:42 +0200)]
build: added external resource API library to build.

11 years agobuild: changed libresource -> libresource-backend.
Ismo Puustinen [Mon, 12 Nov 2012 09:38:58 +0000 (11:38 +0200)]
build: changed libresource -> libresource-backend.

11 years agoresource-c: initial version of external C resource library.
Ismo Puustinen [Mon, 12 Nov 2012 09:26:48 +0000 (11:26 +0200)]
resource-c: initial version of external C resource library.

11 years agobuild: require a recent enough version of ecore.
Ismo Puustinen [Fri, 4 Jan 2013 09:15:18 +0000 (11:15 +0200)]
build: require a recent enough version of ecore.

11 years agocommon: add missing header to ecore-glue.
Ismo Puustinen [Fri, 4 Jan 2013 09:08:58 +0000 (11:08 +0200)]
common: add missing header to ecore-glue.

11 years agotransport: install a handler to catch (and ignore) SIGPIPEs.
Krisztian Litkey [Thu, 3 Jan 2013 11:24:46 +0000 (13:24 +0200)]
transport: install a handler to catch (and ignore) SIGPIPEs.

11 years agomainloop: #include signal.h, since mainloop provides a signal handling interface.
Krisztian Litkey [Thu, 3 Jan 2013 11:23:58 +0000 (13:23 +0200)]
mainloop: #include signal.h, since mainloop provides a signal handling interface.

11 years agolua-utils: userdata of objects is aligned as structure not as char array
Janos Kovacs [Wed, 26 Dec 2012 20:11:11 +0000 (22:11 +0200)]
lua-utils: userdata of objects is aligned as structure not as char array

11 years agoMerge branch 'master' of https://github.com/otcshare/policy-internal
Janos Kovacs [Wed, 26 Dec 2012 20:14:46 +0000 (22:14 +0200)]
Merge branch 'master' of https://github.com/otcshare/policy-internal

11 years agoplugin-console: updated debug info.
Krisztian Litkey [Fri, 21 Dec 2012 15:10:57 +0000 (17:10 +0200)]
plugin-console: updated debug info.

11 years agocore: updated debug info.
Krisztian Litkey [Fri, 21 Dec 2012 15:10:34 +0000 (17:10 +0200)]
core: updated debug info.

11 years agocommon: updated debug info.
Krisztian Litkey [Fri, 21 Dec 2012 15:10:25 +0000 (17:10 +0200)]
common: updated debug info.

11 years agocore: updated linker script.
Krisztian Litkey [Fri, 21 Dec 2012 15:09:40 +0000 (17:09 +0200)]
core: updated linker script.

11 years agocommon: updated linker script.
Krisztian Litkey [Fri, 21 Dec 2012 15:09:34 +0000 (17:09 +0200)]
common: updated linker script.

11 years agoplugin-console: possibly uninitialised var fix.
Krisztian Litkey [Fri, 21 Dec 2012 15:08:53 +0000 (17:08 +0200)]
plugin-console: possibly uninitialised var fix.

11 years agocommon: possibly uninitialised var fix.
Krisztian Litkey [Fri, 21 Dec 2012 15:08:35 +0000 (17:08 +0200)]
common: possibly uninitialised var fix.

11 years agoMerge branch 'master' of github.com:otcshare/policy-internal
Krisztian Litkey [Fri, 21 Dec 2012 14:30:30 +0000 (16:30 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal

11 years agoplugin-console: register (currently only stream-based) consoles as logging targets.
Krisztian Litkey [Fri, 21 Dec 2012 14:27:28 +0000 (16:27 +0200)]
plugin-console: register (currently only stream-based) consoles as logging targets.

11 years agocore: added mrp_console_vprintf.
Krisztian Litkey [Fri, 21 Dec 2012 14:26:23 +0000 (16:26 +0200)]
core: added mrp_console_vprintf.

11 years agocore: added logging configuration commands.
Krisztian Litkey [Fri, 21 Dec 2012 13:19:05 +0000 (15:19 +0200)]
core: added logging configuration commands.

11 years agocommon: improved log setting queriability.
Krisztian Litkey [Fri, 21 Dec 2012 13:18:23 +0000 (15:18 +0200)]
common: improved log setting queriability.

11 years agoconfig: do not load signalling plugin.
Ismo Puustinen [Fri, 21 Dec 2012 13:14:08 +0000 (15:14 +0200)]
config: do not load signalling plugin.

11 years agosignalling: removed the old-style signalling plugin.
Ismo Puustinen [Fri, 21 Dec 2012 13:12:37 +0000 (15:12 +0200)]
signalling: removed the old-style signalling plugin.

11 years agolua-utils: fix in object destructor
Janos Kovacs [Thu, 20 Dec 2012 20:28:15 +0000 (22:28 +0200)]
lua-utils: fix in object destructor

11 years agocommon: updated debug info.
Krisztian Litkey [Thu, 20 Dec 2012 20:06:23 +0000 (22:06 +0200)]
common: updated debug info.

11 years agocommon: updated linker script.
Krisztian Litkey [Thu, 20 Dec 2012 20:05:58 +0000 (22:05 +0200)]
common: updated linker script.

11 years agodaemon: delayed log target activation
Krisztian Litkey [Thu, 20 Dec 2012 18:26:47 +0000 (20:26 +0200)]
daemon: delayed log target activation

To quickly enable the activation of loggers registered by plugins
the log target is now activated from the daemon startup main code
path (used to be done during command line parsing).

This is a quick hack to get dlog going. Probably the right thing
to do is to try activating it as early as possible (during command
line parsing) to get startup messages going to the right place,
take a note if this fails and in this case retry it from the daemon
startup main code path. Later...

11 years agolog: reworked logging to open up logging for external loggers.
Krisztian Litkey [Thu, 20 Dec 2012 14:49:53 +0000 (16:49 +0200)]
log: reworked logging to open up logging for external loggers.

11 years agocommon: fully reset hashtable config.
Krisztian Litkey [Wed, 19 Dec 2012 06:45:49 +0000 (08:45 +0200)]
common: fully reset hashtable config.

11 years agomurphy-db: don't fail for MQL select on an empty table.
Krisztian Litkey [Mon, 17 Dec 2012 11:06:39 +0000 (13:06 +0200)]
murphy-db: don't fail for MQL select on an empty table.

11 years agoresource-native: owners is a non-selectable command.
Krisztian Litkey [Thu, 13 Dec 2012 18:35:39 +0000 (20:35 +0200)]
resource-native: owners is a non-selectable command.

11 years agomurphy-db: handle NULL varchar columns gracefully.
Krisztian Litkey [Thu, 13 Dec 2012 15:39:14 +0000 (17:39 +0200)]
murphy-db: handle NULL varchar columns gracefully.

11 years agocommon: allow NULL path in DBUS signal handlers.
Krisztian Litkey [Thu, 13 Dec 2012 15:38:11 +0000 (17:38 +0200)]
common: allow NULL path in DBUS signal handlers.

11 years agocommon: do not free a NULL D-Bus error.
Ismo Puustinen [Wed, 12 Dec 2012 11:20:52 +0000 (13:20 +0200)]
common: do not free a NULL D-Bus error.

11 years agocommon: the transport I/O watch removal (commit 180802...5e711) seems to triggers...
Krisztian Litkey [Tue, 11 Dec 2012 20:33:31 +0000 (22:33 +0200)]
common: the transport I/O watch removal (commit 180802...5e711) seems to triggers a transport bug, disable it for now.

11 years agoMerge branch 'master' of github.com:otcshare/policy-internal
Krisztian Litkey [Tue, 11 Dec 2012 14:23:44 +0000 (16:23 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal

11 years agocommon: always remove stream transport I/O watch during disconnect.
Krisztian Litkey [Tue, 11 Dec 2012 14:17:55 +0000 (16:17 +0200)]
common: always remove stream transport I/O watch during disconnect.

11 years agocommon: stop monitoring fd if owner keeps ignoring EPOLLHUP notifications.
Krisztian Litkey [Tue, 11 Dec 2012 14:16:38 +0000 (16:16 +0200)]
common: stop monitoring fd if owner keeps ignoring EPOLLHUP notifications.

11 years agocore: check memory before usage.
Ismo Puustinen [Tue, 11 Dec 2012 09:25:28 +0000 (11:25 +0200)]
core: check memory before usage.

11 years agomdb: check allocation success before use.
Ismo Puustinen [Tue, 11 Dec 2012 09:22:48 +0000 (11:22 +0200)]
mdb: check allocation success before use.

11 years agotransport: do not free transport in the middle of busy block.
Ismo Puustinen [Tue, 11 Dec 2012 09:15:15 +0000 (11:15 +0200)]
transport: do not free transport in the middle of busy block.

The transport reference count is decremented when exiting from the busy
block.

11 years agoresource: check NULL value before getting struct member.
Ismo Puustinen [Tue, 11 Dec 2012 09:10:25 +0000 (11:10 +0200)]
resource: check NULL value before getting struct member.

11 years agoresource: do not crash when querying attributes.
Ismo Puustinen [Tue, 11 Dec 2012 09:08:51 +0000 (11:08 +0200)]
resource: do not crash when querying attributes.

11 years agolua-decision: check for memory allocation success.
Ismo Puustinen [Tue, 11 Dec 2012 08:55:35 +0000 (10:55 +0200)]
lua-decision: check for memory allocation success.

11 years agoresource: do not assign to members of NULL pointers.
Ismo Puustinen [Tue, 11 Dec 2012 08:50:48 +0000 (10:50 +0200)]
resource: do not assign to members of NULL pointers.

11 years agomql: initialize variable before use.
Ismo Puustinen [Tue, 11 Dec 2012 08:46:14 +0000 (10:46 +0200)]
mql: initialize variable before use.

11 years agobreedline: default to 80x25 if size detection fails. 66/2566/1
Krisztian Litkey [Mon, 10 Dec 2012 23:39:20 +0000 (01:39 +0200)]
breedline: default to 80x25 if size detection fails.

11 years agoconsole: use unix domain socket by default. 65/2565/1
Krisztian Litkey [Mon, 10 Dec 2012 22:43:17 +0000 (00:43 +0200)]
console: use unix domain socket by default.

11 years agoresource: use unix domain socket by default for resource-native. 64/2564/1
Krisztian Litkey [Mon, 10 Dec 2012 22:35:59 +0000 (00:35 +0200)]
resource: use unix domain socket by default for resource-native.

11 years agoMerge branch 'master' of github.com:otcshare/policy-internal 63/2563/1
Krisztian Litkey [Mon, 10 Dec 2012 20:40:27 +0000 (22:40 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal

Conflicts:
src/core/lua-utils/object.c
src/core/lua-utils/object.h

11 years agolua-utils: add object destructor 62/2562/1
Janos Kovacs [Mon, 10 Dec 2012 19:46:18 +0000 (21:46 +0200)]
lua-utils: add object destructor

11 years agolua-decision: add boolean support to funcbridge 61/2561/1
Janos Kovacs [Thu, 6 Dec 2012 02:35:55 +0000 (04:35 +0200)]
lua-decision: add boolean support to funcbridge

11 years agolua-utils: add object destructor 60/2560/1
Janos Kovacs [Thu, 6 Dec 2012 00:40:11 +0000 (02:40 +0200)]
lua-utils: add object destructor

11 years agolua-utils: make check_funcbridge public 59/2559/1
Janos Kovacs [Thu, 6 Dec 2012 00:20:48 +0000 (02:20 +0200)]
lua-utils: make check_funcbridge public

11 years agodocumentation: added some D-Bus resource api documentation. 58/2558/1
Ismo Puustinen [Wed, 5 Dec 2012 15:25:20 +0000 (17:25 +0200)]
documentation: added some D-Bus resource api documentation.

11 years agomainloop-test: get rid of a few unused var warnings.
Krisztian Litkey [Tue, 4 Dec 2012 21:31:56 +0000 (23:31 +0200)]
mainloop-test: get rid of a few unused var warnings.

11 years agobuild-sys: really... try to generate all linker scripts if asked so.
Krisztian Litkey [Tue, 4 Dec 2012 21:20:51 +0000 (23:20 +0200)]
build-sys: really... try to generate all linker scripts if asked so.

11 years agointernal-transport: fix error case handling.
Ismo Puustinen [Tue, 4 Dec 2012 12:32:10 +0000 (14:32 +0200)]
internal-transport: fix error case handling.

11 years agoresource-dbus: fixing error case handling.
Ismo Puustinen [Tue, 4 Dec 2012 12:31:39 +0000 (14:31 +0200)]
resource-dbus: fixing error case handling.

11 years agoresource-library: do not crash when destroying resource sets
Janos Kovacs [Tue, 4 Dec 2012 10:21:43 +0000 (12:21 +0200)]
resource-library: do not crash when destroying resource sets

11 years agocommon, core: fixing broken pkg-config files
Janos Kovacs [Tue, 4 Dec 2012 02:11:12 +0000 (04:11 +0200)]
common, core: fixing broken pkg-config files

11 years agodocumentation: fix broken docdir
Janos Kovacs [Tue, 4 Dec 2012 00:31:03 +0000 (02:31 +0200)]
documentation: fix broken docdir

11 years agobuild-sys: added build rule to forcibly regenerate all linker scripts.
Krisztian Litkey [Mon, 3 Dec 2012 09:02:26 +0000 (11:02 +0200)]
build-sys: added build rule to forcibly regenerate all linker scripts.

This rule really tries to generate _all_ linkers scripts regardless of
what is enabled/disabled.

11 years agobreedline: added licensing information.
Krisztian Litkey [Mon, 3 Dec 2012 08:08:07 +0000 (10:08 +0200)]
breedline: added licensing information.

11 years agomainloop-tests: fix in running qt tests with GLIB_ENABLED
Amarnath Valluri [Fri, 30 Nov 2012 14:06:56 +0000 (16:06 +0200)]
mainloop-tests: fix in running qt tests with GLIB_ENABLED

Qt default uses glib mainloop, so we cannot use same glib as subloop.

11 years agomainloop-test: fix build for disabled qt support, don't install helper lib.
Krisztian Litkey [Fri, 30 Nov 2012 11:05:09 +0000 (13:05 +0200)]
mainloop-test: fix build for disabled qt support, don't install helper lib.

11 years agomainloop-test: pedantic stylistic changes.
Krisztian Litkey [Fri, 30 Nov 2012 11:33:21 +0000 (13:33 +0200)]
mainloop-test: pedantic stylistic changes.

11 years agobuild-sys: AC_PROG_CXX cannot be used conditionally.
Krisztian Litkey [Fri, 30 Nov 2012 10:58:34 +0000 (12:58 +0200)]
build-sys: AC_PROG_CXX cannot be used conditionally.