From: Arran Cudbard-Bell Date: Sat, 2 Dec 2017 16:04:28 +0000 (+0000) Subject: Don't require test ctx functions X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9e656cb9b57b4ed3984db036a22eb83003b1d463;p=thirdparty%2Ffreeradius-server.git Don't require test ctx functions --- diff --git a/src/main/unit_test_attribute.c b/src/main/unit_test_attribute.c index 3743449dd4e..91116cd62d2 100644 --- a/src/main/unit_test_attribute.c +++ b/src/main/unit_test_attribute.c @@ -1154,7 +1154,7 @@ static void process_file(CONF_SECTION *features, fr_dict_t *dict, const char *ro void *decoder_ctx; p += load_test_point_by_command((void **)&tp, test_type, 11, "tp_decode") + 1; - decoder_ctx = tp->test_ctx(tp_ctx); + if (tp->test_ctx) decoder_ctx = tp->test_ctx(tp_ctx); if (strcmp(p, "-") == 0) { attr = data; @@ -1222,7 +1222,7 @@ static void process_file(CONF_SECTION *features, fr_dict_t *dict, const char *ro void *encoder_ctx; p += load_test_point_by_command((void **)&tp, test_type, 11, "tp_encode") + 1; - encoder_ctx = tp->test_ctx(tp_ctx); + if (tp->test_ctx) encoder_ctx = tp->test_ctx(tp_ctx); /* * Encode the previous output