summaryrefslogtreecommitdiff
path: root/libhfp/hfp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libhfp/hfp.cpp')
-rw-r--r--libhfp/hfp.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libhfp/hfp.cpp b/libhfp/hfp.cpp
index 5ddeb57..6a979c7 100644
--- a/libhfp/hfp.cpp
+++ b/libhfp/hfp.cpp
@@ -564,6 +564,8 @@ SessionFactory(BtDevice *devp)
HfpSession *sessp;
assert(GetHub());
+ assert(!FindSession(devp));
+
if (cb_HfpSessionFactory.Registered())
sessp = cb_HfpSessionFactory(devp);
else
@@ -771,6 +773,10 @@ NotifyConnectionState(ErrorInfo *async_error)
if (!HfpHandshake(&local_error))
__Disconnect(&local_error, false);
+
+ else if (IsConnectionRemoteInitiated() &&
+ cb_NotifyConnection.Registered())
+ cb_NotifyConnection(this, 0);
}
else {