Просмотр исходного кода

Currently if a reload operation fails, any subsystems listening for
notifications will get a RELOAD_NOTIFY_START callback but not a
RELOAD_NOTIFY_END callback.

This patch adds a RELOAD_NOTIFY_FAILED callback so that interested
parties will know when the reload has finished and that it failed.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1678 fd59a12c-fef9-0310-b244-a6a79926bd2f

Christine Caulfield 17 лет назад
Родитель
Сommit
44eaef35e0
2 измененных файлов с 3 добавлено и 1 удалено
  1. 1 0
      exec/objdb.c
  2. 2 1
      include/corosync/engine/objdb.h

+ 1 - 0
exec/objdb.c

@@ -1523,6 +1523,7 @@ static int object_reload_config(int flush, char **error_string)
 		if (modules[i]->config_reloadconfig) {
 			res = modules[i]->config_reloadconfig(&objdb_iface, flush, error_string);
 			if (res) {
+				object_reload_notification(OBJDB_RELOAD_NOTIFY_FAILED, flush);
 				objdb_wrunlock();
 				return res;
 			}

+ 2 - 1
include/corosync/engine/objdb.h

@@ -53,7 +53,8 @@ typedef enum {
 
 typedef enum {
         OBJDB_RELOAD_NOTIFY_START,
-        OBJDB_RELOAD_NOTIFY_END
+        OBJDB_RELOAD_NOTIFY_END,
+	OBJDB_RELOAD_NOTIFY_FAILED
 } objdb_reload_notify_type_t;