Fix some missing error handlings
authorVolker Lendecke <vl@samba.org>
Sun, 5 Oct 2008 11:58:09 +0000 (13:58 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 5 Oct 2008 12:02:34 +0000 (14:02 +0200)
source3/lib/netapi/file.c
source3/lib/netapi/getdc.c
source3/lib/netapi/share.c

index 036af32f385afad2a5f37cf68a296e60416925bc..0d66be0eb171a9890da73703db10b970a896cc79 100644 (file)
@@ -47,7 +47,8 @@ WERROR NetFileClose_r(struct libnetapi_ctx *ctx,
                                            r->in.server_name,
                                            r->in.fileid,
                                            &werr);
-       if (!W_ERROR_IS_OK(werr)) {
+       if (!NT_STATUS_IS_OK(status)) {
+               werr = ntstatus_to_werror(status);
                goto done;
        }
 
index 07a6544af16fb95849846bc3f79066451a458ae9..76c0d0be2af7b598763ae5a69e036a072a2f24a1 100644 (file)
@@ -58,6 +58,10 @@ WERROR NetGetDCName_r(struct libnetapi_ctx *ctx,
                                       r->in.domain_name,
                                       (const char **)r->out.buffer,
                                       &werr);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               werr = ntstatus_to_werror(status);
+       }
  done:
 
        return werr;
index 1d0e1810f15bc8395133ce2d3f9e3ac87595ca78..e6aed360647311ea5a1fd61dd9d2615d1dbac25b 100644 (file)
@@ -271,7 +271,8 @@ WERROR NetShareDel_r(struct libnetapi_ctx *ctx,
                                           r->in.net_name,
                                           r->in.reserved,
                                           &werr);
-       if (!W_ERROR_IS_OK(werr)) {
+       if (!NT_STATUS_IS_OK(status)) {
+               werr = ntstatus_to_werror(status);
                goto done;
        }