Exemple #1
0
static GError *
_cs_check_tokens (struct req_args_s *args)
{
	// XXX All the handler use the NS, this should have been checked earlier.
	if (!validate_namespace(NS()))
		return BADNS();

	const char *type = TYPE();
	if (type && !validate_srvtype(type))
		return BADSRVTYPE();
	return NULL;
}
Exemple #2
0
static GError *
_cs_check_tokens (struct req_args_s *args)
{
    // XXX All the handler use the NS, this should have been checked earlier.
    if (!validate_namespace(NS()))
        return NEWERROR(CODE_NAMESPACE_NOTMANAGED, "Invalid NS");

    if (TYPE()) {
        if (!validate_srvtype(TYPE()))
            return NEWERROR(CODE_NAMESPACE_NOTMANAGED, "Invalid srvtype");
    }
    return NULL;
}