summaryrefslogtreecommitdiff
path: root/source3/lib/g_lock.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
commit6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch)
tree850c71039563c16a5d563c47e7ba2ab645baf198 /source3/lib/g_lock.c
parent6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff)
parent2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff)
downloadsamba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source3/lib/g_lock.c')
-rw-r--r--source3/lib/g_lock.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c
index 184da9b4fd..006ee3698c 100644
--- a/source3/lib/g_lock.c
+++ b/source3/lib/g_lock.c
@@ -20,6 +20,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "g_lock.h"
+#include "util_tdb.h"
#include "ctdbd_conn.h"
#include "../lib/util/select.h"
#include "system/select.h"
@@ -107,7 +108,7 @@ static bool g_lock_parse(TALLOC_CTX *mem_ctx, TDB_DATA data,
DEBUG(10, ("locks:\n"));
for (i=0; i<num_locks; i++) {
DEBUGADD(10, ("%s: %s %s\n",
- procid_str(talloc_tos(), &locks[i].pid),
+ server_id_str(talloc_tos(), &locks[i].pid),
((locks[i].lock_type & 1) == G_LOCK_READ) ?
"read" : "write",
(locks[i].lock_type & G_LOCK_PENDING) ?
@@ -117,7 +118,7 @@ static bool g_lock_parse(TALLOC_CTX *mem_ctx, TDB_DATA data,
&& !process_exists(locks[i].pid)) {
DEBUGADD(10, ("lock owner %s died -- discarding\n",
- procid_str(talloc_tos(),
+ server_id_str(talloc_tos(),
&locks[i].pid)));
if (i < (num_locks-1)) {
@@ -145,7 +146,7 @@ static void g_lock_cleanup(int *pnum_locks, struct g_lock_rec *locks)
continue;
}
DEBUGADD(10, ("%s does not exist -- discarding\n",
- procid_str(talloc_tos(), &locks[i].pid)));
+ server_id_str(talloc_tos(), &locks[i].pid)));
if (i < (num_locks-1)) {
locks[i] = locks[num_locks-1];
@@ -392,7 +393,7 @@ NTSTATUS g_lock_lock(struct g_lock_ctx *ctx, const char *name,
* sys_poll and in the clustering case we might have to add
* the ctdb fd. This avoids the realloc then.
*/
- pollfds = TALLOC_ARRAY(talloc_tos(), struct pollfd, 2);
+ pollfds = talloc_array(talloc_tos(), struct pollfd, 2);
if (pollfds == NULL) {
status = NT_STATUS_NO_MEMORY;
break;
@@ -495,7 +496,7 @@ static void g_lock_got_retry(struct messaging_context *msg,
bool *pretry = (bool *)private_data;
DEBUG(10, ("Got retry message from pid %s\n",
- procid_str(talloc_tos(), &server_id)));
+ server_id_str(talloc_tos(), &server_id)));
*pretry = true;
}
@@ -586,7 +587,7 @@ static NTSTATUS g_lock_force_unlock(struct g_lock_ctx *ctx, const char *name,
&data_blob_null);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(1, ("sending retry to %s failed: %s\n",
- procid_str(talloc_tos(),
+ server_id_str(talloc_tos(),
&locks[i].pid),
nt_errstr(status)));
} else {