- Timestamp:
- May 3, 2018 8:00:03 PM (3 years ago)
- Branches:
- master
- Children:
- c734b84
- Parents:
- 7b2355a8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
apps/BOB/src/net/i2p/BOB/BOB.java
r7b2355a8 r6c88eb5 39 39 import net.i2p.client.I2PClient; 40 40 import net.i2p.util.I2PAppThread; 41 import net.i2p.util.PortMapper; 41 42 import net.i2p.util.SimpleTimer2; 42 43 … … 132 133 // private static int maxConnections = 0; 133 134 135 private final I2PAppContext _context; 134 136 private final Logger _log; 135 137 private final ClientAppManager _mgr; … … 159 161 */ 160 162 public BOB(I2PAppContext context, ClientAppManager mgr, String[] args) { 163 _context = context; 161 164 // If we were run from command line, log to stdout 162 165 boolean logToStdout = false; … … 219 222 File cfg = new File(configLocation); 220 223 if (!cfg.isAbsolute()) { 221 cfg = new File( I2PAppContext.getGlobalContext().getConfigDir(), configLocation);224 cfg = new File(_context.getConfigDir(), configLocation); 222 225 } 223 226 FileInputStream fi = null; … … 276 279 File cfg = new File(configLocation); 277 280 if (!cfg.isAbsolute()) { 278 cfg = new File( I2PAppContext.getGlobalContext().getConfigDir(), configLocation);281 cfg = new File(_context.getConfigDir(), configLocation); 279 282 } 280 283 FileOutputStream fo = null; … … 317 320 if (_mgr != null) 318 321 _mgr.register(this); 322 _context.portMapper().register(PortMapper.SVC_BOB, props.getProperty(PROP_BOB_HOST), 323 Integer.parseInt(props.getProperty(PROP_BOB_PORT))); 319 324 320 325 int i = 0; … … 354 359 } finally { 355 360 _log.info("BOB is now shutting down..."); 361 _context.portMapper().unregister(PortMapper.SVC_BOB); 356 362 // Clean up everything. 357 363 try {
Note: See TracChangeset
for help on using the changeset viewer.