• Stefan Knoblich's avatar
    [FreeTDM] Fix segfault in ftdm_analog_configure_span() on startup. · 02b29263
    Stefan Knoblich 提交于
    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: 's avatarStefan Knoblich <s.knoblich@axsentis.de>
    02b29263
名称
最后提交
最后更新
..
ftmod_analog 正在载入提交数据...
ftmod_analog_em 正在载入提交数据...
ftmod_isdn 正在载入提交数据...
ftmod_libpri 正在载入提交数据...
ftmod_pika 正在载入提交数据...
ftmod_pritap 正在载入提交数据...
ftmod_r2 正在载入提交数据...
ftmod_sangoma_boost 正在载入提交数据...
ftmod_sangoma_isdn 正在载入提交数据...
ftmod_sangoma_ss7 正在载入提交数据...
ftmod_skel 正在载入提交数据...
ftmod_wanpipe 正在载入提交数据...
ftmod_zt 正在载入提交数据...