Loading system/stack/btm/btm_sec.cc +1 −15 Original line number Diff line number Diff line Loading @@ -467,21 +467,7 @@ uint8_t BTM_SecClrService(uint8_t service_id) { * ******************************************************************************/ uint8_t BTM_SecClrServiceByPsm(uint16_t psm) { tBTM_SEC_SERV_REC* p_srec = &btm_sec_cb.sec_serv_rec[0]; uint8_t num_freed = 0; int i; for (i = 0; i < BTM_SEC_MAX_SERVICE_RECORDS; i++, p_srec++) { /* Delete services with specified name (if in use and not SDP) */ if ((p_srec->security_flags & BTM_SEC_IN_USE) && (p_srec->psm == psm)) { LOG_VERBOSE("BTM_SEC_CLR[%d]: id %d ", i, p_srec->service_id); p_srec->security_flags = 0; num_freed++; } } LOG_VERBOSE("BTM_SecClrServiceByPsm psm:0x%x num_freed:%d", psm, num_freed); return (num_freed); return btm_sec_cb.RemoveServiceByPsm(psm); } /******************************************************************************* Loading system/stack/btm/btm_sec_cb.cc +18 −0 Original line number Diff line number Diff line Loading @@ -323,3 +323,21 @@ uint8_t tBTM_SEC_CB::RemoveServiceById(uint8_t service_id) { } return (num_freed); } uint8_t tBTM_SEC_CB::RemoveServiceByPsm(uint16_t psm) { tBTM_SEC_SERV_REC* p_srec = &sec_serv_rec[0]; uint8_t num_freed = 0; int i; for (i = 0; i < BTM_SEC_MAX_SERVICE_RECORDS; i++, p_srec++) { /* Delete services with specified name (if in use and not SDP) */ if ((p_srec->security_flags & BTM_SEC_IN_USE) && (p_srec->psm == psm)) { LOG_VERBOSE("BTM_SEC_CLR[%d]: id %d ", i, p_srec->service_id); p_srec->security_flags = 0; num_freed++; } } LOG_VERBOSE("psm:0x%x num_freed:%d", psm, num_freed); return (num_freed); } system/stack/btm/btm_sec_cb.h +1 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ class tBTM_SEC_CB { uint16_t sec_level, uint16_t psm, uint32_t mx_proto_id, uint32_t mx_chan_id); uint8_t RemoveServiceById(uint8_t service_id); uint8_t RemoveServiceByPsm(uint16_t psm); }; extern tBTM_SEC_CB btm_sec_cb; Loading Loading
system/stack/btm/btm_sec.cc +1 −15 Original line number Diff line number Diff line Loading @@ -467,21 +467,7 @@ uint8_t BTM_SecClrService(uint8_t service_id) { * ******************************************************************************/ uint8_t BTM_SecClrServiceByPsm(uint16_t psm) { tBTM_SEC_SERV_REC* p_srec = &btm_sec_cb.sec_serv_rec[0]; uint8_t num_freed = 0; int i; for (i = 0; i < BTM_SEC_MAX_SERVICE_RECORDS; i++, p_srec++) { /* Delete services with specified name (if in use and not SDP) */ if ((p_srec->security_flags & BTM_SEC_IN_USE) && (p_srec->psm == psm)) { LOG_VERBOSE("BTM_SEC_CLR[%d]: id %d ", i, p_srec->service_id); p_srec->security_flags = 0; num_freed++; } } LOG_VERBOSE("BTM_SecClrServiceByPsm psm:0x%x num_freed:%d", psm, num_freed); return (num_freed); return btm_sec_cb.RemoveServiceByPsm(psm); } /******************************************************************************* Loading
system/stack/btm/btm_sec_cb.cc +18 −0 Original line number Diff line number Diff line Loading @@ -323,3 +323,21 @@ uint8_t tBTM_SEC_CB::RemoveServiceById(uint8_t service_id) { } return (num_freed); } uint8_t tBTM_SEC_CB::RemoveServiceByPsm(uint16_t psm) { tBTM_SEC_SERV_REC* p_srec = &sec_serv_rec[0]; uint8_t num_freed = 0; int i; for (i = 0; i < BTM_SEC_MAX_SERVICE_RECORDS; i++, p_srec++) { /* Delete services with specified name (if in use and not SDP) */ if ((p_srec->security_flags & BTM_SEC_IN_USE) && (p_srec->psm == psm)) { LOG_VERBOSE("BTM_SEC_CLR[%d]: id %d ", i, p_srec->service_id); p_srec->security_flags = 0; num_freed++; } } LOG_VERBOSE("psm:0x%x num_freed:%d", psm, num_freed); return (num_freed); }
system/stack/btm/btm_sec_cb.h +1 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ class tBTM_SEC_CB { uint16_t sec_level, uint16_t psm, uint32_t mx_proto_id, uint32_t mx_chan_id); uint8_t RemoveServiceById(uint8_t service_id); uint8_t RemoveServiceByPsm(uint16_t psm); }; extern tBTM_SEC_CB btm_sec_cb; Loading