[
https://issues.apache.org/jira/browse/TRAFODION-3003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16409782#comment-16409782
]
ASF GitHub Bot commented on TRAFODION-3003:
-------------------------------------------
Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1487#discussion_r176479189
--- 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));
--- End diff --
I think you want "sizeof(keepaliveStatus)-1" here. If argv[count] has a
strlen longer than keepaliveStatus, the first sizeof(keepaliveStatus) bytes
will be copied here, overwriting all of the bytes previously set to null. (I
don't know what we do for other parameters. Maybe we tolerate this situation
today.)
> Trafodion keepalive support
> ---------------------------
>
> Key: TRAFODION-3003
> URL: https://issues.apache.org/jira/browse/TRAFODION-3003
> Project: Apache Trafodion
> Issue Type: New Feature
> Components: connectivity-mxosrvr
> Affects Versions: 2.4
> Reporter: haolin.song
> Assignee: haolin.song
> Priority: Major
>
> We need to make sure the connection exists when the client does not operate
> for a long time.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)