Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
-/* Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
+/* Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
idl->verify_write_only = true;
}
idl->verify_write_only = true;
}
+/* Returns true if 'idl' is currently connected or trying to connect. */
bool
ovsdb_idl_is_alive(const struct ovsdb_idl *idl)
{
return jsonrpc_session_is_alive(idl->session);
}
bool
ovsdb_idl_is_alive(const struct ovsdb_idl *idl)
{
return jsonrpc_session_is_alive(idl->session);
}
+/* Returns the last error reported on a connection by 'idl'. The return value
+ * is 0 only if no connection made by 'idl' has ever encountered an error. See
+ * jsonrpc_get_status() for return value interpretation. */
int
ovsdb_idl_get_last_error(const struct ovsdb_idl *idl)
{
int
ovsdb_idl_get_last_error(const struct ovsdb_idl *idl)
{