trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CoderSong2015 <...@git.apache.org>
Subject [GitHub] trafodion pull request #1487: [TRAFODION-3003]Trafodion keepalive support
Date Mon, 26 Mar 2018 02:52:50 GMT
Github user CoderSong2015 commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1487#discussion_r176970193
  
    --- Diff: core/conn/odbc/src/odbc/nsksrvr/SrvrMain.cpp ---
    @@ -1427,7 +1437,59 @@ BOOL getInitParamSrvr(int argc, char *argv[], SRVR_INIT_PARAM_Def
&initParam, ch
     				argEmpty = TRUE;
     				break;
     			}
    -		}
    +		}else
    +        if (strcmp(arg, "-TCPKEEPALIVESTATUS") == 0){
    +            if (++count < argc && argv[count][0] != '-')
    +            {
    +                if (strlen(argv[count]) < sizeof(keepaliveStatus) - 1)
    +                {
    +                    memset(keepaliveStatus, 0, sizeof(keepaliveStatus));
    +                    strncpy(keepaliveStatus, argv[count], sizeof(keepaliveStatus));
    +                }
    +                else
    +                {
    +                    argWrong = TRUE;
    +                }
    +            }
    +            else
    +            {
    +                argEmpty = TRUE;
    +                break;
    +            }
    +        }else
    +        if (strcmp(arg, "-TCPKEEPALIVEIDLETIME") == 0){
    +			if (++count < argc )
    +			{
    +				keepaliveIdletime = atoi(argv[count]);
    --- End diff --
    
    I just used the code above as a reference. I think I need to modify the all relevant codes
to keep the robustness. Thanks very much for your all suggestions.


---

Mime
View raw message