1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
Commit Graph

16 Commits

Author SHA1 Message Date
Volker Lendecke
b4fd8024b5 libctdb: Fix a few format warnings
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit fa6564c24429e084be728dbe6eea1dec13e58709)
2011-08-22 17:11:06 +02:00
Volker Lendecke
ef64060898 libctdb: Add license header to messages.c
Rusty, please check!

Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit 4bceba374be82e76ba5d9d923172e85e9365b990)
2011-08-22 17:11:06 +02:00
Volker Lendecke
a31d7516f5 libctdb: Reorder set_message_handler
No code change, this is for better readability

Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit e0f93459e05eef33024096654b4aaf1eb3c6d7c4)
2011-08-22 17:11:06 +02:00
Ronnie Sahlberg
f815237f8f libctdb
fix a compile problem after renaming a structure field

(This used to be ctdb commit f44c02f45dbc13e3cc2e89ee1c96bd0d57042fcc)
2010-12-10 14:19:53 +11:00
Ronnie Sahlberg
e42fc0d4f5 LibCTDB
Add an input queue where we keep received pdus we have not yet processed
This allows us to perform SYNC calls from an ASYNC callback

(This used to be ctdb commit c111e98d3ad7bd3d09f4081e9bb1443d3722672f)
2010-12-10 13:42:25 +11:00
Ronnie Sahlberg
22ea35f17d adda GETPUBLICIPS control to libctdb and use this in the test example
enhance the test example to show the new releaseip/takeip messages

(This used to be ctdb commit 21cc57883e6c02b0e037211b26d1d866d5d7f03d)
2010-09-15 14:58:11 +10:00
Rusty Russell
a65cb6a9ae libctdb: add synchronous message handling and unregister, with tests.
It turns out that we *do* want a separate private arg for the message
handler and the completion callback, so we change that.

We also fix the prototypes of the remove_message functions as we
implement them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>


(This used to be ctdb commit 332375246eccd95da626f434f6d49dd9458a9787)
2010-08-09 15:41:32 +09:30
Rusty Russell
b93e65eaf7 libctdb: implement ctdb_disconnect and ctdb_detachdb
These are important for testing, since we can easily tell if we
leak memory if there are outstanding allocations after calling
these.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>


(This used to be ctdb commit 18a212aa40d0ff9ff59775c6fcf9dc973e991460)
2010-06-18 15:35:52 +09:30
Rusty Russell
866cca9637 libctdb: clarify logging levels
Now we have more messages, it seems to make sense to document their usage
and make them consistent.

In particular, LOG_CRIT for internal libctdb problems, LOG_ALERT for
API misuse.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>


(This used to be ctdb commit a6fed3f577c7ec51df38ed15ecb9db6ea2ae7c8f)
2010-06-08 16:53:17 +09:30
Rusty Russell
3a569c14bc libctdb: use bool in API
Return bool instead of -1/0; that's what the young kids are doing
these days!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>


(This used to be ctdb commit e285b5d5a9d4fbc4f75dbb237d2fcdbd84f2d605)
2010-06-04 20:19:25 +09:30
Rusty Russell
d77a1e9399 patch libctdb-use-logging.patch
(This used to be ctdb commit fecb8a19e97f6e453066461b234acdb0946bbadd)
2010-06-04 20:27:06 +09:30
Rusty Russell
cc8435852c libctdb: add ctdb arg to more functions.
This is going to help for logging, since we want it there.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(This used to be ctdb commit 0786152472bc43efae4c896f7c6c07c6e080b9b2)
2010-06-04 16:54:08 +09:30
Ronnie Sahlberg
0844759964 Add the offsetof macro to libctdb
change all calls to new_ctdb_request() to use the offset macro to calculate the correct size (instead of allocating one byte too many and hoping the alignment padding saves us.)

(This used to be ctdb commit 07b395258ab08218e8eed3b4a52654925b85275c)
2010-06-02 15:13:32 +10:00
Rusty Russell
bd8d302589 libctdb: tweak interface for readrecordlock
Previously we could hang in poll with the callback pending (since we
fake it): explicitly call it immediately.

Note: I experienced corruption using DLIST_ADD_END (ctdb->pnn was blatted
when adding to the message_handler list).  I switched them all to DLIST_ADD,
but maybe I'm using it wrong?

(This used to be ctdb commit 3727165f0d206999d2cfc2800ff8868640868c7c)
2010-05-24 13:52:17 +09:30
Rusty Russell
30f4d01df1 libctdb: uniform callbacks, _recv functions to pull out data.
This is a bit tricky for those cases where we need to do multiple or
zero I/Os (eg. attachdb and readrecordlock), but works well for the
simple cases.

(This used to be ctdb commit ebe4dd724338c156423cfdcc10a75b68c2084cde)
2010-05-24 13:17:36 +09:30
Rusty Russell
1dc7f2c4f8 libctdb: first cut, supports getrecmaster only
This is a completely standalone library using only ctdb_protocol.h.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Header from folded patch 'libctdb-message-handling.patch':

libctdb: add message handling to libctdb.

Now clients can send and receive ctdb messages.


(This used to be ctdb commit 732cf6ead4aa2fbefc2b81328171f52c8d935341)
2010-05-21 12:07:41 +09:30