mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Added debugging screen to alpha and beta builds. Dev task #73.
This commit is contained in:
@@ -98,23 +98,8 @@ class ModemPlugin implements DuplexPlugin, Modem.Callback {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean resetModem() {
|
||||
if(!running) return false;
|
||||
for(String portName : serialPortList.getPortNames()) {
|
||||
if(LOG.isLoggable(INFO))
|
||||
LOG.info("Trying to initialise modem on " + portName);
|
||||
modem = modemFactory.createModem(this, portName);
|
||||
try {
|
||||
if(!modem.start()) continue;
|
||||
if(LOG.isLoggable(INFO))
|
||||
LOG.info("Initialised modem on " + portName);
|
||||
return true;
|
||||
} catch(IOException e) {
|
||||
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
|
||||
}
|
||||
}
|
||||
running = false;
|
||||
return false;
|
||||
public boolean isRunning() {
|
||||
return running;
|
||||
}
|
||||
|
||||
public boolean shouldPoll() {
|
||||
@@ -180,6 +165,25 @@ class ModemPlugin implements DuplexPlugin, Modem.Callback {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean resetModem() {
|
||||
if(!running) return false;
|
||||
for(String portName : serialPortList.getPortNames()) {
|
||||
if(LOG.isLoggable(INFO))
|
||||
LOG.info("Trying to initialise modem on " + portName);
|
||||
modem = modemFactory.createModem(this, portName);
|
||||
try {
|
||||
if(!modem.start()) continue;
|
||||
if(LOG.isLoggable(INFO))
|
||||
LOG.info("Initialised modem on " + portName);
|
||||
return true;
|
||||
} catch(IOException e) {
|
||||
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
|
||||
}
|
||||
}
|
||||
running = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
public DuplexTransportConnection createConnection(ContactId c) {
|
||||
if(!running) return null;
|
||||
// Get the ISO 3166 code for the caller's country
|
||||
|
||||
Reference in New Issue
Block a user