Hi,
the return value of the second shutdown is now ignored and the method
should now work as you expected.
Regards
Michele


pikaiyuan wrote:
> Hi,
>       
>       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_);
>               try
>               {
>                       bDis_ = connection_.disconnect (disQos_);
>               //bDis_ = connection_.disconnect (disQos_, true, false, true);
>               }
>               catch(...)
>               {
>                       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?
>       
> regards       
>       
>       
> pikaiyuan
> [EMAIL PROTECTED]
> 2003-09-13
> 
> 
> 
> 


-- 
Michele Laghi
mailto:[EMAIL PROTECTED]
tel. +46 8 7492952 / mob. +46 70 4103964
http://eclettic.tripod.com
http://www.xmlBlaster.org

Reply via email to