Code

sysdb.git
10 years agofrontend: Send connection-related log messages to the client.
Sebastian Harl [Thu, 6 Feb 2014 19:12:38 +0000 (20:12 +0100)]
frontend: Send connection-related log messages to the client.

This is done by registering a logging callback which will send all messages
originating from a thread currently handling a connection to the respective
client. For this, the connection object is stored in a thread-specific data
segment.

10 years agosysdb: Handle EOF from the server.
Sebastian Harl [Thu, 6 Feb 2014 19:11:45 +0000 (20:11 +0100)]
sysdb: Handle EOF from the server.

10 years agoclient: Correctly handle EOF in sdb_client_connect().
Sebastian Harl [Thu, 6 Feb 2014 08:23:52 +0000 (09:23 +0100)]
client: Correctly handle EOF in sdb_client_connect().

10 years agoclient: Added an EOF flag to the client object.
Sebastian Harl [Thu, 6 Feb 2014 08:19:31 +0000 (09:19 +0100)]
client: Added an EOF flag to the client object.

In a lot of cases, a client is passed through a couple of functions in order
to handle I/O. Adding the flag will make it easier to access the information
in the right location without having to worry about 0 return codes (which mean
different things in some cases anyway, e.g. in sdb_client_recv() which returns
zero if an empty message (header only) has been received).

10 years agofrontend/connection: Require authentication before allowing any commands.
Sebastian Harl [Wed, 5 Feb 2014 21:08:54 +0000 (22:08 +0100)]
frontend/connection: Require authentication before allowing any commands.

10 years agofrontend/session: Store authenticated user information.
Sebastian Harl [Wed, 5 Feb 2014 21:07:46 +0000 (22:07 +0100)]
frontend/session: Store authenticated user information.

Also, for now, reject access in case no username is provided.

10 years agollist_test: Added simple tests for _search() and _remove().
Sebastian Harl [Tue, 4 Feb 2014 22:57:27 +0000 (23:57 +0100)]
llist_test: Added simple tests for _search() and _remove().

10 years agoUpdated copyright information.
Sebastian Harl [Tue, 4 Feb 2014 22:35:46 +0000 (23:35 +0100)]
Updated copyright information.

10 years agosysdb: Hide implementation details in the "input" module.
Sebastian Harl [Tue, 4 Feb 2014 22:31:36 +0000 (23:31 +0100)]
sysdb: Hide implementation details in the "input" module.

… and added some overview documentation about how the "input" module works and
interacts with the other subsystems.

10 years agosysdb: Use the asynchronous readline interface; handle asynch server replies.
Sebastian Harl [Tue, 4 Feb 2014 21:57:46 +0000 (22:57 +0100)]
sysdb: Use the asynchronous readline interface; handle asynch server replies.

For this, setup the terminal in non-canonical, raw mode in order to be able to
handle each single character input. This allows to handle user input and
asynchronous server replies at the same time but without the need to give up
sequential operation (no threads are required for the asynchronous operation).
Instead, select() is used to do the input multiplexing allowing to easily
handle different output.

10 years agosysdb: Split sdb_command_exec() into two functions.
Sebastian Harl [Tue, 4 Feb 2014 21:56:23 +0000 (22:56 +0100)]
sysdb: Split sdb_command_exec() into two functions.

Separate the handling of the server's reply to make it reusable by other parts
of the code.

10 years agoMerged branch 'master' of git://git.tokkee.org/sysdb.
Sebastian Harl [Fri, 31 Jan 2014 06:27:24 +0000 (07:27 +0100)]
Merged branch 'master' of git://git.tokkee.org/sysdb.

10 years agocore/data: Added sdb_data_format() function.
Sebastian Harl [Thu, 30 Jan 2014 17:53:29 +0000 (18:53 +0100)]
core/data: Added sdb_data_format() function.

This function creates a string representation of a datum using a default
format.

10 years agocore/data.h: Removed obsolete comment.
Sebastian Harl [Thu, 30 Jan 2014 08:12:57 +0000 (09:12 +0100)]
core/data.h: Removed obsolete comment.

