06b7bc8 sbus: Add the sbus_request_parse_or_finish() method

6 files Authored by stefw 10 years ago, Committed by jhrozek 10 years ago,
    sbus: Add the sbus_request_parse_or_finish() method
    
    Some DBus types returned from dbus_message_get_args() require memory
    to be released when done. We automatically attach these to the talloc
    struct sbus_request memory context in this function.
    
    This accepts varargs similar to dbus_message_get_args(), which are
    rather awkward. However instead of reworking them completely, future
    generated marshalling code will replace most uses of these varargs.
    
    If parsing the dbus message fails, then it responds to the DBus caller
    with an appropriate error such as o.f.D.Error.InvalidArgs. In these
    cases (ie: when it returns FALSE) the sbus_request is finished.
    
    Migrated some, but not all, uses of dbus_message_get_args() to the
    new function. Some instances have uncommon semantics such as terminating
    the connection upon failure to parse a message.
    
    Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
    Reviewed-by: Pavel Březina <pbrezina@redhat.com>
    Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
    
        
file modified
+6 -17
file modified
+49 -0
file modified
+106 -0
file modified
+99 -0