]> git.pld-linux.org Git - packages/GConf2.git/blob - workaround-crash.patch
- python3 patch from Debian
[packages/GConf2.git] / workaround-crash.patch
1 http://bugzilla.redhat.com/858348
2 http://bugzilla.redhat.com/755992
3
4 diff -up GConf-3.2.5/gconf/gconfd.c.workaround-crash GConf-3.2.5/gconf/gconfd.c
5 --- GConf-3.2.5/gconf/gconfd.c.workaround-crash 2012-03-07 13:08:55.000000000 -0500
6 +++ GConf-3.2.5/gconf/gconfd.c  2012-09-24 10:04:22.604652720 -0400
7 @@ -1053,63 +1053,6 @@ static GSList* main_loops = NULL;
8  static guint timeout_id = 0;
9  static gboolean need_log_cleanup = FALSE;
10  
11 -static gboolean
12 -periodic_cleanup_timeout(gpointer data)
13 -{  
14 -  if (need_db_reload)
15 -    {
16 -      gconf_log (GCL_INFO, _("SIGHUP received, reloading all databases"));
17 -
18 -      need_db_reload = FALSE;
19 -#ifdef HAVE_CORBA
20 -      logfile_save ();
21 -      shutdown_databases ();
22 -      init_databases ();
23 -      gconf_server_load_sources ();
24 -      logfile_read ();
25 -#endif
26 -#ifdef HAVE_DBUS
27 -      reload_databases ();
28 -#endif
29 -    }
30 -  
31 -  gconf_log (GCL_DEBUG, "Performing periodic cleanup, expiring cache cruft");
32 -  
33 -#ifdef HAVE_CORBA
34 -  drop_old_clients ();
35 -#endif
36 -  drop_old_databases ();
37 -
38 -#ifdef HAVE_DBUS
39 -  if (no_databases_in_use () && gconfd_dbus_client_count () == 0)
40 -#else
41 -  if (no_databases_in_use () && client_count () == 0)
42 -#endif
43 -    {
44 -      gconf_log (GCL_INFO, _("GConf server is not in use, shutting down."));
45 -      gconfd_main_quit ();
46 -      return FALSE;
47 -    }
48 -  
49 -  /* expire old locale cache entries */
50 -  gconfd_locale_cache_expire ();
51 -
52 -#ifdef HAVE_CORBA
53 -  if (!need_log_cleanup)
54 -    {
55 -      gconf_log (GCL_DEBUG, "No log file saving needed in periodic cleanup handler");
56 -      return TRUE;
57 -    }
58 -  
59 -  /* Compress the running state file */
60 -  logfile_save ();
61 -#endif
62 -
63 -  need_log_cleanup = FALSE;
64 -  
65 -  return TRUE;
66 -}
67 -
68  void
69  gconfd_need_log_cleanup (void)
70  {
71 @@ -1123,26 +1066,14 @@ gconf_main(void)
72  
73    loop = g_main_loop_new (NULL, TRUE);
74  
75 -  if (main_loops == NULL)
76 -    {
77 -      gulong timeout_len = 60*0.5; /* 60 s/min * .5 min */
78 -      
79 -      g_assert(timeout_id == 0);
80 -      timeout_id = g_timeout_add_seconds (timeout_len,
81 -                                          periodic_cleanup_timeout,
82 -                                          NULL);
83 -
84 -    }
85 -  
86    main_loops = g_slist_prepend(main_loops, loop);
87  
88    g_main_loop_run (loop);
89  
90    main_loops = g_slist_remove(main_loops, loop);
91  
92 -  if (main_loops == NULL)
93 +  if (main_loops == NULL && timeout_id != 0)
94      {
95 -      g_assert(timeout_id != 0);
96        g_source_remove(timeout_id);
97        timeout_id = 0;
98      }
This page took 0.081959 seconds and 3 git commands to generate.