GNOME Bugzilla – Bug 158799
QUERY_LOGOUT_ACTION returns wrong values
Last modified: 2005-04-20 00:35:42 UTC
GDM sometimes returns only "OK" if it is queried for the available logout actions. This happens because "OK" is written to the socket first and the writes afterwards fail from time to time. The "gdm_connection_write" function returns a success boolean but it does not get checked. All this together results in wrong GDM answers. I attach a patch wich fixes it for the QUERY_LOGOUT_ACTION part. The patch is very simple: Instead of writing each msg seperate to the socket concat all messages and write them as a whole. The "gdm_connection_write" and "gdm_connection_printf" calls replaced by g_string_append were those functions wich failed from time to time. This is surely not the all in one solution but i think, socket streams should not be constructed the way gdm does it atm because it may result in exactly those errors i ran into.
Created attachment 33958 [details] [review] Patch to fix the QUERY_LOGOUT_ACTION response
George? Any comments on this one?
Confirming bug and poking george again.
In a private mail you mention that this patch is needed to make gdm2 interact better with gnome-panel, but you don't mention anything about this in the bug report. Please explain what is broken more clearly and provide a testcase which demonstrates exactly what this patch fixes. It would also be useful to include information about why gnome-panel and gdm2 are having problems communicating together.
Fixed in CVS head. I went ahed and fixed the other flexiserver commands so they don't send the data in chunks using the same technique. Also fixed up the logic a bit so gdm_connection_printf is used instead of building a temporary string and calling gdm_connection_write.