Преглед изворни кода

* repeater CLI: 'neighbors' command now responds with "-none-" if no neighbors

Scott Powell пре 1 година
родитељ
комит
c0870960d6
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      examples/simple_repeater/main.cpp

+ 3 - 0
examples/simple_repeater/main.cpp

@@ -666,6 +666,9 @@ public:
       while (*dp) dp++;   // find end of string
     }
 #endif
+    if (dp == reply) {   // no neighbours, need empty response
+      strcpy(dp, "-none-"); dp += 6;
+    }
     *dp = 0;  // null terminator
   }