Skip to content

sd-bus: Add sd_bus_reply() - #18354

Merged
yuwata merged 1 commit into
systemd:mainfrom
daandemeyer:sd-bus-reply
Jan 25, 2021
Merged

yuwata merged 1 commit into
systemd:mainfrom
daandemeyer:sd-bus-reply

Conversation

@daandemeyer

@daandemeyer daandemeyer commented Jan 23, 2021 •

Copy link
Copy Markdown
Collaborator

While sd-bus already provides sd_bus_call() for calling a method
from a complete bus message object, we don't have an equivalent
function for replying from a method with a complete bus message
object.

Currently, we use sd_bus_send(call->bus, m, NULL) instead. Let's
add a shorthand for this pattern and name it sd_bus_reply().

@bluca bluca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a useful shortcut to me, but waiting for more folks to also have a look given it's a public API.

@keszybz keszybz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a reasonable thing to add.

The symbol must also be added to src/libsystemd/libsystemd.sym.

Comment thread man/rules/meson.build
['coredump.conf', '5', ['coredump.conf.d'], 'ENABLE_COREDUMP'],
['coredumpctl', '1', [], 'ENABLE_COREDUMP'],
['crypttab', '5', [], 'HAVE_LIBCRYPTSETUP'],
['veritytab', '5', [], 'HAVE_LIBCRYPTSETUP'],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do people keep editing the file by hand?! There is both a header and a footer saying not to do that ;(

@daandemeyer daandemeyer Jan 24, 2021 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we were supposed to run update-man-rules? Or is it run once before a new release?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your patch is fine, it's just fixing an issue introduced when veritytab was added a few days ago.

Comment thread man/sd_bus_reply_method_return.xml Resolved
Comment thread man/sd_bus_reply_method_return.xml Resolved
Comment thread src/libsystemd/sd-bus/sd-bus.c Resolved
Comment thread man/sd_bus_reply_method_return.xml Resolved
Comment thread src/libsystemd/sd-bus/sd-bus.c Resolved
@keszybz keszybz added reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks and removed ci-failure-appears-unrelated needs-review labels Jan 24, 2021
Comment thread src/libsystemd/sd-bus/sd-bus.c Resolved
Comment thread src/libsystemd/libsystemd.sym Resolved
While sd-bus already provides sd_bus_call() for calling a method
from a complete bus message object, We don't have an equivalent
function for replying from a method with a complete bus message
object.

Currently, we use sd_bus_send(call->bus, m, NULL) instead. Let's
add a shorthand for this pattern and name it sd_bus_reply().
@yuwata yuwata added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks labels Jan 25, 2021
@yuwata
yuwata merged commit eb83eb6 into systemd:main Jan 25, 2021
@daandemeyer
daandemeyer deleted the sd-bus-reply branch October 12, 2021 08:44
@keszybz keszybz removed the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

4 participants