-// PARA_DEBUG_LOG("%s, options: %s\n", r->name,
-// options? options : "(none)");
- if (options) {
- PARA_DEBUG_LOG("options: %s\n", options);
- argc = split_args(options, &argv, " \t");
- for (i = argc - 1; i >= 0; i--)
- argv[i + 1] = argv[i];
- argv[0] = para_strdup(r->name);
- argc += 1;
- PARA_DEBUG_LOG("argc = %d, argv[0]: %s\n", argc, argv[0]);
- } else {
+/**
+ * Check if the given string is a valid receiver specifier.
+ *
+ * \param ra string of the form receiver_name [options...]
+ * \param lprp Filled in on success, undefined else.
+ *
+ * This function checks whether \a ra starts with the name of a receiver,
+ * optionally followed by options for that receiver. If a valid receiver name
+ * was found the remaining part of \a ra is passed to the receiver's config
+ * parser.
+ *
+ * If a NULL pointer or an empty string is passed as the first argument, the
+ * hhtp receiver with no options is assumed.
+ *
+ * \return On success the number of the receiver is returned. On errors, the
+ * function calls exit(EXIT_FAILURE).
+ */
+int check_receiver_arg(const char *ra, struct lls_parse_result **lprp)
+{
+ int ret, argc, receiver_num;
+ char *errctx = NULL, **argv;
+ const struct lls_command *cmd;
+
+ *lprp = NULL;
+ if (!ra || !*ra) {