Implement dialup mode
[bpdyndnsd] / src / logger.cpp
index 8f42a3e..4df181e 100644 (file)
@@ -736,6 +736,21 @@ void Logger::print_offline_mode() const
 
 
 /**
+ * Dialup mode: Print how long we plan to delay the next network traffic
+ * @param sleep_until Timestamp until we plan to keep quiet
+ */
+void Logger::print_sleep_dialup_mode(time_t sleep_until) const
+{
+    int level = 1;
+    if ( level <= Loglevel )
+    {
+        ostringstream msg;
+        msg << "Skipped update in dialup mode (" << sleep_until-time(NULL) << " more seconds)" << endl;
+        log_error(msg.str());
+    }
+}
+
+/**
  * Objects successfully serialized.
  */
 void Logger::print_serialized_objects_success() const