sd-varlink: fix overwrite of loop count
Fixes a bug introduced by 206504a594 (v255).
This commit is contained in:
@@ -3753,7 +3753,7 @@ _public_ int sd_varlink_server_add_connection_stdio(sd_varlink_server *s, sd_var
|
||||
|
||||
_public_ int sd_varlink_server_listen_name(sd_varlink_server *s, const char *name) {
|
||||
_cleanup_strv_free_ char **names = NULL;
|
||||
int r, n = 0;
|
||||
int r, m, n = 0;
|
||||
|
||||
assert_return(s, -EINVAL);
|
||||
assert_return(name, -EINVAL);
|
||||
@@ -3764,11 +3764,11 @@ _public_ int sd_varlink_server_listen_name(sd_varlink_server *s, const char *nam
|
||||
* See https://varlink.org/#activation for the environment variables this is backed by and the
|
||||
* recommended "varlink" identifier in $LISTEN_FDNAMES. */
|
||||
|
||||
r = sd_listen_fds_with_names(/* unset_environment= */ false, &names);
|
||||
if (r < 0)
|
||||
return r;
|
||||
m = sd_listen_fds_with_names(/* unset_environment= */ false, &names);
|
||||
if (m < 0)
|
||||
return m;
|
||||
|
||||
for (int i = 0; i < r; i++) {
|
||||
for (int i = 0; i < m; i++) {
|
||||
int b, fd;
|
||||
socklen_t l = sizeof(b);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user