[Bug 34931] Add a "meta porter"

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Mar 21 10:29:03 CET 2011


https://bugs.freedesktop.org/show_bug.cgi?id=34931

--- Comment #10 from Jonny Lamb <jonny.lamb at collabora.co.uk> 2011-03-21 02:29:02 PDT ---
(In reply to comment #9)
> It's a programming error to call it more than once: use g_return_if_fail()?

Yeah, makes sense.

> Why doesn't this also take … all the other arguments?

Hm, not sure why I didn't do this before.

> > No? It's the porter start implementation which returns void. You can get the
> > porter from wocky_meta_porter_get_port().
> 
> I meant: in the error case
> <http://cgit.freedesktop.org/~jonny/wocky/tree/wocky/wocky-meta-porter.c?h=meta-porter&id=7cb02519648fea65317a51f5e3ebe85f79b668b8#n995>,
> do you really want to go on to call g_socket_service_start()?

Ahh yes, I completely missed that! Fixed.

> That's true. This would be more obvious if you replaced the goto in
> <http://cgit.freedesktop.org/~jonny/wocky/tree/wocky/wocky-meta-porter.c?h=meta-porter&id=7cb02519648fea65317a51f5e3ebe85f79b668b8#n1294>
> with if (num != 0) { ClosePorterData *data = g_slice_new0 ... }

Okay, just for you!

> Looking at this again, you initialize 'porters' twice, and leak the first copy
> in the num == 0 case.

Ha, totally didn't notice that. Fixed.

> Misread, sorry. It's still wrong, though: the destroy notify function should be
> g_object_unref, not NULL.

Yes, done.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the telepathy-bugs mailing list