mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Fixed SOCKET_WRITE() when blocked.
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@203 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
parent
7f3d1265ef
commit
222f2d98f1
@ -34,7 +34,10 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
#if !defined(WIN32)
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
#endif
|
||||||
#include "axhttp.h"
|
#include "axhttp.h"
|
||||||
|
|
||||||
struct serverstruct *servers;
|
struct serverstruct *servers;
|
||||||
@ -614,7 +617,9 @@ void removeconnection(struct connstruct *cn)
|
|||||||
cn->ssl = NULL;
|
cn->ssl = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
shutdown(cn->networkdesc, SHUT_WR);
|
shutdown(cn->networkdesc, SHUT_WR);
|
||||||
|
#endif
|
||||||
SOCKET_CLOSE(cn->networkdesc);
|
SOCKET_CLOSE(cn->networkdesc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -946,7 +946,7 @@ static int send_raw_packet(SSL *ssl, uint8_t protocol)
|
|||||||
while (sent < pkt_size)
|
while (sent < pkt_size)
|
||||||
{
|
{
|
||||||
ret = SOCKET_WRITE(ssl->client_fd,
|
ret = SOCKET_WRITE(ssl->client_fd,
|
||||||
&ssl->bm_all_data[sent], pkt_size);
|
&ssl->bm_all_data[sent], pkt_size-sent);
|
||||||
|
|
||||||
if (ret >= 0)
|
if (ret >= 0)
|
||||||
sent += ret;
|
sent += ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user