From 76ce309234adbe0a6a56b849a91714cab148c4a7 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 7 May 2007 15:31:12 +0000 Subject: r22751: Next step for the cluster merge: sessionid.tdb should contain a 'struct server_id' instead of a 'uint32 pid' (This used to be commit be7bac55c37676a8137c59a22dfb2e4c4821ac21) --- source3/smbd/session.c | 2 +- source3/smbd/sesssetup.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/session.c b/source3/smbd/session.c index 30ade8aedf..cd7511430e 100644 --- a/source3/smbd/session.c +++ b/source3/smbd/session.c @@ -60,7 +60,7 @@ BOOL session_claim(user_struct *vuser) struct sockaddr sa; struct in_addr *client_ip; struct sessionid sessionid; - uint32 pid = (uint32)sys_getpid(); + struct server_id pid = procid_self(); fstring keystr; char * hostname; int tdb_store_flag; /* If using utmp, we do an inital 'lock hold' store, diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 7dbf20a189..d6cdf777d8 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -1180,11 +1180,11 @@ static int shutdown_other_smbds(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, struct sessionid *sessionid = (struct sessionid *)dbuf.dptr; const char *ip = (const char *)p; - if (!process_exists(pid_to_procid(sessionid->pid))) { + if (!process_exists(sessionid->pid)) { return 0; } - if (sessionid->pid == sys_getpid()) { + if (procid_is_me(&sessionid->pid)) { return 0; } @@ -1192,7 +1192,7 @@ static int shutdown_other_smbds(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, return 0; } - message_send_pid(pid_to_procid(sessionid->pid), MSG_SHUTDOWN, + message_send_pid(sessionid->pid, MSG_SHUTDOWN, NULL, 0, True); return 0; } -- cgit