Add missing release method to the UDPv4 transport.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2012-03-17 14:54:09 +01:00
parent 319aae1403
commit 9d4d68e667
2 changed files with 6 additions and 11 deletions

11
udp.c
View File

@ -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;
}
static void udp_release(struct transport *t)
{
/* No need for any per-instance deallocation. */
}
static struct transport the_udp_transport = {
.close = udp_close,
.open = udp_open,
.recv = udp_recv,
.send = udp_send,
.release = udp_release,
};
struct transport *udp_transport_create(void)
@ -201,8 +207,3 @@ struct transport *udp_transport_create(void)
/* No need for any per-instance allocation. */
return &the_udp_transport;
}
void udp_transport_destroy(struct transport *t)
{
/* No need for any per-instance deallocation. */
}

6
udp.h
View File

@ -29,10 +29,4 @@
*/
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