Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dreveman:Factory:cr
cr
cr-vncserver-id.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File cr-vncserver-id.diff of Package cr
? mothership/server/crconfig.py ? mothership/server/crconfig.pyc ? mothership/server/mothership.pyc Index: mothership/server/mothership.py =================================================================== RCS file: /cvsroot/chromium/cr/mothership/server/mothership.py,v retrieving revision 1.134 diff -u -r1.134 mothership.py --- mothership/server/mothership.py 14 Sep 2006 23:16:06 -0000 1.134 +++ mothership/server/mothership.py 12 Mar 2009 23:32:35 -0000 @@ -459,9 +459,13 @@ """This class is used for VNC/Replicate SPU configurations. The config file should create one of these - it'll be shared by all vncviewers that might be run.""" + SrvID = 0 + def __init__(self): """Create a new CR VNC Server node.""" CRNode.__init__(self, host="anyhost") + self.id = CRVNCServerNode.SrvID + CRVNCServerNode.SrvID += 1 class CRUTServerNode(CRNode): @@ -1522,7 +1526,23 @@ """do_newserver(sock, args) Called by a crserver to identify itself as a VNC/replication server.""" # One CRVNCServerNode instance will match any number of crservers. - # NOTE: we ignore args (the hostname) + # NOTE: we ignore second arg (the hostname) + try: + (id_string, hostname) = args.split( " " ) + srv_id = int(id_string) + except: + srv_id = -1 + + for node in self.nodes: + if isinstance(node,CRVNCServerNode): + if (srv_id == -1 or node.id == srv_id) and not node.spusloaded: + node.spusloaded = 1 + spuchain = "%d" % len(node.SPUs) + for spu in node.SPUs: + spuchain += " %d %s" % (spu.ID, spu.name) + sock.Success( spuchain ) + sock.node = node + return self.MatchNode("vncserver", sock, "anyhost") def do_crutproxy( self, sock, args ): Index: crserverlib/server_config.c =================================================================== RCS file: /cvsroot/chromium/cr/crserverlib/server_config.c,v retrieving revision 1.25 diff -u -r1.25 server_config.c --- crserverlib/server_config.c 12 Sep 2006 17:14:31 -0000 1.25 +++ crserverlib/server_config.c 12 Mar 2009 23:32:35 -0000 @@ -99,8 +99,13 @@ /* Identify ourselves to the mothership */ if (cr_server.vncMode) { + const char *srv_id = crGetenv ("CR_SERVER_ID_NUMBER"); + + if (!srv_id) + srv_id = "-1"; + /* we're running inside a vnc viewer */ - if (!crMothershipSendString( conn, response, "vncserver %s", hostname )) + if (!crMothershipSendString( conn, response, "vncserver %s %s", srv_id, hostname )) crError( "Bad Mothership response: %s", response ); } else {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor