From: Matteo Brancaleoni Date: Tue, 27 Jan 2015 09:17:07 +0000 (+0100) Subject: If the span has been already fully stopped and ftdm is not running, X-Git-Tag: v1.4.17~1^2~60^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e062f5e3c8355a6b5cb0d12ddb99300e95b38193;p=thirdparty%2Ffreeswitch.git If the span has been already fully stopped and ftdm is not running, return success from the span stop function. --- diff --git a/libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c b/libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c index aa071870a0..1c3a03c3a2 100644 --- a/libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c +++ b/libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c @@ -2706,7 +2706,8 @@ static ftdm_status_t ftdm_libpri_stop(ftdm_span_t *span) ftdm_libpri_data_t *isdn_data = span->signal_data; if (!ftdm_test_flag(isdn_data, FTMOD_LIBPRI_RUNNING)) { - return FTDM_FAIL; + ftdm_log(FTDM_LOG_DEBUG, "Span %d already stopped, continuing anyway...\n", ftdm_span_get_id(span)); + return FTDM_SUCCESS; } ftdm_log(FTDM_LOG_INFO, "Stopping span [s%d][%s]\n",