celery/librabbitmq — pull request #47 by rogerhu (2014-06-18 07:31:10+00:00)
Title: Fix issues with hostname corruption when Python strings go out of scope.

We store references to hostname, userid, virtual_host, and password inside a state object
However, once those arguments leave scope, Python deallocates the memory.

In order to maintain these strings, we need to do custom malloc operations to store them.

I noticed this problem when putting a breakpoint on the kombu/transport/librabbitmq.py establish_connection() and attempted to print the Connection object. On multiple publishing, I noticed the Connection string object corrupted.

Also, string pointers shouldn't have strings defined by default should they?