X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoder.c;h=f15a7995bdf18d7f9354fb6af6e9d5895a2a1ce3;hb=e27d3e67cb69d54936399cd97a4c40c9842549a7;hp=1151f057f2b5c3e2d4fa5f05ed0fda10cb7e7df6;hpb=95e40a0ce2e27ba6ea7c97d9956918336160bf7b;p=libsigrokdecode.git diff --git a/decoder.c b/decoder.c index 1151f05..f15a799 100644 --- a/decoder.c +++ b/decoder.c @@ -682,8 +682,8 @@ SRD_API int srd_decoder_load(const char *module_name) * PDs of different API versions are incompatible and cannot work. */ apiver = srd_decoder_apiver(d); - if (apiver != 2) { - srd_exception_catch("Only PD API version 2 is supported, " + if (apiver != 2 && apiver != 3) { + srd_exception_catch("Only PD API version 2/3 is supported, " "decoder %s has version %ld", module_name, apiver); fail_txt = "API version mismatch"; goto err_out; @@ -849,7 +849,7 @@ SRD_API int srd_decoder_unload(struct srd_decoder *dec) */ for (l = sessions; l; l = l->next) { sess = l->data; - srd_inst_free_all(sess, NULL); + srd_inst_free_all(sess); } /* Remove the PD from the list of loaded decoders. */