SolidWallOfCode commented on code in PR #9323:
URL: https://github.com/apache/trafficserver/pull/9323#discussion_r1090805356
##########
plugins/experimental/stek_share/stek_share.cc:
##########
@@ -57,11 +63,41 @@ shutdown_handler(TSCont contp, TSEvent event, void *edata)
return 0;
}
+static int
+message_handler(TSCont contp, TSEvent event, void *edata)
+{
+ if (event == TS_EVENT_LIFECYCLE_MSG) {
+ TSPluginMsg *msg = static_cast<TSPluginMsg *>(edata);
+ TSDebug(PLUGIN_NAME, "Message to '%s' - %zu bytes of data", msg->tag,
msg->data_size);
+ if ((strnlen(msg->tag, 20) == 10) && (strncmp(msg->tag, PLUGIN_NAME, 10)
== 0)) { // Message is for us
Review Comment:
Isn't the tag guaranteed to be null terminated?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]