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 338274 - Broadcast=false do not works
Broadcast=false do not works
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.14.x
Other All
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-12 22:14 UTC by Tiago Vignatti
Modified: 2006-04-18 21:36 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Finally fix broadcast :) (677 bytes, patch)
2006-04-16 04:11 UTC, Tiago Vignatti
none Details | Review

Description Tiago Vignatti 2006-04-12 22:14:25 UTC
Please describe the problem:
In gdm config file, when Broadcast=false is set it works like Broadcast=true.

To isolate the problem, I am only modifying /usr/share/gdm/defaults.conf for
test cases. But, of course, I had tried all config files combinations
(/etc/gdm/gdm.conf{,-custom})

Steps to reproduce:
1. Just set Broadcast to false and it don't work.


Actual results:


Expected results:


Does this happen every time?
Yes

Other information:
I hacked the code a little bit, but I still not recognize the problem. In my
case, which I don't use broadcast, I did a workaround that is only comment out
the first call of gdm_chooser_find_bcaddr function, on ,
gui/gdmchooser.c:gdm_chooser_add_hosts. Just like:

                if (strcmp (name, "BROADCAST") == 0) {
//                      gdm_chooser_find_bcaddr ();
                        continue;
                }

So I put my hosts at "Host" field and the funny thing is that "Broadcast" is
need to be set to True. Thus, with these workaround above, and "Broadcast=True",
"Host=foo, bar" the broadcast becomes false and it works properly for me.

My suggestion is to change this define: 
daemon/gdm.h:#define GDM_KEY_BROADCAST "chooser/Broadcast=true"
Comment 1 Brian Cameron 2006-04-13 22:20:25 UTC
I think I know what the problem may be.  

Could you edit gui/gdmchooser.c and notice this line (it appears twice in gdm_read_config and gdm_reread_config)

        gdm_config_get_string   (GDM_KEY_BROADCAST);

Please change the function call to

        gdm_config_get_bool     (GDM_KEY_BROADCAST);

This may be causing the problem since the key is really a bool not a string, 
so this code is in error.  I fixed this in CVS head.

Does this fix the problem?  You may also need to backout some of the hacks you put in place above to workaround the problem you report.

Comment 2 Brian Cameron 2006-04-13 22:22:23 UTC
This is a duplciate bug.  Note that the needed file is in the attachment of the duplciate bug, so you can get past your compile issue.



*** This bug has been marked as a duplicate of 338079 ***
Comment 3 Brian Cameron 2006-04-14 18:20:05 UTC
Sorry, didn't mean to mark this as a duplicate - so reopening.

Did this fix your problem, so I can close the bug?
Comment 4 Tiago Vignatti 2006-04-16 04:11:56 UTC
Created attachment 63620 [details] [review]
Finally fix broadcast :)

I did fix the broadcast config file option and remove 3 lines that make non sense to me. Before remove these 3 lines, when "Hosts="(empty) and "Broadcast=false", gdm made broadcast.
Comment 5 Brian Cameron 2006-04-17 21:43:39 UTC
Tiago.  Thanks for the posting.  You are right that the way GdmHosts was being
set up was incorrect.  I believe I have fixed this in CVS head, though not quite in the same way you suggest in your patch.

I'm a bit confused about the need to remove this code:

-	if (bcaddr == NULL &&
-	    queryaddr == NULL)
-		gdm_chooser_find_bcaddr ();
+//	if (bcaddr == NULL &&
+//	    queryaddr == NULL)
+//		gdm_chooser_find_bcaddr ();

Why is queryaddr NULL in your situation?  Also what problems does this code cause you?  Even if this function fails, I don't think it would cause 
gdmchooser to exit or otherwise fail.
Comment 6 Tiago Vignatti 2006-04-18 17:54:50 UTC
Hey Brian! I wasn't clear enough before. I don't see any reason to do broadcast when there isn't hosts set manually ("Hosts=") and even broadcast is set to no ("Broadcast=false") in conf file. 

Well, as I said to you, I saw gdm code for the first time one week ago. So, I'm not sure if these 3 lines do what I say above.

Anyaway, the bug was already fixed :)
Comment 7 Brian Cameron 2006-04-18 20:47:56 UTC
Well, the code only calls gdm_chooser_find_bcaddr if both bcaddr and querryaddr is NULL.  I suspect this is an error condition, and the function doesn't actually get called in the normal case.  Unless you notice both being NULL.

Anyway, I think the bug is fixed, so I'm closing it.  Please reopen if there is any work left to be done.  If you could test and verify that gdm2 from CVS head works okay that would be nice.
Comment 8 Tiago Vignatti 2006-04-18 21:36:55 UTC
Tested. Works okay! Thanks Brian