profile/ivi/murphy.git
10 years agolibresource: cleaned up an error message.
Ismo Puustinen [Thu, 3 Apr 2014 10:29:42 +0000 (13:29 +0300)]
libresource: cleaned up an error message.

10 years agolua-5.2: provide lua_objlen compatibility macro if necessary.
Krisztian Litkey [Mon, 31 Mar 2014 10:55:00 +0000 (13:55 +0300)]
lua-5.2: provide lua_objlen compatibility macro if necessary.

If Lua is compiled without LUA_COMPAT_ALL luaconf.h will not
provide a few macros for backward-compatibility, including
lua_objlen. Detect this and provide lua_objlen in lua-utils.h
if necessary.

10 years agocommon: don't include unused syslog.h in log.h.
Krisztian Litkey [Sat, 29 Mar 2014 12:01:40 +0000 (14:01 +0200)]
common: don't include unused syslog.h in log.h.

10 years agocommon: add missing CDECL-wrapper to debug-info.h.
Krisztian Litkey [Sat, 29 Mar 2014 11:59:57 +0000 (13:59 +0200)]
common: add missing CDECL-wrapper to debug-info.h.

10 years agocommon: fix an error path crash for mrp_msg_t. v0.0.51
Krisztian Litkey [Tue, 25 Mar 2014 22:53:40 +0000 (00:53 +0200)]
common: fix an error path crash for mrp_msg_t.

Initialize properly the hook for array fields too, in case creating the
field fails. On the bailout path we try to unlink the field...

10 years agolua-utils: add a workaround for occasional Lua stack overflow.
Krisztian Litkey [Fri, 21 Mar 2014 21:02:45 +0000 (23:02 +0200)]
lua-utils: add a workaround for occasional Lua stack overflow.

We have a systematic stack-handling bug throughout our codebase.
We never ever grow the Lua stack according to our needs. We rely
on the default available space to be enough. When we occasionally
do run out of stack space, this causes severe memory corruption.

This is quite easy to trigger with Lua 5.1.x but much harder with
Lua 5.2.x (I could not reproduce this with it at all).

This patch is merely a desperate attempt to try and hide the
damage caused by the bug. In a couple of commonly used functions
we make sure there's plenty of space in the stack and hope that
it will be enough also for those who do not take care of this
themselves.

Eventually we'll need to properly fix this throughout the code.

10 years agolua-bindings: autoenable debugging when 'lua debug' is enabled.
Krisztian Litkey [Fri, 21 Mar 2014 15:14:45 +0000 (17:14 +0200)]
lua-bindings: autoenable debugging when 'lua debug' is enabled.

10 years agoplugin-resource-native: adjust dump buffer if needed.
Krisztian Litkey [Fri, 21 Mar 2014 14:30:03 +0000 (16:30 +0200)]
plugin-resource-native: adjust dump buffer if needed.

10 years agolua-bindings: console commands for Lua GC and object dumps.
Krisztian Litkey [Thu, 20 Mar 2014 18:02:21 +0000 (20:02 +0200)]
lua-bindings: console commands for Lua GC and object dumps.

Added a console command for triggering, pausing, restarting and
reconfiguring the Lua garbage collector. Added another command
for dumping tracked active and dead Lua objects. You have to
enable Lua object tracking for this to show anything useful.

10 years agolua-bindings: override allocator earlier, use simpler block tracking.
Krisztian Litkey [Thu, 20 Mar 2014 17:12:41 +0000 (19:12 +0200)]
lua-bindings: override allocator earlier, use simpler block tracking.

Looks like in all hastiness I missed that it is indeed possible
to override the Lua allocator before it has been used to allocate
any blocks. So... instead of blaming the Lua infra for a non-
existing deficiency, let's try to use it correctly. Instead of
first creating the interpreter state and only then overriding the
allocator, let's use the state creation routine which also takes
the allocator to use as an argument.

In all fairness, it is IMO still a deficiency that the interpreter
lets a busy allocator (one that has unfreed blocks) be overridden
without storing and passing the used allocators userdata along
with the allocated blocks of memory.

