The Samba-Bugzilla – Attachment 6241 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.2
samba-3.2.x-libsmb_connection_refused.patch (text/plain), 1007 bytes, created by
Tsukasa HAMANO
on 2011-02-01 22:49:49 UTC
(
hide
)
Description:
patch for 3.2
Filename:
MIME Type:
Creator:
Tsukasa HAMANO
Created:
2011-02-01 22:49:49 UTC
Size:
1007 bytes
patch
obsolete
>diff --git a/source/libsmb/libsmb_server.c b/source/libsmb/libsmb_server.c >index 91a77fe..569f851 100644 >--- a/source/libsmb/libsmb_server.c >+++ b/source/libsmb/libsmb_server.c >@@ -249,6 +249,7 @@ SMBC_server(TALLOC_CTX *ctx, > uint32 fs_attrs = 0; > const char *username_used; > NTSTATUS status; >+ NTSTATUS status_try_first; > > zero_sockaddr(&ss); > ZERO_STRUCT(c); >@@ -416,14 +417,19 @@ 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; > > 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