Re: [PATCH] core: fix singleton handling in NULL/systemd session monitor
- From: Dan Williams <dcbw redhat com>
- To: Thomas Bechtold <thomasbechtold jpberlin de>
- Cc: networkmanager-list gnome org
- Subject: Re: [PATCH] core: fix singleton handling in NULL/systemd session monitor
- Date: Mon, 06 Feb 2012 17:31:08 -0600
On Sat, 2012-02-04 at 21:08 +0100, Thomas Bechtold wrote:
> ---
> src/nm-session-monitor-null.c | 4 +++-
> src/nm-session-monitor-systemd.c | 4 +++-
> 2 files changed, 6 insertions(+), 2 deletions(-)
Pushed, thanks,
Dan
> diff --git a/src/nm-session-monitor-null.c b/src/nm-session-monitor-null.c
> index ec33bef..14d756f 100644
> --- a/src/nm-session-monitor-null.c
> +++ b/src/nm-session-monitor-null.c
> @@ -84,7 +84,9 @@ nm_session_monitor_get (void)
> if (singleton)
> return g_object_ref (singleton);
>
> - return NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL));
> + singleton = NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL));
> + assert (singleton);
> + return singleton;
> }
>
> /* ---------------------------------------------------------------------------------------------------- */
> diff --git a/src/nm-session-monitor-systemd.c b/src/nm-session-monitor-systemd.c
> index ae09494..8fe73ae 100644
> --- a/src/nm-session-monitor-systemd.c
> +++ b/src/nm-session-monitor-systemd.c
> @@ -195,7 +195,9 @@ nm_session_monitor_get (void)
> if (singleton)
> return g_object_ref (singleton);
>
> - return NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL));
> + singleton = NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL));
> + assert (singleton);
> + return singleton;
> }
>
> gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]