mirror of
https://github.com/status-im/miniupnp.git
synced 2025-01-18 18:31:15 +00:00
asyncsendto.c: use named enum.
from ab544c3a0e01e43521203a71d1529d73480efd70 see #502
This commit is contained in:
parent
861f95c634
commit
b44fd0b861
@ -22,6 +22,8 @@
|
||||
#include "asyncsendto.h"
|
||||
#include "upnputils.h"
|
||||
|
||||
enum send_state {ESCHEDULED=1, EWAITREADY=2, ESENDNOW=3} state;
|
||||
|
||||
/* state diagram for a packet :
|
||||
*
|
||||
* |
|
||||
@ -34,7 +36,7 @@
|
||||
struct scheduled_send {
|
||||
LIST_ENTRY(scheduled_send) entries;
|
||||
struct timeval ts;
|
||||
enum {ESCHEDULED=1, EWAITREADY=2, ESENDNOW=3} state;
|
||||
enum send_state state;
|
||||
int sockfd;
|
||||
const void * buf;
|
||||
size_t len;
|
||||
@ -96,7 +98,7 @@ sendto_schedule2(int sockfd, const void *buf, size_t len, int flags,
|
||||
const struct sockaddr_in6 *src_addr,
|
||||
unsigned int delay)
|
||||
{
|
||||
enum {ESCHEDULED, EWAITREADY, ESENDNOW} state;
|
||||
enum send_state state;
|
||||
ssize_t n;
|
||||
size_t alloc_len;
|
||||
struct timeval tv;
|
||||
|
Loading…
x
Reference in New Issue
Block a user