~ubuntu-branches/debian/squeeze/hal/squeeze

« back to all changes in this revision

Viewing changes to hald/linux/addons/addon-storage.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2008-03-05 18:14:57 UTC
  • Revision ID: james.westby@ubuntu.com-20080305181457-fj989u7likg0vd6b
Tags: upstream-0.5.10+git20080301
ImportĀ upstreamĀ versionĀ 0.5.10+git20080301

Show diffs side-by-side

added added

removed removed

Lines of Context:
473
473
                }
474
474
        }
475
475
        
 
476
        /* set correct state on startup, this avoid endless loops if there was a media in the device on startup */
 
477
        if (media_status == MEDIA_STATUS_UNKNOWN) {
 
478
                if (got_media) 
 
479
                        media_status = MEDIA_STATUS_NO_MEDIA;
 
480
                else 
 
481
                        media_status = MEDIA_STATUS_GOT_MEDIA;  
 
482
        }
 
483
 
476
484
        switch (media_status) {
477
485
        case MEDIA_STATUS_GOT_MEDIA:
478
486
                if (!got_media) {
657
665
        }
658
666
        loop = g_main_loop_new (NULL, FALSE);
659
667
        dbus_connection_setup_with_g_main (con, NULL);
 
668
        dbus_connection_set_exit_on_disconnect (con, 0);
660
669
 
661
670
        dbus_error_init (&error);
662
671
        if ((ctx = libhal_ctx_init_direct (&error)) == NULL)