Commit Graph

144 Commits

Author SHA1 Message Date
coder
284df5430b service_logger.c localtime崩溃,换成线程安全的localtime_r (#1311) 2020-12-28 15:42:16 +08:00
Cloud Wu
80b60f23c9 use CAS to finish set 2020-10-23 19:20:31 +08:00
Cloud Wu
a6adc69090 Use atomic instruct to avoid concurrence signal 0 2020-10-23 18:21:16 +08:00
云风
eaa60ca8dd Update to lua 5.4 (#1174)
* update to lua 5.4.0-rc1

* remove LUA_ERRGCMM

* use age bits for shared

* remove unused lbitlib.c

* use luaV_fastget

* fix #1174

* suspend函数tailcall优化

* 防止没有session导致未调用suspend

* luaH_setint check shared (#1184)

* set LUA_GCGEN by default

* fix #1174 (#1186)

checkshared in sweeplist

* update to lua 5.4 rc2

* update to lua 5.4 rc4

* move skynet.profile into snlua

* Use lua_sethook to interrupt tight loops

* remove lua_checksig

* critical condition for signals

* update to lua 5.4 released

* lua 5.4 bugfix

* update lua bugfix

* fix lua_sharestring (#1224)

* update lua

* update lua 5.4

* update README

* add skynet.select

* add test

* test error & discard

* yield session

* request error has no error message

* add timeout to skynet.select

* bugfix

* for lua 5.4

* new version

* bugfix

* bugfix

* use if instead of while

* make local

* yield in select for

* update lua 5.4.1

* change lua version (#1245)

Co-authored-by: xiaojin <xiaojin@onemt.com.cn>

* update lua version number

Co-authored-by: hong <hongling0@gmail.com>
Co-authored-by: hong <hongling-0@qq.com>
Co-authored-by: 风---自由 <996442717qqcom@gmail.com>
Co-authored-by: xiaojin <xiaojin@onemt.com.cn>
2020-10-10 13:36:59 +08:00
Cloud Wu
ce52533c74 remove time() 2020-08-11 16:32:22 +08:00
Cloud Wu
3025e4765a csec 2020-08-11 11:50:45 +08:00
Cloud Wu
446dafdc0b use skynet_now for timestamp 2020-08-11 11:47:33 +08:00
Cloud Wu
c7386fe768 open log file in append mode 2020-08-11 10:54:40 +08:00
Cloud Wu
d80ed7483d add timestamp for logging to file 2020-08-11 10:32:46 +08:00
Cloud Wu
9d7ea09789 Add socket_sendbuffer 2019-11-14 10:49:25 +08:00
Cloud Wu
8a3a0c1b71 register logger name in framework, see #909 2018-10-21 13:21:51 +08:00
caijietao
6c7cb5313d set backlog to 128 2018-05-22 13:08:00 +08:00
spin6lock
188e38198a add ipv6 host support to service_gate.c
service_gate的地址解析用strchr找到第一个':',并将后续的字符串作为
端口号解析。填ipv6地址"0:0:0:0:0:0:0:0:9999"的时候会出错,现在改成
strrchr,从右面找到的第一个':'
2018-05-22 13:07:02 +08:00
Cloud Wu
2bfba716ef forward fd to agent 2018-04-18 19:29:41 +08:00
Cloud Wu
9cf4525a8f avoid error circulation 2018-02-12 18:07:16 +08:00
Cloud Wu
0846a6533d fix a legacy problem. make harbor service more stable 2018-02-12 18:07:16 +08:00
云风
fad154f474 remove this free would be better 2017-08-24 10:01:47 +08:00
hwangcc23
40543d42d5 Fix double free
In the mainloop function, calling __skynet_free__ frees the pointer which may has already been freed in __push_socket_data__.

mainloop(struct skynet_context * context, void * ud, int type, int session, uint32_t source, const void * msg, size_t sz) {
        struct harbor * h = ud;
        switch (type) {
        case PTYPE_SOCKET: {
                const struct skynet_socket_message * message = msg;
                switch(message->type) {
                case SKYNET_SOCKET_TYPE_DATA:
                        push_socket_data(h, message);
                        skynet_free(message->buffer);
                        // skip...

To fix this potential double-free bug, clear the pointer message->buffer in __push_socket_data__ after the pointer is freed.
2017-08-23 23:43:20 +08:00
Cloud Wu
7ee9cdb29b dummy session is 1 2016-12-02 21:23:12 +08:00
Cloud Wu
ea9bc53261 reopen log file when recv signal HUP 2016-06-12 13:40:23 +08:00
Cloud Wu
a5c79cc4bd move skynet.memlimit from skynet.manager to skynet 2016-05-07 09:23:01 +08:00
Cloud Wu
4b96ade660 support sandbox memory limit 2016-05-06 23:40:44 +08:00
Cloud Wu
76d1e6fa1f memory warning 2016-05-06 20:37:51 +08:00
Cloud Wu
1da92850a0 bugfix: dispatch local global message queue 2016-01-19 17:14:52 +08:00
Cloud Wu
9747cf9aee don't assert here 2016-01-19 16:16:18 +08:00
Cloud Wu
878110f9f7 add codecache.mode() 2015-10-12 12:29:19 +08:00
xjdrew
515326dadc bugfix: remove Wformat warning 2015-10-10 18:39:42 +08:00
xjdrew
8dd9923cf6 gate: application could control when to start receiving data 2015-10-08 16:55:29 +08:00
xjdrew
97ff6afc84 removte unused code 2015-09-29 17:29:33 +08:00
great90
63942496fd 从check_wsz发送的SKYNET_SOCKET_TYPE_WARNING消息会assert失败,导致coredump 2015-09-21 23:50:18 +08:00
Cloud Wu
752a501f68 bugfix: remove DONTCOPY tag from type 2015-09-21 10:40:09 +08:00
Cloud Wu
010d1c1d4f avoid dead loop 2015-08-24 11:50:40 +08:00
Cloud Wu
947727e33a add new socket message WARNING 2015-08-11 13:21:24 +08:00
Cloud Wu
aff73cbed7 Increase message size 16M(24bit) limit to 56bit on 64bit arch 2015-08-05 12:23:35 +08:00
leeonix
57999456ef modify Makefile and add lua clean
modify service-src/service_gate.c space to tab
2015-06-20 11:29:56 +08:00
Cloud Wu
ac093c7142 fix memory leak, see Issue #290 2015-06-07 12:38:55 +08:00
xiyanxiyan10
987a90af8b 调整格式 2015-05-23 16:35:15 +08:00
Cloud Wu
f95d8db4da Add marco detect lua version 2015-03-11 15:17:51 +08:00
Cloud Wu
a0ffff8ad6 add module signal and hack lua to support it :) 2015-03-11 15:10:53 +08:00
Cloud Wu
b1ef8a33d9 harbor can post error message back when the destination is not exist 2014-10-28 17:00:24 +08:00
Cloud Wu
d649d0adf1 delete duplicate line 2014-10-13 10:59:33 +08:00
Cloud Wu
55ea556060 avoid issue #154 2014-08-19 23:26:42 +08:00
Cloud Wu
0954a906f4 skynet.redirect support string address 2014-08-11 15:29:48 +08:00
Cloud Wu
e60fb1d722 bugfix: remote send handle destination 2014-07-08 11:01:26 +08:00
Cloud Wu
54f4d94ba2 bugfix: create queue first 2014-07-07 19:50:31 +08:00
Cloud Wu
1e0189962b bugfix: dead lock when service_harbor exit 2014-06-30 11:31:24 +08:00
Cloud Wu
f849c522bb bugfix: silly bug 2014-06-24 21:06:40 +08:00
Cloud Wu
79b6b80676 bugfix: harbor socket package split 2014-06-24 18:19:04 +08:00
Cloud Wu
9937081854 Redesign harbor/master/dummy service 2014-06-21 17:01:59 +08:00
Cloud Wu
c3eb5cd202 After connecting, socket can send before connected. remove block connect api 2014-06-20 02:49:48 +08:00