avdtp.c (d44ccd2766ad45b2ebf101764261b9b7ef65db8c) | avdtp.c (9cb061cb22e6631a9772a9e09b15c93c27d7651c) |
---|---|
1/* 2 * Copyright (C) 2016 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 1286 unchanged lines hidden (view full) --- 1295 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER; 1296 } 1297 1298 if (stream_endpoint->l2cap_media_cid == 0){ 1299 log_error("avdtp_suspend_stream: no media connection for stream_endpoint with seid %d found", local_seid); 1300 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER; 1301 } 1302 | 1/* 2 * Copyright (C) 2016 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 1286 unchanged lines hidden (view full) --- 1295 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER; 1296 } 1297 1298 if (stream_endpoint->l2cap_media_cid == 0){ 1299 log_error("avdtp_suspend_stream: no media connection for stream_endpoint with seid %d found", local_seid); 1300 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER; 1301 } 1302 |
1303 if (!is_avdtp_remote_seid_registered(stream_endpoint) || stream_endpoint->suspend_stream){ | 1303 if (!is_avdtp_remote_seid_registered(stream_endpoint)){ |
1304 return ERROR_CODE_COMMAND_DISALLOWED; 1305 } 1306 | 1304 return ERROR_CODE_COMMAND_DISALLOWED; 1305 } 1306 |
1307 if (stream_endpoint->state != AVDTP_STREAM_ENDPOINT_STREAMING){ 1308 return ERROR_CODE_COMMAND_DISALLOWED; 1309 } 1310 |
|
1307 if (stream_endpoint->suspend_stream == 1) { 1308 return ERROR_CODE_COMMAND_DISALLOWED; 1309 } 1310 1311 stream_endpoint->suspend_stream = 1; 1312 connection->initiator_local_seid = local_seid; 1313 connection->initiator_remote_seid = stream_endpoint->remote_sep.seid; 1314 avdtp_request_can_send_now_initiator(connection); --- 342 unchanged lines hidden --- | 1311 if (stream_endpoint->suspend_stream == 1) { 1312 return ERROR_CODE_COMMAND_DISALLOWED; 1313 } 1314 1315 stream_endpoint->suspend_stream = 1; 1316 connection->initiator_local_seid = local_seid; 1317 connection->initiator_remote_seid = stream_endpoint->remote_sep.seid; 1318 avdtp_request_can_send_now_initiator(connection); --- 342 unchanged lines hidden --- |