projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9fa8a63
)
Fix #1162 by always submitting all changed options to libsrd
author
Soeren Apel
<soeren@apelpie.net>
Tue, 17 Apr 2018 20:23:23 +0000
(22:23 +0200)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Wed, 18 Apr 2018 12:38:10 +0000
(14:38 +0200)
pv/data/decode/decoder.cpp
patch
|
blob
|
history
diff --git
a/pv/data/decode/decoder.cpp
b/pv/data/decode/decoder.cpp
index c6995bcf703a56cb13b4ba347acb2c61aa11d17e..6ce60da8559c96e1e81e7b4e974ba4a6d42874a5 100644
(file)
--- a/
pv/data/decode/decoder.cpp
+++ b/
pv/data/decode/decoder.cpp
@@
-91,8
+91,12
@@
void Decoder::set_option(const char *id, GVariant *value)
GHashTable *const opt_hash = g_hash_table_new_full(g_str_hash,
g_str_equal, g_free, (GDestroyNotify)g_variant_unref);
GHashTable *const opt_hash = g_hash_table_new_full(g_str_hash,
g_str_equal, g_free, (GDestroyNotify)g_variant_unref);
- g_variant_ref(value);
- g_hash_table_insert(opt_hash, (void*)g_strdup(id), value);
+ for (const auto& option : options_) {
+ GVariant *const value = option.second;
+ g_variant_ref(value);
+ g_hash_table_replace(opt_hash, (void*)g_strdup(
+ option.first.c_str()), value);
+ }
srd_inst_option_set(decoder_inst_, opt_hash);
g_hash_table_destroy(opt_hash);
srd_inst_option_set(decoder_inst_, opt_hash);
g_hash_table_destroy(opt_hash);