summaryrefslogtreecommitdiff
path: root/accel-pppd/backup
diff options
context:
space:
mode:
authorKozlov Dmitry <xeb@mail.ru>2012-07-11 15:01:23 +0400
committerKozlov Dmitry <xeb@mail.ru>2012-07-11 15:01:23 +0400
commit641e9de3e2ccbd7607ffb90e258c02635fe2616b (patch)
treef8df517d6dd536551f94942c03454505da480182 /accel-pppd/backup
parent80c32d237e01b1c05663ccfa34003d2f49aa7eee (diff)
downloadaccel-ppp-xebd-641e9de3e2ccbd7607ffb90e258c02635fe2616b.tar.gz
accel-ppp-xebd-641e9de3e2ccbd7607ffb90e258c02635fe2616b.zip
futher session backup implementation
cli: introduced 'restart' command to restrat daemon
Diffstat (limited to 'accel-pppd/backup')
-rw-r--r--accel-pppd/backup/backup.c9
-rw-r--r--accel-pppd/backup/backup.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/accel-pppd/backup/backup.c b/accel-pppd/backup/backup.c
index d045f0c..16349fc 100644
--- a/accel-pppd/backup/backup.c
+++ b/accel-pppd/backup/backup.c
@@ -2,6 +2,7 @@
#include <string.h>
#include "triton.h"
+#include "log.h"
#include "events.h"
#include "ap_session.h"
#include "backup.h"
@@ -184,6 +185,8 @@ static void __restore_session(struct ap_session *ses)
}
}
+ log_ppp_info1("session restored\n");
+
if (ctrl)
ctrl->ctrl_start(ses);
else {
@@ -235,11 +238,17 @@ void backup_restore_fd()
void backup_restore(int internal)
{
struct backup_storage *storage;
+ struct backup_module *module;
list_for_each_entry(storage, &storage_list, entry) {
if (storage->restore)
storage->restore(internal);
}
+
+ list_for_each_entry(module, &module_list, entry) {
+ if (module->restore_complete)
+ module->restore_complete();
+ }
}
#endif
diff --git a/accel-pppd/backup/backup.h b/accel-pppd/backup/backup.h
index 39c4ed7..0037596 100644
--- a/accel-pppd/backup/backup.h
+++ b/accel-pppd/backup/backup.h
@@ -52,6 +52,7 @@ struct backup_module
struct ap_session *(*ctrl_restore)(struct backup_mod *);
void (*ctrl_start)(struct ap_session *ses);
+ void (*restore_complete)(void);
};
struct backup_storage