From: Sven Trenkel Date: Sat, 7 Nov 2009 19:54:08 +0000 (+0100) Subject: Meh, forgot to pass the userdata back on write callbacks. X-Git-Tag: collectd-4.9.0~35^2~26 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=8f21e6c22450047875598615416070e7803248a2;p=collectd.git Meh, forgot to pass the userdata back on write callbacks. --- diff --git a/src/python.c b/src/python.c index 72c4ab61..3d2d3a82 100644 --- a/src/python.c +++ b/src/python.c @@ -129,7 +129,10 @@ static int cpy_write_callback(const data_set_t *ds, const value_list_t *value_li value_list->plugin_instance, value_list->type_instance, value_list->plugin, value_list->host, (double) value_list->time, value_list->interval); Py_DECREF(list); - ret = PyObject_CallFunctionObjArgs(c->callback, v, (void *) 0); + if (c->data == NULL) + ret = PyObject_CallFunctionObjArgs(c->callback, v, (void *) 0); + else + ret = PyObject_CallFunctionObjArgs(c->callback, v, c->data, (void *) 0); if (ret == NULL) { /* FIXME */ PyErr_Print();