Now correctly overriding the allocator with a tracking one at _any_
time has a pretty steep performance penalty. The allocator first
needs to check if a block has been allocated by it and otherwise
pass it on to the previously active one. This is what we used to do
before this patch. With this patch, we choose lower runtime overhead
for the price of less flexibility (can't enable tracking dynamically
at any time).

10 years agolua-utils: count active/dead objects per class.
Krisztian Litkey [Fri, 21 Mar 2014 13:56:19 +0000 (15:56 +0200)]
lua-utils: count active/dead objects per class.

Keep track of the number of active and dead objects per class.
This gives at least some idea/hint of memory consumption and
Lua object leaks even when object tracking is inactive.

10 years agolua-utils: allow object tracking to be enabled from the outside.
Krisztian Litkey [Thu, 20 Mar 2014 17:52:37 +0000 (19:52 +0200)]
lua-utils: allow object tracking to be enabled from the outside.

Added a function to enable/disable object tracking externally.
Currently this is used (in lua-murphy) to automatically turn on
object tracking whenever Lua memory tracking is enabled. Note
that once the first object has been allocated, the state of
tracking cannot be altered since it would have an effect on the
size of object userdata.

10 years agocommon: print total memory usage in mrp_mm_dump.
Krisztian Litkey [Thu, 20 Mar 2014 17:00:13 +0000 (19:00 +0200)]
common: print total memory usage in mrp_mm_dump.

10 years agoresource: don't assert if a resource-set dump does not fit the buffer.
Krisztian Litkey [Thu, 20 Mar 2014 11:22:22 +0000 (13:22 +0200)]
resource: don't assert if a resource-set dump does not fit the buffer.

Instead of asserting just make sure we don't overflow the buffer.
Additionally, if the buffer was too small for the full dump, add
a trailing '...\n' if that fits. When printed, this will provide
at least a visual clue about the insufficient buffer space.

10 years agoresource-native: allow overriding the default transport by an evironment variable.
Krisztian Litkey [Thu, 20 Mar 2014 11:21:25 +0000 (13:21 +0200)]
resource-native: allow overriding the default transport by an evironment variable.

10 years agoresource: allow overriding the default transport by an evironment variable.
Krisztian Litkey [Thu, 20 Mar 2014 11:20:31 +0000 (13:20 +0200)]
resource: allow overriding the default transport by an evironment variable.

10 years agosample-config: small typo/thinko fix. v0.0.50
Krisztian Litkey [Thu, 13 Mar 2014 11:36:56 +0000 (13:36 +0200)]
sample-config: small typo/thinko fix.

10 years agobuild-sys: install (and patch) the modularized sample configuration.
Krisztian Litkey [Thu, 13 Mar 2014 09:30:23 +0000 (11:30 +0200)]
build-sys: install (and patch) the modularized sample configuration.

10 years agobuild-sys: propagate also sysconfdir to the preprocessor.
Krisztian Litkey [Thu, 13 Mar 2014 09:29:09 +0000 (11:29 +0200)]
build-sys: propagate also sysconfdir to the preprocessor.

10 years agodaemon: honour overridden sysconfdir.
Krisztian Litkey [Thu, 13 Mar 2014 09:25:57 +0000 (11:25 +0200)]
daemon: honour overridden sysconfdir.

10 years agolua-5.2: added Lua specfile patches for 'peaceful coexistence'.
Krisztian Litkey [Sun, 9 Mar 2014 21:31:46 +0000 (23:31 +0200)]
lua-5.2: added Lua specfile patches for 'peaceful coexistence'.

Added two patches that allow Lua-5.2.x and Lua-5.1.x to co-
exist without conflicts with whichever version you happen to
have installed on your system. To get the additional version
installed, take the Fedora source RPM of the version you want,
patch its specfile with the patch in this commit, then build
and install. So rougly:

    rpm -ivh <uri-of-fedora-lua.src.rpm>
    patch -p0 < <patch-from-this-commit>
    rpm -bb ~/rpmbuild/SPECS/lua.spec
    rpm -ivh ~/rpmbuild/RPMS/<arch>/lua-*.rpm