10 years agostore: Added support for different data-types for attributes.
Sebastian Harl [Wed, 29 Jan 2014 20:55:58 +0000 (21:55 +0100)]
store: Added support for different data-types for attributes.

An attribute value is now stored as sdb_data_t, supporting all data-types
which are supported by that type.

JSON-serialization does not fully support that yet, though.

10 years agoutils dbi: Use sdb_data_free_datum().
Sebastian Harl [Wed, 29 Jan 2014 20:42:09 +0000 (21:42 +0100)]
utils dbi: Use sdb_data_free_datum().

10 years agodata: Added helper functions to copy and free data.
Sebastian Harl [Wed, 29 Jan 2014 20:41:18 +0000 (21:41 +0100)]
data: Added helper functions to copy and free data.

10 years agodbi_test: Mocked required dbi*_copy_idx() functions.
Sebastian Harl [Wed, 29 Jan 2014 09:33:44 +0000 (10:33 +0100)]
dbi_test: Mocked required dbi*_copy_idx() functions.

10 years agocore/data: Make string and binary data not constant.
Sebastian Harl [Tue, 28 Jan 2014 19:12:22 +0000 (20:12 +0100)]
core/data: Make string and binary data not constant.

This will allow for more flexibility. However, it also requires to create a
copy of data queried using libdbi.

10 years agoconfigure, src/Makefile: Sort plugins alphabetically.
Sebastian Harl [Fri, 24 Jan 2014 08:04:29 +0000 (09:04 +0100)]
configure, src/Makefile: Sort plugins alphabetically.

10 years agoconfigure: Report an error when encountering invalid settings.
Sebastian Harl [Thu, 23 Jan 2014 19:43:41 +0000 (20:43 +0100)]
configure: Report an error when encountering invalid settings.

10 years agoclient, sysdb: Improved error reporting.
Sebastian Harl [Thu, 23 Jan 2014 08:12:47 +0000 (09:12 +0100)]
client, sysdb: Improved error reporting.

10 years agosysdb: Store a global input handler object in the input module.
Sebastian Harl [Sun, 12 Jan 2014 21:43:02 +0000 (22:43 +0100)]
sysdb: Store a global input handler object in the input module.

… rather than in the scanner. All input related code should be in the input
module.

10 years agofrontend: Added missing 'break' in switch statement.
Sebastian Harl [Sun, 12 Jan 2014 21:32:37 +0000 (22:32 +0100)]
frontend: Added missing 'break' in switch statement.

This bug caused a LIST command to be executed after each QUERY.

D'oh!

10 years agoclient: Added sdb_client_sockfd() function.
Sebastian Harl [Sun, 12 Jan 2014 21:11:34 +0000 (22:11 +0100)]
client: Added sdb_client_sockfd() function.

This function returns the file-descriptor associated with the client's network
socket.

10 years agofrontend: Free parser-allocated memory after handling a command.
Sebastian Harl [Sun, 12 Jan 2014 20:45:32 +0000 (21:45 +0100)]
frontend: Free parser-allocated memory after handling a command.

10 years agoMerged branch 'master' of git://git.tokkee.org/sysdb.
Sebastian Harl [Sun, 12 Jan 2014 18:19:56 +0000 (19:19 +0100)]
Merged branch 'master' of git://git.tokkee.org/sysdb.

10 years agosysdb: Do not add duplicate entries to the history.
Sebastian Harl [Fri, 10 Jan 2014 15:40:58 +0000 (16:40 +0100)]
sysdb: Do not add duplicate entries to the history.

10 years ago.travis.yml: Exclude AddressSanitizer runs with GCC.
Sebastian Harl [Sun, 12 Jan 2014 17:53:07 +0000 (18:53 +0100)]
.travis.yml: Exclude AddressSanitizer runs with GCC.

Travis-CI's GCC does not support the address sanitizer options.

10 years agot/cibuild.sh, .travis.yml: Do an AddressSanitizer run as well.
Sebastian Harl [Sun, 12 Jan 2014 17:44:40 +0000 (18:44 +0100)]
t/cibuild.sh, .travis.yml: Do an AddressSanitizer run as well.

