mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
merge from tridge
(This used to be ctdb commit b6ffb429ab33a66e374e9481bbf4fe6b47a67dab)
This commit is contained in:
commit
c522b852c4
@ -39,7 +39,7 @@ void do_debug(const char *format, ...)
|
||||
|
||||
strftime(tbuf,sizeof(tbuf)-1,"%Y/%m/%d %H:%M:%S", tm);
|
||||
|
||||
printf("%s.%06u [%5u]: %s", tbuf, (unsigned)t.tv_usec, (unsigned)getpid(), s);
|
||||
fflush(stdout);
|
||||
fprintf(stderr, "%s.%06u [%5u]: %s", tbuf, (unsigned)t.tv_usec, (unsigned)getpid(), s);
|
||||
fflush(stderr);
|
||||
free(s);
|
||||
}
|
||||
|
@ -217,9 +217,12 @@ static int control_status(struct ctdb_context *ctdb, int argc, const char **argv
|
||||
struct ctdb_vnn_map *vnnmap=NULL;
|
||||
struct ctdb_node_map *nodemap=NULL;
|
||||
uint32_t recmode, recmaster;
|
||||
uint32_t myvnn;
|
||||
int myvnn;
|
||||
|
||||
myvnn = ctdb_ctrl_getvnn(ctdb, TIMELIMIT(), options.vnn);
|
||||
if (myvnn == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = ctdb_ctrl_getnodemap(ctdb, TIMELIMIT(), options.vnn, ctdb, &nodemap);
|
||||
if (ret != 0) {
|
||||
@ -411,9 +414,12 @@ static int control_ip(struct ctdb_context *ctdb, int argc, const char **argv)
|
||||
{
|
||||
int i, ret;
|
||||
struct ctdb_all_public_ips *ips;
|
||||
uint32_t myvnn;
|
||||
int myvnn;
|
||||
|
||||
myvnn = ctdb_ctrl_getvnn(ctdb, TIMELIMIT(), options.vnn);
|
||||
if (myvnn == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = ctdb_ctrl_get_public_ips(ctdb, TIMELIMIT(), options.vnn, ctdb, &ips);
|
||||
if (ret != 0) {
|
||||
@ -449,9 +455,12 @@ static int control_publicip(struct ctdb_context *ctdb, int argc, const char **ar
|
||||
{
|
||||
int ret;
|
||||
struct ctdb_all_public_ips *ips;
|
||||
uint32_t myvnn;
|
||||
int myvnn;
|
||||
|
||||
myvnn = ctdb_ctrl_getvnn(ctdb, TIMELIMIT(), options.vnn);
|
||||
if (myvnn == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = ctdb_ctrl_get_public_ips(ctdb, TIMELIMIT(), options.vnn, ctdb, &ips);
|
||||
if (ret != 0) {
|
||||
@ -1050,7 +1059,12 @@ int main(int argc, const char *argv[])
|
||||
int j;
|
||||
|
||||
if (options.vnn == CTDB_CURRENT_NODE) {
|
||||
options.vnn = ctdb_ctrl_getvnn(ctdb, TIMELIMIT(), options.vnn);
|
||||
int vnn;
|
||||
vnn = ctdb_ctrl_getvnn(ctdb, TIMELIMIT(), options.vnn);
|
||||
if (vnn == -1) {
|
||||
return -1;
|
||||
}
|
||||
options.vnn = vnn;
|
||||
}
|
||||
|
||||
if (ctdb_commands[i].auto_all &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user