-/* Copyright (c) 2009, 2010 Nicira Networks
+/* Copyright (c) 2009, 2010, 2011 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
static WARN_UNUSED_RESULT struct ovsdb_error *
ovsdb_mutation_from_json(const struct ovsdb_table_schema *ts,
const struct json *json,
- const struct ovsdb_symbol_table *symtab,
+ struct ovsdb_symbol_table *symtab,
struct ovsdb_mutation *m)
{
const struct json_array *array;
struct ovsdb_error *
ovsdb_mutation_set_from_json(const struct ovsdb_table_schema *ts,
const struct json *json,
- const struct ovsdb_symbol_table *symtab,
+ struct ovsdb_symbol_table *symtab,
struct ovsdb_mutation_set *set)
{
const struct json_array *array = json_array(json);
}
}
- error = ovsdb_datum_sort(dst, dst_type);
+ error = ovsdb_datum_sort(dst, dst_type->key.type);
if (error) {
ovsdb_error_destroy(error);
return ovsdb_error("constraint violation",
if (!ovsdb_datum_conforms_to_type(dst, dst_type)) {
char *s = ovsdb_type_to_english(dst_type);
struct ovsdb_error *e = ovsdb_error(
- "constaint violation",
+ "constraint violation",
"Attempted to store %u elements in %s.", dst->n, s);
free(s);
return e;
ovsdb_datum_subtract(dst, dst_type, arg, arg_type);
error = ovsdb_mutation_check_count(dst, dst_type);
break;
+
+ default:
+ NOT_REACHED();
}
if (error) {
return error;