mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-11-10 12:47:40 +01:00
Added persistent config for the rfspace source's hostname and port
This commit is contained in:
parent
290bf5e32a
commit
1185e4e114
@ -37,7 +37,12 @@ public:
|
||||
handler.tuneHandler = tune;
|
||||
handler.stream = &stream;
|
||||
|
||||
strcpy(hostname, "192.168.0.111");
|
||||
// Load config
|
||||
config.acquire();
|
||||
std::string hostStr = config.conf["hostname"];
|
||||
strcpy(hostname, hostStr.c_str());
|
||||
port = config.conf["port"];
|
||||
config.release();
|
||||
|
||||
sigpath::sourceManager.registerSource("RFspace", &handler);
|
||||
}
|
||||
@ -313,7 +318,7 @@ private:
|
||||
|
||||
MOD_EXPORT void _INIT_() {
|
||||
json def = json({});
|
||||
def["hostname"] = "localhost";
|
||||
def["hostname"] = "192.168.0.111";
|
||||
def["port"] = 50000;
|
||||
def["devices"] = json::object();
|
||||
config.setPath(options::opts.root + "/rfspace_config.json");
|
||||
|
Loading…
Reference in New Issue
Block a user