Skip to content

Commit 7aa5177

Browse files
authored
Merge pull request #5351 from jsquyres/pr/tcp-btl-hash-map-fix
btl/tcp: fix hash map usage
2 parents 3a7271e + 57bc657 commit 7aa5177

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

opal/mca/btl/tcp/btl_tcp_proc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ static mca_btl_tcp_interface_t** mca_btl_tcp_retrieve_local_interfaces(mca_btl_t
290290
*/
291291
for( idx = opal_ifbegin(); idx >= 0; idx = opal_ifnext (idx) ) {
292292
int kindex;
293-
uint32_t index;
293+
uint64_t index;
294294
bool skip = false;
295295

296296
opal_ifindextoaddr (idx, (struct sockaddr*) &local_addr, sizeof (local_addr));
@@ -344,7 +344,7 @@ static mca_btl_tcp_interface_t** mca_btl_tcp_retrieve_local_interfaces(mca_btl_t
344344
/* create entry for this kernel index previously not seen */
345345
if (OPAL_SUCCESS != rc) {
346346
index = proc_data->num_local_interfaces++;
347-
opal_hash_table_set_value_uint32(&proc_data->local_kindex_to_index, kindex, &index);
347+
opal_hash_table_set_value_uint32(&proc_data->local_kindex_to_index, kindex, (void**) index);
348348

349349
if( proc_data->num_local_interfaces == proc_data->max_local_interfaces ) {
350350
proc_data->max_local_interfaces <<= 1;
@@ -469,7 +469,7 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc,
469469

470470
for( i = 0; i < btl_proc->proc_addr_count; i++ ) {
471471

472-
uint32_t index;
472+
uint64_t index;
473473

474474
mca_btl_tcp_addr_t* endpoint_addr = btl_proc->proc_addrs + i;
475475

@@ -479,7 +479,7 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc,
479479

480480
if (OPAL_SUCCESS != rc) {
481481
index = proc_data->num_peer_interfaces++;
482-
opal_hash_table_set_value_uint32(&proc_data->peer_kindex_to_index, endpoint_addr->addr_ifkindex, &index);
482+
opal_hash_table_set_value_uint32(&proc_data->peer_kindex_to_index, endpoint_addr->addr_ifkindex, (void**) index);
483483
if( proc_data->num_peer_interfaces == max_peer_interfaces ) {
484484
max_peer_interfaces <<= 1;
485485
peer_interfaces = (mca_btl_tcp_interface_t**)realloc( peer_interfaces,

0 commit comments

Comments
 (0)