Follow the equivalent rename in sd-bus to stay as similar as possible.
if (r < 0)
return r;
- r = sd_rtnl_send_with_reply_and_block(rtnl, message, 0, NULL);
+ r = sd_rtnl_call(rtnl, message, 0, NULL);
if (r < 0)
return r;
}
if (need_update) {
- r = sd_rtnl_send_with_reply_and_block(rtnl, message, 0, NULL);
+ r = sd_rtnl_call(rtnl, message, 0, NULL);
if (r < 0)
return r;
}
return NULL;
}
-int sd_rtnl_send_with_reply_and_block(sd_rtnl *nl,
+int sd_rtnl_call(sd_rtnl *nl,
sd_rtnl_message *message,
uint64_t usec,
sd_rtnl_message **ret) {
assert(type == IFLA_MTU);
assert(mtu == *(unsigned int *) data);
- assert(sd_rtnl_send_with_reply_and_block(rtnl, message, 0, NULL) == 0);
+ assert(sd_rtnl_call(rtnl, message, 0, NULL) == 0);
}
static void test_route(void) {
assert(sd_rtnl_message_read(m, &type, &data) == 0);
- assert(sd_rtnl_send_with_reply_and_block(rtnl, m, 0, &r) >= 0);
+ assert(sd_rtnl_call(rtnl, m, 0, &r) >= 0);
assert(sd_rtnl_message_get_type(r, &type) >= 0);
assert(type == RTM_NEWLINK);
assert(sd_rtnl_message_read(m, &type, &data) == 0);
assert((r = sd_rtnl_message_unref(r)) == NULL);
- assert(sd_rtnl_send_with_reply_and_block(rtnl, m, -1, &r) == -EPERM);
+ assert(sd_rtnl_call(rtnl, m, -1, &r) == -EPERM);
assert((m = sd_rtnl_message_unref(m)) == NULL);
assert((r = sd_rtnl_message_unref(r)) == NULL);
assert(sd_rtnl_message_read(m, &type, &data) == 0);
- assert(sd_rtnl_send_with_reply_and_block(rtnl, m, -1, &r) >= 0);
+ assert(sd_rtnl_call(rtnl, m, -1, &r) >= 0);
while (sd_rtnl_message_read(r, &type, &data) > 0) {
switch (type) {
// case IFLA_MTU:
}
}
- r = sd_rtnl_send_with_reply_and_block(manager->rtnl, req, 0, NULL);
+ r = sd_rtnl_call(manager->rtnl, req, 0, NULL);
if (r < 0) {
log_error("Could not configure address: %s", strerror(-r));
return r != -EEXIST ? r : 0;
return r;
}
- r = sd_rtnl_send_with_reply_and_block(manager->rtnl, req, 0, NULL);
+ r = sd_rtnl_call(manager->rtnl, req, 0, NULL);
if (r < 0) {
log_error("Could not UP link: %s", strerror(-r));
return r;
return r;
}
- r = sd_rtnl_send_with_reply_and_block(manager->rtnl, req, 0, NULL);
+ r = sd_rtnl_call(manager->rtnl, req, 0, NULL);
if (r < 0) {
log_error("Could not configure route: %s", strerror(-r));
return r;
sd_rtnl *sd_rtnl_ref(sd_rtnl *nl);
sd_rtnl *sd_rtnl_unref(sd_rtnl *nl);
-int sd_rtnl_send_with_reply_and_block(sd_rtnl *nl, sd_rtnl_message *message, uint64_t timeout, sd_rtnl_message **reply);
+int sd_rtnl_call(sd_rtnl *nl, sd_rtnl_message *message, uint64_t timeout,
+ sd_rtnl_message **reply);
/* messages */
int sd_rtnl_message_link_new(uint16_t msg_type, int index, unsigned int type,