Krisztian Litkey [Tue, 28 Oct 2014 12:48:34 +0000 (14:48 +0200)]
lua-deferred: explicitly restore Lua stack across callbacks.
Krisztian Litkey [Tue, 28 Oct 2014 12:48:34 +0000 (14:48 +0200)]
lua-console: explicitly restore Lua stack across callbacks.
Krisztian Litkey [Mon, 27 Oct 2014 16:27:50 +0000 (18:27 +0200)]
domain-control: switched to resolver-aware trigger-driven notification logic.
Switched client notification logic from table stamp-based to
trigger-driven. Also block client updates if/while ruleset-
resolution is active. Schedule an extra update when resolution
is finished.
Resolver-activity is tracked by subscribing to start/done/fail
events emitted by the resolver and calculating started but un-
finished events.
Krisztian Litkey [Mon, 27 Oct 2014 18:23:26 +0000 (20:23 +0200)]
murphy-db: emit transaction depth/ID in transaction trigger events.
Krisztian Litkey [Sun, 26 Oct 2014 18:00:05 +0000 (20:00 +0200)]
murphy-db: don't leak result rows created in trigger row_event_callbacks.
This patch does fix certain memory leaks, but to be honest I'm not
entirely sure if the fix needs to be put behind some extra checks
to not cause trouble by overzealous freeing on other code pathes.
Needs eyeballing from someone more initiated...
Krisztian Litkey [Sun, 26 Oct 2014 15:32:46 +0000 (17:32 +0200)]
domain-control: fixed a few compiler warnings.
Krisztian Litkey [Sun, 26 Oct 2014 15:04:48 +0000 (17:04 +0200)]
sample-config: better timer/deferred/sighandler tests.
Krisztian Litkey [Sun, 26 Oct 2014 13:16:27 +0000 (15:16 +0200)]
lua-deferred: fixes, explicit enable/disable, removed 'data' member.
Added support for explicitly enabling/disabling deferred callbacks.
Removed 'userdata'-like data member as pointless. Since Lua deferred
callback is an extensible object, one can set data as an extended
Lua attribute just as well. No need to special-case it out...
Deferred callbacks are now automatically disabled if invoking the
associated callback fails.
Krisztian Litkey [Sun, 26 Oct 2014 13:14:42 +0000 (15:14 +0200)]
lua-sighandler: fixes, explicit enable/disable, removed 'data' member.
Added support for explicitly enabling/disabling signal handlers.
Removed 'userdata'-like data member as pointless. Since Lua
sighander is an extensible object, one can set data as an extended
Lua attribute just as well. No need to special-case it out...
Signal handlers are now automatically disabled if invoking the
associated callback fails.
Krisztian Litkey [Sat, 25 Oct 2014 17:25:52 +0000 (20:25 +0300)]
lua-timer: fixes, explicit start/stop, removed 'data' member.
Added support for explicitly stopping and starting an otherwise
fully functional timer (IOW both interval and callback set). Also
removed the userdata-like 'data' members as pointless. Since Lua
timer is an extensible object, one can set data as an extended
Lua attribute just as well. No need to special-case it out...
Removed all attempts to self-destruct the object by explicitly
calling mrp_lua_destroy_object as Lua timer is now marked dynamic.
Timers are now automatically disabled if invoking the callback
fails.
Krisztian Litkey [Sun, 26 Oct 2014 12:42:25 +0000 (14:42 +0200)]
lua-utils: exttbl and reftbl cleanup fixes, call user destructor earlier.
Fix bad exttbl cleanup thinko (exttbl is an ordinary table, not
a table of references). Change reftbl cleanup to simply remove
our reference to reftbl. Also moved invoking the user-provided
destructor a bit earlier before reftbl and extbl are cleaned up.
Explicit cleanup of reftbl (by explicitly looping through reftb
and removing all references found there) reliably triggers an
assert in the Lua garbage-collector. I'm quite puzzled why this
happens. Maybe it has something to do with being called from the
garbage-collector... though I checked the documentation about
finalizers and did not find a word about any limitations what
one would be allowed to do from a finalizers. For the time being
we just drop our reference to reftbl, which should be good enough
as it should remove all references from the table once that is
collected. This needs further head-scratching and eyeballing...
Krisztian Litkey [Sat, 25 Oct 2014 16:52:13 +0000 (19:52 +0300)]
lua-utils: removed #if 0'd code.
Krisztian Litkey [Sat, 25 Oct 2014 15:30:40 +0000 (18:30 +0300)]
lua-utils: properly release references from refs.priv and refs.ext.
Krisztian Litkey [Sat, 25 Oct 2014 15:28:55 +0000 (18:28 +0300)]
lua-utils: obey format string for object dumping.
Krisztian Litkey [Sat, 25 Oct 2014 11:06:57 +0000 (14:06 +0300)]
lua-utils: fix a few snprintf-related formatted printing warnings.
Krisztian Litkey [Sat, 25 Oct 2014 09:26:52 +0000 (12:26 +0300)]
test-plugin: get rid of a compiler warning.
Krisztian Litkey [Sat, 25 Oct 2014 09:26:04 +0000 (12:26 +0300)]
lua-sighandler: get rid of a compiler warning.
Krisztian Litkey [Sat, 25 Oct 2014 09:25:51 +0000 (12:25 +0300)]
lua-deferred: get rid of a compiler warning.
Krisztian Litkey [Sat, 25 Oct 2014 09:25:42 +0000 (12:25 +0300)]
lua-timer: get rid of a compiler warning.
Krisztian Litkey [Fri, 24 Oct 2014 16:37:44 +0000 (19:37 +0300)]
resource-lua: plant the necessary funcbridge gettop/settop wrappers.
Krisztian Litkey [Mon, 20 Oct 2014 14:22:42 +0000 (17:22 +0300)]
lua-bindings: clone JSON objects when setting them as Lua JSON members.
Create a private copy (by cloning) of JSON objects when setting
them as members of a Lua JSON object. Otherwise the same object
would end up being set (and without the necessary extra refcounts)
as members of several Lua JSON objects. This would wreak havoc when
those objects get destroyed, eventually double-freeing a shared
JSON member.
Krisztian Litkey [Thu, 16 Oct 2014 20:35:58 +0000 (23:35 +0300)]
lua-bindings: mark Lua JSON class to opt-out from implicit self-referencing.
JSON Lua objects should definitely not be self-referencing. They are
not going to get explicitly destroyed from C. Rather they should obey
the normal Lua scoping/object lifecycle rules and get garbage-collected
accordingly.
Krisztian Litkey [Mon, 20 Oct 2014 15:31:10 +0000 (18:31 +0300)]
common: added mrp_json_clone for creating a private copy of a JSON object.
Krisztian Litkey [Thu, 16 Oct 2014 19:33:11 +0000 (22:33 +0300)]
lua-utils: add support for dynamically collected Lua objects.
This patch tries to address a number of limitations in the
Murphy Lua object infrastructure that currently prevents us
from creating Lua objects with expected Lua object lifecycle
characteristics and subject to normal Lua garbage-collection
rules.
This patch is monsterous in size and I already regret having
squashed it beyond what would have been more reasonable. I'm
still reluctant to go through the trouble of splitting it up
again to more self-contained orthogonal chunks, as the patch
only touches lua-utils/objects.[hc]. Instead I sum up here
the logically distincts parts the patch is made of:
1) Introduce dynamic classes and implement their necessary
behavior. This involves introducing the DYNAMIC flag, as
well as providing versions of the simple CLASSDEF macros
that take also a flag as it is expected that many of the
simple classes will need to be dynamic.
Implementing the necessary behaviour touches object
creation, destruction (including userdata destuction),
and pushing. As part of the necessary changes, dynamic
objects can not be pushed by reference any more (since
they do not install global self-references). Therefore,
objects have been modified so that two Lua objects can
share a (refcounted) userdata_t (the essence of a Murphy
Lua object) by adding a layer of indirection. IOW, now
instead of a userdata_t being directly allocated as a Lua
(userdata) object on the stack, the corresponding Lua
(userdata) object now contains a pointer to a reference
counted userdata_t (Murphy Lua object). Sorry about the
confusing terminology, for once I'm not the one to be
blamed... Anyway, now pushing a dynamic object becomes
merely creating a new Lua object pointing to the same
userdata_t and increasing the refcount of the latter.
Popping/destroying simply becomes decreasing the refcount
and freeing the object when the last reference is gone.
Dynamic objects are not supposed to be explictly destroyed
and indeed the explicit destructor will refuse to do
lifecyclewise anything to dynamic objects. It will print
an error if th eexplicit destructor is ever called with a
dynamic object.
Note that if you use the more recently introduced but
arguably slightly more complex MRP_LUA_DEFINE_CLASS macros
to declare your classes, even Lua extensions of your objects
keep working as before. For classes created with the original
macros, things might not work as you'd expect (but this
should be really trivial to fix by switching static objects
over to the newer explicit extension mechanism/infra).
2) Slight cleanups and fixes to the object-infra/userdata_t.
userdata has been slightly modified to collect all the
various references under a single refs structure with luatbl
replaced by refs.self, exttbl replaced by refs.ext and reftbl
replaced by refs.priv. The reference and extension table
cleanup functions have been (hopefully) fixed to properly let
go of all per-object references upon object destruction.
MRP_LUA_CLASS_PRIVREFS has been made implicit and removed
altogether. Hence, all the explicit referencing functions now
operate on private references on a per object basis.
3) The object create/push/destroy/pop/unref code pathes have
now been planted with more thorough debug messages for better
debuggability.
4) Two functions have been added for debug-dumping both static and
dynamic object instances in a unified format.
Here are a few more words about the various bits this patch is
comprised of...
The patch loosens the assumptions about whether instances of
all Lua classes always need to be implicitly self-referencing.
Since most of our classes and objects are still configuration
objects or Lua scripting extensions to C objects, neither of
wich are supposed to be destroyed from Lua, we default to self-
referencing classes. Instances of such classes always get a
global reference automatically installed, essentially making
them static and preventing garbage collection from taking place
until they are explicitly destroyed (which also removes their
global reference).
With this patch in place, one can now mark a class dyanmic thus
opting out from implicit self-referencing on a per class basis.
This happens by setting the flag MRP_LUA_CLASS_DYNAMIC for the
class definition. Instances of such classes will not auto-
matically create a globally reachable self-reference into the
registry and hence will be subject to more natural Lua object
lifecycle rules. Once all reference to such an object go out of
scope the object will be garbage collected and destroyed.
Added a level of indirection between murphy Lua objects and their
userdata. Instead of userdata being directly allocated by Lua and
being part of the Lua object itself, userdata is now allocated as
a separate reference-counted chunk of memory. A Lua object now is
just metadata plus a pointer to the separately allocated userdata.
Pushing an object instance on the Lua stack now does not require
keeping a Lua reference to the object. Instead, a new Lua object
(Lua userdata) is created, made to point to the existing userdata
and the userdata reference count is increased. The destructor for
userdata_t has been modified to decrease the reference count of
the object and only destroy it when the last reference is gone.
With this new scheme, several Lua (userdata) objects can exist for
the same userdata (Murphy Lua object), each keeping its own reference
in the userdata reference count. The constructor, push and destructor
have been set up to reference count the potentially shared userdata
so that once all Lua instances representing (pointing to) the same
object instance go out of scope and get collected, the object instance
itself is destroyed.
These changes should be completely transparent to all existing object
implementations. Self-referencing objects still keep a global reference
to themselves in the registry just like they used to preventing the
initially created object to ever get out of scope. Self-referencing
objects are still pushed to the Lua stack by reference.
Krisztian Litkey [Fri, 24 Oct 2014 13:54:51 +0000 (16:54 +0300)]
lua-utils: added mrp_lua_call{stack,trace}.
Krisztian Litkey [Thu, 23 Oct 2014 15:37:06 +0000 (18:37 +0300)]
common: added support for runtime refcounting error detection.
Added support for detecting when object references have been
overzelaously dropped below a reference count of zero. Print
an error message with the offending unref that triggered the
condition (wich is of course not necessarily the bug itself).
refcounting error detection can be disabled during compilation.
Krisztian Litkey [Fri, 17 Oct 2014 16:04:55 +0000 (19:04 +0300)]
core: added 'debug mm dump' console command for dumping unfreed objects.
Krisztian Litkey [Sat, 25 Oct 2014 10:04:32 +0000 (13:04 +0300)]
domain-controller: update watch stamp after sending notifications.
Update proxy table watch stamps after table changes have been
synced to the corresponding client. Failing to do so causes all
transactions to trigger notifications to all clients regardless
of what they have subscribed to.
Krisztian Litkey [Fri, 10 Oct 2014 17:13:01 +0000 (20:13 +0300)]
resource-native: enable json-c/JSON-Glib symbol clash hackaround.
resource-api.h is currently the only known location which triggers
the PITA symbol clash. It happens when compiling ico-uxf-homescreen.
It indirectly includes resource-api.h and also uses JSON-Glib for
manipulating JSON objects ending up including both...
Krisztian Litkey [Fri, 10 Oct 2014 16:54:19 +0000 (19:54 +0300)]
common: added json-c/JSON-Glib symbol clash hackaround.
json-c and JSON-Glib have a symbol clash on json_object_get_type.
With the latest JSON transport mode changes, if someone ends up
directly or indirectly including both our transport.h, and hence
our json.h, as well as JSON-Glib, we'll trigger the symbol clash.
As a workaround if we detect that JSON-Glib has already been
included we'll compile with alternative signatures (void *,
instead of mrp_json_t *) and omit including json.h. Also we
let people give us a warning by defining __JSON_GLIB_DANGER__
that they will or might include JSON-Glib, in which case
we also compile with the alternative signatures. Oh boy...
Krisztian Litkey [Thu, 2 Oct 2014 08:07:27 +0000 (11:07 +0300)]
common: add an explicit transport mode for JSON-based encoding.
Promoted JSON-based encoding to an explicit transport mode of its
own. Taught the stream- and datagram-transports to talk JSON. The
datagram-transport JSON code is untested. The stream-transport has
been minimally exercised.
The websocket transport has not been flipped over to the dedicated
mode yet. It still runs the transport in custom mode for JSON-
based messaging.
Ismo Puustinen [Mon, 29 Sep 2014 07:19:33 +0000 (10:19 +0300)]
resource-lua: fixed call order, memory freeing.
Ismo Puustinen [Mon, 6 Oct 2014 10:31:19 +0000 (13:31 +0300)]
resource-backend: fix a memory leak.
Krisztian Litkey [Thu, 18 Sep 2014 08:23:47 +0000 (11:23 +0300)]
sample-config: added a sample timer test.
Krisztian Litkey [Thu, 18 Sep 2014 08:15:22 +0000 (11:15 +0300)]
lua-timer: delete timer if callback is set to null/nil.
Ismo Puustinen [Mon, 22 Sep 2014 09:58:41 +0000 (12:58 +0300)]
lua-object: always init variable length when iterating object fields.
Ismo Puustinen [Mon, 22 Sep 2014 08:08:53 +0000 (11:08 +0300)]
libresource: handle message parsing errors consistently.
Ismo Puustinen [Mon, 22 Sep 2014 07:07:00 +0000 (10:07 +0300)]
process: removed a code remnant.
Ismo Puustinen [Fri, 19 Sep 2014 07:57:48 +0000 (10:57 +0300)]
libresource: keep on fixing the errors.
Ismo Puustinen [Fri, 19 Sep 2014 07:50:23 +0000 (10:50 +0300)]
libresource: fix errors found by static analysis.
Ismo Puustinen [Fri, 19 Sep 2014 07:32:18 +0000 (10:32 +0300)]
process: fix an error found by static analysis.
Jan Ekström [Wed, 10 Sep 2014 10:41:39 +0000 (13:41 +0300)]
docs: generally document compilation in README.md.
Jan Ekström [Wed, 10 Sep 2014 08:32:52 +0000 (11:32 +0300)]
build: change Automake strictness to "foreign".
This removes automake's need to copy standard GNU INSTALL file
when run with --install. Additionally removes INSTALL as we
do not use it in Murphy
Jan Ekström [Thu, 4 Sep 2014 13:37:03 +0000 (16:37 +0300)]
build-sys: Add checks for Debian-packaged lua.
This adds checks for lua5.2 and lua5.1, and keeps the override
available for cases where a specific lua version is needed.
Jan Ekström [Thu, 4 Sep 2014 10:53:13 +0000 (13:53 +0300)]
lua-utils: correct a type check for a Lua array collection.
Also put there a clarifying comment about the check.
Krisztian Litkey [Wed, 3 Sep 2014 13:14:40 +0000 (16:14 +0300)]
domain-control: think harder, Homer ! (more column check fixes).
Krisztian Litkey [Wed, 3 Sep 2014 08:09:25 +0000 (11:09 +0300)]
build-sys: check and bail out for explicitly detected missing yacc/bison.
Krisztian Litkey [Wed, 3 Sep 2014 08:00:43 +0000 (11:00 +0300)]
build-sys: check and bail out for explicitly detected missing [f]lex.
Krisztian Litkey [Tue, 2 Sep 2014 08:10:38 +0000 (11:10 +0300)]
domain-control: fix check for exceeding total column count.
Jan Ekström [Thu, 28 Aug 2014 09:43:07 +0000 (12:43 +0300)]
build: Don't install license or the INSTALL file
Per-distribution packaging usually handles the license, and
INSTALL usually isn't installed to the system at all.
Krisztian Litkey [Mon, 25 Aug 2014 14:30:44 +0000 (17:30 +0300)]
build-sys: pass $(CC) as the preprocessor to collect-symbols.
Krisztian Litkey [Mon, 25 Aug 2014 14:21:37 +0000 (17:21 +0300)]
collect-symbols: unshave preprocessor if given.
Krisztian Litkey [Thu, 21 Aug 2014 14:33:15 +0000 (17:33 +0300)]
resource-native: get rid of creeping unuseitis.
Krisztian Litkey [Thu, 21 Aug 2014 14:22:57 +0000 (17:22 +0300)]
build-sys: check for malloc only if we're not cross-compiling.
Krisztian Litkey [Thu, 21 Aug 2014 14:04:27 +0000 (17:04 +0300)]
build-sys: removed old cruft, safer flex/bison checks.
Krisztian Litkey [Thu, 21 Aug 2014 12:37:03 +0000 (15:37 +0300)]
build-sys: try to get collect-symbols right when cross-compiling.
Jan Ekström [Thu, 7 Aug 2014 10:43:45 +0000 (13:43 +0300)]
common: Don't use the trailing null with unix socket paths
Affects {stream,dgram}-transport; Bind/connect doesn't ignore/
remove the null, and most things don't have a null at the end
of the socket's path.
Jan Ekström [Mon, 28 Jul 2014 12:42:37 +0000 (15:42 +0300)]
build: Add JSON_LIBS to murphyd's linker flags
Jan Ekström [Thu, 31 Jul 2014 11:07:33 +0000 (14:07 +0300)]
websockets: Do not output creation events with a seq of 0
This was the only event as a response that didn't match the seq
with the query's
Jan Ekström [Tue, 29 Jul 2014 10:06:41 +0000 (13:06 +0300)]
websockets/json: Fix crashes due to misuse of internal APIs
This enables usage of the test page without causing segfaults
Jan Ekström [Tue, 22 Jul 2014 11:13:10 +0000 (14:13 +0300)]
libresource: Catch an allocation failure
Jan Ekström [Tue, 22 Jul 2014 11:12:20 +0000 (14:12 +0300)]
domain-control: Improve set/notify parsing
This fixes warnings given out by clang's static analyzer
Ismo Puustinen [Mon, 5 May 2014 10:38:24 +0000 (13:38 +0300)]
resource-backend: emit resource set events and extend the client API.
Ismo Puustinen [Tue, 3 Jun 2014 14:09:40 +0000 (17:09 +0300)]
core: funcbridge can now return arrays.
The values of arrays are limited to { number, boolean, string }. The numbers are
returned as doubles.
Krisztian Litkey [Fri, 2 May 2014 10:49:59 +0000 (13:49 +0300)]
test-domain-controller, plugin-test: add a test for proxied domain functions.
Krisztian Litkey [Fri, 2 May 2014 10:48:53 +0000 (13:48 +0300)]
core, domain-control: added proxied domain function calls.
Added a mechanism for exporting and invoking 'domain' functions.
Domain controllers can register functions which then can be invoked
by the core. The core uses the domain-control plugin to proxy the
call to and the return from the invocation. These functions currently
cannot be queried by the core. Trying to invoke a non-existing function
will fail asynchronously. Trying to invoke a function of a non-existing
domain controller will fail synchronously.
Similarly, the core can export functions which then can be invoked
by domain controllers. The domain-control plugin proxies the call to
and the return from the invocation. These functions currently cannot
be queried by the domain-controllers. Trying to invoke a non-existing
function will fail asynchronously.
We shouldn't need to have a domain-control specific export mechanism
at all. We need to replace all the various import/export/invocation
mechanism (there is one at least in the plugin infra, in the resolver
and now this) with a single one at its core and only adapt it as
necessary for these various components. Eventually...
Jan Ekström [Tue, 19 Aug 2014 12:01:30 +0000 (15:01 +0300)]
common/tests: added hash12-test.c that fell off in the previous hand-merge.
Krisztian Litkey [Wed, 25 Jun 2014 09:39:18 +0000 (12:39 +0300)]
common: mainloop support for edge-triggered I/O events.
This patch adds support for specifying on a per-watch basis whether
I/O events should be level or edge-triggered and also for setting
and retrieving the default I/O event trigger mode.
Because we provide both default and per-watch settings, we need an
extra flag for indicating level-triggered mode for a watch when the
default is set to EPOLLET (MRP_IO_TRIGGER_EDGE). This makes the patch
slightly more complex than just providing the necessary enum flags.
Krisztian Litkey [Fri, 15 Aug 2014 06:55:25 +0000 (09:55 +0300)]
build-sys: silence/fix warnings from autotools.
Jan Ekström [Mon, 4 Aug 2014 12:43:04 +0000 (15:43 +0300)]
common/tests: add a hash table test that adds and removes twelve objects.
Jan Ekström [Mon, 4 Aug 2014 12:23:30 +0000 (15:23 +0300)]
common/hashtbl: always unlink empty buckets from the used list.
Krisztian Litkey [Mon, 4 Aug 2014 09:28:41 +0000 (12:28 +0300)]
common: quit iterating for MRP_HTBL_ITER_STOP verdict.
Jan Ekström [Mon, 21 Jul 2014 14:05:06 +0000 (17:05 +0300)]
resource-dbus: Merge requesting and release of sets
Less duplicate code, fixes creation->release flow by enabling
further acquisitions. Also set initialization moved to its own
function.
Jan Ekström [Wed, 16 Jul 2014 07:00:39 +0000 (10:00 +0300)]
libresource: Improve the documentation for release of sets
Document the fact that release can be used for start of delivery
of Resource callbacks for sets in cases where actually acquiring
the set is not wished for.
Jan Ekström [Tue, 15 Jul 2014 12:18:00 +0000 (15:18 +0300)]
libresource: Info instead of error when ignoring events
The printed message is used for both informational purposes
as well as when there is an error state - and with error
states there are always other error messages printed, so
having this message be printed out by default is not
necessary. Modifies the printed message, as ignoring events
is not specific to cases of malformed data.
As a side effect, this stops "ignoring malformed resource
event" error messages from coming up in the log when
receiving the first message from Murphy (could be replicated
with both resource-api-test as well as my Python wrapper).
Jan Ekström [Tue, 8 Jul 2014 11:11:18 +0000 (14:11 +0300)]
mdb: Propagate a value gotten from realloc()
Neither ISO C, POSIX or GNU libc seem to guarantee that the pointer
stays the same with size being smaller than the current size. Thus
we need to propagate the pointer, even if it in many cases ends up
being the same one.
Jan Ekström [Tue, 8 Jul 2014 07:23:14 +0000 (10:23 +0300)]
mql: Use correct pointer type
Jan Ekström [Mon, 7 Jul 2014 13:25:20 +0000 (16:25 +0300)]
build: Fix a copy-paste dependency error in libbreedline-glib
Fixes multi-process builds, before it was up to luck whether or
not you had the dependencies already built or not.
Krisztian Litkey [Wed, 9 Jul 2014 11:44:19 +0000 (14:44 +0300)]
websockets: add support for the latest API-breaking upstream changes.
Krisztian Litkey [Tue, 24 Jun 2014 06:06:06 +0000 (09:06 +0300)]
common: band-aid attempt for better xwalk event loop integration.
This patch tries to open up the mainloop for better integration
with the threaded external event loops (mostly xwalk in particular).
Jan Ekström [Wed, 25 Jun 2014 08:24:40 +0000 (11:24 +0300)]
libresource: API cleanup, remove unnecessary function arguments.
Jan Ekström [Wed, 25 Jun 2014 13:59:51 +0000 (16:59 +0300)]
libresource: Add context to resource sets, set a set for listing resources
This enables the removal of passing of contexts and resource sets
unneededly.
Jan Ekström [Wed, 25 Jun 2014 14:30:15 +0000 (17:30 +0300)]
libresource: Docs - Fix documentation on two functions
mrp_res_list_attribute_names and mrp_res_get_attribute_by_name
had the wrong return type as well as an extraneous parameter.
Jan Ekström [Tue, 13 May 2014 12:27:53 +0000 (15:27 +0300)]
Murphy: Add .gitignore
Krisztian Litkey [Wed, 4 Jun 2014 12:41:36 +0000 (15:41 +0300)]
common: fix a few debug infra-related comments.
Krisztian Litkey [Tue, 3 Jun 2014 19:42:15 +0000 (22:42 +0300)]
build-sys: removed gen-debug-table.
Krisztian Litkey [Tue, 3 Jun 2014 19:41:19 +0000 (22:41 +0300)]
common: removed support for listing debug sites.
Krisztian Litkey [Tue, 3 Jun 2014 19:41:02 +0000 (22:41 +0300)]
console: stop listing debug sites.
Krisztian Litkey [Tue, 3 Jun 2014 19:40:37 +0000 (22:40 +0300)]
resolver: stop listing debug sites (in parser-test).
Krisztian Litkey [Tue, 3 Jun 2014 19:40:21 +0000 (22:40 +0300)]
daemon: stop listing debug sites.
Krisztian Litkey [Tue, 3 Jun 2014 19:08:32 +0000 (22:08 +0300)]
build-sys: stop generating file:line->function mapping tables.
The original debug macros were written with older version of gcc in
mind where (in retrospect admittably strangely enough) __FUNCTION__
used to be a full-fledged preprocessor macro that could be among
other things freely concatenated with other string tokens to produce
string literals. The big idea was that each invocation of one of the
debug macros would also produce a site-specific entry to the string
table with a common distinctive/unique enough prefix (__DEBUG_SITE).
This then would make it (relatively) easy to list all existing debug
sites by looping through all the string tables of all mapped shared
objects (using dl_iterate_phdr) and inferring each debug site from the
correspinding string table entry with a matching prefix.
Since fate is cruel, gcc stopped supporting its good ol' full-fledged
__FUNCTION__ ages ago and turned it to a mere alias to __func__ which
is just an automatic variable, which is pretty useless for anything but
printing. One can't compilte-time concatenate it or perform other useful
macro-operations on it at all. As a desperate (and arguably quite brain-
damaged) idea we changed the debug macro to be a mere prefixed file:line
string literal and started generating file:line->function mapping tables
that we used to run-time map the debug sites to function names. So much
effort just to be able to list all the debug sites...
To add insult to injury, this whole scheme falls apart horribly with our
latest additions to the debug macros which proxy/bridge debug calls from
other libraries (or sometimes languages), where the macro invocation
itself is not at the actual originating debug site at all.
So in retrospect it is better to get rid of the whole mechanism altogether
and either trust people to know the code well enough so they know which
debug sites to enable or let them first shoot with a cannon by enabling
all the debug sites before narrowing the scope by picking only the ones
they need once they have read through the flood or resulting debug log
and found out more precisely what they want/need...
Krisztian Litkey [Tue, 27 May 2014 16:57:51 +0000 (19:57 +0300)]
common: parse log levels 'none' and 'off' to mask 0.
Krisztian Litkey [Tue, 27 May 2014 10:08:08 +0000 (13:08 +0300)]
Merge branch 'master' of github.com:otcshare/policy-internal
Krisztian Litkey [Tue, 27 May 2014 10:03:20 +0000 (13:03 +0300)]
build-sys: get rid of the unused generate-linker-script targets.
Krisztian Litkey [Tue, 27 May 2014 08:10:33 +0000 (11:10 +0300)]
build-sys: try to get along without a C++ compiler if Qt is not enabled.
Krisztian Litkey [Fri, 23 May 2014 17:39:29 +0000 (20:39 +0300)]
build-sys: advertise all .la's from LIBADD's as dependencies.
Properly advertise all libraries built by the same Makefile(.am)
and present in *_LIBADD's as dependencies to avoid build failures.
Krisztian Litkey [Wed, 21 May 2014 15:37:02 +0000 (18:37 +0300)]
build-sys: fix a couple of linking mistakes and omissions.
There is one more subtle issue remaining, namely we currently have
an ugly circular/cross-dependency between lua-decision, core and
resolver. For the time being it won't be addressed as we can work
er... link around it anyway.
Krisztian Litkey [Wed, 21 May 2014 13:14:26 +0000 (16:14 +0300)]
common: cope with latest json-c include path changes.
Ismo Puustinen [Tue, 20 May 2014 11:06:54 +0000 (14:06 +0300)]
resource-dbus: store pending event data.
Store event data that has come before acquisition so that we can
deliver all events to the client.
Krisztian Litkey [Fri, 9 May 2014 14:59:47 +0000 (17:59 +0300)]
domain-control: don't fail decoding a fully empty set message.