diff options
author | Raghavendra G <raghavendra@gluster.com> | 2010-08-19 10:42:33 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-08-19 09:50:32 -0700 |
commit | a5dac1f49eb247d854348fe8ec54c33e664adf30 (patch) | |
tree | b2973e967fa44feba7b1eabb813f0e51e1e4b988 /rpc/rpc-lib/src/rpc-transport.c | |
parent | 01c00dd2e1d3113acb3f20c5dc7c20fa8d286339 (diff) |
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 <raghavendra@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
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
Diffstat (limited to 'rpc/rpc-lib/src/rpc-transport.c')
-rw-r--r-- | rpc/rpc-lib/src/rpc-transport.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index e3bc519fc97..adbc0fe1e2b 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; } |