/* forward declarations */
static uint16_t bgp_write(struct peer *);
static uint16_t bgp_read(struct peer *peer, int *code_p);
-static int bgp_process_writes(struct thread *);
-static int bgp_process_reads(struct thread *);
+static void bgp_process_writes(struct thread *);
+static void bgp_process_reads(struct thread *);
static bool validate_header(struct peer *);
/* generic i/o status codes */
/*
* Called from I/O pthread when a file descriptor has become ready for writing.
*/
-static int bgp_process_writes(struct thread *thread)
+static void bgp_process_writes(struct thread *thread)
{
static struct peer *peer;
peer = THREAD_ARG(thread);
bool fatal = false;
if (peer->fd < 0)
- return -1;
+ return;
struct frr_pthread *fpt = bgp_pth_io;
BGP_UPDATE_GROUP_TIMER_ON(&peer->t_generate_updgrp_packets,
bgp_generate_updgrp_packets);
}
-
- return 0;
}
/*
* We read as much data as possible, process as many packets as we can and
* place them on peer->ibuf for secondary processing by the main thread.
*/
-static int bgp_process_reads(struct thread *thread)
+static void bgp_process_reads(struct thread *thread)
{
/* clang-format off */
static struct peer *peer; // peer to read from
peer = THREAD_ARG(thread);
if (peer->fd < 0 || bm->terminating)
- return -1;
+ return;
struct frr_pthread *fpt = bgp_pth_io;
thread_add_event(bm->master, bgp_process_packet,
peer, 0, &peer->t_process_packet);
}
-
- return 0;
}
/*