Krisztian Litkey [Sat, 26 Jan 2013 19:33:22 +0000 (21:33 +0200)]
resource-native: added console command for showing all resource definitions.
Krisztian Litkey [Sat, 26 Jan 2013 18:47:53 +0000 (20:47 +0200)]
websockets: make more explicitly sure we default to sending in text mode.
Otherwise decoding messages in the web runtime/a browser becomes a PITA.
Krisztian Litkey [Sat, 26 Jan 2013 18:46:49 +0000 (20:46 +0200)]
websockets: use JSON for websocket transports in custom mode.
Krisztian Litkey [Sat, 26 Jan 2013 18:44:52 +0000 (20:44 +0200)]
common: added custom transport mode support (custom encoding/decoding).
Krisztian Litkey [Sat, 26 Jan 2013 14:20:07 +0000 (16:20 +0200)]
common: JSON fixes, allow length to be passed to parser.
Krisztian Litkey [Sat, 26 Jan 2013 12:06:17 +0000 (14:06 +0200)]
common: transport mode renamed: s/CUSTOM/DATA/g.
Krisztian Litkey [Sat, 26 Jan 2013 11:39:36 +0000 (13:39 +0200)]
resource-wrt: added WRT resource plugin skeleton.
Krisztian Litkey [Sat, 26 Jan 2013 11:30:27 +0000 (13:30 +0200)]
common: added websocket transport setopt interface.
Krisztian Litkey [Sat, 26 Jan 2013 11:29:34 +0000 (13:29 +0200)]
common: added websocklib write mode setting interface.
Krisztian Litkey [Sat, 26 Jan 2013 11:28:22 +0000 (13:28 +0200)]
common: added transport setopt interface.
Krisztian Litkey [Fri, 25 Jan 2013 14:24:05 +0000 (16:24 +0200)]
websockets: always run the low-level transport in framed mode.
Krisztian Litkey [Fri, 25 Jan 2013 14:21:51 +0000 (16:21 +0200)]
common: added functions for querying fragbuf state.
Krisztian Litkey [Thu, 24 Jan 2013 20:40:30 +0000 (22:40 +0200)]
websockets: don't hardcode framed reassembly, check the protocol descriptor.
Krisztian Litkey [Thu, 24 Jan 2013 18:09:11 +0000 (20:09 +0200)]
websockets: try to reject pure HTTP clients/connections for now.
Krisztian Litkey [Thu, 24 Jan 2013 18:07:50 +0000 (20:07 +0200)]
common: changed stream-transport to use fragbuf.
Krisztian Litkey [Thu, 24 Jan 2013 18:06:35 +0000 (20:06 +0200)]
console-client: saner command-line processing.
Krisztian Litkey [Thu, 24 Jan 2013 18:05:29 +0000 (20:05 +0200)]
common: added fragbuf trim and a check for uninitialized pull.
Krisztian Litkey [Thu, 24 Jan 2013 17:49:03 +0000 (19:49 +0200)]
console-client: added local Makefile.
Krisztian Litkey [Thu, 24 Jan 2013 16:33:02 +0000 (18:33 +0200)]
common/transport: separate mode bits from flags.
Krisztian Litkey [Thu, 24 Jan 2013 16:31:53 +0000 (18:31 +0200)]
domain-control: get rid of a few unused var warnings.
Krisztian Litkey [Thu, 24 Jan 2013 15:55:15 +0000 (17:55 +0200)]
common: added API for basic JSON object manipulation.
Although we do use json-c, we don't want direct json-c dependency
sneak in and spread all over the codebase. Therefore we define a
layer on top of it which will also hopefully provide a confined
space to patch things up if we're not happy with the underlying
interfaces.
Krisztian Litkey [Tue, 22 Jan 2013 14:53:17 +0000 (16:53 +0200)]
plugin-console: updated debug info.
Krisztian Litkey [Tue, 22 Jan 2013 14:46:01 +0000 (16:46 +0200)]
plugin-console: accept websockets for transport.
Krisztian Litkey [Tue, 22 Jan 2013 14:44:29 +0000 (16:44 +0200)]
common: force debug-site update when enabling/disabling debugging.
Krisztian Litkey [Wed, 23 Jan 2013 20:31:00 +0000 (22:31 +0200)]
common: WiP: websockets: updated linker-script.
Krisztian Litkey [Tue, 15 Jan 2013 12:20:07 +0000 (14:20 +0200)]
common: low-level websocket abstraction + a websocket transport
Our low-level websocket library is built on top of libwebsockets.
It basically provides the necessary bits of glue to pump websocket
connections from a Murphy mainloop. Additionally it attempts to do
most of the heavy lifting necessary to associate extra contextual
data with websockets (IOW attaching/detaching in a safe manner
user data with websocket contexts and connections) which I found
surprisingly hairy to do with libwebsockets itself.
Eventually the low-level library should map out all the useful
features of the underlying library. We're far not there at the
moment. We do not provide an interface for features that we do not
need ourselves at the moment. These include things like connection
filtering, pure HTTP connections, serving files to clients, extension-
negotiation, etc. Of these at least SSL-support, pure HTTP clients
and content-serving (for serving our own javascript libraries to
clients) are next on the list to map out.
The websocket transport basically integrates websockets to our
transport abstraction. IOW, it makes it possible to use a websocket
connection as the underlying IPC mechanism for a Murphy transport.
As a side-effect of implementing websocket transports, an automagic
defragmentation mechanism (fragbuf or mrp_fragbuf_t) has also been
added to the common murphy library.
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.
Krisztian Litkey [Mon, 14 Jan 2013 15:28:08 +0000 (17:28 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal
Ismo Puustinen [Mon, 14 Jan 2013 11:32:13 +0000 (13:32 +0200)]
core: added getters for lua sink fields.
Ismo Puustinen [Fri, 11 Jan 2013 14:47:27 +0000 (16:47 +0200)]
lua-decision: added the sink access functions.
Ismo Puustinen [Fri, 11 Jan 2013 08:38:00 +0000 (10:38 +0200)]
common: can use msg and transport functions from C++.
Janos Kovacs [Fri, 11 Jan 2013 12:27:43 +0000 (14:27 +0200)]
lua-decision: add sink.lua
Janos Kovacs [Thu, 10 Jan 2013 23:04:07 +0000 (01:04 +0200)]
lua-decision: add C access routines to mrp_lua_element_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
Janos Kovacs [Thu, 10 Jan 2013 23:00:00 +0000 (01:00 +0200)]
compilation: get rid of some unused variable warnings
Krisztian Litkey [Wed, 9 Jan 2013 07:46:06 +0000 (09:46 +0200)]
console: minor typo fix in debug command help.
Krisztian Litkey [Tue, 8 Jan 2013 11:17:32 +0000 (13:17 +0200)]
daemon: omit plugin info from basic command-line help.
Krisztian Litkey [Mon, 7 Jan 2013 09:34:15 +0000 (11:34 +0200)]
common/msg: handle any-type iterators in a valgrind-kosher way.
Ismo Puustinen [Tue, 8 Jan 2013 08:31:38 +0000 (10:31 +0200)]
common: make glib-glue work with C++.
Krisztian Litkey [Mon, 7 Jan 2013 16:24:02 +0000 (18:24 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal
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'.
Ismo Puustinen [Mon, 7 Jan 2013 15:50:25 +0000 (17:50 +0200)]
common: reference counting now plays nice with C++.
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
Janos Kovacs [Sun, 6 Jan 2013 03:22:15 +0000 (05:22 +0200)]
Merge branch 'master' of https://github.com/otcshare/policy-internal
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
Krisztian Litkey [Fri, 4 Jan 2013 14:58:16 +0000 (16:58 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal
Ismo Puustinen [Thu, 3 Jan 2013 12:20:52 +0000 (14:20 +0200)]
docs: fixed the indentation in the style guide.
Ismo Puustinen [Fri, 4 Jan 2013 12:53:30 +0000 (14:53 +0200)]
resource-c: remove a compiler warning.
Ismo Puustinen [Fri, 4 Jan 2013 12:38:07 +0000 (14:38 +0200)]
resource-c: the preemption logic now appears to work.
Ismo Puustinen [Fri, 4 Jan 2013 11:07:56 +0000 (13:07 +0200)]
resource-c: removed printfs.
Ismo Puustinen [Thu, 3 Jan 2013 14:10:28 +0000 (16:10 +0200)]
resource-c: make the attribute handling smarter.
Ismo Puustinen [Thu, 3 Jan 2013 13:32:39 +0000 (15:32 +0200)]
resource-c: guard the header files, internal cleanups.
Ismo Puustinen [Thu, 3 Jan 2013 11:20:27 +0000 (13:20 +0200)]
build: Generate linker file for resource library.
Ismo Puustinen [Tue, 4 Dec 2012 11:31:36 +0000 (13:31 +0200)]
resource-c: cleaning up the code.
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.
Krisztian Litkey [Wed, 2 Jan 2013 12:23:51 +0000 (14:23 +0200)]
common: removed unused superloop events.
Ismo Puustinen [Thu, 29 Nov 2012 12:24:22 +0000 (14:24 +0200)]
resource-c: implemented functions.
Jaska Uimonen [Thu, 22 Nov 2012 12:52:14 +0000 (14:52 +0200)]
resource-c: towards great success.
Ismo Puustinen [Mon, 12 Nov 2012 09:42:52 +0000 (11:42 +0200)]
build: added external resource API library to build.
Ismo Puustinen [Mon, 12 Nov 2012 09:38:58 +0000 (11:38 +0200)]
build: changed libresource -> libresource-backend.
Ismo Puustinen [Mon, 12 Nov 2012 09:26:48 +0000 (11:26 +0200)]
resource-c: initial version of external C resource library.
Ismo Puustinen [Fri, 4 Jan 2013 09:15:18 +0000 (11:15 +0200)]
build: require a recent enough version of ecore.
Ismo Puustinen [Fri, 4 Jan 2013 09:08:58 +0000 (11:08 +0200)]
common: add missing header to ecore-glue.
Krisztian Litkey [Thu, 3 Jan 2013 11:24:46 +0000 (13:24 +0200)]
transport: install a handler to catch (and ignore) SIGPIPEs.
Krisztian Litkey [Thu, 3 Jan 2013 11:23:58 +0000 (13:23 +0200)]
mainloop: #include signal.h, since mainloop provides a signal handling interface.
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
Janos Kovacs [Wed, 26 Dec 2012 20:14:46 +0000 (22:14 +0200)]
Merge branch 'master' of https://github.com/otcshare/policy-internal
Krisztian Litkey [Fri, 21 Dec 2012 15:10:57 +0000 (17:10 +0200)]
plugin-console: updated debug info.
Krisztian Litkey [Fri, 21 Dec 2012 15:10:34 +0000 (17:10 +0200)]
core: updated debug info.
Krisztian Litkey [Fri, 21 Dec 2012 15:10:25 +0000 (17:10 +0200)]
common: updated debug info.
Krisztian Litkey [Fri, 21 Dec 2012 15:09:40 +0000 (17:09 +0200)]
core: updated linker script.
Krisztian Litkey [Fri, 21 Dec 2012 15:09:34 +0000 (17:09 +0200)]
common: updated linker script.
Krisztian Litkey [Fri, 21 Dec 2012 15:08:53 +0000 (17:08 +0200)]
plugin-console: possibly uninitialised var fix.
Krisztian Litkey [Fri, 21 Dec 2012 15:08:35 +0000 (17:08 +0200)]
common: possibly uninitialised var fix.
Krisztian Litkey [Fri, 21 Dec 2012 14:30:30 +0000 (16:30 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal
Krisztian Litkey [Fri, 21 Dec 2012 14:27:28 +0000 (16:27 +0200)]
plugin-console: register (currently only stream-based) consoles as logging targets.
Krisztian Litkey [Fri, 21 Dec 2012 14:26:23 +0000 (16:26 +0200)]
core: added mrp_console_vprintf.
Krisztian Litkey [Fri, 21 Dec 2012 13:19:05 +0000 (15:19 +0200)]
core: added logging configuration commands.
Krisztian Litkey [Fri, 21 Dec 2012 13:18:23 +0000 (15:18 +0200)]
common: improved log setting queriability.
Ismo Puustinen [Fri, 21 Dec 2012 13:14:08 +0000 (15:14 +0200)]
config: do not load signalling plugin.
Ismo Puustinen [Fri, 21 Dec 2012 13:12:37 +0000 (15:12 +0200)]
signalling: removed the old-style signalling plugin.
Janos Kovacs [Thu, 20 Dec 2012 20:28:15 +0000 (22:28 +0200)]
lua-utils: fix in object destructor
Krisztian Litkey [Thu, 20 Dec 2012 20:06:23 +0000 (22:06 +0200)]
common: updated debug info.
Krisztian Litkey [Thu, 20 Dec 2012 20:05:58 +0000 (22:05 +0200)]
common: updated linker script.
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...
Krisztian Litkey [Thu, 20 Dec 2012 14:49:53 +0000 (16:49 +0200)]
log: reworked logging to open up logging for external loggers.
Krisztian Litkey [Wed, 19 Dec 2012 06:45:49 +0000 (08:45 +0200)]
common: fully reset hashtable config.
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.
Krisztian Litkey [Thu, 13 Dec 2012 18:35:39 +0000 (20:35 +0200)]
resource-native: owners is a non-selectable command.
Krisztian Litkey [Thu, 13 Dec 2012 15:39:14 +0000 (17:39 +0200)]
murphy-db: handle NULL varchar columns gracefully.
Krisztian Litkey [Thu, 13 Dec 2012 15:38:11 +0000 (17:38 +0200)]
common: allow NULL path in DBUS signal handlers.
Ismo Puustinen [Wed, 12 Dec 2012 11:20:52 +0000 (13:20 +0200)]
common: do not free a NULL D-Bus error.
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.
Krisztian Litkey [Tue, 11 Dec 2012 14:23:44 +0000 (16:23 +0200)]
Merge branch 'master' of github.com:otcshare/policy-internal
Krisztian Litkey [Tue, 11 Dec 2012 14:17:55 +0000 (16:17 +0200)]
common: always remove stream transport I/O watch during disconnect.
Krisztian Litkey [Tue, 11 Dec 2012 14:16:38 +0000 (16:16 +0200)]
common: stop monitoring fd if owner keeps ignoring EPOLLHUP notifications.
Ismo Puustinen [Tue, 11 Dec 2012 09:25:28 +0000 (11:25 +0200)]
core: check memory before usage.
Ismo Puustinen [Tue, 11 Dec 2012 09:22:48 +0000 (11:22 +0200)]
mdb: check allocation success before use.
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.
Ismo Puustinen [Tue, 11 Dec 2012 09:10:25 +0000 (11:10 +0200)]
resource: check NULL value before getting struct member.