summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-05-08 18:28:17 +0200
committerAndrew Bartlett <abartlet@samba.org>2011-06-09 12:40:08 +0200
commit8d803d5a0a9a7815c4e6fcbd9b7c652fb85e94dd (patch)
treebbe38810d02bcbc2fe58e180d4e01b6784e9c22f /source4
parent8d4a8389bb2df77ff8923dda8368aa2915652c1a (diff)
downloadsamba-8d803d5a0a9a7815c4e6fcbd9b7c652fb85e94dd.tar.gz
samba-8d803d5a0a9a7815c4e6fcbd9b7c652fb85e94dd.tar.bz2
samba-8d803d5a0a9a7815c4e6fcbd9b7c652fb85e94dd.zip
s4-cluster Use task_id instead of id2 to clarify server_id structure
This seems a clearer and more acceptable name. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/cluster/cluster.c4
-rw-r--r--source4/cluster/cluster.h4
-rw-r--r--source4/cluster/local.c6
-rw-r--r--source4/lib/messaging/pymessaging.c12
-rw-r--r--source4/librpc/idl/server_id4.idl2
5 files changed, 14 insertions, 14 deletions
diff --git a/source4/cluster/cluster.c b/source4/cluster/cluster.c
index 441ea96562..9dcec2e3e0 100644
--- a/source4/cluster/cluster.c
+++ b/source4/cluster/cluster.c
@@ -50,10 +50,10 @@ static void cluster_init(void)
/*
create a server_id for the local node
*/
-struct server_id cluster_id(uint64_t id, uint32_t id2)
+struct server_id cluster_id(uint64_t pid, uint32_t task_id)
{
cluster_init();
- return ops->cluster_id(ops, id, id2);
+ return ops->cluster_id(ops, pid, task_id);
}
diff --git a/source4/cluster/cluster.h b/source4/cluster/cluster.h
index 5ed9055d7b..df12c8bb27 100644
--- a/source4/cluster/cluster.h
+++ b/source4/cluster/cluster.h
@@ -28,7 +28,7 @@
test for same cluster id
*/
#define cluster_id_equal(id_1, id_2) ((id_1)->pid == (id_2)->pid \
- && (id_1)->id2 == (id_2)->id2 \
+ && (id_1)->task_id == (id_2)->task_id \
&& (id_1)->vnn == (id_2)->vnn)
/*
@@ -40,7 +40,7 @@ struct imessaging_context;
typedef void (*cluster_message_fn_t)(struct imessaging_context *, DATA_BLOB);
/* prototypes */
-struct server_id cluster_id(uint64_t id, uint32_t id2);
+struct server_id cluster_id(uint64_t id, uint32_t task_id);
char *cluster_id_string(TALLOC_CTX *mem_ctx, struct server_id id);
struct tdb_wrap *cluster_tdb_tmp_open(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, const char *dbname, int flags);
void *cluster_backend_handle(void);
diff --git a/source4/cluster/local.c b/source4/cluster/local.c
index 9977a2e648..7fe3e04c3e 100644
--- a/source4/cluster/local.c
+++ b/source4/cluster/local.c
@@ -31,12 +31,12 @@
/*
server a server_id for the local node
*/
-static struct server_id local_id(struct cluster_ops *ops, uint64_t pid, uint32_t id2)
+static struct server_id local_id(struct cluster_ops *ops, uint64_t pid, uint32_t task_id)
{
struct server_id server_id;
ZERO_STRUCT(server_id);
server_id.pid = pid;
- server_id.id2 = id2;
+ server_id.task_id = task_id;
return server_id;
}
@@ -47,7 +47,7 @@ static struct server_id local_id(struct cluster_ops *ops, uint64_t pid, uint32_t
static char *local_id_string(struct cluster_ops *ops,
TALLOC_CTX *mem_ctx, struct server_id id)
{
- return talloc_asprintf(mem_ctx, "%u.%llu.%u", id.vnn, (unsigned long long)id.pid, id.id2);
+ return talloc_asprintf(mem_ctx, "%u.%llu.%u", id.vnn, (unsigned long long)id.pid, id.task_id);
}
diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c
index f295f42d5f..63312da5d0 100644
--- a/source4/lib/messaging/pymessaging.c
+++ b/source4/lib/messaging/pymessaging.c
@@ -45,12 +45,12 @@ static bool server_id_from_py(PyObject *object, struct server_id *server_id)
}
if (PyTuple_Size(object) == 3) {
- return PyArg_ParseTuple(object, "iii", &server_id->pid, &server_id->id2, &server_id->vnn);
+ return PyArg_ParseTuple(object, "iii", &server_id->pid, &server_id->task_id, &server_id->vnn);
} else {
- int pid, id2;
- if (!PyArg_ParseTuple(object, "ii", &pid, &id2))
+ int pid, task_id;
+ if (!PyArg_ParseTuple(object, "ii", &pid, &task_id))
return false;
- *server_id = cluster_id(pid, id2);
+ *server_id = cluster_id(pid, task_id);
return true;
}
}
@@ -159,7 +159,7 @@ static void py_msg_callback_wrapper(struct imessaging_context *msg, void *privat
PyObject *callback = (PyObject *)private_data;
PyObject_CallFunction(callback, discard_const_p(char, "i(iii)s#"), msg_type,
- server_id.pid, server_id.id2, server_id.vnn,
+ server_id.pid, server_id.task_id, server_id.vnn,
data->data, data->length);
}
@@ -229,7 +229,7 @@ static PyObject *py_imessaging_server_id(PyObject *obj, void *closure)
imessaging_Object *iface = (imessaging_Object *)obj;
struct server_id server_id = imessaging_get_server_id(iface->msg_ctx);
- return Py_BuildValue("(iii)", server_id.pid, server_id.id2,
+ return Py_BuildValue("(iii)", server_id.pid, server_id.task_id,
server_id.vnn);
}
diff --git a/source4/librpc/idl/server_id4.idl b/source4/librpc/idl/server_id4.idl
index 728818f629..eb191e37b7 100644
--- a/source4/librpc/idl/server_id4.idl
+++ b/source4/librpc/idl/server_id4.idl
@@ -6,7 +6,7 @@ interface server_id
/* id used to identify a endpoint, possibly in a cluster */
typedef [public] struct {
hyper pid;
- uint32 id2;
+ uint32 task_id;
uint32 vnn;
udlong unique_id;
} server_id;