char *value = url_decode_parameter_value(&query);
struct string_list_item *i;
- i = string_list_lookup(name, query_params);
+ i = string_list_lookup(query_params, name);
if (!i)
- i = string_list_insert(name, query_params);
+ i = string_list_insert(query_params, name);
else
free(i->util);
i->util = value;
static const char *get_parameter(const char *name)
{
struct string_list_item *i;
- i = string_list_lookup(name, get_parameters());
+ i = string_list_lookup(get_parameters(), name);
return i ? i->util : NULL;
}
static int dead;
if (!dead) {
- char buffer[1000];
dead = 1;
-
- vsnprintf(buffer, sizeof(buffer), err, params);
- fprintf(stderr, "fatal: %s\n", buffer);
http_status(500, "Internal Server Error");
hdr_nocache();
end_headers();
+
+ vreportf("fatal: ", err, params);
}
exit(0); /* we successfully reported a failure ;-) */
}