From a5dac1f49eb247d854348fe8ec54c33e664adf30 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Thu, 19 Aug 2010 10:42:33 +0000 Subject: rpcsvc: decouple creation of listener from rpcsvc_program_register and rpcsvc_init. - with this patch every program that wants to register itself with rpcsvc should also create one or more listener(s) and register with portmap (if necessary). Signed-off-by: Raghavendra G Signed-off-by: Anand V. Avati BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875 --- rpc/rpc-lib/src/rpc-transport.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'rpc/rpc-lib/src/rpc-transport.c') diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index e3bc519f..adbc0fe1 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -1119,8 +1119,11 @@ rpc_transport_notify (rpc_transport_t *this, rpc_transport_event_t event, goto out; } - //ret = this->notify (this, this->notify_data, event, data); - ret = this->notify (this, this->mydata, event, data); + if (this->notify != NULL) { + ret = this->notify (this, this->mydata, event, data); + } else { + ret = 0; + } out: return ret; } -- cgit