From 56fe4b85babca51dccc18ea9408efa0ea057a34b Mon Sep 17 00:00:00 2001 From: wang sheng Date: Wed, 10 Jun 2015 14:47:41 +0800 Subject: [PATCH] ensure the callback function used in ZKClusterRT.sWatchGroup cannot be NULL --- src/utils/cluster_rt.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/cluster_rt.cc b/src/utils/cluster_rt.cc index b60b3342e8..af6fbbc11c 100644 --- a/src/utils/cluster_rt.cc +++ b/src/utils/cluster_rt.cc @@ -55,6 +55,8 @@ bool ZKClusterRT::Init(){ bool ZKClusterRT::sWatchSGroup(int gid, int sid, rt_callback fn, void *ctx){ + CHECK_NOTNULL(fn); + string path = getSGroupPath(gid); struct Stat stat;