Passing additional build flags as CICFLAGS and CILDFLAGS.

10 years agoFixed memory errors identified by LLVM's AddressSanitizer.
Sebastian Harl [Sun, 12 Jan 2014 17:37:04 +0000 (18:37 +0100)]
Fixed memory errors identified by LLVM's AddressSanitizer.

Test performed as:

  ./configure CC=clang \
      CFLAGS="-O0 -g -fsanitize=address -fno-omit-frame-pointer" \
      LDFLAGS=-fsanitize=address
  make clean all test

See also http://clang.llvm.org/docs/AddressSanitizer.html

10 years agoobject_test: Removed 'obj->ref_cnt == 0' checks.
Sebastian Harl [Sun, 12 Jan 2014 17:29:41 +0000 (18:29 +0100)]
object_test: Removed 'obj->ref_cnt == 0' checks.

They generate unnecessary noise in LLVM's AddressSanitizer runs.

10 years agosysdb: Added a query to the history after executing it.
Sebastian Harl [Fri, 10 Jan 2014 09:01:15 +0000 (10:01 +0100)]
sysdb: Added a query to the history after executing it.

Mimic zsh's histignorespace option and ignore commands when the first
character is a space.

10 years agosysdbd.conf(5), sysdbd.conf: Documented the 'Listen' option.
Sebastian Harl [Fri, 10 Jan 2014 08:23:35 +0000 (09:23 +0100)]
sysdbd.conf(5), sysdbd.conf: Documented the 'Listen' option.

And added a sample configuration.

10 years agosysdb: Only strip newlines from the command buffer.
Sebastian Harl [Fri, 10 Jan 2014 08:17:05 +0000 (09:17 +0100)]
sysdb: Only strip newlines from the command buffer.

Keep whitespace in order to keep the users formatting and keep semicolons to
ensure correct parsing (avoid possible future ambiquity).

10 years agounixsock utils: Retry reading from socket if the call was interrupted.
Sebastian Harl [Fri, 10 Jan 2014 08:06:33 +0000 (09:06 +0100)]
unixsock utils: Retry reading from socket if the call was interrupted.

10 years agoMerged branch 'master' of git://git.tokkee.org/sysdb.
Sebastian Harl [Thu, 9 Jan 2014 06:51:32 +0000 (07:51 +0100)]
Merged branch 'master' of git://git.tokkee.org/sysdb.

10 years agosysdb: Implemented input scanner and simple command handling.
Sebastian Harl [Thu, 9 Jan 2014 06:47:46 +0000 (07:47 +0100)]
sysdb: Implemented input scanner and simple command handling.

Reused the frontend parser lexer to identify single queries (terminated by
semicolon). No other parsing of the command is done by the client to make the
frontend the ultimate truth in regard to the parser (including simple stuff
like comments).

The query is then sent to the daemon and the reply will be printed to the
standard output channel.

10 years agoconfigure: Fixed --with-readline=libreadline checks.
Sebastian Harl [Wed, 8 Jan 2014 12:13:03 +0000 (13:13 +0100)]
configure: Fixed --with-readline=libreadline checks.

10 years ago.travis.yml, t/cibuild.sh: Test builds with libedit and libreadline.
Sebastian Harl [Wed, 8 Jan 2014 10:15:07 +0000 (11:15 +0100)]
.travis.yml, t/cibuild.sh: Test builds with libedit and libreadline.

Using an env variable for this purpose, thus, making both options show up in
the Travis build matrix.

10 years agoAdded t/cibuild.sh and use that in the Travis configuration.
Sebastian Harl [Wed, 8 Jan 2014 10:10:41 +0000 (11:10 +0100)]
Added t/cibuild.sh and use that in the Travis configuration.

This allows for some more flexiblity.

10 years agosysdb: Append newlines to lines read from readline().
Sebastian Harl [Mon, 6 Jan 2014 22:32:31 +0000 (23:32 +0100)]
sysdb: Append newlines to lines read from readline().

