]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[IBAL] Only set SA query handle when it is safe to.
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 11 Sep 2006 17:10:28 +0000 (17:10 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 11 Sep 2006 17:10:28 +0000 (17:10 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@489 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/core/al/al_query.c

index dd86d3b4c29e02a3cfdad7a4371debf86bd82edf..b378f70ca4cfb77c0cbf3c44d8f26ee853d0ca36 100644 (file)
@@ -108,13 +108,6 @@ ib_query(
        /* Track the query with the AL instance. */\r
        al_insert_query( h_al, p_query );\r
 \r
-       /*\r
-        * Set the query handle now so that users that do sync queries\r
-        * can also cancel the queries.\r
-        */\r
-       if( ph_query )\r
-               *ph_query = p_query;\r
-\r
        /* Issue the MAD to the SA. */\r
        status = query_sa( p_query, p_query_req, p_query_req->flags );\r
        if( status != IB_SUCCESS && status != IB_INVALID_GUID )\r
@@ -129,6 +122,10 @@ ib_query(
                al_remove_query( p_query );\r
                cl_free( p_query );\r
        }\r
+       else if( ph_query )\r
+       {\r
+               *ph_query = p_query;\r
+       }\r
 \r
        AL_EXIT( AL_DBG_QUERY );\r
        return status;\r