]> err.no Git - linux-2.6/blobdiff - net/bluetooth/rfcomm/core.c
Merge commit 'origin/master'
[linux-2.6] / net / bluetooth / rfcomm / core.c
index e7a6a03cea37e891d81c3c036140f9e30300108d..6cfc7ba611b36bfd5af56816bc7bfef409cb81b7 100644 (file)
@@ -23,8 +23,6 @@
 
 /*
  * Bluetooth RFCOMM core.
- *
- * $Id: core.c,v 1.42 2002/10/01 23:26:25 maxk Exp $
  */
 
 #include <linux/module.h>
@@ -53,7 +51,7 @@
 #define BT_DBG(D...)
 #endif
 
-#define VERSION "1.9"
+#define VERSION "1.10"
 
 static int disable_cfc = 0;
 static int channel_mtu = -1;
@@ -1463,8 +1461,12 @@ static int rfcomm_recv_msc(struct rfcomm_session *s, int cr, struct sk_buff *skb
                        clear_bit(RFCOMM_TX_THROTTLED, &d->flags);
 
                rfcomm_dlc_lock(d);
+
+               d->remote_v24_sig = msc->v24_sig;
+
                if (d->modem_status)
                        d->modem_status(d, msc->v24_sig);
+
                rfcomm_dlc_unlock(d);
 
                rfcomm_send_msc(s, 0, dlci, msc->v24_sig);
@@ -1969,7 +1971,8 @@ static void rfcomm_auth_cfm(struct hci_conn *conn, u8 status)
        list_for_each_safe(p, n, &s->dlcs) {
                d = list_entry(p, struct rfcomm_dlc, list);
 
-               if (d->link_mode & (RFCOMM_LM_ENCRYPT | RFCOMM_LM_SECURE))
+               if ((d->link_mode & (RFCOMM_LM_ENCRYPT | RFCOMM_LM_SECURE)) &&
+                               !(conn->link_mode & HCI_LM_ENCRYPT) && !status)
                        continue;
 
                if (!test_and_clear_bit(RFCOMM_AUTH_PENDING, &d->flags))