Home Help Center

Glacier2 Rejecting Proxy

slypeteslypete Member Pete SylvesterOrganization: Coconaut StudiosProject: iPhone/iPod Game ✭✭
Hi,

I'm a undergrad student building a game server for an iPhone/iPod touch game. I'm basing my implementation largely off of Connections, namely issues 1-4 by Matthew Newhook. I'm also reviewing the newer chat demo extensively. I must say, it's quite a learning experience working with software written by the high profile developers here at ZeroC.

On the server, behind a firewall, is IceStorm and my game server. Additionally, Glacier2 is running with the usual internal and external endpoints.

Currently, I have a client connecting to the game server to obtain a session proxy from my SessionManager. Once the session is created, the client sets a callback proxy. Next, the client joins a game room and is returned a RoomParticipant proxy:
Ice::Identity ide;
ide.name = "observer.hello";
ide.category = router->getCategoryForClient();
Game::RoomObserverPrx observer = Game::RoomObserverPrx::uncheckedCast(adapter->add(new RoomObserverI("hello"), ide));
Game::RoomParticipantPrx room = session->join("hello", observer);

This all works great until the client attempts to invoke a RPC on the proxy returned from the server:
[ 11/28/08 22:21:01.093 glacier2router: Glacier2: 
accepted proxy 13b74369-e63d-4437-8913-4080bed454a9 -t:tcp -h 127.0.0.1 -p 10001]
[ 11/28/08 22:21:20.062 glacier2router: Glacier2: 
accepted proxy _hello/98282f39-1334-4658-bbb3-be86567e9fd5 -t:tcp -h 127.0.0.1 -p 10001]
[ 11/28/08 22:21:20.125 glacier2router: Glacier2: rejecting request: identity filter
identity: _hello/98282f39-1334-4658-bbb3-be86567e9fd5 ]

Here is my implementation of join:
Game::RoomParticipantPrx 
SessionI::join(const string& room, const Game::RoomObserverPrx& observer, const Ice::Current& c)
{
        IceUtil::Mutex::Lock lock(_mutex);

	Ice::Identity id;
	id.category = "_" + _name;
	id.name = IceUtil::generateUUID();

	return Game::RoomParticipantPrx::uncheckedCast(c.adapter->add(new RoomParticipantI(room, _name, observer), id));
}

I have no filters (identity or category) set on the router; it's using the defaults. The category in my join implementation makes you believe otherwise, but I was just following Matthew's articles.

I'm pretty sure this has something to do with the proxy's category, but I have been unable to nail it down. Any ideas for me?

Thanks,
Pete

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Pete,

    It's not clear to me why this happens if you don't set any filters. The trace indicates that the request is rejected by the identity filter and this should only occur if identity filters are setup either through configuration with the Glacier2.Filter.Identity.Accept property or dynamically using the interface returned by the Glacier::SessionControl identities() method. You're using Glacier2 from Ice-3.3.0, correct?

    Cheers,
    Benoit.
  • slypeteslypete Member Pete SylvesterOrganization: Coconaut StudiosProject: iPhone/iPod Game ✭✭
    Yes, I'm using Ice-3.3.0; however, I was able to solve the problem after commenting out these lines in my SessionManager:
    //Ice::IdentitySeq ids;
    //ids.push_back(proxy->ice_getIdentity());
    //sessionControl->identities()->add(ids);
    

    Thanks very much for pointing me in the right direction!

    Pete
Sign In or Register to comment.