freeswitch/libs/freetdm/src/ftmod/ftmod_analog
Stefan Knoblich 02b2926351 [FreeTDM] Fix segfault in ftdm_analog_configure_span() on startup.
Using ftdm_log_chan() in ftdm_analog_configure_span() is a bad idea,
since the span won't have any channels assigned.

This bug powered by declaring all variables at the top of the function,
even if they are used in an if branch at the end.

A C99'ish:

	if (callwaiting) {
		for (unsigned int i = 1; i <= span->span->chan_count; i++) {
			/* ... */
		}
	}

would have alerted the developer adding the log statement.
But since we can't have nice things (thanks MSVC for not supporting C99!)
</rant>

Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
2011-03-06 19:42:47 +01:00
..
ftdm_analog.h freetdm: Added new OOB event FTDM_OOB_POLARITY_REVERSE 2010-12-21 15:11:22 -05:00
ftmod_analog.2008.vcproj misc windows x64 fixes 2010-12-01 10:25:02 -06:00
ftmod_analog.2010.vcxproj VS2010 Freetdm fix misc build settings 2010-12-01 18:42:28 -06:00
ftmod_analog.2010.vcxproj.filters VS2010 Initial version for freetdm 2010-11-29 21:55:34 -06:00
ftmod_analog.c [FreeTDM] Fix segfault in ftdm_analog_configure_span() on startup. 2011-03-06 19:42:47 +01:00