Subversion Repositories Tewi

Rev

Rev 22 | Rev 43 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22 Rev 23
Line 1... Line 1...
1
/* $Id: http.c 22 2024-09-14 13:25:38Z nishi $ */
1
/* $Id: http.c 23 2024-09-14 13:31:16Z nishi $ */
2
 
2
 
3
#define SOURCE
3
#define SOURCE
4
 
4
 
5
#include "tw_http.h"
5
#include "tw_http.h"
6
 
6
 
Line 57... Line 57...
57
		FD_ZERO(&fds);
57
		FD_ZERO(&fds);
58
		FD_SET(sock, &fds);
58
		FD_SET(sock, &fds);
59
		struct timeval tv;
59
		struct timeval tv;
60
		tv.tv_sec = 5;
60
		tv.tv_sec = 5;
61
		tv.tv_usec = 0;
61
		tv.tv_usec = 0;
62
		if(!SSL_has_pending(ssl)) {
62
		if(ssl == NULL || !SSL_has_pending(ssl)) {
63
			int n = select(FD_SETSIZE, &fds, NULL, NULL, &tv);
63
			int n = select(FD_SETSIZE, &fds, NULL, NULL, &tv);
64
			if(n <= 0) {
64
			if(n <= 0) {
65
				free(header);
65
				free(header);
66
				tw_free_request(req);
66
				tw_free_request(req);
67
				return -1;
67
				return -1;