浏览代码

Replace TCP_BUF_SIZE with a cfg_get(..).

Jan Janak 16 年之前
父节点
当前提交
29b0138a7c
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      modules/tls/tls_server.c

+ 2 - 1
modules/tls/tls_server.c

@@ -45,6 +45,7 @@
 #include "../../timer.h"
 #include "../../timer.h"
 #include "../../globals.h"
 #include "../../globals.h"
 #include "../../pt.h"
 #include "../../pt.h"
+#include "../../tcp_options.h"
 
 
 #include "tls_init.h"
 #include "tls_init.h"
 #include "tls_domain.h"
 #include "tls_domain.h"
@@ -813,7 +814,7 @@ int tls_h_read(struct tcp_connection * c)
 	SSL* ssl;
 	SSL* ssl;
 
 
 	r = &c->req;
 	r = &c->req;
-	bytes_free = TCP_BUF_SIZE - (int)(r->pos - r->buf);
+	bytes_free = cfg_get(tcp, tcp_cfg, rd_buf_size) - (int)(r->pos - r->buf);
 	
 	
 	if (bytes_free == 0) {
 	if (bytes_free == 0) {
 		ERR("Buffer overrun, dropping\n");
 		ERR("Buffer overrun, dropping\n");