From 69f44ebd5780a8f29835c865cc585e5235efbe51 Mon Sep 17 00:00:00 2001 From: Recolic Keghart <root@recolic.net> Date: Sun, 3 May 2020 01:17:42 +0800 Subject: [PATCH] . --- impl/traceable_list.hpp | 4 ++-- sys/sio.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/impl/traceable_list.hpp b/impl/traceable_list.hpp index 053f4bb..07f7030 100644 --- a/impl/traceable_list.hpp +++ b/impl/traceable_list.hpp @@ -19,7 +19,7 @@ namespace rlib { node *prev; node *next; extra_info_t extra_info; // bool flag. specially designed for object_pool. - uint32_t magic = 0x19980427; + uint32_t magic = 0x19990823; template <typename... TConstructArgs> node(node *prev, node *next, const extra_info_t &extra_info, TConstructArgs... args) : data(std::forward<TConstructArgs>(args) ...), prev(prev), next(next), extra_info(extra_info) @@ -36,7 +36,7 @@ namespace rlib { explicit iterator(node *ptr) : ptr(ptr) {} explicit iterator(T *data_pointer) : ptr(reinterpret_cast<node *>(data_pointer)) { - if (ptr->magic != 0x19980427) + if (ptr->magic != 0x19990823) throw std::invalid_argument( "magic_num verification failed. invalid data_pointer passed or ruined memory?"); } diff --git a/sys/sio.hpp b/sys/sio.hpp index a89c382..57902f9 100644 --- a/sys/sio.hpp +++ b/sys/sio.hpp @@ -631,7 +631,7 @@ namespace rlib { private: #pragma pack(push, 1) struct packed_msg_head { - uint32_t magic = 0x19980427; + uint32_t magic = 0x19990823; uint64_t len; }; #pragma pack(pop) @@ -640,7 +640,7 @@ namespace rlib { static std::string recv_msg(sockfd_t fd) { packed_msg_head head; recvn_ex(fd, &head, sizeof(head), MSG_NOSIGNAL); - if(head.magic != 0x19980427) + if(head.magic != 0x19990823) throw std::runtime_error("Invalid magic received."); if(head.len > 1024ull*1024*1024*2) throw std::runtime_error("Message len is greater than 2GiB. Refuse to alloc space."); -- GitLab