feat(lander): initial lnm integration test
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
parent
799821d9fc
commit
8ec667af3b
15 changed files with 187 additions and 44 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include <fcntl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <poll.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "lnm/common.h"
|
||||
|
|
@ -43,7 +44,9 @@ lnm_err lnm_loop_accept(lnm_loop *l) {
|
|||
// Append connection to list of connections
|
||||
if ((size_t)conn_fd >= l->conns.len) {
|
||||
lnm_loop_conn **new =
|
||||
realloc(l->conns.arr, sizeof(lnm_loop_conn *) * (conn_fd + 1));
|
||||
l->conns.len == 0
|
||||
? calloc(sizeof(lnm_loop_conn *), conn_fd + 1)
|
||||
: realloc(l->conns.arr, sizeof(lnm_loop_conn *) * (conn_fd + 1));
|
||||
|
||||
if (new == NULL) {
|
||||
close(conn_fd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue