ieee802154_req_data: Don't modify the IOB until we are certain that no EINTR errors will occur. Otherwise, the retry will fail

This commit is contained in:
Gregory Nutt
2017-06-20 14:27:22 -06:00
parent 192bacbd7f
commit d9f549121c
3 changed files with 33 additions and 9 deletions
+10
View File
@@ -444,6 +444,9 @@ int sixlowpan_queue_frames(FAR struct ieee802154_driver_s *ieee,
/* Add the first frame to the IOB queue */
ninfo("Queuing frame io_len=%u io_offset=%u\n",
iob->io_len, iob->io_offset);
qhead = iob;
qtail = iob;
@@ -522,6 +525,9 @@ int sixlowpan_queue_frames(FAR struct ieee802154_driver_s *ieee,
/* Add the next frame to the tail of the IOB queue */
ninfo("Queuing frame io_len=%u io_offset=%u\n",
iob->io_len, iob->io_offset);
qtail->io_flink = iob;
qtail = iob;
@@ -544,6 +550,7 @@ int sixlowpan_queue_frames(FAR struct ieee802154_driver_s *ieee,
/* And submit the frame to the MAC */
ninfo("Submitting framelist\n");
ret = sixlowpan_frame_submit(ieee, &meta, iob);
if (ret < 0)
{
@@ -580,6 +587,9 @@ int sixlowpan_queue_frames(FAR struct ieee802154_driver_s *ieee,
/* And submit the frame to the MAC */
ninfo("Submitting frame length=%u io_offset=%u\n",
iob->io_len, iob->io_offset);
ret = sixlowpan_frame_submit(ieee, &meta, iob);
if (ret < 0)
{