-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// GEOM GEOMClient : tool to transfer BREP files from GEOM server to GEOM client
// File : GEOM_Client.cxx
// Author : Yves FRICAUD/Lucien PIGNOLONI
// Module : GEOM
// $Header$
-
+//
#include <Standard_Stream.hxx>
#include <Standard_Stream.hxx>
-#include <strstream>
+#include <sstream>
#include "GEOM_Client.hxx"
#include <SALOMEconfig.h>
Engines::Container_var ctn_server = geom->GetContainerRef();
long pid_server = ctn_server->getPID();
- if ( (pid_client==pid_server) && (strcmp(hst_client.c_str(), ctn_server->getHostName())==0) ) {
+ CORBA::String_var hostname = ctn_server->getHostName();
+ if ( pid_client == pid_server && !strcmp(hst_client.c_str(), hostname.in()) ) {
TopoDS_Shape* S = (TopoDS_Shape*)(aShape->getShape());
return(*S);
} else {
int sizebuf = SeqFile->length();
char* buf;
buf = (char*) &SeqFile[0];
- std::istrstream streamBrep(buf,sizebuf);
+ std::istringstream streamBrep(buf);
BRep_Builder aBuilder;
BRepTools::Read(S, streamBrep, aBuilder);
return(S);