Browse Source

pass the name of the changed variable to the callback in resolv_reinit()

Miklos Tirpak 17 năm trước cách đây
mục cha
commit
d1df3d2fba
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      resolve.c
  2. 1 1
      resolve.h

+ 1 - 1
resolve.c

@@ -162,7 +162,7 @@ void resolv_reinit(str *name)
 	_resolv_init();
 	_resolv_init();
 
 
 #ifdef DNS_WATCHDOG_SUPPORT
 #ifdef DNS_WATCHDOG_SUPPORT
-	if (on_resolv_reinit_cb) on_resolv_reinit_cb();
+	if (on_resolv_reinit_cb) on_resolv_reinit_cb(name);
 #endif
 #endif
 	LOG(L_DBG, "DEBUG: resolv_reinit(): "
 	LOG(L_DBG, "DEBUG: resolv_reinit(): "
 		"DNS resolver has been reinitialized\n");
 		"DNS resolver has been reinitialized\n");

+ 1 - 1
resolve.h

@@ -417,7 +417,7 @@ void reinit_naptr_proto_prefs(str *name);
  * If the callback is registered after forking, only the child process
  * If the callback is registered after forking, only the child process
  * that installs the hook will call the callback.
  * that installs the hook will call the callback.
  */
  */
-typedef void (*on_resolv_reinit)(void);
+typedef void (*on_resolv_reinit)(str*);
 int register_resolv_reinit_cb(on_resolv_reinit cb);
 int register_resolv_reinit_cb(on_resolv_reinit cb);
 #endif
 #endif