After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 158799 - QUERY_LOGOUT_ACTION returns wrong values
QUERY_LOGOUT_ACTION returns wrong values
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.6.0.x
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2004-11-20 09:52 UTC by Raffaele Sandrini
Modified: 2005-04-20 00:35 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Patch to fix the QUERY_LOGOUT_ACTION response (2.00 KB, patch)
2004-11-20 09:54 UTC, Raffaele Sandrini
none Details | Review

Description Raffaele Sandrini 2004-11-20 09:52:49 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.
Comment 1 Raffaele Sandrini 2004-11-20 09:54:03 UTC
Created attachment 33958 [details] [review]
Patch to fix the QUERY_LOGOUT_ACTION response
Comment 2 Raffaele Sandrini 2004-12-23 23:00:56 UTC
George? Any comments on this one?
Comment 3 Luis Villa 2005-01-03 01:29:12 UTC
Confirming bug and poking george again.
Comment 4 Brian Cameron 2005-02-08 04:48:15 UTC
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.
Comment 5 Brian Cameron 2005-04-20 00:35:42 UTC
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.