From 8bc1e98bb996a9317e7dbee61323d97977ab6c39 Mon Sep 17 00:00:00 2001 From: ftillier Date: Mon, 11 Sep 2006 17:10:28 +0000 Subject: [PATCH] [IBAL] Only set SA query handle when it is safe to. git-svn-id: svn://openib.tc.cornell.edu/gen1@489 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/core/al/al_query.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/trunk/core/al/al_query.c b/trunk/core/al/al_query.c index dd86d3b4..b378f70c 100644 --- a/trunk/core/al/al_query.c +++ b/trunk/core/al/al_query.c @@ -108,13 +108,6 @@ ib_query( /* Track the query with the AL instance. */ al_insert_query( h_al, p_query ); - /* - * Set the query handle now so that users that do sync queries - * can also cancel the queries. - */ - if( ph_query ) - *ph_query = p_query; - /* Issue the MAD to the SA. */ status = query_sa( p_query, p_query_req, p_query_req->flags ); if( status != IB_SUCCESS && status != IB_INVALID_GUID ) @@ -129,6 +122,10 @@ ib_query( al_remove_query( p_query ); cl_free( p_query ); } + else if( ph_query ) + { + *ph_query = p_query; + } AL_EXIT( AL_DBG_QUERY ); return status; -- 2.41.0