[AG-DEV] possible problem in VenueServer Code in Venue.py

Tobias Schiebeck Tobias.Schiebeck at manchester.ac.uk
Wed Jun 10 09:27:23 CDT 2009


Hi All,

looking at the Venue.py file in detail I've found a possible code
problem in the __AddCapabilitiesToStream (Venue.py Line 816 onwards)
method.

the current code : 

    def __AddCapabilitiesToStream(self, stream, capabilities):
        match = 0
        for cap in capabilities:
            for c in stream.capability:
                if c.matches(cap):
                    match = 1
            if not match:
                caps = stream.capability
                caps.append(cap)
                stream.capability = caps

seems to possibly adds too many capabilties to the stream. I think the
match = 0 should move inside the first loop.

I haven't seen any effects of this code on the server though.

Best Wishes

Tobias

-- 
---------------------------------------------------------------------
Tobias Schiebeck                    tobias.schiebeck at manchester.ac.uk
Research Computing Services           http://www.rcs.manchester.ac.uk
The University of Manchester                  tel: (+44) 161-275-0601
---------------------------------------------------------------------



More information about the ag-dev mailing list