diff options
author | Olli Salli <olli.salli@collabora.co.uk> | 2007-03-31 18:46:18 +0000 |
---|---|---|
committer | Olli Salli <olli.salli@collabora.co.uk> | 2007-03-31 18:46:18 +0000 |
commit | b45f6bd4ad20bf0a082095d7c0bc1dde400cec0e (patch) | |
tree | 7783f4eede0f02e0b66200059968e239d1e43bda /src/idle-handles.c | |
parent | 788cc118e89ae5bcdcba81c534f60df9438bd2e2 (diff) | |
download | telepathy-idle-b45f6bd4ad20bf0a082095d7c0bc1dde400cec0e.tar.gz |
Add actual parsing to IdleParser, it now seems to parse stuff correctly
20070331184618-9db4d-266d19b78932da09df53b3b21dc8b9d8ee328e7e.gz
Diffstat (limited to 'src/idle-handles.c')
-rw-r--r-- | src/idle-handles.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/idle-handles.c b/src/idle-handles.c index 42f4063..2cdd5af 100644 --- a/src/idle-handles.c +++ b/src/idle-handles.c @@ -240,12 +240,13 @@ TpHandle idle_handle_for_contact(TpHandleRepoIface *storage, const char *nicknam handle = tp_handle_lookup(storage, nickname, NULL, NULL); - if (!handle) - { + if (!handle) { handle = tp_handle_ensure(storage, nickname, NULL, NULL); if (handle) tp_handle_set_qdata(storage, handle, idle_handle_real_quark(), g_strdup(nickname), (GDestroyNotify)(g_free)); - } + } else { + tp_handle_ref(storage, handle); + } return handle; } @@ -258,12 +259,13 @@ TpHandle idle_handle_for_room(TpHandleRepoIface *storage, const char *channel) handle = tp_handle_lookup(storage, channel, NULL, NULL); - if (!handle) - { + if (!handle) { handle = tp_handle_ensure(storage, channel, NULL, NULL); if (handle) tp_handle_set_qdata(storage, handle, idle_handle_real_quark(), g_strdup(channel), (GDestroyNotify)(g_free)); - } + } else { + tp_handle_ref(storage, handle); + } return handle; } |