[PATCH 2/10] rlm_python: 02-rename-radlog-py-to-python-radlog.patch
Rename radlog_py to python_radlog Add Py_INCREF(None) because we are returning it. Change radlog invokation. --- commit 6050d39e6f0c26ecd73c026fcca6e6a17806a4e3 tree 5e412673bfc4727599b0afa7c5e917cdf1a5ddf5 parent 20b0202331f6bc26c46d3c91caf3c209a5958e01 author <stingray@boxster64.stingr.net> Sun, 29 Jan 2006 14:54:05 +0300 committer <stingray@boxster64.stingr.net> Sun, 29 Jan 2006 14:54:05 +0300 src/modules/rlm_python/rlm_python.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/rlm_python/rlm_python.c b/src/modules/rlm_python/rlm_python.c --- a/src/modules/rlm_python/rlm_python.c +++ b/src/modules/rlm_python/rlm_python.c @@ -139,7 +139,7 @@ static PyObject *radiusd_module = NULL; */ /* radlog wrapper */ -static PyObject *radlog_py(const PyObject *self, PyObject *args) { +static PyObject *python_radlog(const PyObject *module, PyObject *args) { int status; char *msg; @@ -147,12 +147,14 @@ static PyObject *radlog_py(const PyObjec return NULL; } - radlog(status, msg); + radlog(status, "%s", msg); + Py_INCREF(Py_None); + return Py_None; } static PyMethodDef radiusd_methods[] = { - {"radlog", (PyCFunction)radlog_py, METH_VARARGS, "freeradius radlog()."}, + {"radlog", (PyCFunction) &python_radlog, METH_VARARGS, "freeradius radlog()."}, {NULL, NULL, 0, NULL} }; -- Paul P 'Stingray' Komkoff Jr // http://stingr.net/key <- my pgp key This message represents the official view of the voices in my head
participants (1)
-
Paul P Komkoff Jr