mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-02 00:24:25 +08:00
obex: get src and dst address and store it
This commit creates src and dst members in obex_session to later use them to export via Session D-Bus API.
This commit is contained in:
parent
a8a9649850
commit
4d8c46d451
@ -27,6 +27,8 @@ struct obex_session {
|
||||
uint32_t id;
|
||||
uint8_t cmd;
|
||||
uint8_t action_id;
|
||||
char *src;
|
||||
char *dst;
|
||||
char *name;
|
||||
char *destname;
|
||||
char *type;
|
||||
|
@ -252,6 +252,9 @@ static void obex_session_free(struct obex_session *os)
|
||||
if (os->obex)
|
||||
g_obex_unref(os->obex);
|
||||
|
||||
g_free(os->src);
|
||||
g_free(os->dst);
|
||||
|
||||
g_free(os);
|
||||
}
|
||||
|
||||
@ -1134,6 +1137,9 @@ int obex_session_start(GIOChannel *io, uint16_t tx_mtu, uint16_t rx_mtu,
|
||||
os->obex = obex;
|
||||
os->io = g_io_channel_ref(io);
|
||||
|
||||
obex_getsockname(os, &os->src);
|
||||
obex_getpeername(os, &os->dst);
|
||||
|
||||
sessions = g_slist_prepend(sessions, os);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user