stream-tcp: proper error if segment pool init fails

Until now a PoolInit failure for the segment pools would result in
an abort() through BUG_ON(). This patch adds a proper error message,
then exits.

Bug #1108.
pull/855/head
Victor Julien 11 years ago
parent 7e38347d99
commit f9213d7cc6

@ -411,7 +411,12 @@ int StreamTcpReassemblyConfig(char quiet)
(void *) &my_segment_pktsizes[i],
TcpSegmentPoolCleanup, NULL);
SCMutexUnlock(&my_segment_lock[i]);
BUG_ON(my_segment_pool[i] == NULL);
if (my_segment_pool[i] == NULL) {
SCLogError(SC_ERR_INITIALIZATION, "couldn't set up segment pool "
"for packet size %u. Memcap too low?", my_segment_pktsizes[i]);
exit(EXIT_FAILURE);
}
SCLogDebug("my_segment_pktsizes[i] %u, my_segment_poolsizes[i] %u",
my_segment_pktsizes[i], my_segment_poolsizes[i]);

Loading…
Cancel
Save