<br><br>
<div class="gmail_quote">On Sun, Aug 2, 2009 at 7:16 AM, Sasha Khapyorsky <span dir="ltr"><<a href="mailto:sashak@voltaire.com">sashak@voltaire.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im">On 06:53 Sun 02 Aug     , Hal Rosenstock wrote:<br>> diff --git a/opensm/opensm/osm_ucast_lash.c b/opensm/opensm/osm_ucast_lash.c<br>> index 1c55a90..cf8e793 100644<br>> --- a/opensm/opensm/osm_ucast_lash.c<br>
> +++ b/opensm/opensm/osm_ucast_lash.c<br>> @@ -5,6 +5,7 @@<br>>   * Copyright (c) 2007      Simula Research Laboratory. All rights reserved.<br>>   * Copyright (c) 2007      Silicon Graphics Inc. All rights reserved.<br>
>   * Copyright (c) 2008,2009 System Fabric Works, Inc. All rights reserved.<br>> + * Copyright (c) 2009      HNR Consulting. All rights reserved.<br>>   *<br>>   * This software is available to you under a choice of one of two<br>
>   * licenses.  You may choose to be licensed under the terms of the GNU<br>> @@ -659,6 +660,18 @@ static void switch_delete(lash_t *p_lash, switch_t * sw)<br>>       free(sw);<br>>  }<br>><br>> +static void delete_switches(lash_t *p_lash)<br>
<br></div>Would delete_mesh_switches() (or cleanup_mesh*()) be a better name? It<br>doesn't delete lash's switches, only mesh nodes.</blockquote>
<div> </div>
<div>Sure.</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span id=""></span><br>
<div class="im"><br>> +{<br>> +     if (p_lash->switches) {<br>> +             unsigned id;<br>> +             for (id = 0; ((int)id) < p_lash->num_switches; id++)<br>> +                     if (p_lash->switches[id])<br>
> +                             osm_mesh_node_delete(p_lash,<br>> +                                                  p_lash->switches[id]);<br>> +     }<br>> +}<br>> +<br>> +<br>>  static void free_lash_structures(lash_t * p_lash)<br>
>  {<br>>       unsigned int i, j, k;<br>> @@ -1219,7 +1232,7 @@ static int lash_process(void *context)<br>><br>>       return_status = discover_network_properties(p_lash);<br><br></div>discover_network_properties() can fail in a middle of allocations and<br>
full clean is desired anyway. It should be safe to 'goto Exit' below<br>since mesh node deletion is protected against not yet initialized input.</blockquote>
<div> </div>
<div>It's not; I had tried doing that.</div>
<div> </div>
<div>-- Hal</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span id=""></span><br><font color="#888888"><br>Sasha<br></font>
<div>
<div></div>
<div class="h5"><br>>       if (return_status != IB_SUCCESS)<br>> -             goto Exit;<br>> +             goto Exit2;<br>><br>>       return_status = init_lash_structures(p_lash);<br>>       if (return_status != IB_SUCCESS)<br>
> @@ -1234,6 +1247,9 @@ static int lash_process(void *context)<br>>       populate_fwd_tbls(p_lash);<br>><br>>  Exit:<br>> +     delete_switches(p_lash);<br>> +<br>> +Exit2:<br>>       if (p_lash->vl_min)<br>
>               free_lash_structures(p_lash);<br>>       OSM_LOG_EXIT(p_log);<br>><br>_______________________________________________<br>general mailing list<br><a href="mailto:general@lists.openfabrics.org">general@lists.openfabrics.org</a><br>
<a href="http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general" target="_blank">http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general</a><br><br>To unsubscribe, please visit <a href="http://openib.org/mailman/listinfo/openib-general" target="_blank">http://openib.org/mailman/listinfo/openib-general</a><br>
</div></div></blockquote></div><br>