File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
samples/bluetooth/tmap_peripheral/src Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 7
7
*
8
8
* SPDX-License-Identifier: Apache-2.0
9
9
*/
10
+ #include <errno.h>
10
11
11
12
#include <zephyr/kernel.h>
12
13
#include <zephyr/sys/printk.h>
@@ -139,6 +140,12 @@ int ccp_originate_call(void)
139
140
int err ;
140
141
char uri [CONFIG_BT_TBS_MAX_URI_LENGTH ];
141
142
143
+ /* If remote_uri is empty then we cannot place a call */
144
+ if (remote_uri [0 ] == '\0' ) {
145
+ printk ("Remote does not support any URI schemes, cannot place call\n" );
146
+ return - ENOENT ;
147
+ }
148
+
142
149
strcpy (uri , remote_uri );
143
150
strcat (uri , URI_SEPARATOR );
144
151
strcat (uri , CALLER_ID );
Original file line number Diff line number Diff line change @@ -289,9 +289,10 @@ int main(void)
289
289
err = ccp_originate_call ();
290
290
if (err != 0 ) {
291
291
printk ("Error sending call originate command!\n" );
292
+ } else {
293
+ /* Start timer to send terminate call command */
294
+ k_work_schedule (& call_terminate_set_work , K_MSEC (2000 ));
292
295
}
293
- /* Start timer to send terminate call command */
294
- k_work_schedule (& call_terminate_set_work , K_MSEC (2000 ));
295
296
}
296
297
297
298
if (peer_is_ums ) {
You can’t perform that action at this time.
0 commit comments