Else, whitespace will be missing in multi-line commands.

10 years agoparser_test: Test partial query parsing.
Sebastian Harl [Mon, 6 Jan 2014 11:03:47 +0000 (12:03 +0100)]
parser_test: Test partial query parsing.

10 years agofrontend: Implemented the CONNECTION_QUERY command.
Sebastian Harl [Mon, 6 Jan 2014 11:00:18 +0000 (12:00 +0100)]
frontend: Implemented the CONNECTION_QUERY command.

This command expects a string representation of the to be executed command as
the command body. The frontend will then parse the string and execute the
first command. Other commands are (currently?) ignored to make injection
attacks harder.

10 years agofrontend parser: Added 'len' parameter to sdb_fe_parse().
Sebastian Harl [Mon, 6 Jan 2014 10:55:53 +0000 (11:55 +0100)]
frontend parser: Added 'len' parameter to sdb_fe_parse().

When greater than (or equal to) zero, this parameter let's the parser parse a
substring of the specified query. This makes it easier to pass in a command
stored in a connection's input string buffer.

10 years agofrontend: Added simple implementation of sdb_fe_exec().
Sebastian Harl [Mon, 6 Jan 2014 10:26:21 +0000 (11:26 +0100)]
frontend: Added simple implementation of sdb_fe_exec().

This function executes the return value of sdb_fe_parse().

10 years agostore: Added sdb_store_get_host().
Sebastian Harl [Mon, 6 Jan 2014 10:16:52 +0000 (11:16 +0100)]
store: Added sdb_store_get_host().

… querying a host by it's name.

10 years agot/coverage.sh: Reset files not part of the tarball.
Sebastian Harl [Sat, 4 Jan 2014 13:09:25 +0000 (14:09 +0100)]
t/coverage.sh: Reset files not part of the tarball.

This way, files like .gitignore and .travis.yml, which are not part of a
release, are reset and will not cause a "dirty" version.

10 years agostore_test: Test various serialization flags.
Sebastian Harl [Fri, 3 Jan 2014 13:36:54 +0000 (14:36 +0100)]
store_test: Test various serialization flags.

10 years agostore: Added flags to JSON functions indicating information to leave out.
Sebastian Harl [Fri, 3 Jan 2014 13:20:30 +0000 (14:20 +0100)]
store: Added flags to JSON functions indicating information to leave out.

This may be used to leave out services or attributes from the serialized
object. For this purpose, the serialization function has been simplified to
handle attributes and services mostly alike.

10 years agostore: Introduced sdb_store_host_tojson() to serialize a single host.
Sebastian Harl [Fri, 3 Jan 2014 12:50:34 +0000 (13:50 +0100)]
store: Introduced sdb_store_host_tojson() to serialize a single host.

10 years agostore: Moved object type attribute to the base object.
Sebastian Harl [Fri, 3 Jan 2014 12:39:27 +0000 (13:39 +0100)]
store: Moved object type attribute to the base object.

10 years agoutils llist: Added TODO note about iterator improvements.
Sebastian Harl [Fri, 3 Jan 2014 12:23:51 +0000 (13:23 +0100)]
utils llist: Added TODO note about iterator improvements.

10 years agostore: Exported the store base object type as opaque type.
Sebastian Harl [Fri, 3 Jan 2014 12:17:17 +0000 (13:17 +0100)]
store: Exported the store base object type as opaque type.

Renamed from store_obj_t to sdb_store_base_t to avoid a name-clash with
sdb_store_obj_t.

10 years agoparser_test: Free memory returned by sdb_fe_parse().
Sebastian Harl [Thu, 2 Jan 2014 00:15:52 +0000 (01:15 +0100)]
parser_test: Free memory returned by sdb_fe_parse().

10 years agodbi_test: Make tests support CK_FORK=no.
Sebastian Harl [Thu, 2 Jan 2014 00:14:17 +0000 (01:14 +0100)]
dbi_test: Make tests support CK_FORK=no.

… by resetting state as needed.

