@Override public int compare ( Address o1, Address o2 ) { Integer fail1 = SmbTransportPoolImpl.this.failCounts.get(o1.getHostAddress()); Integer fail2 = SmbTransportPoolImpl.this.failCounts.get(o2.getHostAddress()); if ( fail1 == null ) { fail1 = 0; } if ( fail2 == null ) { fail2 = 0; } return Integer.compare(fail1, fail2); }
@Override public int compare ( Address o1, Address o2 ) { Integer fail1 = SmbTransportPoolImpl.this.failCounts.get(o1.getHostAddress()); Integer fail2 = SmbTransportPoolImpl.this.failCounts.get(o2.getHostAddress()); if ( fail1 == null ) { fail1 = 0; } if ( fail2 == null ) { fail2 = 0; } return Integer.compare(fail1, fail2); }
private static String getRPCTarget ( CIFSContext ctx, SmbResourceLocator loc, Address serverAddress ) { // Try to stick to the same server. However if we are using kerberos authentication we need to use the name. // The comment about composite share lists was wrong, we do not iterate over multiple targets. Credentials creds = ctx.getCredentials(); if ( creds instanceof Kerb5Authenticator && serverAddress.getHostName() != null ) { return serverAddress.getHostName(); } return serverAddress.getHostAddress(); }
private static String getRPCTarget ( CIFSContext ctx, SmbResourceLocator loc, Address serverAddress ) { // Try to stick to the same server. However if we are using kerberos authentication we need to use the name. // The comment about composite share lists was wrong, we do not iterate over multiple targets. Credentials creds = ctx.getCredentials(); if ( creds instanceof Kerb5Authenticator && serverAddress.getHostName() != null ) { return serverAddress.getHostName(); } return serverAddress.getHostAddress(); }
String host = trans.getRemoteAddress().getHostAddress(); try { host = trans.getRemoteAddress().getHostName();
String host = trans.getRemoteAddress().getHostAddress(); try { host = trans.getRemoteAddress().getHostName();
if ( this.localAddr != null ) this.socket.bind(new InetSocketAddress(this.localAddr, this.localPort)); this.socket.connect(new InetSocketAddress(this.address.getHostAddress(), 139), tc.getConfig().getConnTimeout()); this.socket.setSoTimeout(tc.getConfig().getSoTimeout());
if ( this.localAddr != null ) this.socket.bind(new InetSocketAddress(this.localAddr, this.localPort)); this.socket.connect(new InetSocketAddress(this.address.getHostAddress(), 139), tc.getConfig().getConnTimeout()); this.socket.setSoTimeout(tc.getConfig().getSoTimeout());
Address addr = this.ctx.getNameServiceClient().getNbtByName(NbtAddress.MASTER_BROWSER_NAME, 0x01, null); this.addresses = new UniAddress[1]; this.addresses[ 0 ] = this.ctx.getNameServiceClient().getByName(addr.getHostAddress());
Address addr = this.ctx.getNameServiceClient().getNbtByName(NbtAddress.MASTER_BROWSER_NAME, 0x01, null); this.addresses = new UniAddress[1]; this.addresses[ 0 ] = this.ctx.getNameServiceClient().getByName(addr.getHostAddress());
String hostAddress = addr.getHostAddress(); Integer failCount = this.failCounts.get(hostAddress); if ( failCount == null ) {
String hostAddress = addr.getHostAddress(); Integer failCount = this.failCounts.get(hostAddress); if ( failCount == null ) {
if ( this.localAddr != null ) this.socket.bind(new InetSocketAddress(this.localAddr, this.localPort)); this.socket.connect(new InetSocketAddress(this.address.getHostAddress(), prt), this.transportContext.getConfig().getConnTimeout()); this.socket.setSoTimeout(this.transportContext.getConfig().getSoTimeout());
if ( this.localAddr != null ) this.socket.bind(new InetSocketAddress(this.localAddr, this.localPort)); this.socket.connect(new InetSocketAddress(this.address.getHostAddress(), prt), this.transportContext.getConfig().getConnTimeout()); this.socket.setSoTimeout(this.transportContext.getConfig().getSoTimeout());
log.debug("Connecting in state " + this.state + " addr " + this.address.getHostAddress());
log.debug("Connecting in state " + this.state + " addr " + this.address.getHostAddress());
try ( SmbFile browser = (SmbFile) parent.resolve(addr.getHostAddress()) ) { try ( SmbTreeHandleImpl th = browser.ensureTreeConnected() ) { if ( th.isSMB2() ) {
try ( SmbFile browser = (SmbFile) parent.resolve(addr.getHostAddress()) ) { try ( SmbTreeHandleImpl th = browser.ensureTreeConnected() ) { if ( th.isSMB2() ) {
String host = this.getTargetHost(); if ( host == null ) { host = trans.getRemoteAddress().getHostAddress(); try { host = trans.getRemoteAddress().getHostName();
String host = this.getTargetHost(); if ( host == null ) { host = trans.getRemoteAddress().getHostAddress(); try { host = trans.getRemoteAddress().getHostName();