Diff between 27fe5e2ee70e80be14e24935a3f1133794096125 and a449862869986efbc6eebf7057526e5ddb07d828

Changed Files

File Additions Deletions Status
src/shared/att.c +8 -0 modified
src/shared/att.h +2 -0 modified

Full Patch

diff --git a/src/shared/att.c b/src/shared/att.c
index d2468a0..90c794a 100644
--- a/src/shared/att.c
+++ b/src/shared/att.c
@@ -917,6 +917,14 @@ bool bt_att_set_close_on_unref(struct bt_att *att, bool do_close)
 	return io_set_close_on_destroy(att->io, do_close);
 }
 
+int bt_att_get_fd(struct bt_att *att)
+{
+	if (!att)
+		return -1;
+
+	return att->fd;
+}
+
 bool bt_att_set_debug(struct bt_att *att, bt_att_debug_func_t callback,
 				void *user_data, bt_att_destroy_func_t destroy)
 {
diff --git a/src/shared/att.h b/src/shared/att.h
index f13fc7b..5256ff9 100644
--- a/src/shared/att.h
+++ b/src/shared/att.h
@@ -35,6 +35,8 @@ void bt_att_unref(struct bt_att *att);
 
 bool bt_att_set_close_on_unref(struct bt_att *att, bool do_close);
 
+int bt_att_get_fd(struct bt_att *att);
+
 typedef void (*bt_att_response_func_t)(uint8_t opcode, const void *pdu,
 					uint16_t length, void *user_data);
 typedef void (*bt_att_notify_func_t)(uint8_t opcode, const void *pdu,