inliniac/suricata — pull request #1216 by poona (2014-11-17 17:54:32+00:00)
Title: bug_1318, init: Setup stream config, before spawning threads.

During the setup/boot phase, we would spawn threads first and then
initialize stream tcp config using StreamTcpInitConfig(), which can lead
to cases where the stream module thread init function would access stream
variables that aren't initialized yet.

This commit moves the StreamTcpInitConfig() function before we dispatch
the runmode. We also make sure that we do this conditionally on the
current runmode being unix_socket or not.

Buildbot:
- PR build: https://buildbot.openinfosecfoundation.org/builders/poona/builds/0
- PR pcaps: https://buildbot.openinfosecfoundation.org/builders/poona-pcap/builds/0