diff options
author | Bernard Normier <bernard@zeroc.com> | 2008-05-15 15:46:11 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2008-05-15 15:46:11 -0400 |
commit | f8f74a8d27fd7d672d681b7ad01031fc999ef89c (patch) | |
tree | 87b638adb39b3f2609e04418b33fca7f47de14cf /cpp | |
parent | using PHP 5.2.6 on Windows (diff) | |
download | ice-f8f74a8d27fd7d672d681b7ad01031fc999ef89c.tar.bz2 ice-f8f74a8d27fd7d672d681b7ad01031fc999ef89c.tar.xz ice-f8f74a8d27fd7d672d681b7ad01031fc999ef89c.zip |
Fixed HP crash
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/demo/book/lifecycle/FilesystemI.cpp | 9 | ||||
-rw-r--r-- | cpp/demo/book/lifecycle/Server.cpp | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/cpp/demo/book/lifecycle/FilesystemI.cpp b/cpp/demo/book/lifecycle/FilesystemI.cpp index 75695597c2f..89b7d982318 100644 --- a/cpp/demo/book/lifecycle/FilesystemI.cpp +++ b/cpp/demo/book/lifecycle/FilesystemI.cpp @@ -61,7 +61,14 @@ FilesystemI::NodeI::NodeI(const string& name, const DirectoryIPtr& parent) { // Create an identity. The root directory has the fixed identity "RootDir". // - _id.name = parent ? IceUtil::generateUUID() : string("RootDir"); + if(parent != 0) + { + _id.name = IceUtil::generateUUID(); + } + else + { + _id.name = "RootDir"; + } } // Slice File::read() operation. diff --git a/cpp/demo/book/lifecycle/Server.cpp b/cpp/demo/book/lifecycle/Server.cpp index ff99757a233..6c44e305745 100644 --- a/cpp/demo/book/lifecycle/Server.cpp +++ b/cpp/demo/book/lifecycle/Server.cpp @@ -29,7 +29,7 @@ public: // Create the root directory. // - DirectoryIPtr root = new DirectoryI(); + DirectoryIPtr root = new DirectoryI; root->activate(adapter); // All objects are created, allow client requests now. |