Diff between a0207272ed7d102da62f4013a7f36be66a7e407c and 73f977e64d4c0fcb52fa6bbefdaa54fa250e35e8
Changed Files
| File | Additions | Deletions | Status |
| profiles/network/connection.c | +5 | -2 | modified |
Full Patch
diff --git a/profiles/network/connection.c b/profiles/network/connection.c
index 3a913cf..3ccd211 100644
--- a/profiles/network/connection.c
+++ b/profiles/network/connection.c
@@ -698,8 +698,11 @@ int connection_register(struct btd_device *device, uint16_t id)
}
nc = find_connection(peer->connections, id);
- if (nc)
- return 0;
+ if (nc) {
+ error("Device %s has multiple connection instances of %d",
+ device_get_path(device), id);
+ return -1;
+ }
nc = g_new0(struct network_conn, 1);
nc->id = id;