diff options
author | Cristian Maglie <c.maglie@bug.st> | 2013-03-20 11:35:55 +0100 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2013-03-20 11:35:55 +0100 |
commit | c2de020c3d19abe01a8e903926eede69106fa9d5 (patch) | |
tree | 26b2d5748bf095bbb2da0f6acbacf163b728ae61 /firmwares/wifishield/wifiHD/src/ard_tcp.h | |
parent | 84d842a16f05dc2de368d5205bd63fab2d5987e9 (diff) | |
parent | f0ba738a71ec8dafe4705ddd02c07a2eb880655c (diff) |
Merge remote-tracking branch 'mlafauci/wifishield-bugfix' into HEAD
Diffstat (limited to 'firmwares/wifishield/wifiHD/src/ard_tcp.h')
-rw-r--r-- | firmwares/wifishield/wifiHD/src/ard_tcp.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/firmwares/wifishield/wifiHD/src/ard_tcp.h b/firmwares/wifishield/wifiHD/src/ard_tcp.h index 7d0bf7b..2bd3731 100644 --- a/firmwares/wifishield/wifiHD/src/ard_tcp.h +++ b/firmwares/wifishield/wifiHD/src/ard_tcp.h @@ -24,7 +24,9 @@ typedef void (ard_tcp_done_cb_t)(void *opaque, int result); // Maximum number of client connection accepted by server #define MAX_CLIENT_ACCEPTED 4 #define NO_VALID_ID -1 -#define GET_FIRST_CLIENT_TCP(TTCP) ((TTCP!=NULL)?TTCP->tpcb[0] : NULL) + +#define GET_FIRST_CLIENT_TCP(TTCP) getFirstClient(TTCP, 1) +#define GET_FIRST_CLIENT_TCP_NV(TTCP) getFirstClient(TTCP, 0) #define GET_CLIENT_TCP(TTCP,ID) (((TTCP!=NULL)&&(ID>=0)&&(ID<MAX_CLIENT_ACCEPTED))?TTCP->tpcb[ID] : NULL) @@ -92,6 +94,10 @@ bool cleanNewClientConn(struct ttcp* _ttcp); int8_t getNewClientConnId(struct ttcp* _ttcp, struct tcp_pcb *newpcb); +int8_t getCurrClientConnId(); + +struct tcp_pcb * getFirstClient(struct ttcp* _ttcp, bool verbose); + void closeConnections(); #endif |