The Samba-Bugzilla – Attachment 6242 Details for
Bug 7943
libsmbclient does not set errno of ECONNREFUSED
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 3.5
samba-3.5.x-libsmb_connection_refused.patch (text/plain), 1009 bytes, created by
Tsukasa HAMANO
on 2011-02-01 22:50:12 UTC
(
hide
)
Description:
patch for 3.5
Filename:
MIME Type:
Creator:
Tsukasa HAMANO
Created:
2011-02-01 22:50:12 UTC
Size:
1009 bytes
patch
obsolete
>diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c >index 6ad3bf9..297d6a7 100644 >--- a/source3/libsmb/libsmb_server.c >+++ b/source3/libsmb/libsmb_server.c >@@ -252,6 +252,7 @@ SMBC_server_internal(TALLOC_CTX *ctx, > uint32 fs_attrs = 0; > const char *username_used; > NTSTATUS status; >+ NTSTATUS status_try_first; > char *newserver, *newshare; > > zero_sockaddr(&ss); >@@ -435,6 +436,7 @@ again: > > status = cli_connect(c, server_n, &ss); > if (!NT_STATUS_IS_OK(status)) { >+ status_try_first = status; > > /* First connection attempt failed. Try alternate port. */ > c->port = port_try_next; >@@ -442,7 +444,12 @@ again: > status = cli_connect(c, server_n, &ss); > if (!NT_STATUS_IS_OK(status)) { > cli_shutdown(c); >- errno = ETIMEDOUT; >+ if(NT_STATUS_EQUAL(status_try_first, >+ NT_STATUS_CONNECTION_REFUSED)){ >+ errno = ECONNREFUSED; >+ }else{ >+ errno = ETIMEDOUT; >+ } > return NULL; > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 7943
:
6241
| 6242