[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] problems in XmlBlasterAccess.cpp
the return value of the second shutdown is now ignored and the method
should now work as you expected.
> C++ client disconnect to xmlblaster return false.
> I modify the PublishDemo.cpp in c++ demos, add a disconnect() method like this:
> void disconnect()
> bool bDis_;
> DisconnectQos disQos_(global_);
> bDis_ = connection_.disconnect (disQos_);
> //bDis_ = connection_.disconnect (disQos_, true, false, true);
> std::cout << "errors occur when disconnect" << std::endl;
> and call this method after "demo.erase();" at line 124 in PublishDemo.cpp.
> But connection_.disconnect() method return false when program runs.
> After having read the src code of XmlBlasterAccess.cpp and CorbaConnection.cpp,
> I find there are some problems:
> program runs to "ret1 = connection_->disconnect(qos);" at line 156 in XmlBlasterAccess.cpp, it will call shutdown() method at line 459 or line 464 in CorbaConnection.cpp, the method returns true.
> program runs to "if (shutdown) ret2 = connection_->shutdown();" at line 157, if shutdown flag is true, the shutdown() method in CorbaConnection will be revoked again, and this time, returns false, and results in the false return of disconnec() method in XmlBlasterAccess.
> In my option,the shutdown flag in XmlBlasterAccess::disconnect() method is useless, whether it is true or false, the shutdown() method in CorbaConnection.cpp will be revoked,isn't it?
> pi_kyuan at cvicse.com
mailto:laghi at swissinfo.org
tel. +46 8 7492952 / mob. +46 70 4103964