Pull from CVS head: Make wait=no possible, and add an extra check for possibly errone...
authorphampson <phampson>
Sun, 28 Sep 2003 13:31:26 +0000 (13:31 +0000)
committerphampson <phampson>
Sun, 28 Sep 2003 13:31:26 +0000 (13:31 +0000)
src/modules/rlm_exec/rlm_exec.c

index 897ae85..ff634dd 100644 (file)
@@ -63,7 +63,7 @@ static CONF_PARSER module_config[] = {
        { "input_pairs", PW_TYPE_STRING_PTR,
          offsetof(rlm_exec_t,input), NULL, "request" },
        { "output_pairs",  PW_TYPE_STRING_PTR,
-         offsetof(rlm_exec_t,output), NULL, "reply" },
+         offsetof(rlm_exec_t,output), NULL, NULL },
        { "packet_type", PW_TYPE_STRING_PTR,
          offsetof(rlm_exec_t,packet_type), NULL, NULL },
        { NULL, -1, 0, NULL, NULL }             /* end the list */
@@ -231,6 +231,15 @@ static int exec_instantiate(CONF_SECTION *conf, void **instance)
        }
 
        /*
+        *      Sanity check the config.  If we're told to wait,
+        *      then the output pairs should be defined.
+        */
+       if (inst->wait &&
+           (inst->output == NULL)) {
+               radlog(L_INFO, "rlm_exec: Wait=yes but no output defined. Did you mean output=none?");
+       }
+
+       /*
         *      Get the packet type on which to execute
         */
        if (!inst->packet_type) {