shared: Correct BuxtonArray get check

Arrays should not be returning data past their length. Fix check to
return when the index given is past where data has been stored.
Fixed confusing typos in buxton_wire_get_value error messages
test: Split up and add tests for BuxtonList
shared: Set BuxtonList pointer to null after list free

Since we are being passed the address of the BuxtonList pointer, set
the pointer to NULL once buxton_list_free(_all) are finished.

Signed-off-by: William Douglas <william.douglas@intel.com>
shared: Fix test failures in BuxtonList

BuxtonList was not accounting for size correctly in append and
prepend. BuxtonList also did not account for always keeping the tail
pointer valid. This change fixes these issues to pass tests.

Signed-off-by: William Douglas <william.douglas@intel.com>
test: Add seperate BuxtonArray tests
Whitespace cleanup
libbuxtonsimple: Correct handling of strings

The simple API was using a reference to a char * instead of just a
char * when getting and setting values. This may also have been the
reason behind the implementation not freeing the pointer from
buxton_get_value so free that now as well to fix the memory leak.
buxtonctl: Fix a bug while handling numerics

The functions strtoll and others of the familly
are using errno to report any conversion error.
But they doen't touch errno in case of success.
Thus errno has to be reset to 0 before calling it.

Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
libbuxton: Implementing get and unset for any type

This implementation defines the new type BUXTON_TYPE_UNSET.

Using this type is allowed for getting, unsetting and listening
notifications of change.

It adds the function buxton_response_value_type that enable
to discover the true type of the value of the response.

The type set to the key during the request is still available
using:
 key = buxton_response_key(response);
 type = buxton_key_get_type(key)
 buxton_key_free(key)

This type should differ from the type of the value of the
response only if it is BUXTON_TYPE_UNSET.
core: removing fake setting of the type

When setting labels, the type of the key doesn't matter.

Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
data: Setting smack labels on daemon socket

When Smack is enabled, the label must be set to
* to allow the service to be accessed by any
clients. The rules for accessing the socket file
are still applied and used for controlling access
to buxton.

Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
cli: Improving get value output

To allow type checking, the output is now showing the type of the key.

Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
gdbm: Fix assertion on unintended value

The assertion was hit because the goto end was missing.

Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
libbuxton: Add functionnality of getting labels

Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
demo: Plug leak in hellosimple (allocated string)

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
demo: Plug leak in helloget (response_value)

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
Release buxton v4
libbuxton: don't change the key type

The key type is not used by any of the wiring
functions get_label, set_label, create_group
and remove_group. Then it is much better to not
alter the type of the key.

Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
libbuxton: enforcing correct type for groups

When creating group keys, it enforces the type to
be either STRING or UNSET.

Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>