traffic-selector: Don't end printf'ed list of traffic selectors with a space
This commit is contained in:
@@ -219,9 +219,8 @@ int traffic_selector_printf_hook(printf_hook_data_t *data,
|
|||||||
enumerator_t *enumerator;
|
enumerator_t *enumerator;
|
||||||
char from_str[INET6_ADDRSTRLEN] = "";
|
char from_str[INET6_ADDRSTRLEN] = "";
|
||||||
char to_str[INET6_ADDRSTRLEN] = "";
|
char to_str[INET6_ADDRSTRLEN] = "";
|
||||||
char *serv_proto = NULL;
|
char *serv_proto = NULL, *sep = "";
|
||||||
bool has_proto;
|
bool has_proto, has_ports;
|
||||||
bool has_ports;
|
|
||||||
size_t written = 0;
|
size_t written = 0;
|
||||||
u_int32_t from[4], to[4];
|
u_int32_t from[4], to[4];
|
||||||
|
|
||||||
@@ -235,8 +234,8 @@ int traffic_selector_printf_hook(printf_hook_data_t *data,
|
|||||||
enumerator = list->create_enumerator(list);
|
enumerator = list->create_enumerator(list);
|
||||||
while (enumerator->enumerate(enumerator, (void**)&this))
|
while (enumerator->enumerate(enumerator, (void**)&this))
|
||||||
{
|
{
|
||||||
/* call recursivly */
|
written += print_in_hook(data, "%s%R", sep, this);
|
||||||
written += print_in_hook(data, "%R ", this);
|
sep = " ";
|
||||||
}
|
}
|
||||||
enumerator->destroy(enumerator);
|
enumerator->destroy(enumerator);
|
||||||
return written;
|
return written;
|
||||||
|
|||||||
Reference in New Issue
Block a user