projects
/
pihpsdr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56faebf
)
Add check for MAX_DEVICES to STEMlab discovery
author
Markus Großer
<markus.grosser2+git@gmail.com>
Sat, 18 Nov 2017 15:26:08 +0000
(16:26 +0100)
committer
Markus Großer
<markus.grosser2+git@gmail.com>
Sat, 18 Nov 2017 15:26:08 +0000
(16:26 +0100)
stemlab_discovery.c
patch
|
blob
|
history
diff --git
a/stemlab_discovery.c
b/stemlab_discovery.c
index 154d923c3824078c37d5831592df3b150bdb3d65..5e8e7050c419d2339be942ed77094d9878bd266b 100644
(file)
--- a/
stemlab_discovery.c
+++ b/
stemlab_discovery.c
@@
-188,6
+188,10
@@
static void new_service_cb(GaServiceBrowser *browser, gint if_index, GaProtocol
if (1 != sscanf(name, "rp-%6x HTTP", &mac_buffer)) {
return;
}
+ if (devices >= MAX_DEVICES) {
+ fprintf(stderr, ERROR_PREFIX "Maximum number of devices (%d) reached\n",
+ MAX_DEVICES);
+ }
if (protocol != AVAHI_PROTO_INET) {
fprintf(stderr, ERROR_PREFIX "found %.9s via IPv6, skipping ...\n", name);
return;