#include <dirent.h>
/* The list of protocol decoders. */
-GSList *list_pds = NULL;
-GSList *decoders = NULL;
+GSList *pd_list = NULL;
+GSList *di_list = NULL;
/**
GSList *srd_list_decoders(void)
{
- return list_pds;
+ return pd_list;
}
if (!(d = malloc(sizeof(struct srd_decoder))))
return SRD_ERR_MALLOC;
- /* We'll just use the name of the module for the ID. */
- d->id = strdup(name);
+ if ((r = h_str(py_res, "id", &(d->id))) < 0)
+ return r;
- if ((r = h_str(py_res, py_mod, "name", &(d->name))) < 0)
+ if ((r = h_str(py_res, "name", &(d->name))) < 0)
return r;
- if ((r = h_str(py_res, py_mod, "longname",
+ if ((r = h_str(py_res, "longname",
&(d->longname))) < 0)
return r;
- if ((r = h_str(py_res, py_mod, "desc", &(d->desc))) < 0)
+ if ((r = h_str(py_res, "desc", &(d->desc))) < 0)
return r;
- if ((r = h_str(py_res, py_mod, "longdesc",
+ if ((r = h_str(py_res, "longdesc",
&(d->longdesc))) < 0)
return r;
- if ((r = h_str(py_res, py_mod, "author", &(d->author))) < 0)
+ if ((r = h_str(py_res, "author", &(d->author))) < 0)
return r;
- if ((r = h_str(py_res, py_mod, "email", &(d->email))) < 0)
+ if ((r = h_str(py_res, "email", &(d->email))) < 0)
return r;
- if ((r = h_str(py_res, py_mod, "license", &(d->license))) < 0)
+ if ((r = h_str(py_res, "license", &(d->license))) < 0)
return r;
d->py_mod = py_mod;
/* TODO: Warning if loading fails for a decoder. */
if ((ret = srd_load_decoder(decodername, &dec)) == SRD_OK) {
/* Append it to the list of supported/loaded decoders. */
- list_pds = g_slist_append(list_pds, dec);
+ pd_list = g_slist_append(pd_list, dec);
}
}
closedir(dir);