Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
别团等shy哥发育
redis
提交
896c1e65
R
redis
项目概览
别团等shy哥发育
/
redis
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
redis
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
896c1e65
编写于
1月 22, 2013
作者:
H
Henry Rawas
提交者:
JonathanPickett
7月 21, 2013
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Redis 2.6 for Windows
上级
19c476f4
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
33 addition
and
4 deletion
+33
-4
msvs/bin/.gitignore
msvs/bin/.gitignore
+4
-0
src/networking.c
src/networking.c
+3
-0
src/redis-cli.c
src/redis-cli.c
+18
-1
src/redis.c
src/redis.c
+3
-3
src/replication.c
src/replication.c
+1
-0
tests/unit/protocol.tcl
tests/unit/protocol.tcl
+4
-0
未找到文件。
msvs/bin/.gitignore
0 → 100644
浏览文件 @
896c1e65
!release
!debug
!release/*
!debug/*
src/networking.c
浏览文件 @
896c1e65
...
...
@@ -635,6 +635,9 @@ void freeClient(redisClient *c) {
* unblockClientWaitingData() to avoid processInputBuffer() will get
* called. Also it is important to remove the file events after
* this, because this call adds the READABLE event. */
#ifdef _WIN32
aeWinSocketDetach
(
c
->
fd
,
1
);
#endif
sdsfree
(
c
->
querybuf
);
c
->
querybuf
=
NULL
;
if
(
c
->
flags
&
REDIS_BLOCKED
)
...
...
src/redis-cli.c
浏览文件 @
896c1e65
...
...
@@ -41,7 +41,9 @@
#include <ctype.h>
#include <errno.h>
#include <sys/stat.h>
#ifndef _WIN32
#include <sys/time.h>
#endif
#include <assert.h>
#include <fcntl.h>
#ifdef _WIN32
...
...
@@ -60,6 +62,21 @@
#include <limits.h>
#ifdef _WIN32
#include <fcntl.h>
#ifndef FD_SETSIZE
#define FD_SETSIZE 16000
#endif
#ifndef STDIN_FILENO
#define STDIN_FILENO (_fileno(stdin))
#endif
#include <winsock2.h>
#include <windows.h>
#include "win32fixes.h"
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#define strtoull _strtoui64
#endif
#include "hiredis.h"
#include "sds.h"
...
...
@@ -1121,7 +1138,7 @@ static void getRDB(void) {
while
(
payload
)
{
ssize_t
nread
,
nwritten
;
nread
=
read
(
s
,
buf
,(
payload
>
sizeof
(
buf
))
?
sizeof
(
buf
)
:
payload
);
nread
=
read
(
s
,
buf
,(
unsigned
int
)(
payload
>
sizeof
(
buf
))
?
sizeof
(
buf
)
:
payload
);
if
(
nread
<=
0
)
{
fprintf
(
stderr
,
"I/O Error reading RDB payload from socket
\n
"
);
exit
(
1
);
...
...
src/redis.c
浏览文件 @
896c1e65
...
...
@@ -664,8 +664,8 @@ void activeExpireCycle(void) {
* 2) If last time we hit the time limit, we want to scan all DBs
* in this iteration, as there is work to do in some DB and we don't want
* expired keys to use memory for too much time. */
if
(
dbs_per_call
>
server
.
dbnum
||
timelimit_exit
)
dbs_per_call
=
server
.
dbnum
;
if
(
dbs_per_call
>
(
unsigned
)
server
.
dbnum
||
timelimit_exit
)
dbs_per_call
=
(
unsigned
)
server
.
dbnum
;
/* We can use at max REDIS_EXPIRELOOKUPS_TIME_PERC percentage of CPU time
* per iteration. Since this function gets called with a frequency of
...
...
@@ -868,7 +868,7 @@ void databasesCron(void) {
unsigned
int
j
;
/* Don't test more DBs than we have. */
if
(
dbs_per_call
>
server
.
dbnum
)
dbs_per_call
=
server
.
dbnum
;
if
(
dbs_per_call
>
(
unsigned
)
server
.
dbnum
)
dbs_per_call
=
server
.
dbnum
;
/* Resize */
for
(
j
=
0
;
j
<
dbs_per_call
;
j
++
)
{
...
...
src/replication.c
浏览文件 @
896c1e65
...
...
@@ -438,6 +438,7 @@ void replicationAbortSyncTransfer(void) {
}
#else
close
(
server
.
repl_transfer_s
);
#endif
close
(
server
.
repl_transfer_fd
);
unlink
(
server
.
repl_transfer_tmpfile
);
zfree
(
server
.
repl_transfer_tmpfile
);
...
...
tests/unit/protocol.tcl
浏览文件 @
896c1e65
...
...
@@ -60,9 +60,12 @@ start_server {tags {"protocol"}} {
assert_error
"*wrong*arguments*ping*"
{
r ping x y z
}
}
if
{
0 == 1
}
{
# not run in windows
set c 0
foreach seq
[
list
"
\x00
"
"*
\x00
"
"
$
\x00
"
]
{
incr c
after 10000
test
"Protocol desync regression test #
$c
"
{
set s
[
socket
[
srv 0 host
]
[
srv 0 port
]]
# windows - set nonblocking
...
...
@@ -95,6 +98,7 @@ start_server {tags {"protocol"}} {
}
{
*Protocol error*
}
}
unset c
}
}
start_server
{
tags
{
"regression"
}}
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录