diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-06-21 01:04:33 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-06-21 01:04:33 +0200 |
commit | 2cf6216ac51488f8b143bcc2baf69b47f937b7be (patch) | |
tree | 38d3194b3b072e21d45bec726b474a7ae4acb5fa /plugins | |
parent | 1ee012d9dd83d6abc7eefa6a07fff0e43c9196aa (diff) | |
download | neard-2cf6216ac51488f8b143bcc2baf69b47f937b7be.tar.gz neard-2cf6216ac51488f8b143bcc2baf69b47f937b7be.tar.bz2 neard-2cf6216ac51488f8b143bcc2baf69b47f937b7be.zip |
ndef: Support receiving empty Handover select frames
Empty handover select frames are received when the peer notifies us
about not supporting any of the carrier sent in the handover request
frame.
In that case there is nothing to do but disconnecting from the handover
service.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/handover.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/handover.c b/plugins/handover.c index bd3b4cd..fa4126a 100644 --- a/plugins/handover.c +++ b/plugins/handover.c @@ -349,6 +349,11 @@ static near_bool_t handover_read_initialize(int client_fd, ndef->cur_ptr += bytes_recv; ndef->missing_bytes = ndef->cur_record_len - bytes_recv; + if (ndef->cur_record_len == NDEF_HR_MSG_MIN_LENGTH) { + handover_ndef_parse(client_fd, ndef); + return FALSE; + } + DBG("Handover frame size is %d", ndef->cur_ptr); /* Next prepare read to complete the read */ |