r25917: ndr: move ndr_map_error2ntstatus to errormap.c
[ira/wip.git] / source4 / librpc / ndr / ndr.c
index 4ea36f82c82c8223663dc3de5965d504b02cdbf4..6a1850624b8a8be565eef5253ab3437631514954 100644 (file)
@@ -353,31 +353,6 @@ _PUBLIC_ void ndr_set_flags(uint32_t *pflags, uint32_t new_flags)
        (*pflags) |= new_flags;
 }
 
-NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err)
-{
-       switch (ndr_err) {
-       case NDR_ERR_SUCCESS:
-               return NT_STATUS_OK;
-       case NDR_ERR_BUFSIZE:
-               return NT_STATUS_BUFFER_TOO_SMALL;
-       case NDR_ERR_TOKEN:
-               return NT_STATUS_INTERNAL_ERROR;
-       case NDR_ERR_ALLOC:
-               return NT_STATUS_NO_MEMORY;
-       case NDR_ERR_ARRAY_SIZE:
-               return NT_STATUS_ARRAY_BOUNDS_EXCEEDED;
-       case NDR_ERR_INVALID_POINTER:
-               return NT_STATUS_INVALID_PARAMETER_MIX;
-       case NDR_ERR_UNREAD_BYTES:
-               return NT_STATUS_PORT_MESSAGE_TOO_LONG;
-       default:
-               break;
-       }
-
-       /* we should map all error codes to different status codes */
-       return NT_STATUS_INVALID_PARAMETER;
-}
-
 /*
   return and possibly log an NDR error
 */