ywkaras commented on code in PR #9479:
URL: https://github.com/apache/trafficserver/pull/9479#discussion_r1130299368


##########
iocore/eventsystem/EventSystem.cc:
##########
@@ -45,24 +45,12 @@ ink_event_system_init(ts::ModuleVersion v)
 
   int chunk_sizes[DEFAULT_BUFFER_SIZES] = {0};
   char *chunk_sizes_string              = 
REC_ConfigReadString("proxy.config.allocator.iobuf_chunk_sizes");
-  if (chunk_sizes_string != nullptr) {
-    ts::TextView src(chunk_sizes_string, ts::TextView::npos);
-    int n = 0;
-    while (n < DEFAULT_BUFFER_SIZES && !src.empty()) {
-      ts::TextView token{src.take_prefix_at(' ')};
-      auto x = ts::svto_radix<10>(token);
-      if (token.empty() && x != std::numeric_limits<decltype(x)>::max()) {
-        chunk_sizes[n++] = x;
-      } else {
-        break;
-      }
-    }
-    ats_free(chunk_sizes_string);
+  if (chunk_sizes_string && !parse_buffer_chunk_sizes(chunk_sizes_string, 
chunk_sizes)) {
+    // If we can't parse the string then we can't be sure of the chunk sizes 
so just exit
+    ::exit(1);

Review Comment:
   Why aren't you using `Fatal()` from `Diags.h`?



-- 
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]

Reply via email to