1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

merge from tridge

(This used to be ctdb commit fffe94f22f58027bdf2b465d252f41e7b8689399)
This commit is contained in:
Ronnie Sahlberg 2007-07-10 19:07:23 +10:00
commit d5f60b58f8
4 changed files with 8 additions and 20 deletions

View File

@ -1612,8 +1612,8 @@ static int dumpdb_fn(struct ctdb_context *ctdb, TDB_DATA key, TDB_DATA data, voi
char *keystr, *datastr;
struct ctdb_ltdb_header *h = (struct ctdb_ltdb_header *)data.dptr;
keystr = hex_encode(ctdb, key.dptr, key.dsize);
datastr = hex_encode(ctdb, data.dptr+sizeof(*h), data.dsize-sizeof(*h));
keystr = hex_encode_talloc(ctdb, key.dptr, key.dsize);
datastr = hex_encode_talloc(ctdb, data.dptr+sizeof(*h), data.dsize-sizeof(*h));
fprintf(f, "dmaster: %u\n", h->dmaster);
fprintf(f, "rsn: %llu\n", (unsigned long long)h->rsn);

View File

@ -6,25 +6,13 @@ OBJ_FILES = brlock_ctdb.o
[SUBSYSTEM::opendb_ctdb]
OBJ_FILES = opendb_ctdb.o
##################
[SUBSYSTEM::ctdb_tcp]
OBJ_FILES = \
tcp/tcp_init.o \
tcp/tcp_io.o \
tcp/tcp_connect.o
##################
[SUBSYSTEM::ctdb]
OBJ_FILES = \
ctdb_cluster.o \
common/ctdb.o \
common/ctdb_call.o \
common/ctdb_message.o \
common/ctdb_ltdb.o \
common/ctdb_util.o \
client/ctdb_client.o \
common/ctdb_io.o \
common/ctdb_client.o \
common/ctdb_daemon.o \
common/ctdb_lockwait.o
common/ctdb_ltdb.o \
common/ctdb_message.o \
common/ctdb_util.o
PUBLIC_DEPENDENCIES = LIBTDB LIBTALLOC
PRIVATE_DEPENDENCIES = ctdb_tcp

View File

@ -34,7 +34,7 @@ struct timeval timeval_until(const struct timeval *tv1,
_PUBLIC_ struct timeval timeval_current_ofs(uint32_t secs, uint32_t usecs);
double timeval_elapsed(struct timeval *tv);
char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *mem_ctx);
char *hex_encode(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len);
char *hex_encode_talloc(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len);
_PUBLIC_ const char **str_list_add(const char **list, const char *s);
_PUBLIC_ int set_blocking(int fd, BOOL set);

View File

@ -102,7 +102,7 @@ _PUBLIC_ char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *me
return file_lines_parse(p, size, numlines, mem_ctx);
}
char *hex_encode(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len)
char *hex_encode_talloc(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len)
{
int i;
char *hex_buffer;