10 years agofrontend: Let sdb_fe_parse() return a list of parsed node objects.
Sebastian Harl [Thu, 2 Jan 2014 00:00:07 +0000 (01:00 +0100)]
frontend: Let sdb_fe_parse() return a list of parsed node objects.

Each parse-tree node object represents a single command.

10 years agoutils llist: Added sdb_llist_get().
Sebastian Harl [Wed, 1 Jan 2014 23:54:13 +0000 (00:54 +0100)]
utils llist: Added sdb_llist_get().

10 years agoobject: Added sdb_object_create_simple().
Sebastian Harl [Wed, 1 Jan 2014 23:40:35 +0000 (00:40 +0100)]
object: Added sdb_object_create_simple().

This function creates a "simple" object without custom initialization and
destructor.

10 years agoutils llist: Added sdb_llist_len().
Sebastian Harl [Wed, 1 Jan 2014 23:39:20 +0000 (00:39 +0100)]
utils llist: Added sdb_llist_len().

10 years agoDeclare sdb_fe_yyparse() in parser.h.
Sebastian Harl [Tue, 31 Dec 2013 00:23:01 +0000 (01:23 +0100)]
Declare sdb_fe_yyparse() in parser.h.

Apparently, older versions of bison do not include the function prototype in
the generated header file. Double-declarations don't hurt (as long as they
match).

10 years agosrc/Makefile: Let libsysdb depend on parser.h.
Sebastian Harl [Tue, 31 Dec 2013 00:20:41 +0000 (01:20 +0100)]
src/Makefile: Let libsysdb depend on parser.h.

10 years agosrc/Makefile: Tell automake that grammar.h is auto-built.
Sebastian Harl [Tue, 31 Dec 2013 00:16:27 +0000 (01:16 +0100)]
src/Makefile: Tell automake that grammar.h is auto-built.

10 years agofrontend: Added flex/bison based parser skeleton.
Sebastian Harl [Tue, 31 Dec 2013 00:05:22 +0000 (01:05 +0100)]
frontend: Added flex/bison based parser skeleton.

For now, this implements a mostly empty parser and helper functions to parse
strings (rather than open files). The parser accepts the "LIST" command and
ignores SQL and C style comments.

10 years agofrontend/query: Fixed typo.
Sebastian Harl [Mon, 30 Dec 2013 18:06:10 +0000 (19:06 +0100)]
frontend/query: Fixed typo.

10 years agosrc/Makefile: Use LTLIBRARIES for libsysdb_scanner.
Sebastian Harl [Mon, 30 Dec 2013 18:05:12 +0000 (19:05 +0100)]
src/Makefile: Use LTLIBRARIES for libsysdb_scanner.

10 years agosysdb/scanner.l: Enabled 8bit, nodefault, and warn options.
Sebastian Harl [Thu, 26 Dec 2013 14:37:45 +0000 (15:37 +0100)]
sysdb/scanner.l: Enabled 8bit, nodefault, and warn options.

10 years agostore: Don't look up services from hierarchical hosts.
Sebastian Harl [Thu, 26 Dec 2013 13:12:30 +0000 (14:12 +0100)]
store: Don't look up services from hierarchical hosts.

We don't have any concept of service inheritance (yet?).

Also, I'm not sure if this would ever make sense in general. This might be a
query option, though.

10 years agoFixed some issues identified by static code analysis.
Sebastian Harl [Thu, 26 Dec 2013 12:49:55 +0000 (13:49 +0100)]
Fixed some issues identified by static code analysis.

The following issues were identified and fixed:

 * Allocator sizeof operand mismatch in dbi utils.
 * Dead increment in tools/sysdb/input.
 * Memory leak (and leaving behind invalid memory) in tools/sysdbd/configfile.
 * Out-of-bound array access in core/plugin (the original report by the clang
   analyzer was wrong but pointed to a location affected by a related
   problem).
 * Stack address stored into global variable in liboconfig.

Thanks to cppcheck and the clang analyzer!

10 years agoMoved coverage.sh to the t/ subdirectory.
Sebastian Harl [Thu, 26 Dec 2013 12:34:45 +0000 (13:34 +0100)]
Moved coverage.sh to the t/ subdirectory.

