trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zellerh <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #1192: [TRAFODION-2692] Fixed monitor start...
Date Mon, 31 Jul 2017 23:14:30 GMT
Github user zellerh commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/1192#discussion_r130483435
  
    --- Diff: core/sqf/monitor/linux/cluster.cxx ---
    @@ -749,7 +732,22 @@ void CCluster::HardNodeDown (int pnid, bool communicate_state)
             }
             else
             {
    -            snprintf(port_fname, sizeof(port_fname), "%s/monitor.port.%s",getenv("MPI_TMPDIR"),node->GetName());
    +            // Remove the domain portion of the name if any
    +            char my_node_name[MPI_MAX_PROCESSOR_NAME];
    +            char str1[MPI_MAX_PROCESSOR_NAME];
    +            memset( str1, 0, MPI_MAX_PROCESSOR_NAME );
    +            strcpy (str1, node->GetName() );
    +        
    +            char *str1_dot = strchr( (char *) str1, '.' );
    +            if ( str1_dot )
    +            {
    +                memcpy( my_node_name, str1, str1_dot - str1 );
    --- End diff --
    
    since my_node_name is not initialized, does this need a statement to set my_node_name[str1_dot-str1]
to 0?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message