[Pvfs2-cvs] commit by atchley in pvfs2/src/io/bmi/bmi_mx: mx.c mx.h

CVS commit program cvs at parl.clemson.edu
Thu Feb 21 14:03:10 EST 2008


Update of /projects/cvsroot/pvfs2/src/io/bmi/bmi_mx
In directory parlweb1:/tmp/cvs-serv22517

Modified Files:
	mx.c mx.h 
Log Message:

Modified Files:
	mx.c mx.h 
	Handle bmi_method_addr_forget_callback() properly


Index: mx.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/bmi/bmi_mx/mx.c,v
diff -p -u -r1.13 -r1.14
--- mx.c	21 Feb 2008 18:41:44 -0000	1.13
+++ mx.c	21 Feb 2008 19:03:10 -0000	1.14
@@ -1124,7 +1124,13 @@ BMI_mx_set_info(int option, void *inout_
                                                 mxmap->mxm_peername : "NULL", map,
                                                 mxmap);
                                 if (bmi_mx != NULL) {
+                                        PVFS_BMI_addr_t addr;
                                         peer = mxmap->mxm_peer;
+                                        if (peer != NULL) {
+                                                addr = peer->mxp_bmi_addr;
+                                                if (addr != 0)
+                                                        bmi_method_addr_forget_callback(addr);
+                                        }
                                         bmx_peer_disconnect(peer, 1, BMI_ENETRESET);
                                 }
                                 if (!mxmap->mxm_peername) free((void *) mxmap->mxm_peername);
@@ -2304,7 +2310,14 @@ bmx_handle_icon_ack(void)
                         mx_isend(bmi_mx->bmx_ep, &tx->mxc_seg, tx->mxc_nseg, peer->mxp_epa,
                                  tx->mxc_match, (void *) tx, &tx->mxc_mxreq);
                         if (!peer->mxp_exist) {
-                                bmi_method_addr_reg_callback(peer->mxp_map);
+                                peer->mxp_bmi_addr =
+                                        bmi_method_addr_reg_callback(peer->mxp_map);
+                                if (peer->mxp_bmi_addr == 0) {
+                                        debug(BMX_DB_ERR, "%s: "
+                                                "bmi_method_addr_reg_callback "
+                                                "failed", __func__);
+                                        exit(1);
+                                }
                                 peer->mxp_exist = 1;
                         }
                 }

Index: mx.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/bmi/bmi_mx/mx.h,v
diff -p -u -r1.6 -r1.7
--- mx.h	21 Feb 2008 18:41:44 -0000	1.6
+++ mx.h	21 Feb 2008 19:03:10 -0000	1.7
@@ -219,6 +219,8 @@ struct bmx_peer
 
         list_t                  mxp_list;       /* hang this on bmx_peers */
         gen_mutex_t             mxp_lock;       /* peer lock */
+
+        PVFS_BMI_addr_t         mxp_bmi_addr;   /* bmi_method_addr_[reg|forget]_callback */
 };
 
 enum bmx_req_type {



More information about the Pvfs2-cvs mailing list