edbus: fix checking if root objects are our son
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Mon, 12 Nov 2012 16:07:12 +0000 (16:07 +0000)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Mon, 12 Nov 2012 16:07:12 +0000 (16:07 +0000)
commit8fe3146fe8a1583ebc9d09bd9443f39b12354467
tree02d349b0e0a537fa29932bc709121d8d9b95f51d
parent312bb0d887e47171e9c8011f4a7a2197388d7f3a
edbus: fix checking if root objects are our son

strncmp'ing is not sufficient because it whould fail in case an object
like "/org/bla" is registered (and in conn->root_objs) and we were
registering "/org/blatest/". We would incorrectly put "/org/bla" as son
of "/org/blatest". Fix this by looking up the next char, checking if
it's a slash.

Also re-format the code a little bit.

SVN revision: 79179
legacy/edbus/src/lib/edbus_service.c