Skip to content

Commit 8e5ae88

Browse files
committed
acl.3.0.19 版本发布
1 parent 6a94a8f commit 8e5ae88

File tree

24 files changed

+210
-90
lines changed

24 files changed

+210
-90
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ endif
4242
##############################################################################
4343

4444
.PHONY = check help all clean install uninstall uninstall_all build_bin build_src
45-
VERSION = 3.0.17
45+
VERSION = 3.0.19
4646

4747
help:
4848
@(echo "usage: make help|all|clean|install|uninstall|uninstall_all|build_bin|build_src")

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ session manager<br>
2121
unit test framework<br>
2222

2323
website: <a href=http://www.iteye.com/ target=_blank>http://www.iteye.com/</a><br>
24-
bbs: <a href=http://www.aclfans.com/ target=_blank>http://www.aclfans.com</a><br>
2524
download: <a href=https://sourceforge.net/projects/acl/ target=_blank>https://sourceforge.net/projects/acl/</a><br>
2625
qq group: 242722074<br>

changes.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
�޸���ʷ�б���
22
------------------------------------------------------------------------
3+
71) 2014.6.23 --- acl 3.0.19 �汾������
4+
35
70) 2014.5.27
46
70.1) �����˹��� VC2003, VC2008, VC2010, VC2012
57

lib_acl/changes.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
�޸���ʷ�б���
22

33
------------------------------------------------------------------------
4+
449) 2014.6.23
5+
449.1) acl_aio_server.c: ��������֮ǰ���ܼ����Խӿ�
6+
7+
448) 2014.6.20
8+
448.1) acl_aio_server.c: ������ IP ��ַ���ƹ���
9+
410
447) 2014.6.17
511
447.1) master/template: ������һ�¸�ģ��Ĵ���
612
447.2) removed: ȥ���� acl_aio_app_main.c�����书�ܺϲ��� acl_aio_server.c �У�

lib_acl/include/master/acl_server_api.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,15 @@ typedef void (*ACL_AIO_SERVER2_FN) (ACL_SOCKET, void *);
131131

132132
void acl_aio_server_main(int, char **, ACL_AIO_SERVER_FN, ...);
133133
void acl_aio_server2_main(int, char **, ACL_AIO_SERVER2_FN, ...);
134+
135+
typedef int (*ACL_AIO_RUN_FN)(ACL_ASTREAM *stream, void *run_ctx);
136+
typedef int (*ACL_AIO_RUN2_FN)(ACL_SOCKET fd, void *run_ctx);
137+
138+
ACL_DEPRECATED void acl_aio_app_main(int argc, char *argv[],
139+
ACL_AIO_RUN_FN run_fn, void *run_ctx, ...);
140+
ACL_DEPRECATED void acl_aio_app2_main(int argc, char *argv[],
141+
ACL_AIO_RUN2_FN run2_fn, void *run_ctx, ...);
142+
134143
void acl_aio_server_request_timer(ACL_EVENT_NOTIFY_TIME timer_fn,
135144
void *arg, int delay);
136145
void acl_aio_server_cancel_timer(ACL_EVENT_NOTIFY_TIME timer_fn, void *arg);

lib_acl/lib_acl.rc

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@
1313
#undef APSTUDIO_READONLY_SYMBOLS
1414

1515
/////////////////////////////////////////////////////////////////////////////
16-
// ??(???????) resources
16+
// ����(���壬�й�) resources
1717

1818
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
19-
#ifdef _WIN32
2019
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
2120
#pragma code_page(936)
22-
#endif //_WIN32
2321

2422
#ifdef APSTUDIO_INVOKED
2523
/////////////////////////////////////////////////////////////////////////////
@@ -53,8 +51,8 @@ END
5351
//
5452

