Are GnomeVFSVolume pointers supposed to be unique?



Hi,

I'm debugging an interesting problem in nautilus/gnome-vfs.  From a
debug log of Nautilus, I have this:

0x817ba88 2007/10/23 10:27:48.2286 (desktop-links): Initializing desktop link monitor
0x817ba88 2007/10/23 10:27:50.6678 (drives-volumes): Refreshing drive and volume links
0x817ba88 2007/10/23 10:27:50.8848 (drives-volumes):     * Creating desktop link "TheFrozenThrone" for volume /org/freedesktop/Hal/devices/volume_label_TheFrozenThrone (0x81ba330)
..
.. later ...
..
0x817ba88 2007/10/23 10:27:51.8862 (drives-volumes): Volume /org/freedesktop/Hal/devices/volume_label_TheFrozenThrone (0x81f37d0) got mounted

(sorry for the long lines)

When it says "Creating desktop link", it is the initial pass in
nautilus-desktop-link-monitor that calls
gnome_vfs_volume_monitor_get_mounted_volumes().  You can see that it
gives us a GnomeVFSVolume* equal to 0x81ba330, for a certain HAL UDI.

Later, we get a "volume mounted" signal for the *same* HAL UDI, but we
get a different GnomeVFSVolume* of 0x81f37d0.  The code in Nautilus then
gets quite confused, since it assumes that GnomeVFSVolume pointers
identify volumes uniquely.  Is this assumption correct?

I haven't finished digging into the gnome-vfs code yet, but
gnome-vfs-volume-monitor-client.c is decoding a volume from the DBus
signal, and indeed it creates a new volume object.  So I don't know if
the daemon should be uniquifying the volumes, or not re-sending "volume
mounted" signals for volumes that are already mounted, or if Nautilus's
assumptions are just wrong.  Does anyone know what's the intended
behavior here?

Thanks,

  Federico



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]