aboutsummaryrefslogtreecommitdiff
path: root/stack/sdp/sdp_utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'stack/sdp/sdp_utils.cc')
-rw-r--r--stack/sdp/sdp_utils.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/stack/sdp/sdp_utils.cc b/stack/sdp/sdp_utils.cc
index 720c74672..803e963c2 100644
--- a/stack/sdp/sdp_utils.cc
+++ b/stack/sdp/sdp_utils.cc
@@ -108,8 +108,9 @@ tCONN_CB* sdpu_allocate_ccb(void) {
/* Look through each connection control block for a free one */
for (xx = 0, p_ccb = sdp_cb.ccb; xx < SDP_MAX_CONNECTIONS; xx++, p_ccb++) {
if (p_ccb->con_state == SDP_STATE_IDLE) {
+ alarm_t* alarm = p_ccb->sdp_conn_timer;
memset(p_ccb, 0, sizeof(tCONN_CB));
- p_ccb->sdp_conn_timer = alarm_new("sdp.sdp_conn_timer");
+ p_ccb->sdp_conn_timer = alarm;
return (p_ccb);
}
}
@@ -129,8 +130,7 @@ tCONN_CB* sdpu_allocate_ccb(void) {
******************************************************************************/
void sdpu_release_ccb(tCONN_CB* p_ccb) {
/* Ensure timer is stopped */
- alarm_free(p_ccb->sdp_conn_timer);
- p_ccb->sdp_conn_timer = NULL;
+ alarm_cancel(p_ccb->sdp_conn_timer);
/* Drop any response pointer we may be holding */
p_ccb->con_state = SDP_STATE_IDLE;