Skip to content

Commit

Permalink
test: support UDP urls for marry
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamore committed Oct 6, 2024
1 parent f89f8f5 commit 07a0155
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/testing/marry.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2021 Staysail Systems, Inc. <[email protected]>
// Copyright 2024 Staysail Systems, Inc. <[email protected]>
// Copyright 2018 Capitar IT Group BV <[email protected]>
//
// This software is supplied under the terms of the MIT License, a
Expand Down Expand Up @@ -46,7 +46,8 @@ nuts_scratch_addr(const char *scheme, size_t sz, char *addr)
}

if ((strncmp(scheme, "tcp", 3) == 0) ||
(strncmp(scheme, "tls", 3) == 0)) {
(strncmp(scheme, "tls", 3) == 0) ||
(strncmp(scheme, "udp", 3) == 0)) {
(void) snprintf(
addr, sz, "%s://127.0.0.1:%u", scheme, nuts_next_port());
return;
Expand Down Expand Up @@ -84,6 +85,7 @@ nuts_scratch_addr(const char *scheme, size_t sz, char *addr)
}

// We should not be here.
nng_log_err("NUTS", "Unknown scheme");
abort();
}

Expand Down

0 comments on commit 07a0155

Please sign in to comment.