my.patch
1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--- ../../xmlrpc/include/client.h 2010-08-12 20:15:42.000000000 +0200
+++ ./include/virtualitemreceiver/client.h 2010-09-13 20:51:51.284184703 +0200
@@ -3,31 +3,26 @@
#include <stdio.h> /* for FILE */
-#include <expat.h>
+#include <expat.h>
+#include "httpRequest.h"
+
+#define READBUFSIZE 2048 /* Size of receive buffer */
+#define CLIENTMULTMAX 512U /* 1MB maximum size the readbuffer may grow */
-#include "httpRequest.h"
+#define WRITE_ERR_IO -1
+#define WRITE_ERR_NOPRINT -2
-#define READBUFSIZE 2048 /* Size of receive readBuffer */
-
-extern int verbose;
+#define READ_ERR_LONGLINE -2
typedef struct {
int socket;
- char * readBuffer;
- char * writeBuffer;
+ char * readBuffer;
+ char * writeBuffer;
unsigned int readPos;
- unsigned int writePos;
+ unsigned int writePos;
+ unsigned int readBufMult;
+ unsigned int writeBufMult;
char remoteAddr[16];
tHttpHeader httpHeader;
unsigned int bodyLenRemaining;
XML_Parser parser;
} tClient;
-void clientClose(tClient * client);
-int clientRead(tClient * client);
-int clientWrite(tClient * client);
+void clientClose(tClient *);
+int clientRead(tClient *);
+int writeRemaining(tClient *);
+int writeBuffer(tClient *);
#endif // __CLIENT_H__