Skip to content

Commit

Permalink
Merge branch 'release/4.6.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Mar 4, 2018
2 parents 630dcf5 + db1b98d commit 12bcc05
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
1 change: 1 addition & 0 deletions docs/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Release Notes
.. toctree::
:maxdepth: 2

release-notes/version-4.6.1
release-notes/version-4.6.0

release-notes/version-4.5.24
Expand Down
13 changes: 13 additions & 0 deletions docs/release-notes/version-4.6.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
=============
Version 4.6.1
=============

Version 4.6.1 of mod_wsgi can be obtained from:

https://codeload.github.com/GrahamDumpleton/mod_wsgi/tar.gz/4.6.1

Bugs Fixed
----------

* APR version 1.4.X on RHEL/CentOS doesn't have ``apr_hash_this_key()``
function. Swap to using ``apr_hash_this()`` instead.
20 changes: 12 additions & 8 deletions src/server/wsgi_interp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2613,21 +2613,25 @@ void wsgi_publish_process_stopping(char *reason)
PyObject *event = NULL;
PyObject *object = NULL;

interp = wsgi_acquire_interpreter((char *)apr_hash_this_key(hi));
const void *key;

event = PyDict_New();
apr_hash_this(hi, &key, NULL, NULL);

interp = wsgi_acquire_interpreter((char *)key);

event = PyDict_New();

#if PY_MAJOR_VERSION >= 3
object = PyUnicode_DecodeLatin1(reason, strlen(reason), NULL);
object = PyUnicode_DecodeLatin1(reason, strlen(reason), NULL);
#else
object = PyString_FromString(reason);
object = PyString_FromString(reason);
#endif
PyDict_SetItemString(event, "shutdown_reason", object);
Py_DECREF(object);
PyDict_SetItemString(event, "shutdown_reason", object);
Py_DECREF(object);

wsgi_publish_event("process_stopping", event);
wsgi_publish_event("process_stopping", event);

Py_DECREF(event);
Py_DECREF(event);

wsgi_release_interpreter(interp);

Expand Down
4 changes: 2 additions & 2 deletions src/server/wsgi_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

#define MOD_WSGI_MAJORVERSION_NUMBER 4
#define MOD_WSGI_MINORVERSION_NUMBER 6
#define MOD_WSGI_MICROVERSION_NUMBER 0
#define MOD_WSGI_VERSION_STRING "4.6.0"
#define MOD_WSGI_MICROVERSION_NUMBER 1
#define MOD_WSGI_VERSION_STRING "4.6.1"

/* ------------------------------------------------------------------------- */

Expand Down

0 comments on commit 12bcc05

Please sign in to comment.