SolidWallOfCode commented on a change in pull request #7023:
URL: https://github.com/apache/trafficserver/pull/7023#discussion_r500350942



##########
File path: proxy/http/remap/RemapPluginInfo.cc
##########
@@ -271,6 +273,31 @@ RemapPluginInfo::indicatePostReload(TSRemapReloadStatus 
reloadStatus)
   resetPluginContext();
 }
 
+/* Initialize strategy (optional). */
+std::shared_ptr<TSNextHopSelectionStrategy>
+RemapPluginInfo::initStrategy(void *ih)
+{
+  if (!init_strategy_cb) {
+    PluginDebug(_tag, "plugin '%s' has no init_strategy_cb, returning 
nullptr", _configPath.c_str());
+    return std::shared_ptr<TSNextHopSelectionStrategy>();
+  }
+  char tmpbuf[2048];
+  ink_zero(tmpbuf);
+  TSNextHopSelectionStrategy *strategy_raw = nullptr;
+  if (init_strategy_cb(strategy_raw, ih, tmpbuf, sizeof(tmpbuf) - 1) != 
TS_SUCCESS) {

Review comment:
       How does `strategy_raw` become not `nullptr`?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to