You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by zr...@apache.org on 2021/05/28 01:30:10 UTC

[trafficcontrol] branch master updated: Add define switch for ATS version (#5849)

This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 83979f2  Add define switch for ATS version (#5849)
83979f2 is described below

commit 83979f2708de805ad4334dd749fc75cba67b9c4f
Author: Evan Zelkowitz <ez...@apache.org>
AuthorDate: Thu May 27 19:29:51 2021 -0600

    Add define switch for ATS version (#5849)
    
    From versions 8->9->master the api definitions for the TSCont* functions have been changing. From 8 to 9 TSContSchedule dropped an argument, and 9 to master the function
    was dropped completely in favor of TSContScheduleOnPool which took the original amount of arguments.
    
    Adding a switch to for <9 use the old definition and for others use the TSContScheduleOnPool function which should act the same. This way it will always build (for now)
---
 traffic_server/plugins/astats_over_http/astats_over_http.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/traffic_server/plugins/astats_over_http/astats_over_http.c b/traffic_server/plugins/astats_over_http/astats_over_http.c
index 8efd242..1ac5dc6 100644
--- a/traffic_server/plugins/astats_over_http/astats_over_http.c
+++ b/traffic_server/plugins/astats_over_http/astats_over_http.c
@@ -915,7 +915,11 @@ static void load_config_file(config_holder_t *config_holder) {
 			TSDebug(PLUGIN_TAG, "scheduling free: %p (%p)", oldconfig, newconfig);
 			free_cont = TSContCreate(free_handler, TSMutexCreate());
 			TSContDataSet(free_cont, (void *) oldconfig);
+#if TS_VERSION_MAJOR < 9
 			TSContSchedule(free_cont, FREE_TMOUT, TS_THREAD_POOL_TASK);
+#else
+			TSContScheduleOnPool(free_cont, FREE_TMOUT, TS_THREAD_POOL_TASK);
+#endif
 		}
 	}
 	if(fh)