[riot-notifications] [RIOT-OS/RIOT] sx127x: ignore empty iolist element (#11215)

José Alamos notifications at github.com
Wed Mar 20 10:53:19 CET 2019


<!--
The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
-->

### Contribution description
fixes #11163 for the `sx127x` radio driver
<!--
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes
-->


### Testing procedure
Apply the following patch:
```
diff --git a/tests/driver_sx127x/main.c b/tests/driver_sx127x/main.c
index a009e7a2f..92fa0d18f 100644
--- a/tests/driver_sx127x/main.c
+++ b/tests/driver_sx127x/main.c
@@ -236,8 +236,8 @@ int send_cmd(int argc, char **argv)
            argv[1], (unsigned)strlen(argv[1]) + 1);
 
     iolist_t iolist = {
-        .iol_base = argv[1],
-        .iol_len = (strlen(argv[1]) + 1)
+        .iol_base = NULL,
+        .iol_len = 0
     };
 
     netdev_t *netdev = (netdev_t*) &sx127x;
```
Compile and flash wit b-l072z-lrwan1 or any compatible LoRaWAN board. 
Without this PR, it will crash due to an SPI assertion
<!--
Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output
-->


### Issues/PRs references
#11163 
<!--
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
-->

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/11215

-- Commit Summary --

  * sx127x: ignore empty iolist element

-- File Changes --

    M drivers/sx127x/sx127x_netdev.c (9)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11215.patch
https://github.com/RIOT-OS/RIOT/pull/11215.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11215
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190320/db8e4dc5/attachment.html>


More information about the notifications mailing list