5553
VS_VERSION_INFO VERSIONINFO
56-
FILEVERSION 3,0,1,7
57-
PRODUCTVERSION 3,0,1,7
54+
FILEVERSION 3,0,19,0
55+
PRODUCTVERSION 3,0,19,0
5856
FILEFLAGSMASK 0x17L
5957
#ifdef _DEBUG
6058
FILEFLAGS 0x1L
@@ -71,12 +69,12 @@ BEGIN
7169
BEGIN
7270
VALUE "Comments", "����Ϊ��ƽ̨��C�⣬����������ͨѶ����������ܵȹ���"
7371
VALUE "FileDescription", "acl ��"
74-
VALUE "FileVersion", "3, 0, 1, 7"
72+
VALUE "FileVersion", "3.0.19.0"
7573
VALUE "InternalName", "lib_acl"
7674
VALUE "LegalCopyright", "zsx (C) 2011"
7775
VALUE "OriginalFilename", "lib_acl.lib"
7876
VALUE "ProductName", " acl ��"
79-
VALUE "ProductVersion", "3, 0, l, 7"
77+
VALUE "ProductVersion", "3, 0, l, 9"
8078
END
8179
END
8280
BLOCK "VarFileInfo"
@@ -85,7 +83,7 @@ BEGIN
8583
END
8684
END
8785

88-
#endif // ??(???????) resources
86+
#endif // ����(���壬�й�) resources
8987
/////////////////////////////////////////////////////////////////////////////
9088

9189

lib_acl/src/init/acl_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#include "init.h"
2626

27-
static char *version = "lib_acl_3.0.18";
27+
static char *version = "lib_acl_3.0.19";
2828

