#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, py_mod, "id", &(d->id))) < 0)
+ return r;
if ((r = h_str(py_res, py_mod, "name", &(d->name))) < 0)
return r;
/* 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);