Results 1 to 2 of 2

Thread: IceGrid: using Windows network drives

  1. #1
    mpugach is offline Registered User
    Name: Michael Pugach
    Organization: StrategyRunner
    Project: StrategyRunner
    Join Date
    Aug 2006
    Posts
    3

    IceGrid: using Windows network drives

    Ice: Ice-3.2.1 for C++
    OS: Windows XP
    Compiler: VS 2005

    I'm trying to install IceGridNode/Registry as a Windows Service putting data directory on a Windows network drive. When Windows starts a service it does not use network drive letters defined for a Windows account. The only way to define Grid’s data directory is to use shared resource name (\\server name\share name\directory name). Currently Ice 3.2.1 for C++ does not support that. In order to make it work I did two fixes. The second fix is intended for IceBox activated by Grid.

    1. File: Ice-3.2.1/src/IcePatch2/Util.cpp
    Function: string IcePatch2::simplify(const string& path)
    Line: 280

    Change

    #ifdef _WIN32
    for(pos = 0; pos < result.size(); ++pos)
    {
    if(result[pos] == '\\')
    {
    result[pos] = '/';
    }
    }
    #endif

    to

    #ifdef _WIN32
    // In case of network drive skip first two backslashes
    if(result.find("\\\\") != string::npos)
    {
    pos = 2;
    }
    else
    {
    pos = 0;
    }

    for(; pos < result.size(); ++pos)
    {
    if(result[pos] == '\\')
    {
    result[pos] = '/';
    }
    }
    #endif

    2. File: Ice-3.2.1/src/IceUtil/options.cpp
    Function: IceUtil::Options::StringVector IceUtil::Options::split(const string& line)
    Line: 323

    Change

    case '"':
    case '\\':
    case '\n':
    {
    arg.push_back(c);
    break;
    }

    to

    case '"':
    case '\\':
    case '\n':
    {
    arg.push_back(c);
    #ifdef WIN32
    // Add a second backslash for network drive in Windows
    if (c == '\\')
    {
    arg.push_back(c);
    }
    #endif
    break;
    }
    Michael Pugach
    Strategy Runner Ltd.
    www.strategyrunner.com

  2. #2
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi Michael,

    Thanks for the bug report, we'll look into this.

    Cheers,
    Benoit.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Alternative to IceGrid Windows Service
    By jharriot in forum Comments
    Replies: 0
    Last Post: 08-03-2010, 08:21 PM
  2. Replies: 1
    Last Post: 06-30-2010, 06:51 PM
  3. Replies: 4
    Last Post: 10-09-2007, 09:32 AM
  4. Problem using icegrid as windows service
    By Vivien Delage in forum Help Center
    Replies: 2
    Last Post: 08-22-2007, 09:45 AM
  5. How to use a new network ?
    By mykael in forum Help Center
    Replies: 2
    Last Post: 08-07-2006, 05:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •