Rework some of the SoupAuthNegotiate internals
There are several problems with the current state. The main problem is that the SoupMessage can outlive the SoupAuthNegotiate object and if the SoupMessage signals handlers are active then they could be called with invalid SoupAuthNegotiate object. To avoid that use the g_signal_connect_data() and increase the reference on the SoupAuthNegotiate object. Also rework how we are connecting the 'got_headers' signal handler to the SoupMessage object, so they are really connected only once, even if the GSS mechanism involves multiple rounds. The whole concept of how we are working with the SoupAuthNegotiateConnectionState is also wrong. When the connection state is created it's saved to the private structure and then accessed from there. The problem is that another state for different message could be created in the mean time and that one would overwrite the currently set (or if one would be freed then it would erase the one that is currently set). To solve this expose the SoupConnectionAuth's get_connection_state_for_message() and call it when we need the connection state object.
parent
97a69ff9
Please register or sign in to comment