#1 Fix the multiscreen issue

closed-fixed
nobody
None
5
2006-07-19
2005-01-09
bysse
No

protocol/display.py(530) : recv = self.socket.recv(2048)

2048 might be to small for X-servers with multiple
screens. Since the while-loop exits every time
something have been received, the maximum value of the
recv operation must be increased or the whole loop must
be rebuild.

/erik.bystrom@gmail.com

Discussion

  • Mike Grant

    Mike Grant - 2005-06-29

    Logged In: YES
    user_id=1175208

    Another possible patch in
    https://sourceforge.net/tracker/?func=detail&atid=110350&aid=1098695&group_id=10350

    Copy of the relevant part:
    I think I managed to track the problem down to an overused
    variable in
    Xlib/protocol/display.py.

    "recv" is used as a byte counter on line 530 (function
    send_and_recv) as:
    recv = self.socket.recv(2048)
    but this overwrites the function's argument "recv" (used to
    request all pending data be read) and causes the function to
    terminate after only one read iteration. In the case of a
    large reply (> 2048 bytes? such as on connection setup with
    a multihead display) requiring more than one iteration to
    get all the data, this causes the request reply not to be
    parsed.

    Renaming the second use of "recv" to "bytes_recv" (or
    whatever) appears to fix the error for me, e.g.
    if recieving:
    try:
    bytes_recv = self.socket.recv(2048)
    except socket.error, err:
    self.close_internal('server: %s' %
    err[1])
    raise self.socket_error

    if not bytes_recv:
    # Clear up, set a connection closed
    indicator and raise it
    self.close_internal('server')
    raise self.socket_error

    self.data_recv = self.data_recv + bytes_recv
    gotreq = self.parse_response(request)

     
  • Mike Grant

    Mike Grant - 2006-06-08

    Logged In: YES
    user_id=1175208

    Applied patch to CVS - hopefully fixed. May wish to revisit
    the loop later.

     
  • Mike Grant

    Mike Grant - 2006-07-19
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks