Add missing release method to the UDPv4 transport.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
319aae1403
commit
9d4d68e667
11
udp.c
11
udp.c
|
@ -189,11 +189,17 @@ static int udp_send(struct transport *t, struct fdarray *fda, int event,
|
||||||
return event ? sk_receive(fd, junk, len, hwts, MSG_ERRQUEUE) : cnt;
|
return event ? sk_receive(fd, junk, len, hwts, MSG_ERRQUEUE) : cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void udp_release(struct transport *t)
|
||||||
|
{
|
||||||
|
/* No need for any per-instance deallocation. */
|
||||||
|
}
|
||||||
|
|
||||||
static struct transport the_udp_transport = {
|
static struct transport the_udp_transport = {
|
||||||
.close = udp_close,
|
.close = udp_close,
|
||||||
.open = udp_open,
|
.open = udp_open,
|
||||||
.recv = udp_recv,
|
.recv = udp_recv,
|
||||||
.send = udp_send,
|
.send = udp_send,
|
||||||
|
.release = udp_release,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct transport *udp_transport_create(void)
|
struct transport *udp_transport_create(void)
|
||||||
|
@ -201,8 +207,3 @@ struct transport *udp_transport_create(void)
|
||||||
/* No need for any per-instance allocation. */
|
/* No need for any per-instance allocation. */
|
||||||
return &the_udp_transport;
|
return &the_udp_transport;
|
||||||
}
|
}
|
||||||
|
|
||||||
void udp_transport_destroy(struct transport *t)
|
|
||||||
{
|
|
||||||
/* No need for any per-instance deallocation. */
|
|
||||||
}
|
|
||||||
|
|
6
udp.h
6
udp.h
|
@ -29,10 +29,4 @@
|
||||||
*/
|
*/
|
||||||
struct transport *udp_transport_create(void);
|
struct transport *udp_transport_create(void);
|
||||||
|
|
||||||
/**
|
|
||||||
* Free an instance of a UDP/IPv4 transport.
|
|
||||||
* @param t Pointer obtained by calling udp_transport_create().
|
|
||||||
*/
|
|
||||||
void udp_transport_destroy(struct transport *t);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue