s3: Remove procid_self() from connections_fetch_entry()
[mat/samba.git] / source3 / lib / conn_tdb.c
index 7f9c74636a6ad1a8e6c5a731684a388cced92630..b95b4cd377cde89599b9f912fd86260cc6a02a8a 100644 (file)
@@ -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));