10 years agolua-5.2: build-sys: allow building against a specified Lua version.
Krisztian Litkey [Sun, 9 Mar 2014 16:21:47 +0000 (18:21 +0200)]
lua-5.2: build-sys: allow building against a specified Lua version.

10 years agolua-5.2: resource: allow building against Lua >= 5.2.
Krisztian Litkey [Sun, 9 Mar 2014 16:21:26 +0000 (18:21 +0200)]
lua-5.2: resource: allow building against Lua >= 5.2.

10 years agolua-5.2: core: allow building against Lua >= 5.2.
Krisztian Litkey [Sun, 9 Mar 2014 16:21:06 +0000 (18:21 +0200)]
lua-5.2: core: allow building against Lua >= 5.2.

10 years agoresource-dbus: shared and mandatory property sigs 's' -> 'b'.
Ismo Puustinen [Mon, 10 Mar 2014 09:02:18 +0000 (11:02 +0200)]
resource-dbus: shared and mandatory property sigs 's' -> 'b'.

10 years agosample-config: don't load superfluous D-Bus plugin.
Krisztian Litkey [Fri, 7 Mar 2014 11:02:04 +0000 (13:02 +0200)]
sample-config: don't load superfluous D-Bus plugin.

10 years agodomain-control: fix an error message typo.
Krisztian Litkey [Fri, 7 Mar 2014 10:47:19 +0000 (12:47 +0200)]
domain-control: fix an error message typo.

10 years agodomain-control: add missing CDECL-wrapper to client header.
Krisztian Litkey [Fri, 7 Mar 2014 09:19:26 +0000 (11:19 +0200)]
domain-control: add missing CDECL-wrapper to client header.

10 years agocommon: rewind the DBus message after each signal handler. v0.0.49 v0.0.49.1 v0.0.49.2
Krisztian Litkey [Wed, 5 Mar 2014 16:14:19 +0000 (18:14 +0200)]
common: rewind the DBus message after each signal handler.

10 years agosample-config: test how the basis for a modular config could look like.
Krisztian Litkey [Tue, 25 Feb 2014 09:18:25 +0000 (11:18 +0200)]
sample-config: test how the basis for a modular config could look like.

10 years agolua-utils: add missing boolean support for funcbridge Lua call. v0.0.48
Janos Kovacs [Tue, 11 Feb 2014 14:49:47 +0000 (16:49 +0200)]
lua-utils: add missing boolean support for funcbridge Lua call.

10 years agolua-utils: oops... don't patch the stack quite so eagerly.
Krisztian Litkey [Tue, 25 Feb 2014 08:30:23 +0000 (10:30 +0200)]
lua-utils: oops... don't patch the stack quite so eagerly.

During the last merge/rebase cycle I screwed up and a small
object infra patch fell of. Undo that damage now.

10 years agolua-utils: patch the stack for {s,g}etfield during init + fix a bad pattern of thinkos. v0.0.47
Krisztian Litkey [Sun, 23 Feb 2014 20:11:44 +0000 (22:11 +0200)]
lua-utils: patch the stack for {s,g}etfield during init + fix a bad pattern of thinkos.

This could/should still be improved a bit. Now setfield and getfield
must use top-relative addressing and also be extremely careful not
to screw up the stack by popping it too much. Probably it would be
much betters to patch the stack and then invoke setfield or getfield
via lua_pcall which would both protect and clean up the stack for us.
This'll probably need another iteration...

This patch also fixes a pattern of horribly embarrassing thinkos in
the setter/getter and initializer status checking / fallback selection
logic.

10 years agolua-utils: try harder getting complex object getter/setter cases right.
Krisztian Litkey [Sat, 22 Feb 2014 11:34:51 +0000 (13:34 +0200)]
lua-utils: try harder getting complex object getter/setter cases right.

Try to handle better cases when a (potentially extensible) object
class has both predefined members and an overridden setter/getter
with or without native/whitelisted members. The current semantics
is roughly the following:

  1) check and handle if the field corresponds to a predefined member
  2) if there is a setfield/getfield declared and the field is marked
     native or no fields have been marked native at all, pass it to
     setfield/getfield
  3) if there is no setfield/getfield or there is one but it did not
     handle the field (returned 0), pass it to setext/getext if the
     class is extensible

