summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2010-06-14 23:33:55 +0200
committerHarald Welte <laforge@gnumonks.org>2010-07-20 00:10:57 +0200
commit64fdc4cb06c1b89b2b3aa2ae01c92248292262f0 (patch)
tree290bbf4427008253b82afd91078e0674c4ebc94b /src
parentb9d517e75509c6c30e2fe8740b81f5c26d77f89e (diff)
src: Print member's name in CHOICE print
Sometimes, if the choice is a null or integer or ... it's not easy to know what has really been selected without the choice member name. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'src')
-rw-r--r--src/constr_CHOICE.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/constr_CHOICE.c b/src/constr_CHOICE.c
index a9eb719..4f0d992 100644
--- a/src/constr_CHOICE.c
+++ b/src/constr_CHOICE.c
@@ -1014,11 +1014,9 @@ CHOICE_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
}
/* Print member's name and stuff */
- if(0) {
- if(cb(elm->name, strlen(elm->name), app_key) < 0
- || cb(": ", 2, app_key) < 0)
- return -1;
- }
+ if(cb(elm->name, strlen(elm->name), app_key) < 0
+ || cb(": ", 2, app_key) < 0)
+ return -1;
return elm->type->print_struct(elm->type, memb_ptr, ilevel,
cb, app_key);