move argument checks for psk and identity to WITH_MQTT, closes #250

This commit is contained in:
ldruschk
2018-07-14 21:00:22 +02:00
parent 0ccc01dba9
commit 9929716cd4

View File

@@ -1417,6 +1417,12 @@ int main(int argc, char **argv)
case 'p':
ud->port = atoi(optarg);
break;
case 20:
ud->psk = strdup(optarg);
break;
case 21:
ud->identity = strdup(optarg);
break;
#endif /* WITH_MQTT */
case 5:
geohash_setprec(atoi(optarg));
@@ -1443,13 +1449,6 @@ int main(int argc, char **argv)
if (ud->browser_apikey) free(ud->browser_apikey);
ud->browser_apikey = strdup(optarg);
break;
case 20:
ud->psk = strdup(optarg);
break;
case 21:
ud->identity = strdup(optarg);
break;
#endif
case 'D':
ud->skipdemo = FALSE;