10 years agoMakefile: Added coverage.sh to a dist tarball.
Sebastian Harl [Sun, 22 Dec 2013 17:55:14 +0000 (18:55 +0100)]
Makefile: Added coverage.sh to a dist tarball.

10 years agocoverage.sh: Added a helper script to generate HTML coverage reports.
Sebastian Harl [Sun, 22 Dec 2013 17:53:53 +0000 (18:53 +0100)]
coverage.sh: Added a helper script to generate HTML coverage reports.

The script uses lcov and creates a clean copy of the source code in a
temporary directory using 'make dist'.

10 years agot/Makefile: Pass gcov flags to tests as well.
Sebastian Harl [Sun, 22 Dec 2013 17:43:11 +0000 (18:43 +0100)]
t/Makefile: Pass gcov flags to tests as well.

Else, some tests might not compile correctly.

10 years ago.gitignore: Ignore test-driver.
Sebastian Harl [Sun, 22 Dec 2013 17:31:25 +0000 (18:31 +0100)]
.gitignore: Ignore test-driver.

This file is created by newer autotools when running ‘make check’.

10 years agosrc/Makefile: Include sysdb.h.in file in a distribution.
Sebastian Harl [Sun, 22 Dec 2013 17:30:31 +0000 (18:30 +0100)]
src/Makefile: Include sysdb.h.in file in a distribution.

10 years agosrc/Makefile: Added a rule to create ‘../version’.
Sebastian Harl [Sun, 22 Dec 2013 17:30:10 +0000 (18:30 +0100)]
src/Makefile: Added a rule to create ‘../version’.

10 years agoMakefile: Fixed generation of the ‘version’ file.
Sebastian Harl [Sun, 22 Dec 2013 17:29:20 +0000 (18:29 +0100)]
Makefile: Fixed generation of the ‘version’ file.

10 years agosrc/Makefile: Fixed path to connection-private.h.
Sebastian Harl [Sun, 22 Dec 2013 17:19:22 +0000 (18:19 +0100)]
src/Makefile: Fixed path to connection-private.h.

10 years agot/Makefile: Use top_srcdir rather than top_builddir.
Sebastian Harl [Sun, 22 Dec 2013 16:25:55 +0000 (17:25 +0100)]
t/Makefile: Use top_srcdir rather than top_builddir.

This allows running tests out-of-tree.

10 years agoMake everything buildable out-of-tree.
Sebastian Harl [Sun, 22 Dec 2013 16:25:01 +0000 (17:25 +0100)]
Make everything buildable out-of-tree.

10 years agoUpdated README.
Sebastian Harl [Sun, 22 Dec 2013 16:17:42 +0000 (17:17 +0100)]
Updated README.

Added missing dependencies, links to dependency upstream homepages, and some
notes about testing.

10 years agoLet the config parser accept unquoted IPv6 addresses.
Sebastian Harl [Sat, 21 Dec 2013 21:37:58 +0000 (22:37 +0100)]
Let the config parser accept unquoted IPv6 addresses.

The parser supports raw IPv6 addresses, optional address and port (as
[<addr>]:<port>), and embedded IPv4 addresses.

Based on "Common Patterns" found in the flex manual.

10 years agosrc/Makefile: Fixed an automake warning.
Sebastian Harl [Sat, 21 Dec 2013 21:29:16 +0000 (22:29 +0100)]
src/Makefile: Fixed an automake warning.

Added "lib" suffix to library name.

10 years agoconfigure: Re-enabled coverage support for GCC.
Sebastian Harl [Sat, 21 Dec 2013 21:05:17 +0000 (22:05 +0100)]
configure: Re-enabled coverage support for GCC.

D'oh!

10 years agoconfigure: Do stricter GCC checking.
Sebastian Harl [Sat, 21 Dec 2013 20:55:21 +0000 (21:55 +0100)]
configure: Do stricter GCC checking.

$GCC might be true for clang as well but clang does not support gcov coverage
testing.

