#endif
static fr_cmd_t *radmin_cmd = NULL;
+static char *radmin_buffer = NULL;
#define CMD_MAX_ARGV (32)
#define CMD_MAX_EXPANSIONS (128)
ctx = talloc_init("radmin");
size = room = 8192;
+ radmin_buffer = talloc_array(ctx, char, size);
argv_buffer = talloc_array(ctx, char, size);
current_str = argv_buffer;
* the current context.
*/
strlcpy(current_str, line, room);
+
+ /*
+ * Keep a copy of the full string entered.
+ */
+ if (current_str > argv_buffer) {
+ radmin_buffer[(current_str - argv_buffer) - 1] = ' ';
+ }
+ strlcpy(radmin_buffer + (current_str - argv_buffer), line, room);
+
argc = fr_command_str_to_argv(radmin_cmd, info, current_str);
/*
}
talloc_free(ctx);
+ radmin_buffer = NULL;
return NULL;
}