Note that in principle we should treat it an error if a field declared
as native is not handled by setfield/getfield. Currently we don't.

Also note that with these semantics it probably would be better to
forget about marking members as native and just remove native
whitelisting altogether. We'd then instead always pass every non-
predeclared field to setfield/getfield, then try setext/getext if
this setfield/getfield did not handle the field (IOW returned 0).

This would also get us rid of the potential ambiguity of what to do
if a field has been declared native but then setfield/getfield does
not handle it.

10 years agomdb: added functions for handling database trigger event data.
Ismo Puustinen [Wed, 19 Feb 2014 12:35:16 +0000 (14:35 +0200)]
mdb: added functions for handling database trigger event data.

10 years agolua-utils: be a bit more robust if fed with invalid objects.
Krisztian Litkey [Fri, 21 Feb 2014 09:29:52 +0000 (11:29 +0200)]
lua-utils: be a bit more robust if fed with invalid objects.

10 years agolua-bindings: try not to lose file inclusion Lua error messages
Krisztian Litkey [Thu, 20 Feb 2014 17:15:00 +0000 (19:15 +0200)]
lua-bindings: try not to lose file inclusion Lua error messages

Propagate file inclusion Lua error messages back to the caller.
If we're handling a try-include (errors are ignored), log any
Lua runtime  errors as a warning (since the user probably wanted
include-if-exists semantics).

10 years agolua-bindings: added function to test if a plugin is loaded (and running).
Krisztian Litkey [Wed, 19 Feb 2014 16:20:09 +0000 (18:20 +0200)]
lua-bindings: added function to test if a plugin is loaded (and running).

10 years agocore: added a few plugin state testing functions.
Krisztian Litkey [Wed, 19 Feb 2014 16:19:19 +0000 (18:19 +0200)]
core: added a few plugin state testing functions.

10 years agoMerge remote-tracking branch 'private/master' v0.0.46
Krisztian Litkey [Fri, 14 Feb 2014 20:51:01 +0000 (22:51 +0200)]
Merge remote-tracking branch 'private/master'

10 years agolua-utils: let mrp_funcbridge_unref gracefully handle a NULL bridge.
Krisztian Litkey [Fri, 14 Feb 2014 20:44:51 +0000 (22:44 +0200)]
lua-utils: let mrp_funcbridge_unref gracefully handle a NULL bridge.

10 years agolua-utils: make sure the error buffer is always reset.
Krisztian Litkey [Mon, 10 Feb 2014 11:55:43 +0000 (13:55 +0200)]
lua-utils: make sure the error buffer is always reset.

10 years agolua-utils: funcbridge fixes for custom murphy Lua object types.
Krisztian Litkey [Fri, 7 Feb 2014 17:02:14 +0000 (19:02 +0200)]
lua-utils: funcbridge fixes for custom murphy Lua object types.

Fix signature parsing to properly extract type information for
custom object types (ie. without an extra leading '('). It's
really strange this had not been caught earlier, as I recall
this having been used already elsewhere. Hmm...

For symmetricity, allow funcbridge invocations to use 'O' as
the signature for (custom murphy) Lua objects.
to see how this was not caught earlier... I recall the same

10 years agocore: fix typo in an error message.
Krisztian Litkey [Fri, 7 Feb 2014 13:49:16 +0000 (15:49 +0200)]
core: fix typo in an error message.

10 years agolua-utils: clean up the stack after table-based object initialization.
Krisztian Litkey [Tue, 4 Feb 2014 22:44:22 +0000 (00:44 +0200)]
lua-utils: clean up the stack after table-based object initialization.

10 years agocore: don't use memory if allocation failed.
Ismo Puustinen [Tue, 11 Feb 2014 12:12:44 +0000 (14:12 +0200)]
core: don't use memory if allocation failed.

10 years agocommon: fix another buffer overflow.
Ismo Puustinen [Tue, 11 Feb 2014 11:59:21 +0000 (13:59 +0200)]
common: fix another buffer overflow.

