Changeset 242f280 for protocols

Timestamp:
2016-02-18T11:17:08Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
0843bbe
Parents:
9456255
Message:

Fix a double free when calling proxy_disconnect() inside phb->func()

Fixes trac ticket #1248

proxy_connected() calls phb->func(), then tries to do phb_free() directly
afterwards, but that might have been freed by a proxy_disconnect() call
during the execution of that callback.

This one happened to several different people because some AIM server
broke recently.

This commit fixes it by implementing a phb_connected() function that
removes the PHB from the hash table before calling phb->func(), which
ensures that any proxy_disconnect() calls just close the fd and nothing
else.

(No files)

Note: See TracChangeset for help on using the changeset viewer.