Skip to content

Commit

Permalink
opal info_subscriber: update subscriber object s_info unconditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
wenduwan committed Jul 14, 2023
1 parent a8fbb4d commit 5403341
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions opal/util/info_subscriber.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ int opal_infosubscribe_testregister(opal_infosubscriber_t *object)
int opal_infosubscribe_change_info(opal_infosubscriber_t *object, opal_info_t *new_info)
{
opal_info_entry_t *iterator;
const char *updated_value;

/* for each key/value in new info, let subscribers know of new value */
int found_callback;
Expand All @@ -266,13 +265,10 @@ int opal_infosubscribe_change_info(opal_infosubscriber_t *object, opal_info_t *n
key_str = iterator->ie_key;
OBJ_RETAIN(key_str);

updated_value = opal_infosubscribe_inform_subscribers(object, iterator->ie_key->string,
iterator->ie_value->string,
&found_callback);
if (NULL != updated_value
&& 0 != strncmp(updated_value, value_str->string, value_str->length)) {
err = opal_info_set(object->s_info, iterator->ie_key->string, updated_value);
}
opal_infosubscribe_inform_subscribers(object, iterator->ie_key->string,
iterator->ie_value->string, &found_callback);
err = opal_info_set(object->s_info, iterator->ie_key->string,
iterator->ie_value->string);
OBJ_RELEASE(value_str);
OBJ_RELEASE(key_str);
if (OPAL_SUCCESS != err) {
Expand Down

0 comments on commit 5403341

Please sign in to comment.