diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-03-20 18:54:48 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-03-21 16:13:44 +0200 |
commit | 4b873ec8af81415a1c501aa1a9024146d78cd222 (patch) | |
tree | 351897f53b87119c99df96d65402a733bf362f09 /gobex | |
parent | bcd9265d725f7e09746eb0716c40e9cdb2e95cb7 (diff) | |
download | bluez-4b873ec8af81415a1c501aa1a9024146d78cd222.tar.gz |
gobex: Fix not resetting SRM setup
If SRM is not confirmed by both ends the setup should be disregarded and
the data associated to it can be freed otherwise the next command may
reuse the same setup assuming it is still valid and probably cause SRM
to be enabled without remote consent.
Diffstat (limited to 'gobex')
-rw-r--r-- | gobex/gobex.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gobex/gobex.c b/gobex/gobex.c index 0d9b4498b..d7d325b41 100644 --- a/gobex/gobex.c +++ b/gobex/gobex.c @@ -400,7 +400,8 @@ static void setup_srm(GObex *obex, GObexPacket *pkt, gboolean outgoing) g_obex_header_get_uint8(hdr, &srm); g_obex_debug(G_OBEX_DEBUG_COMMAND, "srm 0x%02x", srm); set_srm(obex, op, srm); - } + } else if (!g_obex_srm_enabled(obex)) + set_srm(obex, op, G_OBEX_SRM_DISABLE); hdr = g_obex_packet_get_header(pkt, G_OBEX_HDR_SRMP); if (hdr != NULL) { |