summaryrefslogtreecommitdiff
path: root/controller.c
diff options
context:
space:
mode:
authorBert Vermeulen <bert@biot.com>2013-09-01 18:20:36 +0200
committerBert Vermeulen <bert@biot.com>2013-09-01 18:20:36 +0200
commit2994587f98f205bb8847554bd28483532b277f2c (patch)
tree958783ed186aaa2ab05572b1ff4a9075187285f1 /controller.c
parent845f0d4031780220451037e87885e1ff79670976 (diff)
downloadlibsigrokdecode-2994587f98f205bb8847554bd28483532b277f2c.tar.gz
libsigrokdecode-2994587f98f205bb8847554bd28483532b277f2c.zip
Use frontend-registered callback with correct parameters
Diffstat (limited to 'controller.c')
-rw-r--r--controller.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/controller.c b/controller.c
index 7987ea1..9267ded 100644
--- a/controller.c
+++ b/controller.c
@@ -965,22 +965,21 @@ SRD_API int srd_pd_output_callback_add(int output_type,
}
/** @private */
-SRD_PRIV void *srd_pd_output_callback_find(int output_type)
+SRD_PRIV struct srd_pd_callback *srd_pd_output_callback_find(int output_type)
{
GSList *l;
- struct srd_pd_callback *pd_cb;
- void *(cb);
+ struct srd_pd_callback *tmp, *pd_cb;
- cb = NULL;
+ pd_cb = NULL;
for (l = callbacks; l; l = l->next) {
- pd_cb = l->data;
- if (pd_cb->output_type == output_type) {
- cb = pd_cb->cb;
+ tmp = l->data;
+ if (tmp->output_type == output_type) {
+ pd_cb = tmp;
break;
}
}
- return cb;
+ return pd_cb;
}
/* This is the backend function to Python sigrokdecode.add() call. */