From 4edb4666f465956c76c5b41ec9c8fc582dbea64a Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 29 Apr 2014 20:31:59 +0400 Subject: [PATCH] SALOME_TESTS/Grids/smesh/3D_mesh_NETGEN_02/C1 File descriptor 0 is valid --- src/DriverSTL/DriverSTL_R_SMDS_Mesh.cxx | 2 ++ src/SMDS/SMDS_VtkVolume.cxx | 2 +- src/SMESHUtils/SMESH_File.cxx | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/DriverSTL/DriverSTL_R_SMDS_Mesh.cxx b/src/DriverSTL/DriverSTL_R_SMDS_Mesh.cxx index a250b428a..53374c647 100644 --- a/src/DriverSTL/DriverSTL_R_SMDS_Mesh.cxx +++ b/src/DriverSTL/DriverSTL_R_SMDS_Mesh.cxx @@ -114,6 +114,8 @@ Driver_Mesh::Status DriverSTL_R_SMDS_Mesh::Perform() SMESH_File file( myFile, /*open=*/false ); if ( !file.open() ) { fprintf(stderr, ">> ERROR : cannot open file %s \n", myFile.c_str()); + if ( file.error().empty() ) + fprintf(stderr, ">> ERROR : %s \n", file.error().c_str()); return DRS_FAIL; } diff --git a/src/SMDS/SMDS_VtkVolume.cxx b/src/SMDS/SMDS_VtkVolume.cxx index e78e8d24b..f97e31969 100644 --- a/src/SMDS/SMDS_VtkVolume.cxx +++ b/src/SMDS/SMDS_VtkVolume.cxx @@ -719,6 +719,6 @@ int SMDS_VtkVolume::NbUniqueNodes() const */ SMDS_ElemIteratorPtr SMDS_VtkVolume::uniqueNodesIterator() const { - MESSAGE("uniqueNodesIterator"); + //MESSAGE("uniqueNodesIterator"); return SMDS_ElemIteratorPtr(new SMDS_VtkCellIterator(SMDS_Mesh::_meshList[myMeshId], myVtkID, GetEntityType())); } diff --git a/src/SMESHUtils/SMESH_File.cxx b/src/SMESHUtils/SMESH_File.cxx index d75cd108a..ade3256bb 100644 --- a/src/SMESHUtils/SMESH_File.cxx +++ b/src/SMESHUtils/SMESH_File.cxx @@ -78,7 +78,7 @@ bool SMESH_File::open() bool ok = ( _file != INVALID_HANDLE_VALUE ); #else _file = ::open(_name.data(), O_RDONLY ); - bool ok = ( _file > 0 ); + bool ok = ( _file >= 0 ); #endif if ( ok ) { -- 2.39.2