Rev 1648: Properly mark ra connection as not busy if a property is invalidly formatted. in http://people.samba.org/bzr/jelmer/bzr-svn/trunk

Jelmer Vernooij jelmer at samba.org
Mon Aug 25 02:32:45 BST 2008


At http://people.samba.org/bzr/jelmer/bzr-svn/trunk

------------------------------------------------------------
revno: 1648
revision-id: jelmer at samba.org-20080825013242-dwspr8d9fm10c681
parent: jelmer at samba.org-20080825000515-tt361na3wn5crg0k
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Mon 2008-08-25 03:32:42 +0200
message:
  Properly mark ra connection as not busy if a property is invalidly formatted.
modified:
  ra.c                           ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
=== modified file 'ra.c'
--- a/ra.c	2008-08-24 16:44:21 +0000
+++ b/ra.c	2008-08-25 01:32:42 +0000
@@ -1286,8 +1286,11 @@
 
 #if SVN_VER_MAJOR >= 1 && SVN_VER_MINOR >= 5
 	hash_revprops = prop_dict_to_hash(pool, revprops);
-	if (hash_revprops == NULL)
+	if (hash_revprops == NULL) {
+		apr_pool_destroy(pool);
+		ra->busy = false;
 		return NULL;
+	}
 	Py_BEGIN_ALLOW_THREADS
 	err = svn_ra_get_commit_editor3(ra->ra, &editor, 
 		&edit_baton, 
@@ -1297,17 +1300,23 @@
 	/* Check that revprops has only one member named SVN_PROP_REVISION_LOG */
 	if (PyDict_Size(revprops) != 1) {
 		PyErr_SetString(PyExc_ValueError, "Only svn:log can be set with Subversion 1.4");
+		apr_pool_destroy(pool);
+		ra->busy = false;
 		return NULL;
 	}
 
 	py_log_msg = PyDict_GetItemString(revprops, SVN_PROP_REVISION_LOG);
 	if (py_log_msg == NULL) {
 		PyErr_SetString(PyExc_ValueError, "Only svn:log can be set with Subversion 1.4.");
+		apr_pool_destroy(pool);
+		ra->busy = false;
 		return NULL;
 	}
 
 	if (PyString_Check(py_log_msg)) {
 		PyErr_SetString(PyExc_ValueError, "svn:log property should be set to string.");
+		apr_pool_destroy(pool);
+		ra->busy = false;
 		return NULL;
 	}
 




More information about the bazaar-commits mailing list