From e8a8a5f41859f3d23722c360d494854df71fb7b9 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 8 Aug 2024 14:59:21 -0700 Subject: [PATCH] server: use correct DB connection in create_work() A work generator can create and use its own DB connection. Fix a bug in create_work() that incorrectly used the boinc_db connection (which might not even be initialized). Fixes #4032 --- tools/backend_lib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/backend_lib.cpp b/tools/backend_lib.cpp index 00b1a4fce6..63b055b785 100644 --- a/tools/backend_lib.cpp +++ b/tools/backend_lib.cpp @@ -377,7 +377,7 @@ int create_work2( ); return retval; } - wu.id = boinc_db.insert_id(); + wu.id = wu.db->insert_id(); } return 0;