5G-MAG / rt-5gms-media-session-handler

5G Media Streaming - Media Session Handler
https://www.5g-mag.com/streaming
Other
4 stars 4 forks source link

The event for UNREGISTER_CLIENT message is not correct #48

Closed shilinding closed 11 months ago

shilinding commented 12 months ago

Describe the bug There is a small bug that the event for UNREGISTER_CLIENT message should be unregisterClient(msg), not registerClient(msg).

inner class IncomingHandler(
        context: Context,
        private val applicationContext: Context = context.applicationContext
    ) : Handler() {

        override fun handleMessage(msg: Message) {
            when (msg.what) {
                SessionHandlerMessageTypes.REGISTER_CLIENT -> registerClient(msg)
                SessionHandlerMessageTypes.UNREGISTER_CLIENT -> registerClient(msg)
                SessionHandlerMessageTypes.STATUS_MESSAGE -> handleStatusMessage(msg)
                SessionHandlerMessageTypes.START_PLAYBACK_BY_SERVICE_LIST_ENTRY_MESSAGE -> handleStartPlaybackByServiceListEntryMessage(
                    msg
                )

                SessionHandlerMessageTypes.SET_M5_ENDPOINT -> setM5Endpoint(msg)
                SessionHandlerMessageTypes.CONSUMPTION_REPORT -> handleConsumptionReportMessage(msg)
                else -> super.handleMessage(msg)
            }
        }