From: Uwe Hermann Date: Sun, 4 Dec 2011 22:36:52 +0000 (+0100) Subject: srd: Bring back the 'id' field and use it. X-Git-Tag: libsigrokdecode-0.1.0~246 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commitdiff_plain;h=09b0acbb8dd292794e7fc797352cda47c27a1355 srd: Bring back the 'id' field and use it. --- diff --git a/decoder.c b/decoder.c index 7753a33..e69eae8 100644 --- a/decoder.c +++ b/decoder.c @@ -96,8 +96,8 @@ int srd_load_decoder(const char *name, struct srd_decoder **dec) 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;