|
@@ -877,13 +877,26 @@ hibernate_begin_shutdown(void)
|
|
|
hibernate_begin(HIBERNATE_STATE_EXITING, time(NULL));
|
|
|
}
|
|
|
|
|
|
-/** Return true iff we are currently hibernating. */
|
|
|
+/**
|
|
|
+ * Return true iff we are currently hibernating -- that is, if we are in
|
|
|
+ * any non-live state.
|
|
|
+ */
|
|
|
MOCK_IMPL(int,
|
|
|
we_are_hibernating,(void))
|
|
|
{
|
|
|
return hibernate_state != HIBERNATE_STATE_LIVE;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * Return true iff we are currently _fully_ hibernating -- that is, if we are
|
|
|
+ * in a state where we expect to handle no network activity at all.
|
|
|
+ */
|
|
|
+MOCK_IMPL(int,
|
|
|
+we_are_fully_hibernating,(void))
|
|
|
+{
|
|
|
+ return hibernate_state == HIBERNATE_STATE_DORMANT;
|
|
|
+}
|
|
|
+
|
|
|
/** If we aren't currently dormant, close all connections and become
|
|
|
* dormant. */
|
|
|
static void
|