Fixed some stuff

This commit is contained in:
WolverinDEV 2019-06-28 18:14:44 +02:00
parent 9e1566566a
commit d75455c63f
4 changed files with 10 additions and 5 deletions

View File

@ -93,6 +93,8 @@ bool EventExecutor::cancel(const std::shared_ptr<event::EventEntry> &entry) {
return false;
auto linked_entry = (LinkedEntry*) entry->_event_ptr;
entry->_event_ptr = nullptr;
this->head = linked_entry->next;
if(this->head) {
assert(linked_entry == this->head->previous);
@ -103,7 +105,6 @@ bool EventExecutor::cancel(const std::shared_ptr<event::EventEntry> &entry) {
}
delete linked_entry;
entry->_event_ptr = nullptr;
return true;
}

View File

@ -141,9 +141,9 @@ namespace ts {
array<shared_ptr<PropertyDescription>, VirtualServerProperties::VIRTUALSERVER_ENDMARKER> virtualserver_info = {
make_shared<PropertyDescription>(VIRTUALSERVER_UNDEFINED, "VIRTUALSERVER_UNDEFINED", "", TYPE_UNKNOWN, 0), //Must be at index 0!
make_shared<PropertyDescription>(VIRTUALSERVER_ID, "virtualserver_id", "0", TYPE_UNSIGNED_NUMBER, FLAG_SERVER_VIEW), //available when connected
make_shared<PropertyDescription>(VIRTUALSERVER_UNIQUE_IDENTIFIER, "virtualserver_unique_identifier", "", TYPE_STRING, FLAG_SERVER_VV | FLAG_SNAPSHOT),
make_shared<PropertyDescription>(VIRTUALSERVER_NAME, "virtualserver_name", "Another TeaSpeak server software user", TYPE_STRING, FLAG_SERVER_VVSS | FLAG_USER_EDITABLE),
make_shared<PropertyDescription>(VIRTUALSERVER_ID, "VIRTUALSERVER_ID", "0", TYPE_UNSIGNED_NUMBER, FLAG_SERVER_VIEW), //available when connected
make_shared<PropertyDescription>(VIRTUALSERVER_UNIQUE_IDENTIFIER, "VIRTUALSERVER_UNIQUE_IDENTIFIER", "", TYPE_STRING, FLAG_SERVER_VV | FLAG_SNAPSHOT),
make_shared<PropertyDescription>(VIRTUALSERVER_NAME, "VIRTUALSERVER_NAME", "Another TeaSpeak server software user", TYPE_STRING, FLAG_SERVER_VVSS | FLAG_USER_EDITABLE),
make_shared<PropertyDescription>(VIRTUALSERVER_WELCOMEMESSAGE, "VIRTUALSERVER_WELCOMEMESSAGE", "Welcome on another TeaSpeak server. (Download now and a license fee is not your cup of tea! [URL]www.teaspeak.de[/URL])", TYPE_STRING, FLAG_SERVER_VVSS | FLAG_USER_EDITABLE),
make_shared<PropertyDescription>(VIRTUALSERVER_PLATFORM, "VIRTUALSERVER_PLATFORM", "undefined", TYPE_STRING, FLAG_SERVER_VIEW),
make_shared<PropertyDescription>(VIRTUALSERVER_VERSION, "VIRTUALSERVER_VERSION", "undefined", TYPE_STRING, FLAG_SERVER_VIEW),
@ -453,6 +453,7 @@ namespace ts {
make_shared<PropertyDescription>(SERVERINSTANCE_SPOKEN_TIME_DELETED, "SERVERINSTANCE_SPOKEN_TIME_DELETED", "0", TYPE_UNSIGNED_NUMBER, FLAG_INTERNAL | FLAG_SAVE | FLAG_NEW),
make_shared<PropertyDescription>(SERVERINSTANCE_SPOKEN_TIME_ALIVE, "SERVERINSTANCE_SPOKEN_TIME_ALIVE", "0", TYPE_UNSIGNED_NUMBER, FLAG_INTERNAL | FLAG_SAVE | FLAG_NEW),
make_shared<PropertyDescription>(SERVERINSTANCE_SPOKEN_TIME_VARIANZ, "SERVERINSTANCE_SPOKEN_TIME_VARIANZ", "0", TYPE_UNSIGNED_NUMBER, FLAG_INTERNAL | FLAG_SAVE | FLAG_NEW),
make_shared<PropertyDescription>(SERVERINSTANCE_VIRTUAL_SERVER_ID_INDEX, "SERVERINSTANCE_VIRTUAL_SERVER_ID_INDEX", "1", TYPE_UNSIGNED_NUMBER, FLAG_SAVE | FLAG_INSTANCE_VARIABLE | FLAG_NEW),
make_shared<PropertyDescription>(SERVERINSTANCE_UNIQUE_ID, "SERVERINSTANCE_UNIQUE_ID", "", TYPE_STRING, FLAG_INTERNAL | FLAG_SAVE | FLAG_NEW),
};

View File

@ -109,6 +109,9 @@ namespace ts {
SERVERINSTANCE_SPOKEN_TIME_DELETED,
SERVERINSTANCE_SPOKEN_TIME_ALIVE,
SERVERINSTANCE_SPOKEN_TIME_VARIANZ,
SERVERINSTANCE_VIRTUAL_SERVER_ID_INDEX,
SERVERINSTANCE_UNIQUE_ID,
SERVERINSTANCE_ENDMARKER,
};

View File

@ -155,7 +155,7 @@ namespace ts {
inline pipes::buffer_view header() const { return this->_buffer.view(MAC_SIZE, this->_header_length); }
inline pipes::buffer header() { return this->_buffer.range(MAC_SIZE, this->_header_length); }
inline size_t data_length() const { return this->_buffer.length() - MAC_SIZE - this->_header_length; }
inline size_t data_length() const { return this->_buffer.length() - (MAC_SIZE + this->_header_length); }
inline pipes::buffer_view data() const { return this->_buffer.view(MAC_SIZE + this->_header_length); }
inline pipes::buffer data() { return this->_buffer.range(MAC_SIZE + this->_header_length); }