Skip to content

File descriptor in a signal message containing destination is closed #29

@kyotsumoto-sun-denshi

Description

@kyotsumoto-sun-denshi

If a D-Bus server sends a signal message containing destination and file descriptor,
OBus closes the file descriptor in the message.

https://github.com/ocaml-community/obus/blob/master/src/protocol/oBus_connection.ml#L459

match apply_filters "incoming" message active.incoming_filters with
   | None -> ...
   | Some message ->
       (* The internal dispatcher accepts only messages destined to
          the current connection: *)
       if active.name = "" || OBus_message.destination message = active.name then ignore (
         (try%lwt
           dispatch_message active message
         with exn ->
           Lwt_log.error ~section ~exn "message dispatching failed with")
         [%lwt.finally
           OBus_value.V.sequence_close (OBus_message.body message)]
       );

If a signal message doesn't contain destination, " OBus_value.V.sequence_close" is not called.
But If a signal message contains destination, " OBus_value.V.sequence_close" is called, file descriptor is closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions