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.
Krisztian Litkey [Mon, 25 Nov 2013 11:30:43 +0000 (13:30 +0200)]
common: initial support for native transport mode.
Added transport mode MRP_TRANSPORT_MODE_NATIVE to transmit
and receive registered native-type's. Now that it's been a
while since I last dug in, I can tell the transport infra
could use a heavy-handed cleanup / refactoring.
Krisztian Litkey [Mon, 25 Nov 2013 11:05:38 +0000 (13:05 +0200)]
common: arrays of basic types in native-types.
Hmm... looks like I've partially overlooked/forgotten about
arrays of basic types. Part of the code was there, part was
missing and part was simply broken. With this band-aid fix,
at least the basic cases should work. Let's see what else is
missing...
Krisztian Litkey [Fri, 25 Oct 2013 09:38:29 +0000 (12:38 +0300)]
common: more versatile data serialization via native-types.
Added native-types (and a primitive TLV encoder/decoder) to
provide more flexible and versatile data/type serialization.
Ideally (and eventually) we'd like to be able to throw any
natively declared data type at any supported transport and
have that automatically take care of the serialization and
deserialization necessary for transmission. Although with
this initial implementation we're far not there yet, this
should already provide a much more flexible framework to
work with and later build upon than what the original
MRP_TRANSPORT_MODE_DATA is capable of providing.
There are still quite a few rough edges and features either
missing or not fully implemented, including but not limited
to
- support for unions,
- implement blobs,
- automatic handling of linked lists of known types
- support all the (sensible) type/layout combinations
- allow self- and cross-referencing data types (IOW
allow forward-references to yet undeclared types, and
provide a function for checking if a type is complete,
ie. there are no undeclared types it references, and
this holds true also for all its referenced types)
Eventually we'd like to get to the point where, instead of
having to keep the limitations of the available transport
encoding and decoding in mind, one could freely design data
types as seen fit, and the transports could always handle
them.
Krisztian Litkey [Sat, 23 Nov 2013 12:39:14 +0000 (14:39 +0200)]
daemon,core: unlink all blacklisted builtin plugins.
Brutally unlink all blacklisted builtin plugins to make them
unreachable by ordinary means.
Krisztian Litkey [Fri, 22 Nov 2013 19:23:25 +0000 (21:23 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal
Krisztian Litkey [Fri, 22 Nov 2013 14:20:18 +0000 (16:20 +0200)]
lua-utils: can't call mrp_lua_get_lua_state, pulls in core.
Krisztian Litkey [Fri, 22 Nov 2013 14:11:50 +0000 (16:11 +0200)]
lua-utils: added missing include.
Ismo Puustinen [Thu, 21 Nov 2013 21:48:52 +0000 (23:48 +0200)]
resource: fix a memory corruption issue.
Krisztian Litkey [Wed, 20 Nov 2013 17:22:39 +0000 (19:22 +0200)]
lua-utils: fixed a few uninitialized var warnings.
Krisztian Litkey [Wed, 20 Nov 2013 01:14:05 +0000 (03:14 +0200)]
lua-utils: allocation tracking for the Lua object infra
If enabled, the object infra keeps track of all allocated and
still uncollected objects on a per classdef basis. Upon exit
all existing objects are dumped to stdout.
This behavior is enabled by setting __MURPHY_LUA_CONFIG="track=yes".
Setting it to any other value (than true, or on) or clearing the
environment variables disables object tracking.
Krisztian Litkey [Wed, 20 Nov 2013 01:07:00 +0000 (03:07 +0200)]
common: added mrp_env_config_* for fetching pre-startup configuration.
These routines are meant to pass configuration information to the
Murphy common/core infrastructure in cases where the configuration
needs to be obtained and activated before the startup sequence is
complete. A typical example would be to select whether to use the
stock allocator as such or to enable the built-in leak-checking and
tracking capabilities. Configuration for these kinds of features is
passed in special environment variables which there routines are
designed to extract information from.
Krisztian Litkey [Mon, 18 Nov 2013 23:31:11 +0000 (01:31 +0200)]
lua-utils: some sketch about how error path cleanup could look like.
Krisztian Litkey [Tue, 19 Nov 2013 20:35:02 +0000 (22:35 +0200)]
lua-utils: fix getfield thinko (not a setfield), try more intuitive behavior.
If a class is not marked extensible but it has overridden getfield
and setfield, always pass these operations for unrecognized members,
(members that have not been declared explicitly) to the overridden
handlers. If a class is marked extensible, only pass those members
to the overridden handlers that are whitelisted.
The same commit also fiddles a bit around in a seeming attempt to
unify the return value convention of setext/setiext/getext/getiext.
On a second thought, I think this was a rather pointless now. Error
handling will anyway need a thorough review cycle followed by a
systematic swipe through the code base unifying and rationalizing
all the error paths. We need to be especially careful with code that
can be called both from C and Lua context and make sure that throwing
a Lua error will not leave half-created/initialized objects hanging
around from nowhere just leaking memory.
Krisztian Litkey [Mon, 18 Nov 2013 17:47:40 +0000 (19:47 +0200)]
lua-bindings: added a very primitive module exposing bitwise operations to Lua.
Krisztian Litkey [Mon, 18 Nov 2013 23:13:09 +0000 (01:13 +0200)]
common/debug: check the proxied debug site in mrp_debug_at.
Krisztian Litkey [Mon, 18 Nov 2013 12:44:39 +0000 (14:44 +0200)]
lua-utils: get rid of unused function warning.
Krisztian Litkey [Sun, 17 Nov 2013 20:07:26 +0000 (22:07 +0200)]
lua-bindings: updated transport bindings MRP_LUA_DEFINE_CLASS macro usage.
Krisztian Litkey [Sun, 17 Nov 2013 20:06:09 +0000 (22:06 +0200)]
lua-bindings: updated MRP_LUA_DEFINE_CLASS macro usage.
Krisztian Litkey [Sun, 17 Nov 2013 20:04:24 +0000 (22:04 +0200)]
lua-utils: infra support for object stringification.
Krisztian Litkey [Sat, 16 Nov 2013 23:57:17 +0000 (01:57 +0200)]
lua-bindings: updated most bindings to used MRP_LUA_DEFINE_CLASS macro.
Krisztian Litkey [Sat, 16 Nov 2013 23:55:38 +0000 (01:55 +0200)]
lua-utils: added MRP_LUA_DEFINE_CLASS macro, comments for defining classes.
Krisztian Litkey [Sat, 16 Nov 2013 21:23:19 +0000 (23:23 +0200)]
lua-utils: simple stylistic unification, basic comments on visible routines.
Krisztian Litkey [Sat, 16 Nov 2013 22:24:59 +0000 (00:24 +0200)]
lua-utils: support for automatically bridged member methods
Added support for 'automatically bridged' member methods, a bit
akin to our 'automatically handled members'. These methods will
get their arguments readily fetched and decoded/converted from
the Lua stack into native C types on behalf of them in a fairly
type-safe manner (sans method signature misadvertising, of course).
The dirty details and heavy lifting of the actual type conversion
and bridging is taken care of by the nifty funcbridge infrastructure.
Krisztian Litkey [Sat, 16 Nov 2013 22:23:52 +0000 (00:23 +0200)]
common: added a macro for debug messages with explicitly specified site-info.
Krisztian Litkey [Sat, 16 Nov 2013 22:08:21 +0000 (00:08 +0200)]
lua-utils: support for typed objects, arrays, and autobridged members.
Extended funcbridge to support type-checked arrays and (murphy
core/lua-utils/object-infra) objects. The extensions include
- signature extensions for object and array specifications:
o [s|d|f]: an array of strings, integers, or doubles
o [*]: an array of any of the above types
o O(<C-type>): a Lua object of the given registered Murphy C type
o O(*): a Lua object of any of the registered Murphy C types
- collecting, type-checking, and passing arrays to bridged calls
- fetching, type-checking, and passing objects to bridged calls
Additionally, as calls to funcbridge member methods (from Lua to C)
arrive at funcbridge with an extra table at the bottom of the stack,
this needs special treatment if we want to make the bridged calls
with a genuine-looking stack. Funcbridge now has the necessary code
to patch the stack before the bridge (taking care of preventing any
garbage collection of temporarily removed objects), if the bridged
callee has indicated its desire for this.
Krisztian Litkey [Sat, 16 Nov 2013 22:05:08 +0000 (00:05 +0200)]
lua-utils: macros to produce a simple debug dump of the Lua stack.
Krisztian Litkey [Thu, 14 Nov 2013 19:39:14 +0000 (21:39 +0200)]
lua-utils: formalized object/userdata conversion, stricter validation.
Added a few macros and inlines to do checked and unchecked/trusted
conversion between objects and userdata. Changed all existing code
to use these. This should also make it easier to switch to a different
association mechanism/model when we move to Lua 5.2 or later.
Also added compile-time selectable stricter checking for valid userdata.
The stricter version stores the self pointer XOR'ed with the data
pointer. This should prevent us from misidentifying an empty linked
list or hook for a valid userdata.
Krisztian Litkey [Wed, 13 Nov 2013 23:44:20 +0000 (01:44 +0200)]
WiP: infantile transport testing in sample config.
Krisztian Litkey [Wed, 13 Nov 2013 23:25:29 +0000 (01:25 +0200)]
lua-bindings: embrionic first incarnation of transport bindings.
Added a limited first prototype of the transport bindings. This
one only does custom/JSON-encoding, and there is no sending in
place yet at all...
Krisztian Litkey [Thu, 14 Nov 2013 16:46:16 +0000 (18:46 +0200)]
lua-utils: first attempt at error handling macros.
Krisztian Litkey [Thu, 14 Nov 2013 16:41:34 +0000 (18:41 +0200)]
lua-bindings: added mrp_json_lua_unwrap.
Krisztian Litkey [Thu, 14 Nov 2013 16:40:07 +0000 (18:40 +0200)]
lua-bindings: check for failure of object class creation.
Krisztian Litkey [Thu, 14 Nov 2013 16:34:33 +0000 (18:34 +0200)]
lua-utils: mandate constructor, pointer-based type-check, raw setter/getter.
Don't allow registration of classes without a constructor.
Added mrp_lua_pointer_of_type for checking the type of the given
object. Note that the caller better make/be sure that the passed
pointer is definitely an instance of one of our classes, otherwise
horrible mayhem will ensue (as the now non-existing userdata is
accessed).
Added support (currently untested) for raw getters and setters.
These are called without a value pointer and are expected to
pop, decode, push and encode values from and to the Lua stack
themselves.
Also removed non-explicit member autoinitialization. The dominant
pattern is to set members to defaults in the constructor and then
call mrp_lua_init_members if there is table of initial values
passed to the construcor.
Krisztian Litkey [Thu, 14 Nov 2013 10:30:21 +0000 (12:30 +0200)]
lua-utils: PRIVREFS flag and handling, userdata/data conversion routines.
Added MRP_LUA_CLASS_PRIVREFS, supporting classes to choose between a
private and common reference tables. For instances of classes with a
private, all references the object owns will be automatically cleaned
up when the object is destroyed along with its privte reference table.
Also added static inline retrieval routines for getting to an object
from its userdata and vice versa (instead of the manual +/- 1-ing) to
help hide the internal details of the association mechanism. Still
need to go through the code and replace all +/- 1 instances with calls
to these.
Krisztian Litkey [Wed, 13 Nov 2013 23:18:25 +0000 (01:18 +0200)]
lua-utils: added ref reffing + simple class-checker macro.
Added mrp_lua_object_getref/putref for getting a private reference
from a reference owner by another object. Also added for simple
cases MRP_LUA_CLASS_CHECKER, a macro which automatically generates
a trivial minimalistic class checker (idx to class pointer) function..
Krisztian Litkey [Wed, 13 Nov 2013 22:51:01 +0000 (00:51 +0200)]
lua-bindings: push only once on mrp_json_lua_push.
Krisztian Litkey [Wed, 13 Nov 2013 12:19:43 +0000 (14:19 +0200)]
lua-utils: added MRP_LUA_CLASS_NOINIT flag.
Krisztian Litkey [Wed, 13 Nov 2013 00:09:45 +0000 (02:09 +0200)]
lua-utils: support objects of a specific type as automatic members.
Krisztian Litkey [Tue, 12 Nov 2013 23:59:38 +0000 (01:59 +0200)]
lua-bindings: fix inverted enabling/disabling debug printout.
Krisztian Litkey [Tue, 12 Nov 2013 23:57:08 +0000 (01:57 +0200)]
lua-bindings: don't add timer when callback is set if we already have one.
Krisztian Litkey [Tue, 12 Nov 2013 15:44:00 +0000 (17:44 +0200)]
lua-utils: support arrays as automatic members.
Krisztian Litkey [Thu, 21 Nov 2013 15:48:02 +0000 (17:48 +0200)]
daemon: added command-line option to disable runtime plugin loading.
Krisztian Litkey [Wed, 20 Nov 2013 23:34:10 +0000 (01:34 +0200)]
daemon: added command-line option to disable debug console.
Krisztian Litkey [Wed, 20 Nov 2013 22:45:26 +0000 (00:45 +0200)]
daemon: implemented blacklisting/whitelisting of plugins.
Currently plugins can only be blacklisted/whitelisted on the
command line. You can specify blacklists and whitelists separately
for builtin plugins, dynamic plugins, and plugins of either type.
You can use the special tokens '*' and 'all' as wildcards which
match all tokens. Using wildcards you can easily blacklist or
whitelist all plugins of any or a certain kind then puch holes
on the whiltelists or blacklists.
Examples:
- to blacklist all builtin plugins, use:
murphyd --blacklist-builtin '*'
- to blacklist all builtin plugins except lua and resource-native, use:
murphyd --blacklist-builtin '*' --whitelist-builtin lua,resource-native
- to consider all external plugins untrusted and blacklist them, use:
murphyd --blacklist-dynamic '*'
- to disable the console:
murphyd --blacklist console,wrt-console
Note that only the names of builtin plugins can be (somewhat) trusted
and even those cannot be trusted if you don't have any extra mechanisms
for the integrity protection of binaries and libraries. External plugins
can always be copied/moved under a different name, so disabling any
specific external plugin by name should not be considered secure by any
means. One typical usage of these options is to disable loading of any
external plugins.
Krisztian Litkey [Wed, 20 Nov 2013 20:45:29 +0000 (22:45 +0200)]
build-sys: finally, remove all *-func-info.c from the repo.
Krisztian Litkey [Tue, 12 Nov 2013 10:47:48 +0000 (12:47 +0200)]
resolver: pkg-config fixes.
Krisztian Litkey [Mon, 11 Nov 2013 20:18:07 +0000 (22:18 +0200)]
lua-bindings: don't declare an unused variable by a macro.
Krisztian Litkey [Mon, 11 Nov 2013 20:15:46 +0000 (22:15 +0200)]
lua-bindings: fix luaL_error induced uninitialized false positives.
Krisztian Litkey [Mon, 11 Nov 2013 20:14:35 +0000 (22:14 +0200)]
common/test: fix a sizeof-thinko.
Krisztian Litkey [Mon, 11 Nov 2013 02:23:07 +0000 (04:23 +0200)]
lua-bindings: added Lua bindings for murphy sighandlers.
Krisztian Litkey [Mon, 11 Nov 2013 01:03:47 +0000 (03:03 +0200)]
lua-bindings: added Lua bindings for murphy deferred callback.
Krisztian Litkey [Sun, 10 Nov 2013 02:12:41 +0000 (04:12 +0200)]
lua-bindings: added Lua bindings for murphy timers.
Krisztian Litkey [Mon, 11 Nov 2013 00:56:32 +0000 (02:56 +0200)]
lua-utils: support for automatic handling of Lua object members.
A big bunch of code to allow easier development of Lua bindings
for native C functionality. The new features include:
o Fully backward-compatible, actually unmodified (sans bugs) support
for the existing class/object implementation model. If you don't
touch your code, it's behavior (and performance) should not change.
o Automatically handled members. Just declare member name, type,
storage offset, read-write status, and let the infra handle the
rest for you.
o Change notifications. If you need to know, the infra will notify you
whenever the value of an automaticallt handled variable has been
changed.
o Optional setters and getters. If a member needs a bit more complex
handling (eg. to take care of semantic or contextual constrains),
you can specify getters and/or setters on a per-member basis. If set
these will be invoked to set and retrieve the value of a member when
necessary.
o Extended members. If you mark your class extensible, users will be
able to extend your class from Lua by setting other members than the
ones you have declared.
o Fully manual members. Even if you have a class with automatically
handled and Lua-extended members, you can declare a set of members
'native'. These will always be handed to the setfield/getfield class
methods where you take care of every detail of setting/retrieving
their values.
Note that there are quite a few pending ideas that we did not have time
to implement yet. The most obvious one is the automatic handling of more
types, especially Lua classes/objects (of our object modes), arrays of
various basic types, values/calling of C-functions, and values/calling of
funcbridges. Others include things like improvements to the notifications
(to allow better/easier rejection of setting invalid values), runtime
object usage gathering (in a similar fashion to what murphy/common/mm
does for basic chunks, if tracing is enabled) and a bunch of others...
Also note that due to the amount of new code in short time, there are
very probably plenty of bugs remaining. One source of problems is hasty
raising of Lua exceptions (typically by luaL_error & co) on code pathes
where an exception will cause memory leaks. This can happen easily by
allocating objects in several go and doing calls to Lua or functions
that might raise Lua exceptions. It can happen also in a less obvious
way when a Lua exception (and the resulting longjump) will leave dangling
refrences to Lua objects. All the new getfield/setfield code paths will
need to receive eyeballing with scrutiny to identify these cases and
some of the existing functions will need to be changed so that instead
of always throwing an exception they either throw or return an error
code (and an error message) depending on whether the caller has provided
an error buffer or NULL. With such a convention, code that can get called
from both Lua and C context, can always fail gracefully without causing
leaks.
Krisztian Litkey [Sun, 10 Nov 2013 11:43:35 +0000 (13:43 +0200)]
lua-bindings: added mrp_lua_dump_stack.
Krisztian Litkey [Sun, 10 Nov 2013 02:14:30 +0000 (04:14 +0200)]
lua-bindings: JSON constructor fix for no arguments.
Krisztian Litkey [Fri, 8 Nov 2013 17:12:56 +0000 (19:12 +0200)]
lua-bindings: added Lua bindings to manipulate JSON objects from Lua.
Krisztian Litkey [Thu, 7 Nov 2013 21:20:43 +0000 (23:20 +0200)]
common: print empty JSON object as {} instead of null.
Krisztian Litkey [Thu, 7 Nov 2013 21:14:28 +0000 (23:14 +0200)]
core: allow also registering a class defintion by MURPHY_REGISTER_LUA_BINDINGS.
Krisztian Litkey [Thu, 7 Nov 2013 17:08:32 +0000 (19:08 +0200)]
common: fix a few JSON macros with extra semicolons.
Krisztian Litkey [Mon, 4 Nov 2013 00:40:58 +0000 (02:40 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal
Krisztian Litkey [Sun, 3 Nov 2013 23:45:43 +0000 (01:45 +0200)]
websockets: honour the requested/specified protocol name
Don't hardcode "murphy" as the websocket protocol name. Instead,
use the protocol name specified in the websocket address both
for bind and connect.
Ismo Puustinen [Wed, 30 Oct 2013 14:23:15 +0000 (16:23 +0200)]
resource-c: updated API test.
Ismo Puustinen [Tue, 22 Oct 2013 10:37:34 +0000 (13:37 +0300)]
resource-c: added support for querying resource set id.
Also, if there wasn't a server side resource set, make the release operation
create one. This is needed so that resource set ids (assigned by server)
can be retrieved without acquiring a resource set.
Ismo Puustinen [Tue, 15 Oct 2013 10:17:53 +0000 (13:17 +0300)]
common: fixed a possible NULL pointer dereference in process tracking.
Krisztian Litkey [Tue, 15 Oct 2013 11:14:47 +0000 (14:14 +0300)]
Merge branch 'master' of github.com:otcshare/policy-internal
Krisztian Litkey [Tue, 15 Oct 2013 05:39:55 +0000 (08:39 +0300)]
common: never remove forcibly a reused fd from epoll.
If during a single iteration of epoll event dispatching
a file descriptor is closed and reused, make sure the
new reused file desciptor is not accidentially removed
from epoll.
During dispatching we try to patch things up to prevent
a busy looping flood of EPOLLRDHUP/EPOLLHUP events for
users that don't properly handle them. This bug was
triggered when the closed file descriptor got reused and
a new watch for it readded from within the I/O watch
callback for the HUP event on the original closed descriptor.
This patch also makes sure that an effectively similar bug
can not be triggered by calling mrp_del_io_watch twice for
the same I/O watch.
Krisztian Litkey [Mon, 14 Oct 2013 17:23:45 +0000 (20:23 +0300)]
common: more mainloop debug messages for I/O watches.
Krisztian Litkey [Mon, 14 Oct 2013 15:01:15 +0000 (18:01 +0300)]
common: more debug messages for stream transport events.
Ismo Puustinen [Mon, 14 Oct 2013 13:51:17 +0000 (16:51 +0300)]
mdb: Don't use C++ keywords in variable names and structure members.
Ismo Puustinen [Mon, 14 Oct 2013 13:48:09 +0000 (16:48 +0300)]
core: fix compiler warnings.
In theory, forward declarations of enums are not allowed, because C
standard doesn't define the size of enum type.
Ismo Puustinen [Fri, 4 Oct 2013 12:11:01 +0000 (15:11 +0300)]
resource-dbus: fix a memory leak.
Krisztian Litkey [Fri, 4 Oct 2013 11:36:13 +0000 (14:36 +0300)]
build-sys: added githooks to do Change-Id insertion/filtering.
Added a bunch of git hooks that collectively try to automatically
insert or filter gerrit Change-Id tags depending on the branch name.
Branches matching *tizen* will have tags inserted other will have
tags filtered out. If you have a bunch of existing commits where
you want do a bulk insert/filter operation, just run git rebase -i
over the range of commits, mark all for rewording, and the hooks
will (try to) do the right thing for you.
To get the name-based insertion/filtering logic working correctly
over rebases, we have to save the branch name in a pre-rebase hook,
use the saved name if it exists or dig it out if not in the
commit-msg hook, and remove the saved name in a post-rewrite hook.
Krisztian Litkey [Mon, 30 Sep 2013 15:53:43 +0000 (18:53 +0300)]
common: don't free a busy nl_pid_watch_t.
Mark an nl_pid_watch_t busy while it is being scanned. If a
client callback destroys the last watch, check if the pid
watch is busy. If it is, just unhash it and mark it dead,
otherwise unhash and destroy it right away. Each time a watch
scan finishes, check and destroy the watch if it has been
marked dead.
Krisztian Litkey [Mon, 30 Sep 2013 14:49:50 +0000 (17:49 +0300)]
resolver: filter out duplicate target dependencies.
Currently failing to do so could trigger dereferencing
fact_stamps beyond its end in older_than_facts (as
fact_stamps is allocated in the graph sorter and its
size reflects the number of unique dependencies).
Krisztian Litkey [Sat, 28 Sep 2013 19:34:33 +0000 (22:34 +0300)]
console: flush and proxy output after each command.
Also we have now an I/O watch in place for the console
output pipe. This enables us in the future to plug any output fd
to any console if we wish to do so.
Krisztian Litkey [Sat, 28 Sep 2013 19:25:03 +0000 (22:25 +0300)]
daemon: make sure stdout is line-buffered (and stderr non-buffered).
This should fix the annoying "no output from console commands" bug
experienced when running/logging via systemd. When running under
systemd fileno stdout is a socket. Hence, stdout is fully buffered
by default with a quite large buffer size. This effectively breaks
the interactive murphy console (unless we fflush both stdout and
stderr after running a command handler) as output resulting from
a console command gets buffered and is only written to the console
at random intervals when the buffer gets full.
Krisztian Litkey [Tue, 24 Sep 2013 19:13:55 +0000 (22:13 +0300)]
config: don't try to load D-Bus plugin.
Krisztian Litkey [Tue, 24 Sep 2013 18:51:57 +0000 (21:51 +0300)]
murphy-db: don't propagate uninitialized value to status.
Krisztian Litkey [Tue, 17 Sep 2013 22:39:10 +0000 (01:39 +0300)]
daemon: valgrind re-exec support, source tree detection
The daemon can now re-exec itself through valgrind, preserving its
command line and the environment if so requested.
Also the daemon tries to detect if it is run directly from the
source tree. If it is, the runtime defaults are modified to
load the configuration file and plugins from the same source
tree and to run with increased verbosity. If necessary these
can be overridden on the command line.
Krisztian Litkey [Tue, 17 Sep 2013 19:20:56 +0000 (22:20 +0300)]
lua-decision: removed now unused 'dependency' Lua object.
Krisztian Litkey [Tue, 17 Sep 2013 14:50:41 +0000 (17:50 +0300)]
lua-decision: use direct dependency on the table for select.
Instead of generating an intermediate target that depends
on the table and have the select rule depend on this one,
omit the intermediate target altogether and let the select
depend on the table itself.
Krisztian Litkey [Tue, 17 Sep 2013 14:28:14 +0000 (17:28 +0300)]
lua-decision: throw Lua exception for fatal ruleset errors.
Throw Lua exception to bail out for ruleset generation errors.
Also use mrp_log_error to log errors instead of printf.
Krisztian Litkey [Sat, 14 Sep 2013 06:25:36 +0000 (09:25 +0300)]
resolver: update targets based on direct dependencies.
Don't run unconditionally the actions of a target if any
of the facts in the transitive closure of the dependencies
have changed. Instead always check the immediate dependencies
and run the actions only if some of those have changed.
Krisztian Litkey [Mon, 16 Sep 2013 12:41:31 +0000 (15:41 +0300)]
resolver: added console dump command.
Krisztian Litkey [Fri, 13 Sep 2013 18:38:50 +0000 (21:38 +0300)]
murphy-db: maintain stamp across transactions without changes.
Transaction track the state of tables by storing as a fingerprint
the number of inserts, deletes and updates in a transaction start
log entry. If at the end of the transaction the fingerprint is
identical the table stamp is restored.
Additionally, row and column update has been modified to omit the
creation of log entries for updates that would produce an identical
row. Since the insert/delete/update fingerprint is updated when
a log entry is created (and replayed during a rollback), this will
keep the stamp intact if a transaction contains only identical
updates.
Krisztian Litkey [Thu, 29 Aug 2013 23:11:30 +0000 (02:11 +0300)]
Merge branch 'master' of github.com:otcshare/policy-internal
Krisztian Litkey [Tue, 27 Aug 2013 16:12:14 +0000 (19:12 +0300)]
common: make mrp_mm_realloc[z] more C++-kosher.
Krisztian Litkey [Wed, 21 Aug 2013 13:19:32 +0000 (16:19 +0300)]
common/glib-glue: include common/mainloop.h.
Ismo Puustinen [Tue, 20 Aug 2013 07:25:49 +0000 (10:25 +0300)]
resource-c: removed forgotten debug print.
Ismo Puustinen [Wed, 14 Aug 2013 06:15:39 +0000 (09:15 +0300)]
common: ecore-glue.h can now be called from C++.
Ismo Puustinen [Tue, 13 Aug 2013 13:18:23 +0000 (16:18 +0300)]
resource-c: can be called from C++ code.
Ismo Puustinen [Tue, 6 Aug 2013 07:22:42 +0000 (10:22 +0300)]
breedline: started working on backwards search.
Ismo Puustinen [Fri, 26 Jul 2013 12:05:33 +0000 (15:05 +0300)]
lua-decision: do not crash if no error message set.
Function bridge expects every caller object to set a string
error message if the call fails, even if the return type is
set to boolean. Still, there shouldn't be a crash if the error
message is not set.
Ismo Puustinen [Wed, 24 Jul 2013 07:25:39 +0000 (10:25 +0300)]
resource-client: fix possible NULL pointer bug.
Ismo Puustinen [Wed, 24 Jul 2013 07:22:02 +0000 (10:22 +0300)]
resource-dbus: do not use memory before testing for NULL.
Ismo Puustinen [Wed, 24 Jul 2013 07:20:37 +0000 (10:20 +0300)]
resource-native: do not use memory before assert.
Ismo Puustinen [Wed, 24 Jul 2013 07:19:10 +0000 (10:19 +0300)]
common: fix a possible NULL pointer error.
Ismo Puustinen [Mon, 22 Jul 2013 20:29:24 +0000 (23:29 +0300)]
murphy-db: sizeof(int*) -> sizeof(int) as reported by static analysis.
Ismo Puustinen [Mon, 22 Jul 2013 17:13:55 +0000 (20:13 +0300)]
resource-c: fixed a compiler warning.