10 years agocommon: #define UNIX_PATH_MAX if needed.
Krisztian Litkey [Fri, 7 Feb 2014 14:29:01 +0000 (16:29 +0200)]
common: #define UNIX_PATH_MAX if needed.

10 years agocommon: fix a buffer overflow.
Ismo Puustinen [Fri, 7 Feb 2014 09:24:17 +0000 (11:24 +0200)]
common: fix a buffer overflow.

10 years agoMerge branch 'master' of github.com:otcshare/policy-internal
Krisztian Litkey [Fri, 7 Feb 2014 13:50:54 +0000 (15:50 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal

10 years agoresource-dbus: fix an error case.
Ismo Puustinen [Tue, 4 Feb 2014 11:05:07 +0000 (13:05 +0200)]
resource-dbus: fix an error case.

10 years agoresource: cope with NULL reqset in mrp_resource_lua_veto() v0.0.44 v0.0.45
Janos Kovacs [Wed, 5 Feb 2014 15:05:56 +0000 (17:05 +0200)]
resource: cope with NULL reqset in mrp_resource_lua_veto()

10 years agocommon: make sure the logger is never recursing
Krisztian Litkey [Wed, 29 Jan 2014 13:14:21 +0000 (15:14 +0200)]
common: make sure the logger is never recursing

Make sure the logger is never recursively invoked. The default logger
backend can never recurse. However with an overridden backend this
could happen, especially if the backend pushes log messages over a
transport or some other generic IPC. If something goes wrong at the
IPC level, an error is usually logged. If this results in an attempt
to use the same IPC we might end up recursing ad infinitum, or rather
ad stack-overflowtum...

Since we can't safely assume backends to properly check and handle
such a corner case, it is better to protect against this in the
common infra.

10 years agoplugin-console: configurable debug metadata, defaults to 'function'.
Krisztian Litkey [Wed, 29 Jan 2014 12:24:36 +0000 (14:24 +0200)]
plugin-console: configurable debug metadata, defaults to 'function'.

10 years agolua-timer: tostring thinko fixes.
Krisztian Litkey [Thu, 23 Jan 2014 08:41:37 +0000 (10:41 +0200)]
lua-timer: tostring thinko fixes.

10 years agolua-utils: fix MRP_LUA_LFUNC/MRP_LUA_FUNC setter type checks.
Krisztian Litkey [Thu, 23 Jan 2014 07:07:11 +0000 (09:07 +0200)]
lua-utils: fix MRP_LUA_LFUNC/MRP_LUA_FUNC setter type checks.

10 years agoMerge branch 'master' of github.com:otcshare/policy-internal
Krisztian Litkey [Wed, 29 Jan 2014 13:42:38 +0000 (15:42 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal

10 years agolua-utils: include missing header for bool.
Krisztian Litkey [Wed, 22 Jan 2014 11:01:39 +0000 (13:01 +0200)]
lua-utils: include missing header for bool.

10 years agomdb: fix the delete wrong line bug when updating the table.
Ismo Puustinen [Mon, 20 Jan 2014 13:41:51 +0000 (15:41 +0200)]
mdb: fix the delete wrong line bug when updating the table.

10 years agocommon: typeid -> type_id, because typeid is a C++ reserved word. v0.0.43
Ismo Puustinen [Thu, 16 Jan 2014 19:13:33 +0000 (21:13 +0200)]
common: typeid -> type_id, because typeid is a C++ reserved word.

10 years agoMerge branch 'master' of github.com:otcshare/policy-internal
Krisztian Litkey [Thu, 16 Jan 2014 15:33:03 +0000 (17:33 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal

10 years agocommon: don't allow mark_deleted corrupt the pending deleted list.
Krisztian Litkey [Thu, 16 Jan 2014 12:59:36 +0000 (14:59 +0200)]
common: don't allow mark_deleted corrupt the pending deleted list.

Make sure mark_deleted is not called twice for timer, deferred,
or wakeup objects to prevent it from corrupting the list of
pending deleted objects. The corruption itself is the result
of the same object being linked twice to the pending list and
consequently free'd twice. The other types of objects were
correctly protected against this.

The 'safeguard' is just check that the object had not been deleted
before calling mark_deleted. It would be safer to add this check to
mark_deleted itself but since the check is usually needed to protect
other things as well it is now done always by the caller.

10 years agomdb: free memory if an update doesn't cause a row to be changed.
Ismo Puustinen [Thu, 16 Jan 2014 12:45:23 +0000 (14:45 +0200)]
mdb: free memory if an update doesn't cause a row to be changed.

10 years agocommon: small transport fixes to enable socket-based activation.
Krisztian Litkey [Tue, 14 Jan 2014 19:38:13 +0000 (21:38 +0200)]
common: small transport fixes to enable socket-based activation.

This patch fixes the most obvious shortcomings in the transport
implementation that currently prevented us from having transport
socket-based activation. With this patch in place, socket-based
activation should work for stream transports.

10 years agocommon: exercise some of the extra types in native-types test.
Krisztian Litkey [Tue, 14 Jan 2014 10:35:46 +0000 (12:35 +0200)]
common: exercise some of the extra types in native-types test.

10 years agocommon: int/short/size_t support for native-types.
Krisztian Litkey [Mon, 13 Jan 2014 14:02:46 +0000 (16:02 +0200)]
common: int/short/size_t support for native-types.

Added support for unsigned/signed int's, unsigned/signed short's,
size_t's and ssize_t's. All of these types are encoded as 32-bit
integers (and currently without a check for overflow, so now you
have been warned).

10 years agoMerge branch 'master' of github.com:01org/murphy submit/tizen/20140110.142837
Krisztian Litkey [Fri, 10 Jan 2014 14:17:11 +0000 (16:17 +0200)]
Merge branch 'master' of github.com:01org/murphy

10 years agoMerge branch 'master' of github.com:otcshare/policy-internal v0.0.42
Krisztian Litkey [Thu, 9 Jan 2014 16:28:48 +0000 (18:28 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal

10 years agoresolver: don't fail when asked to generate empty autopdate target.
Krisztian Litkey [Thu, 9 Jan 2014 16:21:40 +0000 (18:21 +0200)]
resolver: don't fail when asked to generate empty autopdate target.

10 years agoresource: turn off advice for same class if class ordering is lifo.
Ismo Puustinen [Thu, 9 Jan 2014 14:43:47 +0000 (16:43 +0200)]
resource: turn off advice for same class if class ordering is lifo.

10 years agosample-config: added a sample entry for a console over D-Bus transport.
Krisztian Litkey [Wed, 8 Jan 2014 16:04:02 +0000 (18:04 +0200)]
sample-config: added a sample entry for a console over D-Bus transport.

10 years agodbus-transport: fixes for the new D-Bus abstraction.
Krisztian Litkey [Wed, 8 Jan 2014 16:03:28 +0000 (18:03 +0200)]
dbus-transport: fixes for the new D-Bus abstraction.

10 years agocommon/test: don't try to unconditionally compile sdbus-error-message.
Krisztian Litkey [Wed, 8 Jan 2014 12:30:04 +0000 (14:30 +0200)]
common/test: don't try to unconditionally compile sdbus-error-message.

10 years agoresource-dbus: use libdbus, not systemd-bus.
Krisztian Litkey [Wed, 8 Jan 2014 12:29:26 +0000 (14:29 +0200)]
resource-dbus: use libdbus, not systemd-bus.

10 years agoresource: temporary enforcement of 'dont_wait' and 'auto_release' from LUA
Janos Kovacs [Tue, 7 Jan 2014 08:11:26 +0000 (10:11 +0200)]
resource: temporary enforcement of 'dont_wait' and 'auto_release' from LUA

10 years agoresource: pass the requesting resource set in an argument to the veto functions
Janos Kovacs [Mon, 6 Jan 2014 16:58:53 +0000 (18:58 +0200)]
resource: pass the requesting resource set in an argument to the veto functions

10 years agoresource: add 'resource_set_id' column to resource owner tables
Janos Kovacs [Fri, 3 Jan 2014 19:04:43 +0000 (21:04 +0200)]
resource: add 'resource_set_id' column to resource owner tables

10 years agobuild-sys: install dbus-error.h.
Krisztian Litkey [Wed, 8 Jan 2014 17:30:18 +0000 (19:30 +0200)]
build-sys: install dbus-error.h.

10 years agocommon: allow setting a mapping table of native-type id's for transports.
Krisztian Litkey [Wed, 11 Dec 2013 22:34:18 +0000 (00:34 +0200)]
common: allow setting a mapping table of native-type id's for transports.

Added support for a native-type id mapping table for transports. This
is necessary to avoid the problems arising from not having the exactly
same set of native-types registered (or having the same set registered
in different order) by the communicating parties. With this mechanism,
it is enough for the communicating parties to agree about the ids of
the native-types passed over that particular instance of transport
instead of having to agree about the ids of all the registered native-
types over all the transports.

The support is still a bit lacky on the user-friendliness side. We'll
probably need a few additional macros and convenience functions to
allow people to easily set up a mapping table correctly.

10 years agocommon: small inclusion and macro fixes for native-types.
Krisztian Litkey [Wed, 11 Dec 2013 22:32:34 +0000 (00:32 +0200)]
common: small inclusion and macro fixes for native-types.

10 years agoMerge branch 'systemd-bus+native-types'
Krisztian Litkey [Wed, 8 Jan 2014 11:33:29 +0000 (13:33 +0200)]
Merge branch 'systemd-bus+native-types'

10 years agoresolver: print the resolver graph to console in DOT format.
Ismo Puustinen [Tue, 17 Dec 2013 14:50:46 +0000 (16:50 +0200)]
resolver: print the resolver graph to console in DOT format.

10 years agoMerge branch 'master' of github.com:otcshare/policy-internal v0.0.40 v0.0.41
Krisztian Litkey [Fri, 13 Dec 2013 22:02:57 +0000 (00:02 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal

10 years agolua-decision: don't crash in table/select constructor if arg is not table.
Janos Kovacs [Fri, 13 Dec 2013 12:35:42 +0000 (14:35 +0200)]
lua-decision: don't crash in table/select constructor if arg is not table.

10 years agoresource-dbus: fix a buffer overflow.
Ismo Puustinen [Wed, 11 Dec 2013 13:17:47 +0000 (15:17 +0200)]
resource-dbus: fix a buffer overflow.

10 years agoresource-dbus: fix a buffer overflow.
Ismo Puustinen [Wed, 11 Dec 2013 13:17:47 +0000 (15:17 +0200)]
resource-dbus: fix a buffer overflow.

10 years agolua-bindings: added murphy.disable_include(), for disabling inclusion.
Krisztian Litkey [Fri, 6 Dec 2013 17:22:36 +0000 (19:22 +0200)]
lua-bindings: added murphy.disable_include(), for disabling inclusion.

10 years agolua-utils: get rid of a compiler warning.
Krisztian Litkey [Thu, 5 Dec 2013 17:54:00 +0000 (19:54 +0200)]
lua-utils: get rid of a compiler warning.

10 years agolua-bindings: reworked Murphy.include & co. to use mrp_lua_include_file.
Krisztian Litkey [Thu, 5 Dec 2013 15:59:19 +0000 (17:59 +0200)]
lua-bindings: reworked Murphy.include & co. to use mrp_lua_include_file.

Rewrote include and try_include to use mrp_lua_include_file as the
underlying file inclusion mechanism. The newly introduced *_once
versions of these only include any given file at most once. When using
one of these, subsequent inclusion of an already included file will
silently succeed without re-reading or re-evaluating the file.

10 years agolua-utils: added mrp_lua_include_file.
Krisztian Litkey [Thu, 5 Dec 2013 15:58:09 +0000 (17:58 +0200)]
lua-utils: added mrp_lua_include_file.

Added mrp_lua_include_file as the basic building block for a
simple C-like Lua inclusion mechanism. You can provide a
file, a list of directories to searchi, and optionally a list
to administer successfully included files. If the provided file
name is not a absolute one, the given directories are searched
for the file. If the provided list is not NULL, any given file
will be included at most once.

10 years agocommon: added mrp_find_file for doing #include-like file search.
Krisztian Litkey [Thu, 5 Dec 2013 15:56:05 +0000 (17:56 +0200)]
common: added mrp_find_file for doing #include-like file search.

mrp_find_file searches for the given file in the given set of
directories. If the file name is absolute it is used as such.
Otherwise the given set of directories (and the current working
directory) are searched. If a match is found, it is tested for
access using the given mode. If the found file is accessible,
the resolved path is copied to the given buffer.

10 years agoMerge branch 'master' of github.com:otcshare/policy-internal
Krisztian Litkey [Wed, 4 Dec 2013 23:32:34 +0000 (01:32 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal

10 years agolua-bindings: first shot at Murphy.include/Murphy.try_include, for more modular confi...
Krisztian Litkey [Wed, 4 Dec 2013 23:31:29 +0000 (01:31 +0200)]
lua-bindings: first shot at Murphy.include/Murphy.try_include, for more modular configuration.

10 years agocommon/test: post-merge Makefile.am fix.
Krisztian Litkey [Mon, 25 Nov 2013 20:14:26 +0000 (22:14 +0200)]
common/test: post-merge Makefile.am fix.

10 years agocommon: adjusted dbus MRP_REGISTER_TRANSPORT usage.
Krisztian Litkey [Mon, 25 Nov 2013 19:44:03 +0000 (21:44 +0200)]
common: adjusted dbus MRP_REGISTER_TRANSPORT usage.

10 years agocommon/dbus: added patch for Fedora 19/systemd-204 src.rpm.
Krisztian Litkey [Tue, 8 Oct 2013 13:54:02 +0000 (16:54 +0300)]
common/dbus: added patch for Fedora 19/systemd-204 src.rpm.

If you download the official Fedora 19 systemd source RPM, patch
it with this patch and rebuild, you should get two additional
subpackages: systemd-libs-dbus and systemd-libs-dbus-devel. These
include a shared version of systemd's dbus library, systemd-bus.
Installing these should allow you to test/use the systemd-bus based
version of murphy-dbus.

10 years agocommon/dbus: added patch for Fedora 18/systemd-201 src.rpm.
Krisztian Litkey [Thu, 29 Aug 2013 23:08:43 +0000 (02:08 +0300)]
common/dbus: added patch for Fedora 18/systemd-201 src.rpm.

If you download the official Fedora 18 systemd source RPM, patch
it with this patch and rebuild, you should get two additional
subpackages: systemd-libs-dbus and systemd-libs-dbus-devel. These
include a shared version of systemd's dbus library, systemd-bus.
Installing these should allow you to test/use the systemd-bus based
version of murphy-dbus.

10 years agocommon: added a unit test for sdbus error message handling.
Ismo Puustinen [Wed, 25 Sep 2013 08:02:58 +0000 (11:02 +0300)]
common: added a unit test for sdbus error message handling.

10 years agoresource-dbus: converted to new D-Bus library API.
Ismo Puustinen [Mon, 23 Sep 2013 10:05:02 +0000 (13:05 +0300)]
resource-dbus: converted to new D-Bus library API.

10 years agocommon/dbus: systemd-bus based murphy-dbus implementation.
Krisztian Litkey [Tue, 20 Aug 2013 08:30:32 +0000 (11:30 +0300)]
common/dbus: systemd-bus based murphy-dbus implementation.

Added an alternative murphy-dbus implementation based on the
low-level D-Bus library (systemd-bus) from systemd. This needs
a patched systemd to build and install systemd-bus as a shared
library.

To get rid of libdbus-dependency it was also necessary to provide
an abstraction for message building and parsing and hence break
backward compatibility. To ease the transitional pain, we provide
currently three version of murphy-dbus: the original one with the
leaky message abstraction, as well as a libdbus- and a systmed-bus-
based one with the new abstraction. Once all the code has been
updated to not use directly libdbus calls for message building and
parsing, the original library will be removed.