bugfix: radio medium should reset last connection data before notifying observers that a new connection has begun

This commit is contained in:
fros4943 2009-10-29 10:31:55 +00:00
parent 53b6e0e7fa
commit 62c8535678

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: AbstractRadioMedium.java,v 1.11 2009/10/27 10:10:03 fros4943 Exp $ * $Id: AbstractRadioMedium.java,v 1.12 2009/10/29 10:31:55 fros4943 Exp $
*/ */
package se.sics.cooja.radiomediums; package se.sics.cooja.radiomediums;
@ -268,6 +268,7 @@ public abstract class AbstractRadioMedium extends RadioMedium {
updateSignalStrengths(); updateSignalStrengths();
/* Notify observers */ /* Notify observers */
lastConnection = null;
radioMediumObservable.setRadioMediumChangedAndNotify(); radioMediumObservable.setRadioMediumChangedAndNotify();
} else if (event == Radio.RadioEvent.TRANSMISSION_FINISHED) { } else if (event == Radio.RadioEvent.TRANSMISSION_FINISHED) {