[Patch] Moving FD passing into the header

Thiago Macieira thiago at kde.org
Tue Jun 15 14:14:32 PDT 2010


Em Terça-feira 15. Junho 2010, às 18.18.57, Christian Dywan escreveu:
> Hejsan,
> 
> so I changed Unix FD to not be a basic type anymore, and it's not
> anymore part of the message arguments. Instead you add and retrieve
> them specifically, see
> 
> http://lists.freedesktop.org/archives/dbus/2010-April/012509.html
> 
> The API is this:
> 
> dbus_bool_t dbus_message_append_unix_fd       (DBusMessage *message,
>                                                int          fd);
> dbus_bool_t dbus_message_contains_unix_fds    (DBusMessage *message);
> int         dbus_message_get_n_unix_fds       (DBusMessage *message);
> int         dbus_message_get_unix_fd          (DBusMessage *message,
>                                                int          index);
> 
> *Getting* duplicates the handle. It is an error to try to get more
> descriptors than exist in the message.
> 
> I adjusted the two test cases accordingly to use the new API.

Are they still part of the signature? How do I differentiate two fds from one 
array of fds?

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20100615/398c114b/attachment.pgp>


More information about the dbus mailing list