aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--include/tinyrad.h1
-rw-r--r--lib/libtinyrad/lmemory.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/include/tinyrad.h b/include/tinyrad.h
index 3e3a224..8cf42eb 100644
--- a/include/tinyrad.h
+++ b/include/tinyrad.h
@@ -218,6 +218,7 @@
218#define TRAD_OPT_DEBUG_IDENT 10 218#define TRAD_OPT_DEBUG_IDENT 10
219#define TRAD_OPT_DEBUG_SYSLOG 11 219#define TRAD_OPT_DEBUG_SYSLOG 11
220#define TRAD_OPT_SCHEME 12 220#define TRAD_OPT_SCHEME 12
221#define TRAD_OPT_DICTIONARY 13
221 222
222// dictionary get options 223// dictionary get options
223#define TRAD_DICT_OPT_REF_COUNT 1 // used by TinyRadDict, TinyRadDictVendor and TinyRadDictAttr 224#define TRAD_DICT_OPT_REF_COUNT 1 // used by TinyRadDict, TinyRadDictVendor and TinyRadDictAttr
diff --git a/lib/libtinyrad/lmemory.c b/lib/libtinyrad/lmemory.c
index 533805e..2ec3935 100644
--- a/lib/libtinyrad/lmemory.c
+++ b/lib/libtinyrad/lmemory.c
@@ -208,6 +208,11 @@ tinyrad_get_option(
208 return(TRAD_ENOMEM); 208 return(TRAD_ENOMEM);
209 break; 209 break;
210 210
211 case TRAD_OPT_DICTIONARY:
212 TinyRadDebug(TRAD_DEBUG_ARGS, " == %s( tr, TRAD_OPT_DICTIONARY, outvalue )", __func__);
213 *((TinyRadDict **)outvalue) = tinyrad_obj_retain(&tr->dict->obj);
214 break;
215
211 case TRAD_OPT_IPV4: 216 case TRAD_OPT_IPV4:
212 TinyRadDebug(TRAD_DEBUG_ARGS, " == %s( tr, TRAD_OPT_IPV4, outvalue )", __func__); 217 TinyRadDebug(TRAD_DEBUG_ARGS, " == %s( tr, TRAD_OPT_IPV4, outvalue )", __func__);
213 TinyRadDebug(TRAD_DEBUG_ARGS, " <= outvalue: %i", ((tr->opts & TRAD_IPV4)) ? TRAD_ON : TRAD_OFF); 218 TinyRadDebug(TRAD_DEBUG_ARGS, " <= outvalue: %i", ((tr->opts & TRAD_IPV4)) ? TRAD_ON : TRAD_OFF);
@@ -436,6 +441,10 @@ tinyrad_set_option(
436 TinyRadDebug(TRAD_DEBUG_ARGS, " == %s( tr, TRAD_OPT_DIAGNOSTIC_MESSAGE, invalue )", __func__); 441 TinyRadDebug(TRAD_DEBUG_ARGS, " == %s( tr, TRAD_OPT_DIAGNOSTIC_MESSAGE, invalue )", __func__);
437 return(TRAD_EOPTERR); 442 return(TRAD_EOPTERR);
438 443
444 case TRAD_OPT_DICTIONARY:
445 TinyRadDebug(TRAD_DEBUG_ARGS, " == %s( tr, TRAD_OPT_DICTIONARY, invalue )", __func__);
446 return(TRAD_EOPTERR);
447
439 case TRAD_OPT_IPV4: 448 case TRAD_OPT_IPV4:
440 TinyRadDebug(TRAD_DEBUG_ARGS, " == %s( tr, TRAD_OPT_IPV4, %s )", __func__, (((*((const int *)invalue))) ? "TRAD_ON" : "TRAD_OFF")); 449 TinyRadDebug(TRAD_DEBUG_ARGS, " == %s( tr, TRAD_OPT_IPV4, %s )", __func__, (((*((const int *)invalue))) ? "TRAD_ON" : "TRAD_OFF"));
441 if (tr->s != -1) 450 if (tr->s != -1)