diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/handsfree-audio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index 857c258d..73c61830 100644 --- a/src/handsfree-audio.c +++ b/src/handsfree-audio.c @@ -123,6 +123,12 @@ static gboolean sco_accept(GIOChannel *io, GIOCondition cond, if (nsk < 0) return TRUE; + if (agent == NULL) { + ofono_error("Reject SCO: Agent not registered"); + close(nsk); + return TRUE; + } + bt_ba2str(&saddr.sco_bdaddr, remote); memset(&saddr, 0, sizeof(saddr)); |