~ubuntu-branches/ubuntu/oneiric/bluez/oneiric

« back to all changes in this revision

Viewing changes to input/server.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2011-07-28 16:47:35 UTC
  • mto: This revision was merged to the branch mainline in revision 65.
  • Revision ID: james.westby@ubuntu.com-20110728164735-39htlytedlb0smuk
Tags: upstream-4.95
ImportĀ upstreamĀ versionĀ 4.95

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
{
63
63
        uint16_t psm;
64
64
        bdaddr_t src, dst;
 
65
        char address[18];
65
66
        GError *gerr = NULL;
66
67
        int ret;
67
68
 
82
83
                return;
83
84
        }
84
85
 
85
 
        DBG("Incoming connection on PSM %d", psm);
 
86
        ba2str(&dst, address);
 
87
        DBG("Incoming connection from %s on PSM %d", address, psm);
86
88
 
87
89
        ret = input_device_set_channel(&src, &dst, psm, chan);
88
90
        if (ret == 0)
89
91
                return;
90
92
 
 
93
        error("Refusing input device connect: %s (%d)", strerror(-ret), -ret);
 
94
 
91
95
        /* Send unplug virtual cable to unknown devices */
92
96
        if (ret == -ENOENT && psm == L2CAP_PSM_HIDP_CTRL) {
93
97
                unsigned char unplug = 0x15;
157
161
        }
158
162
 
159
163
        if (server->confirm) {
160
 
                error("Refusing connection: setup in progress");
 
164
                char address[18];
 
165
 
 
166
                ba2str(&dst, address);
 
167
                error("Refusing connection from %s: setup in progress",
 
168
                                                                address);
161
169
                goto drop;
162
170
        }
163
171