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 77 *
88 * SPDX-License-Identifier: Apache-2.0
99 */
10+ #include <errno.h>
1011
1112#include <zephyr/kernel.h>
1213#include <zephyr/sys/printk.h>
@@ -139,6 +140,12 @@ int ccp_originate_call(void)
139140 int err ;
140141 char uri [CONFIG_BT_TBS_MAX_URI_LENGTH ];
141142
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+
142149 strcpy (uri , remote_uri );
143150 strcat (uri , URI_SEPARATOR );
144151 strcat (uri , CALLER_ID );
Original file line number Diff line number Diff line change @@ -289,9 +289,10 @@ int main(void)
289289 err = ccp_originate_call ();
290290 if (err != 0 ) {
291291 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 ));
292295 }
293- /* Start timer to send terminate call command */
294- k_work_schedule (& call_terminate_set_work , K_MSEC (2000 ));
295296 }
296297
297298 if (peer_is_ums ) {
You can’t perform that action at this time.
0 commit comments