*
*****************************************************************************/
-#include "bt_target.h"
+#include "common/bt_target.h"
-#include "btm_api.h"
+#include "stack/btm_api.h"
#include "btm_int.h"
-#include "rfcdefs.h"
-#include "port_api.h"
-#include "port_ext.h"
+#include "stack/rfcdefs.h"
+#include "stack/port_api.h"
+#include "stack/port_ext.h"
#include "port_int.h"
#include "rfc_int.h"
-#include "btu.h"
-#include "bt_defs.h"
+#include "stack/btu.h"
+#include "common/bt_defs.h"
-#include "allocator.h"
-#include "mutex.h"
+#include "osi/allocator.h"
+#include "osi/mutex.h"
#include <string.h>
if (rfc_cb.port.rfc_mcb[j].state == RFC_MX_STATE_IDLE) {
/* New multiplexer control block */
fixed_queue_free(p_mcb->cmd_q, NULL);
+ rfc_timer_free(p_mcb);
memset (p_mcb, 0, sizeof (tRFC_MCB));
memcpy (p_mcb->bd_addr, bd_addr, BD_ADDR_LEN);
RFCOMM_TRACE_DEBUG("rfc_alloc_multiplexer_channel:is_initiator:%d, create new p_mcb:%p, index:%d",
is_initiator, &rfc_cb.port.rfc_mcb[j], j);
- p_mcb->cmd_q = fixed_queue_new(SIZE_MAX);
+ p_mcb->cmd_q = fixed_queue_new(QUEUE_SIZE_MAX);
p_mcb->is_initiator = is_initiator;
void rfc_release_multiplexer_channel (tRFC_MCB *p_mcb)
{
- rfc_timer_stop (p_mcb);
+ rfc_timer_free (p_mcb);
fixed_queue_free(p_mcb->cmd_q, osi_free_fun);
btu_start_timer (p_tle, BTU_TTYPE_RFCOMM_MFC, timeout);
}
-
/*******************************************************************************
**
** Function rfc_timer_stop
btu_stop_timer (&p_mcb->tle);
}
+/*******************************************************************************
+**
+** Function rfc_timer_free
+**
+** Description Stop and free RFC Timer
+**
+*******************************************************************************/
+void rfc_timer_free (tRFC_MCB *p_mcb)
+{
+ RFCOMM_TRACE_EVENT ("rfc_timer_free");
+
+ btu_free_timer (&p_mcb->tle);
+ memset(&p_mcb->tle, 0, sizeof(TIMER_LIST_ENT));
+}
/*******************************************************************************
**
btu_start_timer (p_tle, BTU_TTYPE_RFCOMM_PORT, timeout);
}
-
/*******************************************************************************
**
** Function rfc_port_timer_stop
{
RFCOMM_TRACE_EVENT ("rfc_port_timer_stop");
- btu_free_timer (&p_port->rfc.tle);
+ btu_stop_timer (&p_port->rfc.tle);
}
+/*******************************************************************************
+**
+** Function rfc_port_timer_free
+**
+** Description Stop and free RFC Timer
+**
+*******************************************************************************/
+void rfc_port_timer_free (tPORT *p_port)
+{
+ RFCOMM_TRACE_EVENT ("rfc_port_timer_stop");
+
+ btu_free_timer (&p_port->rfc.tle);
+ memset(&p_port->rfc.tle, 0, sizeof(TIMER_LIST_ENT));
+}
/*******************************************************************************
**
}
-#endif ///(defined RFCOMM_INCLUDED && RFCOMM_INCLUDED == TRUE)
\ No newline at end of file
+#endif ///(defined RFCOMM_INCLUDED && RFCOMM_INCLUDED == TRUE)