qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Conway <acon...@redhat.com>
Subject Re: patch: Don't access after delete in RdmaServer.cpp
Date Wed, 06 Oct 2010 15:47:16 GMT
On 10/05/2010 10:10 PM, Aaron Fabbri wrote:
> Just noticed this when reading the Rdma transport unit test code:
>
> Index: RdmaServer.cpp
> ===================================================================
> --- RdmaServer.cpp      (revision 1004875)
> +++ RdmaServer.cpp      (working copy)
> @@ -118,18 +118,18 @@
>       ConRec* cr = ci->getContext<ConRec>();
>       cr->connection->disconnect();
>       cr->data->drainWriteQueue(drained);
> +    cout<<  "Disconnected: "<<  cr<<  "\n";
>       delete cr;
> -    cout<<  "Disconnected: "<<  cr<<  "\n";
>   }
>
>   void connectionError(Rdma::Connection::intrusive_ptr&  ci, Rdma::ErrorType) {
>       ConRec* cr = ci->getContext<ConRec>();
>       cr->connection->disconnect();
> +    cout<<  "Connection error: "<<  cr<<  "\n";
>       if (cr) {
>           cr->data->drainWriteQueue(drained);
>           delete cr;
>       }
> -    cout<<  "Connection error: "<<  cr<<  "\n";
>   }
>
>   bool connectionRequest(Rdma::Connection::intrusive_ptr&  ci,  const
> Rdma::ConnectionParams&  cp) {
>

Why is RdmaServer printing messages direct to cout rather than using qpid logging?

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message