summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/conn_tdb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/lib/conn_tdb.c b/source3/lib/conn_tdb.c
index 7f9c74636a..b95b4cd377 100644
--- a/source3/lib/conn_tdb.c
+++ b/source3/lib/conn_tdb.c
@@ -18,6 +18,7 @@
*/
#include "includes.h"
+#include "smbd/globals.h"
static struct db_context *connections_db_ctx(bool rw)
{
@@ -55,7 +56,7 @@ struct db_record *connections_fetch_entry(TALLOC_CTX *mem_ctx,
TDB_DATA key;
ZERO_STRUCT(ckey);
- ckey.pid = procid_self();
+ ckey.pid = sconn_server_id(conn->sconn);
ckey.cnum = conn->cnum;
strlcpy(ckey.name, name, sizeof(ckey.name));