10 years agoconfigure: Do not enable gcov unless the compiler is GCC.
Sebastian Harl [Sat, 21 Dec 2013 20:24:31 +0000 (21:24 +0100)]
configure: Do not enable gcov unless the compiler is GCC.

Others are not known (to me) to work.

10 years ago.travis.yml: Use --enable-gcov which will fix clang builds.
Sebastian Harl [Sat, 21 Dec 2013 20:09:47 +0000 (21:09 +0100)]
.travis.yml: Use --enable-gcov which will fix clang builds.

10 years agobuild system: Added --enable-gcov configure option.
Sebastian Harl [Sat, 21 Dec 2013 20:08:43 +0000 (21:08 +0100)]
build system: Added --enable-gcov configure option.

10 years ago.travis.yml: Use verbose coveralls output.
Sebastian Harl [Sat, 21 Dec 2013 19:28:06 +0000 (20:28 +0100)]
.travis.yml: Use verbose coveralls output.

This is to see what's going on in the logs.

10 years ago.travis.yml: Collect and upload coverage information to coveralls.io.
Sebastian Harl [Sat, 21 Dec 2013 19:22:12 +0000 (20:22 +0100)]
.travis.yml: Collect and upload coverage information to coveralls.io.

10 years agoUse -Wno-sign-conversion on Travis.
Sebastian Harl [Sat, 21 Dec 2013 18:30:04 +0000 (19:30 +0100)]
Use -Wno-sign-conversion on Travis.

GNU libc, as used on the current test machines, would else provoke an error in
the expansion of FD_SET.

10 years agoproto utils: Fixed invalid conversion of return value.
Sebastian Harl [Sat, 21 Dec 2013 17:45:57 +0000 (18:45 +0100)]
proto utils: Fixed invalid conversion of return value.

Thanks to Travis CI for finding this!

10 years agoAdded a travis-ci.org project specification.
Sebastian Harl [Sat, 21 Dec 2013 17:39:58 +0000 (18:39 +0100)]
Added a travis-ci.org project specification.

10 years agosysdb: Use the flex scanner generator for reading input.
Sebastian Harl [Fri, 20 Dec 2013 23:19:45 +0000 (00:19 +0100)]
sysdb: Use the flex scanner generator for reading input.

The idea is to implement a minimalistic parser which understands all valid
input and which is used to determine if an input line is part of an existing
command or a command on its own. This information will then be used to update
the prompt (and possibly to determine other information as well).

The scanner's YY_INPUT "method" is overwritten in order to use readline and
custom buffering for user input.

10 years agoMerged branch 'master' of git://git.tokkee.org/sysdb.
Sebastian Harl [Fri, 20 Dec 2013 19:09:48 +0000 (20:09 +0100)]
Merged branch 'master' of git://git.tokkee.org/sysdb.

10 years agoplugin: Record all loaded plugins and use that for improved error messages.
Sebastian Harl [Fri, 20 Dec 2013 17:25:25 +0000 (18:25 +0100)]
plugin: Record all loaded plugins and use that for improved error messages.

10 years agofrontend: Make the number of handler threads configurable.
Sebastian Harl [Fri, 20 Dec 2013 08:18:34 +0000 (09:18 +0100)]
frontend: Make the number of handler threads configurable.

The number is passed to listen_and_serve() as part of sdb_fe_loop_t.

10 years agofrontend: Return an error if no handler threads could be created.
Sebastian Harl [Fri, 20 Dec 2013 08:09:59 +0000 (09:09 +0100)]
frontend: Return an error if no handler threads could be created.

10 years agofrontend: Implemented simplified error handling when creating threads.
Sebastian Harl [Thu, 19 Dec 2013 20:51:57 +0000 (21:51 +0100)]
frontend: Implemented simplified error handling when creating threads.

There's hardly any reasonable error condition that might happen, so this
rather simplied approach should be sufficient.

10 years agoclient: Let sdb_client_recv() use sdb_proto_select().
Sebastian Harl [Thu, 19 Dec 2013 20:43:59 +0000 (21:43 +0100)]
client: Let sdb_client_recv() use sdb_proto_select().