[ https://issues.apache.org/jira/browse/TS-1953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13727462#comment-13727462 ]
Igor Galić commented on TS-1953: -------------------------------- uses the version string: {code} // plugins/stats_over_http/stats_over_http.c Line 150 static void json_out_stats(stats_state * my_state) { const char *version; APPEND("{ \"global\": {\n"); TSRecordDump(TS_RECORDTYPE_PROCESS, json_out_stat, my_state); version = TSTrafficServerVersionGet(); APPEND("\"server\": \""); APPEND(version); APPEND("\"\n"); APPEND(" }\n}\n"); } {code} uses the Version Number in a way that actually makes sense: {code} // plugins/stats_over_http/stats_over_http.c Line 241 cleanup: #if (TS_VERSION_NUMBER < 2001005) if(path) TSHandleStringRelease(reqp, url_loc, path); #endif if(url_loc) TSHandleMLocRelease(reqp, hdr_loc, url_loc); if(hdr_loc) TSHandleMLocRelease(reqp, TS_NULL_MLOC, hdr_loc); {code} so I'd like to boil this down to an example/doc about how to handle versioning. > remove check_ts_version() from (example) plugins or make it an API > ------------------------------------------------------------------ > > Key: TS-1953 > URL: https://issues.apache.org/jira/browse/TS-1953 > Project: Traffic Server > Issue Type: Improvement > Components: Plugins > Reporter: Igor Galić > Fix For: sometime > > > almost every single of our (example) plugins has a function > {{chec_ts_version()}}. If this boiler-code is so crucial to a plugin's > functionality, we should offer an API for it, instead of making developers > write (copy) that code every time. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira