fix logger: sscanf was used wrong for custom topics file

using scanf with %s reads until the first whitespace, which included the
comma (as per C standard and tested on linux). Behavior on NuttX differs.

This makes it work on both Linux and Nuttx.
This commit is contained in:
Beat Küng
2017-01-09 11:09:37 +01:00
parent b8afc97959
commit 30f80515ec
2 changed files with 15 additions and 6 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ public:
* (because it does not write an ADD_LOGGED_MSG message).
* @param name topic name
* @param interval limit rate if >0, otherwise log as fast as the topic is updated.
* @return 0 on success
* @return -1 on error, file descriptor otherwise
*/
int add_topic(const char *name, unsigned interval);