Lines Matching defs:conn

22 void PurgeChannels(HciConnection* conn);
27 mutex_init(&fLock, "conn outgoing");
44 HciConnection* conn = ConnectionByHandle(handle, hid);
45 if (conn != NULL)
48 conn = new (std::nothrow) HciConnection;
49 if (conn == NULL)
52 // memset(conn, 0, sizeof(HciConnection));
54 conn->currentRxPacket = NULL;
55 conn->currentRxExpectedLength = 0;
58 bdaddrUtils::Copy(conn->destination, dst);
59 conn->type = type;
60 conn->handle = handle;
61 conn->Hid = hid;
62 conn->status = HCI_CONN_OPEN;
63 conn->mtu = L2CAP_MTU_MINIMUM; // TODO: give the mtu to the connection
64 conn->lastCid = L2CAP_FIRST_CID;
65 conn->lastIdent = L2CAP_FIRST_IDENT;
67 sConnectionList.Add(conn);
70 return conn;
77 HciConnection* conn;
84 conn = iterator.Next();
85 if (conn->Hid == hid
86 && bdaddrUtils::Compare(conn->destination, destination)) {
89 if (conn->GetDoublyLinkedListLink()->next != NULL
90 || conn->GetDoublyLinkedListLink()->previous != NULL
91 || conn == sConnectionList.Head()) {
92 sConnectionList.Remove(conn);
94 delete conn;
106 HciConnection* conn;
112 conn = iterator.Next();
113 if (conn->Hid == hid && conn->handle == handle) {
116 if (conn->GetDoublyLinkedListLink()->next != NULL
117 || conn->GetDoublyLinkedListLink()->previous != NULL
118 || conn == sConnectionList.Head()) {
119 sConnectionList.Remove(conn);
121 PurgeChannels(conn);
122 delete conn;
134 HciConnection* conn;
140 conn = iterator.Next();
141 if (bdaddrUtils::Compare(conn->destination, destination)) {
142 return conn->Hid;
153 HciConnection* conn;
159 conn = iterator.Next();
160 if (conn->Hid == hid && conn->handle == handle) {
161 return conn;
172 HciConnection* conn;
178 conn = iterator.Next();
179 if (conn->Hid == hid
180 && bdaddrUtils::Compare(conn->destination, destination)) {
181 return conn;
194 SetAclBuffer(HciConnection* conn, net_buffer* nbuf)
196 conn->currentRxPacket = nbuf;
201 SetAclExpectedSize(HciConnection* conn, size_t size)
203 conn->currentRxExpectedLength = size;
208 AclPutting(HciConnection* conn, size_t size)
210 conn->currentRxExpectedLength -= size;
215 AclComplete(HciConnection* conn)
217 return conn->currentRxExpectedLength == 0;
222 AclOverFlowed(HciConnection* conn)
224 return conn->currentRxExpectedLength < 0;
233 PurgeChannels(HciConnection* conn)