47 Commits

Author SHA1 Message Date
华仔
fb97668f9e fix word err (#1847) 2024-01-03 20:05:28 +08:00
Cloud Wu
27866518ef Fix #1506 2021-11-19 08:48:27 +08:00
Cloud Wu
9d7ea09789 Add socket_sendbuffer 2019-11-14 10:49:25 +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
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
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
Cloud Wu
ac093c7142 fix memory leak, see Issue #290 2015-06-07 12:38:55 +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
55ea556060 avoid issue #154 2014-08-19 23:26:42 +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
Cloud Wu
ad9898a209 add module skynet.harbor 2014-06-19 15:43:41 +08:00
Cloud Wu
c2ed2f8603 bugfix. the harbor and master service need to rewrite in future 2014-05-15 19:32:54 +08:00
Cloud Wu
8d8cb17e0a launch all the bootstrap services in bootstrap.lua 2014-05-08 12:06:53 +08:00
Cloud Wu
a700abcdb3 remove skynet.watch, move simplemonitor to examples 2014-05-06 14:57:01 +08:00
Cloud Wu
75a28b0fcc use skynet malloc api directly 2014-04-22 12:26:08 +08:00
Cloud Wu
7d835d222b use macro for replace malloc api (see skynet_malloc.h) 2014-04-18 22:38:18 +08:00
nopsky
c18ea761a4 修改harbor_init里的一个小bug 2014-04-09 19:14:54 +08:00
Cloud Wu
b02d07f124 throw an error only session !=0 2014-03-28 15:15:02 +08:00
Cloud Wu
f772fc4ce8 remote call will raise an error when the harbor disconnected 2014-03-28 15:08:20 +08:00
云风
2d8b061970 add log for net building 2013-12-16 13:39:27 +08:00
云风
80fe468e8e add block connect for harbor 2013-09-10 23:21:30 +08:00
Cloud
a15b93cbcf bugfix: kqueue api 2013-09-10 21:44:32 +08:00
云风
fd67d2f968 push message back to queue before harbor connect to master 2013-09-10 18:09:04 +08:00
云风
1fc601612c bugfix: gate start 2013-08-23 10:40:14 +08:00
云风
83db25fe92 service_harbor use skynet_socket now 2013-08-21 16:56:16 +08:00
云风
fdb37bc110 Make for Freebsd 2013-05-08 17:26:43 +08:00
Yecheng Fu
6319225b7a BUG: expand buffer 后所取的 slot 不正确,与下次要取的 slot 是同一个 slot。
FIX: 先 expand,再获取 slot 并移动 tail。
2013-01-04 18:10:01 +08:00
云风
b6314b537f skynet abort 2012-11-08 14:57:51 +08:00
云风
664056977d gate support user defined header size 2012-09-05 10:56:16 +08:00
云风
eba15c820f use HANDLE_MASK & HANDLE_REMOTE_SHIFT 2012-09-04 11:19:41 +08:00
云风
0a886cd57c support multi protocol 2012-08-31 21:18:19 +08:00
云风
1ee802c5c5 global group multicast 2012-08-30 23:31:33 +08:00
云风
1791becd09 change skynet_send api (use uint32_t instead of string) 2012-08-30 13:09:34 +08:00
云风
b06d380219 Rewrite harbor and don't need zeromq :) 2012-08-17 11:48:22 +08:00