apple / ccs-calendarserver

The Calendar and Contacts Server.
https://www.calendarserver.org
Apache License 2.0
486 stars 136 forks source link

Exception in recvfd #381

Closed macosforgebot closed 11 years ago

macosforgebot commented 11 years ago

Axel.Rau@… originally submitted this as ticket:801


While trying to connect to the server, I'm getting:


[caldav-0] --- <exception caught here> ---

[caldav-0] File "/usr/local/lib/python2.7/site-packages/twisted/internet/selectreactor.py", line 150, in _doReadOrWrite

[caldav-0] why = getattr(selectable, method)()

[caldav-0] File "/usr/local/lib/python2.7/site-packages/Calendar_and_Contacts_Server-4.2-py2.7-freebsd-8.2-RELEASE-p9-amd64.egg/twext/internet/sendfdport.py", line 281, in doRead

[caldav-0] fd, description = recvfd(self.fd)

[caldav-0] File "/usr/local/lib/python2.7/site-packages/Calendar_and_Contacts_Server-4.2-py2.7-freebsd-8.2-RELEASE-p9-amd64.egg/twext/python/sendfd.py", line 65, in recvfd

[caldav-0] [unpackedFD] = unpack("i", packedFD)

[caldav-0] struct.error: unpack requires a string argument of length 4

--- This happens on 64 bit architecture, verified on FreeBSD 8.2 and 9.1.

Further investigation shows, that 8 bytes are returned instead of 4.

Patch for sendfd.py attached.

macosforgebot commented 11 years ago

Axel.Rau@… originally submitted this as attachment:sendfd.diff:⁠ticket:801


diff --git a/twext/python/sendfd.py b/twext/python/sendfd.py

macosforgebot commented 11 years ago

@wsanchez originally submitted this as comment:1:⁠ticket:801


Committed in r10943.

Thanks for the patch.