2929
const char *acl_version(void)
3030
{

lib_acl/src/master/template/acl_aio_server.c

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,6 @@ static void usage(int argc, char *argv[])
10121012
acl_msg_info("usage: %s -h[help]"
10131013
" -c [use chroot]"
10141014
" -d [debug]"
1015-
" -l [run alone]"
10161015
" -n service_name"
10171016
" -s socket_count"
10181017
" -i [use stdin]"
@@ -1222,7 +1221,7 @@ static void server_main(int argc, char **argv, va_list ap)
12221221
{
12231222
const char *myname = "acl_aio_server_main";
12241223
ACL_VSTREAM *stream = 0;
1225-
int key, f_flag = 0, alone = 0;
1224+
int key, f_flag = 0;
12261225
char *root_dir = 0, *user_name = 0;
12271226
char *service_name = acl_mystrdup(acl_safe_basename(argv[0]));
12281227
ACL_MASTER_SERVER_INIT_FN pre_init = 0;
@@ -1254,7 +1253,7 @@ static void server_main(int argc, char **argv, va_list ap)
12541253

12551254
opterr = 0;
12561255

1257-
while ((key = getopt(argc, argv, "hcdlm:n:o:s:it:uvzf:")) > 0) {
1256+
while ((key = getopt(argc, argv, "hcdm:n:o:s:it:uvzf:")) > 0) {
12581257
switch (key) {
12591258
case 'h':
12601259
usage(argc, argv);
@@ -1267,9 +1266,6 @@ static void server_main(int argc, char **argv, va_list ap)
12671266
case 'c':
12681267
root_dir = "setme";
12691268
break;
1270-
case 'l':
1271-
alone = 1;
1272-
break;
12731269
case 'n':
12741270
service_name = optarg;
12751271
break;
@@ -1387,6 +1383,10 @@ static void server_main(int argc, char **argv, va_list ap)
13871383
acl_msg_fatal("chdir(\"%s\"): %s", acl_var_aio_queue_dir,
13881384
acl_last_serror());
13891385

1386+
/* 增加 ip 地址限制 */
1387+
if (acl_var_aio_access_allow && *acl_var_aio_access_allow)
1388+
acl_access_add(acl_var_aio_access_allow, ", \t", ":");
1389+
13901390
/* Run pre-jail initialization. */
13911391
if (pre_init)
13921392
pre_init(__service_ctx);
@@ -1437,4 +1437,58 @@ void acl_aio_server2_main(int argc, char **argv, ACL_AIO_SERVER2_FN service,...)
14371437
server_main(argc, argv, ap);
14381438
}
14391439

1440+
/****************************************************************************/
1441+
1442+
static ACL_AIO_RUN_FN __app_run;
1443+
1444+
static void service_adapter(ACL_ASTREAM *astream, void *ctx)
1445+
{
1446+
const char *myname = "service_adapter";
1447+
1448+
if (__app_run) {
1449+
if (__app_run(astream, ctx) != 0)
1450+
acl_aio_iocp_close(astream);
1451+
} else
1452+
acl_msg_error("%s(%d): __app_run null", myname, __LINE__);
1453+
}
1454+
1455+
void acl_aio_app_main(int argc, char *argv[], ACL_AIO_RUN_FN run_fn,
1456+
void *run_ctx, ...)
1457+
{
1458+
va_list ap;
1459+
1460+
va_start(ap, run_ctx);
1461+
__service_main = service_adapter;
1462+
__app_run = run_fn;
1463+
__service_ctx = run_ctx;
1464+
1465+
server_main(argc, argv, ap);
1466+
}
1467+
1468+
static ACL_AIO_RUN2_FN __app2_run;
1469+
1470+
static void service_adapter2(ACL_SOCKET fd, void *ctx)
1471+
{
1472+
const char *myname = "service_adapter";
1473+
1474+
if (__app2_run) {
1475+
if (__app2_run(fd, ctx) != 0)
1476+
acl_socket_close(fd);
1477+
} else
1478+
acl_msg_error("%s(%d): __app2_run null", myname, __LINE__);
1479+
}
1480+
1481+
void acl_aio_app2_main(int argc, char *argv[], ACL_AIO_RUN2_FN run2_fn,
1482+
void *run_ctx, ...)
1483+
{
1484+
va_list ap;
1485+
1486+
va_start(ap, run_ctx);
1487+
__service2_main = service_adapter2;
1488+
__app2_run = run2_fn;
1489+
__service_ctx = run_ctx;
1490+
1491+
server_main(argc, argv, ap);
1492+
}
1493+
14401494
#endif /* ACL_UNIX */

lib_acl/src/master/template/acl_multi_server.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,6 @@ static void usage(int argc, char *argv[])
493493
acl_msg_info("usage: %s -h[help]"
494494
" -c [use chroot]"
495495
" -d [debug]"
496-
" -l [run alone]"
497496
" -n service_name"
498497
" -s socket_count"
499498
" -i [use stdin]"
@@ -521,8 +520,6 @@ void acl_multi_server_main(int argc, char **argv, ACL_MULTI_SERVER_FN service,..
521520
ACL_MASTER_SERVER_LOOP_FN loop = 0;
522521
int key;
523522
char *transport = 0;
524-
int alone = 0;
525-
int zerolimit = 0;
526523
ACL_WATCHDOG *watchdog;
527524
char *generation;
528525
int fd, i, fdtype = 0;
@@ -539,7 +536,7 @@ void acl_multi_server_main(int argc, char **argv, ACL_MULTI_SERVER_FN service,..
539536
* stderr, because no-one is going to see them.
540537
*/
541538
opterr = 0;
542-
while ((c = getopt(argc, argv, "hcdlm:n:s:it:uvzf:")) > 0) {
539+
while ((c = getopt(argc, argv, "hcdm:n:s:it:uvf:")) > 0) {
543540
switch (c) {
544541
case 'h':
545542
usage(argc, argv);
@@ -552,9 +549,6 @@ void acl_multi_server_main(int argc, char **argv, ACL_MULTI_SERVER_FN service,..
552549
case 'c':
553550
root_dir = "setme";
554551
break;
555-
case 'l':
556-
alone = 1;
557-
break;
558552
case 'n':
559553
service_name = optarg;
560554
break;
@@ -574,9 +568,6 @@ void acl_multi_server_main(int argc, char **argv, ACL_MULTI_SERVER_FN service,..
574568
case 'v':
575569
acl_msg_verbose++;
576570
break;
577-
case 'z':
578-
zerolimit = 1;
579-
break;
580571
default:
581572
break;
582573
}

lib_acl_cpp/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ clean:
246246
rm -f $(OBJS_DEF)
247247
@(cd samples; make clean)
248248

249+
rebuild rb: clean static
250+
249251
build_src: clean
250252
@(echo "begin building src release...")
251253
@(rm -rf acl_cpp)

0 commit comments

Comments
 (0)