From 25a2a0bc6bd136a4d9ea6034e7a86c889d02e4e2 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 28 Apr 2010 10:32:49 +0200 Subject: [PATCH] ingest_record: lock client, then session lock client, then session rather than the reverse way. This saves us locking but more importantly prevents that session gets destroyed under our feet (while client and session is not locked). --- src/session.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/session.c b/src/session.c index 14b9a2c..309d9ff 100644 --- a/src/session.c +++ b/src/session.c @@ -1172,14 +1172,10 @@ int ingest_record(struct client *cl, const char *rec, xmlFreeDoc(xdoc); return -1; } - client_unlock(cl); session_enter(se); - client_lock(cl); if (client_get_session(cl) == se) ret = ingest_to_cluster(cl, xdoc, root, record_no, mergekey_norm); - client_unlock(cl); session_leave(se); - client_lock(cl); xmlFreeDoc(xdoc); return ret; -- 1.7.10.4