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.
---