diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-20 14:55:32 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-20 08:12:03 +0200 |
commit | a1f04e8abc761ef1ba211420ff1dbda50fcf527d (patch) | |
tree | 77f452c87c7e859341728e2835bd7493b6d8c9c7 /libcli | |
parent | 018f4a5889743f742a59e9ad72056b2ea09adfe9 (diff) | |
download | samba-a1f04e8abc761ef1ba211420ff1dbda50fcf527d.tar.gz samba-a1f04e8abc761ef1ba211420ff1dbda50fcf527d.tar.bz2 samba-a1f04e8abc761ef1ba211420ff1dbda50fcf527d.zip |
libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol
The two error tables need to be combined, but for now seperate the names.
(As the common parts of the tree now use the _common function,
errmap_unix.c must be included in the s3 autoconf build).
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/auth/msrpc_parse.c | 6 | ||||
-rw-r--r-- | libcli/cldap/cldap.c | 8 | ||||
-rw-r--r-- | libcli/echo/echo.c | 10 | ||||
-rw-r--r-- | libcli/nbt/namerefresh.c | 2 | ||||
-rw-r--r-- | libcli/nbt/nameregister.c | 4 | ||||
-rw-r--r-- | libcli/util/errmap_unix.c | 2 | ||||
-rw-r--r-- | libcli/util/error.h | 2 | ||||
-rw-r--r-- | libcli/util/tstream.c | 2 |
8 files changed, 18 insertions, 18 deletions
diff --git a/libcli/auth/msrpc_parse.c b/libcli/auth/msrpc_parse.c index bdbba3d76c..8b64e98feb 100644 --- a/libcli/auth/msrpc_parse.c +++ b/libcli/auth/msrpc_parse.c @@ -78,7 +78,7 @@ NTSTATUS msrpc_gen(TALLOC_CTX *mem_ctx, s, &n); if (!ret) { va_end(ap); - return map_nt_error_from_unix(errno); + return map_nt_error_from_unix_common(errno); } pointers[i].length = n; pointers[i].length -= 2; @@ -92,7 +92,7 @@ NTSTATUS msrpc_gen(TALLOC_CTX *mem_ctx, s, &n); if (!ret) { va_end(ap); - return map_nt_error_from_unix(errno); + return map_nt_error_from_unix_common(errno); } pointers[i].length = n; pointers[i].length -= 1; @@ -108,7 +108,7 @@ NTSTATUS msrpc_gen(TALLOC_CTX *mem_ctx, s, &n); if (!ret) { va_end(ap); - return map_nt_error_from_unix(errno); + return map_nt_error_from_unix_common(errno); } pointers[i].length = n; pointers[i].length -= 2; diff --git a/libcli/cldap/cldap.c b/libcli/cldap/cldap.c index 37b4f4913d..59c54eabea 100644 --- a/libcli/cldap/cldap.c +++ b/libcli/cldap/cldap.c @@ -284,7 +284,7 @@ static bool cldap_socket_recv_dgram(struct cldap_socket *c, nomem: in->recv_errno = ENOMEM; error: - status = map_nt_error_from_unix(in->recv_errno); + status = map_nt_error_from_unix_common(in->recv_errno); nterror: /* in connected mode the first pending search gets the error */ if (!c->connected) { @@ -337,7 +337,7 @@ NTSTATUS cldap_socket_init(TALLOC_CTX *mem_ctx, NULL, 0, &any); if (ret != 0) { - status = map_nt_error_from_unix(errno); + status = map_nt_error_from_unix_common(errno); goto nterror; } local_addr = any; @@ -351,7 +351,7 @@ NTSTATUS cldap_socket_init(TALLOC_CTX *mem_ctx, ret = tdgram_inet_udp_socket(local_addr, remote_addr, c, &c->sock); if (ret != 0) { - status = map_nt_error_from_unix(errno); + status = map_nt_error_from_unix_common(errno); goto nterror; } talloc_free(any); @@ -669,7 +669,7 @@ static void cldap_search_state_queue_done(struct tevent_req *subreq) talloc_free(subreq); if (ret == -1) { NTSTATUS status; - status = map_nt_error_from_unix(sys_errno); + status = map_nt_error_from_unix_common(sys_errno); DLIST_REMOVE(state->caller.cldap->searches.list, state); ZERO_STRUCT(state->caller.cldap); tevent_req_nterror(req, status); diff --git a/libcli/echo/echo.c b/libcli/echo/echo.c index 271f71b0ae..b6005cb32c 100644 --- a/libcli/echo/echo.c +++ b/libcli/echo/echo.c @@ -75,20 +75,20 @@ struct tevent_req *echo_request_send(TALLOC_CTX *mem_ctx, ret = tsocket_address_inet_from_strings(state, "ip", NULL, 0, &local_addr); if (ret != 0) { - tevent_req_nterror(req, map_nt_error_from_unix(ret)); + tevent_req_nterror(req, map_nt_error_from_unix_common(ret)); return tevent_req_post(req, ev); } ret = tsocket_address_inet_from_strings(state, "ip", server_addr_string, ECHO_PORT, &server_addr); if (ret != 0) { - tevent_req_nterror(req, map_nt_error_from_unix(ret)); + tevent_req_nterror(req, map_nt_error_from_unix_common(ret)); return tevent_req_post(req, ev); } ret = tdgram_inet_udp_socket(local_addr, server_addr, state, &dgram); if (ret != 0) { - tevent_req_nterror(req, map_nt_error_from_unix(ret)); + tevent_req_nterror(req, map_nt_error_from_unix_common(ret)); return tevent_req_post(req, ev); } @@ -132,7 +132,7 @@ static void echo_request_get_reply(struct tevent_req *subreq) TALLOC_FREE(subreq); if (len == -1 && err != 0) { - tevent_req_nterror(req, map_nt_error_from_unix(err)); + tevent_req_nterror(req, map_nt_error_from_unix_common(err)); return; } @@ -168,7 +168,7 @@ static void echo_request_done(struct tevent_req *subreq) TALLOC_FREE(subreq); if (len == -1 && err != 0) { - tevent_req_nterror(req, map_nt_error_from_unix(err)); + tevent_req_nterror(req, map_nt_error_from_unix_common(err)); return; } diff --git a/libcli/nbt/namerefresh.c b/libcli/nbt/namerefresh.c index 79c6c1f2ea..b525356c74 100644 --- a/libcli/nbt/namerefresh.c +++ b/libcli/nbt/namerefresh.c @@ -331,7 +331,7 @@ _PUBLIC_ NTSTATUS nbt_name_refresh_wins(struct nbt_name_socket *nbtsock, } if (!tevent_req_poll(subreq, ev)) { - status = map_nt_error_from_unix(errno); + status = map_nt_error_from_unix_common(errno); talloc_free(frame); return status; } diff --git a/libcli/nbt/nameregister.c b/libcli/nbt/nameregister.c index 204fb6f328..ff5418c85e 100644 --- a/libcli/nbt/nameregister.c +++ b/libcli/nbt/nameregister.c @@ -283,7 +283,7 @@ NTSTATUS nbt_name_register_bcast(struct nbt_name_socket *nbtsock, } if (!tevent_req_poll(subreq, ev)) { - status = map_nt_error_from_unix(errno); + status = map_nt_error_from_unix_common(errno); talloc_free(frame); return status; } @@ -498,7 +498,7 @@ _PUBLIC_ NTSTATUS nbt_name_register_wins(struct nbt_name_socket *nbtsock, } if (!tevent_req_poll(subreq, ev)) { - status = map_nt_error_from_unix(errno); + status = map_nt_error_from_unix_common(errno); talloc_free(frame); return status; } diff --git a/libcli/util/errmap_unix.c b/libcli/util/errmap_unix.c index 75b1e8d2fe..8f9f89835e 100644 --- a/libcli/util/errmap_unix.c +++ b/libcli/util/errmap_unix.c @@ -140,7 +140,7 @@ static const struct { /********************************************************************* Map an NT error code from a Unix error code. *********************************************************************/ -NTSTATUS map_nt_error_from_unix(int unix_error) +NTSTATUS map_nt_error_from_unix_common(int unix_error) { int i; diff --git a/libcli/util/error.h b/libcli/util/error.h index 771d7a661e..5c4dc10916 100644 --- a/libcli/util/error.h +++ b/libcli/util/error.h @@ -41,7 +41,7 @@ WERROR ntstatus_to_werror(NTSTATUS error); /********************************************************************* Map an NT error code from a Unix error code. *********************************************************************/ -NTSTATUS map_nt_error_from_unix(int unix_error); +NTSTATUS map_nt_error_from_unix_common(int unix_error); NTSTATUS nt_status_squash(NTSTATUS nt_status); diff --git a/libcli/util/tstream.c b/libcli/util/tstream.c index b287597c62..12cef9b6dd 100644 --- a/libcli/util/tstream.c +++ b/libcli/util/tstream.c @@ -106,7 +106,7 @@ static void tstream_read_pdu_blob_done(struct tevent_req *subreq) ret = tstream_readv_recv(subreq, &sys_errno); TALLOC_FREE(subreq); if (ret == -1) { - status = map_nt_error_from_unix(sys_errno); + status = map_nt_error_from_unix_common(sys_errno); tevent_req_nterror(req, status); return; } |