[sr-dev] git:master:dc7f2eca: core: tcp - init local variables and define function only when needed