Commit Graph

15 Commits

Author SHA1 Message Date
Angus Salkeld
73b7aa19bb Add value types to objdb keys.
This allows you to create a key with a know type.
And then get the type with the key value.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2511 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-10 03:20:38 +00:00
Jim Meyering
62e71c31d6 coroapi.h, confdb.h, objdb.h: big s/int/size_t/ change
* exec/mainconfig.c (objdb_get_string, objdb_get_int):
* exec/totemconfig.c (objdb_get_string, objdb_get_int)
(totem_config_keyread, totem_key_change_notify):
* include/corosync/confdb.h (confdb_callbacks_t):
* include/corosync/engine/coroapi.h (group_len, object_len)
(key_len, validate_callback, object_key_change_notify_fn_t)
(object_create_notify_fn_t, object_destroy_notify_fn_t)
(object_notify_callback_fn_t, object_reload_notify_fn_t)
(object_create, object_key_create, object_find_create)
(object_key_get, object_key_replace, object_key_delete)
(object_iter, object_key_iter, object_name_get)
(object_key_iter_from, object_key_increment)
(object_key_decrement):
* include/corosync/engine/objdb.h (object_key_change_notify_fn_t)
(object_create_notify_fn_t, object_destroy_notify_fn_t)
(object_len, key_len, validate_callback, object_create)
(object_key_create, object_find_create, object_key_get)
(object_key_replace, object_key_delete, object_iter)
(object_key_iter, object_name_get, object_key_iter_from)
(object_key_increment, object_key_decrement):
* lib/confdb.c (confdb_object_create, confdb_key_create)
(confdb_key_delete, confdb_key_get, confdb_key_increment)
(confdb_key_decrement, confdb_key_replace, confdb_object_find)
(confdb_object_iter, confdb_key_iter):
* lib/sa-confdb.c (confdb_sa_object_create, confdb_sa_key_create)
(confdb_sa_key_delete, confdb_sa_key_get)
(confdb_sa_key_increment, confdb_sa_key_decrement)
(confdb_sa_key_replace, confdb_sa_object_find)
(confdb_sa_object_iter, confdb_sa_key_iter):
* lib/sa-confdb.h:
* services/confdb.c (message_handler_req_lib_confdb_key_replace):
* services/votequorum.c (objdb_get_string, objdb_get_int)
(quorum_key_change_notify, votequorum_objdb_reload_notify):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2040 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:29:16 +00:00
Jim Meyering
6b9505992f confdb.h (confdb_reload) Add errbuf_len parameter and propagate.
* include/corosync/confdb.h (confdb_callbacks_t):
* lib/confdb.c (confdb_reload):
* lib/sa-confdb.c (confdb_sa_reload):
* lib/sa-confdb.h:
* test/testconfdb.c (main):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2004 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 20:31:38 +00:00
Jim Meyering
b6378dc05d confdb_sa_write: propagate errbuf_len parameter
* lib/sa-confdb.c (confdb_sa_write): Propagate errbuf_len parameter.
* lib/sa-confdb.h: Update prototype

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2003 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 20:31:24 +00:00
Christine Caulfield
2924b84b60 Fix some const warnings
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1828 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 17:13:37 +00:00
Steven Dake
58ab8d4a65 Unification around hdb_handle_t data type.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1782 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-25 11:14:47 +00:00
Christine Caulfield
d2795808da Fix some compile warnings.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1672 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-10-06 07:46:04 +00:00
Christine Caulfield
2bab5b36cc Remove the disliked *_from calls from the objdb and recast
the confdb library to use the new find_create/find_next/find_destroy API
calls instead.

I've kept the libcondfb API the same as before with the single change of
adding a confdb_object_find_destroy to tidy up the find handle after
use. If you don't call this then libcondfb will do it for you when
confdb_finalize is called.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1660 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-26 07:34:22 +00:00
Steven Dake
e1f531380a Revert patch 1633 which breaks build.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1636 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:44:26 +00:00
Steven Dake
c4a1c7eb96 Change all occurances of openais to corosync.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1633 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:04:01 +00:00
Fabio M. Di Nitto
010198fac4 Add support for reload operations within objdb and plugins.
Use a 2 phase "commit" operation:
1) Invoke verifyconfig that should catch the errors before the reload operation
2) Invoke reloadconfig that performs the operation and should _never_ fail

Implementation note: if step 2 fails, there is no fall back at the moment.

Fix the IPC table for confdb:
MESSAGE_REQ_CONFDB_XPATH_EVAL_EXPRESSION = 12 was added to include/ipc_confdb.h
without an associated call. Thanks Chrissie for spotting this.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1629 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-13 03:58:03 +00:00
Steven Dake
617dbdf2f0 Split openais and corosync tree into two seperate repositories.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1622 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-05 13:23:46 +00:00
Steven Dake
46babc95ad Initial move of corosync and openais trees into seperate directories.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1582 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-07-21 07:59:08 +00:00
Patrick Caulfield
fef53eb2c4 Expose confdb write to the library.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1536 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-05-07 07:27:37 +00:00
Patrick Caulfield
1165060e46 Allow libconfdb to run standalone (without aisexec)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1531 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-04-30 15:32:25 +00:00