Ahem. Apparently we should be checking for ORTE_EQUAL upon return
from orte_ns.compare_fields(), not 0 (yes, they're the same [today], but it is much better to check for symbolic names...). This commit was SVN r15731.
Этот коммит содержится в:
родитель
8d4b6c7b0d
Коммит
106beff744
@ -348,8 +348,8 @@ static orte_iof_base_endpoint_t* orte_iof_base_endpoint_lookup(
|
|||||||
item != opal_list_get_end(&orte_iof_base.iof_endpoints);
|
item != opal_list_get_end(&orte_iof_base.iof_endpoints);
|
||||||
item = opal_list_get_next(item)) {
|
item = opal_list_get_next(item)) {
|
||||||
orte_iof_base_endpoint_t* endpoint = (orte_iof_base_endpoint_t*)item;
|
orte_iof_base_endpoint_t* endpoint = (orte_iof_base_endpoint_t*)item;
|
||||||
if(orte_ns.compare_fields(ORTE_NS_CMP_ALL,proc,&endpoint->ep_origin) == 0 &&
|
if (ORTE_EQUAL == orte_ns.compare_fields(ORTE_NS_CMP_ALL,proc,&endpoint->ep_origin) &&
|
||||||
endpoint->ep_tag == tag && endpoint->ep_mode == mode) {
|
endpoint->ep_tag == tag && endpoint->ep_mode == mode) {
|
||||||
OBJ_RETAIN(endpoint);
|
OBJ_RETAIN(endpoint);
|
||||||
return endpoint;
|
return endpoint;
|
||||||
}
|
}
|
||||||
@ -494,7 +494,7 @@ int orte_iof_base_endpoint_delete(
|
|||||||
while(item != opal_list_get_end(&orte_iof_base.iof_endpoints)) {
|
while(item != opal_list_get_end(&orte_iof_base.iof_endpoints)) {
|
||||||
opal_list_item_t* next = opal_list_get_next(item);
|
opal_list_item_t* next = opal_list_get_next(item);
|
||||||
orte_iof_base_endpoint_t* endpoint = (orte_iof_base_endpoint_t*)item;
|
orte_iof_base_endpoint_t* endpoint = (orte_iof_base_endpoint_t*)item;
|
||||||
if (orte_ns.compare_fields(mask,proc,&endpoint->ep_origin) == 0) {
|
if (ORTE_EQUAL == orte_ns.compare_fields(mask,proc,&endpoint->ep_origin)) {
|
||||||
if (endpoint->ep_tag == tag ||
|
if (endpoint->ep_tag == tag ||
|
||||||
ORTE_IOF_ANY == endpoint->ep_tag ||
|
ORTE_IOF_ANY == endpoint->ep_tag ||
|
||||||
ORTE_IOF_ANY == tag) {
|
ORTE_IOF_ANY == tag) {
|
||||||
@ -568,7 +568,7 @@ orte_iof_base_endpoint_t* orte_iof_base_endpoint_match(
|
|||||||
item != opal_list_get_end(&orte_iof_base.iof_endpoints);
|
item != opal_list_get_end(&orte_iof_base.iof_endpoints);
|
||||||
item = opal_list_get_next(item)) {
|
item = opal_list_get_next(item)) {
|
||||||
orte_iof_base_endpoint_t* endpoint = (orte_iof_base_endpoint_t*)item;
|
orte_iof_base_endpoint_t* endpoint = (orte_iof_base_endpoint_t*)item;
|
||||||
if(orte_ns.compare_fields(target_mask,target_name,&endpoint->ep_origin) == 0) {
|
if(ORTE_EQUAL == orte_ns.compare_fields(target_mask,target_name,&endpoint->ep_origin)) {
|
||||||
if(endpoint->ep_tag == target_tag ||
|
if(endpoint->ep_tag == target_tag ||
|
||||||
endpoint->ep_tag == ORTE_IOF_ANY ||
|
endpoint->ep_tag == ORTE_IOF_ANY ||
|
||||||
target_tag == ORTE_IOF_ANY) {
|
target_tag == ORTE_IOF_ANY) {
|
||||||
|
@ -173,7 +173,7 @@ static void orte_iof_svc_proxy_msg(
|
|||||||
|
|
||||||
/* if the subscription origin doesn't match the message's
|
/* if the subscription origin doesn't match the message's
|
||||||
origin, skip this subscription */
|
origin, skip this subscription */
|
||||||
if(0 == orte_ns.compare_fields(sub->origin_mask,&sub->origin_name,&hdr->msg_origin)) {
|
if (ORTE_EQUAL == orte_ns.compare_fields(sub->origin_mask,&sub->origin_name,&hdr->msg_origin)) {
|
||||||
opal_output(orte_iof_base.iof_output, "sub MATCH: origin %s, msg origin %s, msg proxy %s orte_iof_svc_proxy_msg: tag %d sequence %d, len %d",
|
opal_output(orte_iof_base.iof_output, "sub MATCH: origin %s, msg origin %s, msg proxy %s orte_iof_svc_proxy_msg: tag %d sequence %d, len %d",
|
||||||
ORTE_NAME_PRINT(&sub->origin_name),
|
ORTE_NAME_PRINT(&sub->origin_name),
|
||||||
ORTE_NAME_PRINT(&hdr->msg_origin),
|
ORTE_NAME_PRINT(&hdr->msg_origin),
|
||||||
|
@ -36,8 +36,8 @@ int orte_iof_svc_pub_create(
|
|||||||
item != opal_list_get_end(&mca_iof_svc_component.svc_published);
|
item != opal_list_get_end(&mca_iof_svc_component.svc_published);
|
||||||
item = opal_list_get_next(item)) {
|
item = opal_list_get_next(item)) {
|
||||||
pub = (orte_iof_svc_pub_t*)item;
|
pub = (orte_iof_svc_pub_t*)item;
|
||||||
if(orte_ns.compare_fields(pub_mask,pub_name,&pub->pub_name) == 0 &&
|
if(ORTE_EQUAL == orte_ns.compare_fields(pub_mask,pub_name,&pub->pub_name) &&
|
||||||
orte_ns.compare_fields(ORTE_NS_CMP_ALL,pub_proxy,&pub->pub_proxy) == 0 &&
|
ORTE_EQUAL == orte_ns.compare_fields(ORTE_NS_CMP_ALL,pub_proxy,&pub->pub_proxy) &&
|
||||||
pub_tag == pub->pub_tag) {
|
pub_tag == pub->pub_tag) {
|
||||||
OPAL_THREAD_UNLOCK(&mca_iof_svc_component.svc_lock);
|
OPAL_THREAD_UNLOCK(&mca_iof_svc_component.svc_lock);
|
||||||
return ORTE_SUCCESS;
|
return ORTE_SUCCESS;
|
||||||
@ -89,8 +89,8 @@ orte_iof_svc_pub_t* orte_iof_svc_pub_lookup(
|
|||||||
item != opal_list_get_end(&mca_iof_svc_component.svc_published);
|
item != opal_list_get_end(&mca_iof_svc_component.svc_published);
|
||||||
item = opal_list_get_next(item)) {
|
item = opal_list_get_next(item)) {
|
||||||
orte_iof_svc_pub_t* pub = (orte_iof_svc_pub_t*)item;
|
orte_iof_svc_pub_t* pub = (orte_iof_svc_pub_t*)item;
|
||||||
if (orte_ns.compare_fields(ORTE_NS_CMP_ALL, &pub->pub_name,pub_name) == 0 &&
|
if (ORTE_EQUAL == orte_ns.compare_fields(ORTE_NS_CMP_ALL, &pub->pub_name,pub_name) &&
|
||||||
orte_ns.compare_fields(ORTE_NS_CMP_ALL, &pub->pub_proxy,pub_proxy) == 0 &&
|
ORTE_EQUAL == orte_ns.compare_fields(ORTE_NS_CMP_ALL, &pub->pub_proxy,pub_proxy) &&
|
||||||
pub->pub_mask == pub_mask &&
|
pub->pub_mask == pub_mask &&
|
||||||
pub->pub_tag == pub_tag) {
|
pub->pub_tag == pub_tag) {
|
||||||
return pub;
|
return pub;
|
||||||
@ -150,8 +150,8 @@ void orte_iof_svc_pub_delete_all(
|
|||||||
opal_list_item_t* p_next = opal_list_get_next(p_item);
|
opal_list_item_t* p_next = opal_list_get_next(p_item);
|
||||||
orte_iof_svc_pub_t* pub = (orte_iof_svc_pub_t*)p_item;
|
orte_iof_svc_pub_t* pub = (orte_iof_svc_pub_t*)p_item;
|
||||||
|
|
||||||
if (orte_ns.compare_fields(ORTE_NS_CMP_ALL, &pub->pub_name,name) == 0 ||
|
if (ORTE_EQUAL == orte_ns.compare_fields(ORTE_NS_CMP_ALL, &pub->pub_name,name) ||
|
||||||
orte_ns.compare_fields(ORTE_NS_CMP_ALL, &pub->pub_proxy,name) == 0) {
|
ORTE_EQUAL == orte_ns.compare_fields(ORTE_NS_CMP_ALL, &pub->pub_proxy,name)) {
|
||||||
|
|
||||||
opal_list_item_t* s_item;
|
opal_list_item_t* s_item;
|
||||||
for(s_item = opal_list_get_first(&mca_iof_svc_component.svc_subscribed);
|
for(s_item = opal_list_get_first(&mca_iof_svc_component.svc_subscribed);
|
||||||
|
@ -85,10 +85,10 @@ int orte_iof_svc_sub_create(
|
|||||||
item = opal_list_get_next(item)) {
|
item = opal_list_get_next(item)) {
|
||||||
sub = (orte_iof_svc_sub_t*)item;
|
sub = (orte_iof_svc_sub_t*)item;
|
||||||
if (sub->origin_mask == origin_mask &&
|
if (sub->origin_mask == origin_mask &&
|
||||||
orte_ns.compare_fields(sub->origin_mask,&sub->origin_name,origin_name) == 0 &&
|
ORTE_EQUAL == orte_ns.compare_fields(sub->origin_mask,&sub->origin_name,origin_name) &&
|
||||||
sub->origin_tag == origin_tag &&
|
sub->origin_tag == origin_tag &&
|
||||||
sub->target_mask == target_mask &&
|
sub->target_mask == target_mask &&
|
||||||
orte_ns.compare_fields(sub->target_mask,&sub->target_name,target_name) == 0 &&
|
ORTE_EQUAL == orte_ns.compare_fields(sub->target_mask,&sub->target_name,target_name) &&
|
||||||
sub->target_tag == target_tag) {
|
sub->target_tag == target_tag) {
|
||||||
OPAL_THREAD_UNLOCK(&mca_iof_svc_component.svc_lock);
|
OPAL_THREAD_UNLOCK(&mca_iof_svc_component.svc_lock);
|
||||||
return ORTE_SUCCESS;
|
return ORTE_SUCCESS;
|
||||||
@ -197,8 +197,9 @@ void orte_iof_svc_sub_ack(
|
|||||||
|
|
||||||
/* If the subscription origin/tag doesn't match the ACK
|
/* If the subscription origin/tag doesn't match the ACK
|
||||||
origin/tag, skip it */
|
origin/tag, skip it */
|
||||||
if (orte_ns.compare_fields(sub->origin_mask,
|
if (ORTE_EQUAL != orte_ns.compare_fields(sub->origin_mask,
|
||||||
&sub->origin_name, &hdr->msg_origin) != 0 ||
|
&sub->origin_name,
|
||||||
|
&hdr->msg_origin) ||
|
||||||
sub->origin_tag != hdr->msg_tag) {
|
sub->origin_tag != hdr->msg_tag) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -220,8 +221,9 @@ void orte_iof_svc_sub_ack(
|
|||||||
coming from this process, then update the seq_min
|
coming from this process, then update the seq_min
|
||||||
calculation */
|
calculation */
|
||||||
if (NULL != sub->sub_endpoint &&
|
if (NULL != sub->sub_endpoint &&
|
||||||
0 == orte_ns.compare_fields(ORTE_NS_CMP_ALL,
|
ORTE_EQUAL == orte_ns.compare_fields(ORTE_NS_CMP_ALL,
|
||||||
orte_process_info.my_name, peer)) {
|
orte_process_info.my_name,
|
||||||
|
peer)) {
|
||||||
if (do_close) {
|
if (do_close) {
|
||||||
/* JMS what to do here? Need to set sub->sub_endpoint
|
/* JMS what to do here? Need to set sub->sub_endpoint
|
||||||
to NULL. Have similar leak for do_close for
|
to NULL. Have similar leak for do_close for
|
||||||
@ -255,8 +257,8 @@ void orte_iof_svc_sub_ack(
|
|||||||
/* If the publication origin or publication proxy matches
|
/* If the publication origin or publication proxy matches
|
||||||
the ACK'ing proxy, save the ACK'ed byte count for this
|
the ACK'ing proxy, save the ACK'ed byte count for this
|
||||||
*origin* (not the proxy). */
|
*origin* (not the proxy). */
|
||||||
if (orte_ns.compare_fields(pub->pub_mask,&pub->pub_name,peer) == 0 ||
|
if (ORTE_EQUAL == orte_ns.compare_fields(pub->pub_mask,&pub->pub_name,peer) ||
|
||||||
orte_ns.compare_fields(ORTE_NS_CMP_ALL,&pub->pub_proxy,peer) == 0) {
|
ORTE_EQUAL == orte_ns.compare_fields(ORTE_NS_CMP_ALL,&pub->pub_proxy,peer)) {
|
||||||
opal_output(orte_iof_base.iof_output,
|
opal_output(orte_iof_base.iof_output,
|
||||||
"ack: found matching pub");
|
"ack: found matching pub");
|
||||||
/* If we're closing, then remove this proc from
|
/* If we're closing, then remove this proc from
|
||||||
@ -311,12 +313,12 @@ void orte_iof_svc_sub_ack(
|
|||||||
if (seq_min == hdr->msg_seq+hdr->msg_len) {
|
if (seq_min == hdr->msg_seq+hdr->msg_len) {
|
||||||
/* If the original message was initiated from this process,
|
/* If the original message was initiated from this process,
|
||||||
then the ACK delivery is local. */
|
then the ACK delivery is local. */
|
||||||
if (0 == orte_ns.compare_fields(ORTE_NS_CMP_ALL,
|
if (ORTE_EQUAL == orte_ns.compare_fields(ORTE_NS_CMP_ALL,
|
||||||
orte_process_info.my_name,
|
orte_process_info.my_name,
|
||||||
&hdr->msg_origin) ||
|
&hdr->msg_origin) ||
|
||||||
0 == orte_ns.compare_fields(ORTE_NS_CMP_ALL,
|
ORTE_EQUAL == orte_ns.compare_fields(ORTE_NS_CMP_ALL,
|
||||||
orte_process_info.my_name,
|
orte_process_info.my_name,
|
||||||
&hdr->msg_proxy)) {
|
&hdr->msg_proxy)) {
|
||||||
orte_iof_base_endpoint_t* endpoint;
|
orte_iof_base_endpoint_t* endpoint;
|
||||||
endpoint = orte_iof_base_endpoint_match(&hdr->msg_origin,
|
endpoint = orte_iof_base_endpoint_match(&hdr->msg_origin,
|
||||||
ORTE_NS_CMP_ALL,
|
ORTE_NS_CMP_ALL,
|
||||||
@ -381,10 +383,10 @@ int orte_iof_svc_sub_delete(
|
|||||||
opal_list_item_t* next = opal_list_get_next(item);
|
opal_list_item_t* next = opal_list_get_next(item);
|
||||||
orte_iof_svc_sub_t* sub = (orte_iof_svc_sub_t*)item;
|
orte_iof_svc_sub_t* sub = (orte_iof_svc_sub_t*)item;
|
||||||
if (sub->origin_mask == origin_mask &&
|
if (sub->origin_mask == origin_mask &&
|
||||||
orte_ns.compare_fields(sub->origin_mask,&sub->origin_name,origin_name) == 0 &&
|
ORTE_EQUAL == orte_ns.compare_fields(sub->origin_mask,&sub->origin_name,origin_name) &&
|
||||||
sub->origin_tag == origin_tag &&
|
sub->origin_tag == origin_tag &&
|
||||||
sub->target_mask == target_mask &&
|
sub->target_mask == target_mask &&
|
||||||
orte_ns.compare_fields(sub->target_mask,&sub->target_name,target_name) == 0 &&
|
ORTE_EQUAL == orte_ns.compare_fields(sub->target_mask,&sub->target_name,target_name) &&
|
||||||
sub->target_tag == target_tag) {
|
sub->target_tag == target_tag) {
|
||||||
opal_list_remove_item(&mca_iof_svc_component.svc_subscribed, item);
|
opal_list_remove_item(&mca_iof_svc_component.svc_subscribed, item);
|
||||||
OBJ_RELEASE(item);
|
OBJ_RELEASE(item);
|
||||||
@ -406,9 +408,9 @@ int orte_iof_svc_sub_delete_all(
|
|||||||
opal_list_item_t* next = opal_list_get_next(item);
|
opal_list_item_t* next = opal_list_get_next(item);
|
||||||
orte_iof_svc_sub_t* sub = (orte_iof_svc_sub_t*)item;
|
orte_iof_svc_sub_t* sub = (orte_iof_svc_sub_t*)item;
|
||||||
if ((sub->origin_mask == ORTE_NS_CMP_ALL &&
|
if ((sub->origin_mask == ORTE_NS_CMP_ALL &&
|
||||||
orte_ns.compare_fields(ORTE_NS_CMP_ALL,&sub->origin_name,name) == 0) ||
|
ORTE_EQUAL == orte_ns.compare_fields(ORTE_NS_CMP_ALL,&sub->origin_name,name)) ||
|
||||||
(sub->target_mask == ORTE_NS_CMP_ALL &&
|
(sub->target_mask == ORTE_NS_CMP_ALL &&
|
||||||
orte_ns.compare_fields(ORTE_NS_CMP_ALL,&sub->target_name,name) == 0)) {
|
ORTE_EQUAL == orte_ns.compare_fields(ORTE_NS_CMP_ALL,&sub->target_name,name))) {
|
||||||
opal_list_remove_item(&mca_iof_svc_component.svc_subscribed, item);
|
opal_list_remove_item(&mca_iof_svc_component.svc_subscribed, item);
|
||||||
OBJ_RELEASE(item);
|
OBJ_RELEASE(item);
|
||||||
}
|
}
|
||||||
@ -534,7 +536,7 @@ bool orte_iof_svc_fwd_match(
|
|||||||
orte_iof_svc_sub_t* sub,
|
orte_iof_svc_sub_t* sub,
|
||||||
orte_iof_svc_pub_t* pub)
|
orte_iof_svc_pub_t* pub)
|
||||||
{
|
{
|
||||||
if (orte_ns.compare_fields(sub->target_mask,&sub->target_name,&pub->pub_name) == 0 &&
|
if (ORTE_EQUAL == orte_ns.compare_fields(sub->target_mask,&sub->target_name,&pub->pub_name) &&
|
||||||
sub->origin_tag == pub->pub_tag) {
|
sub->origin_tag == pub->pub_tag) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user