mirror of git://git.sysmocom.de/ofono
handsfree-audio: Reject SCO if agent is unavailable
This patch rejects the incoming SCO connection if there isn't a Handsfree Audio Agent registered.
This commit is contained in:
parent
a6874a64b2
commit
241e3ca74c
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue