Skip to content

Commit

Permalink
Update yasio plugin to v3.39.4
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxiaodong committed Apr 15, 2022
1 parent 48c2fb7 commit 872040c
Show file tree
Hide file tree
Showing 41 changed files with 1,800 additions and 1,785 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/*
The MIT License (MIT)
Copyright (c) 2012-2021 HALX99
Copyright (c) 2012-2022 HALX99
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/*
The MIT License (MIT)
Copyright (c) 2012-2021 HALX99
Copyright (c) 2012-2022 HALX99
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//////////////////////////////////////////////////////////////////////////////////////////
/*
The MIT License (MIT)
Copyright (c) 2012-2021 HALX99
Copyright (c) 2012-2022 HALX99
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//////////////////////////////////////////////////////////////////////////////////////////
/*
The MIT License (MIT)
Copyright (c) 2012-2021 HALX99
Copyright (c) 2012-2022 HALX99
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
Expand Down
2 changes: 1 addition & 1 deletion Plugins/yasio/Source/yasio/Private/yasio/xxsocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/*
The MIT License (MIT)
Copyright (c) 2012-2021 HALX99
Copyright (c) 2012-2022 HALX99
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
17 changes: 12 additions & 5 deletions Plugins/yasio/Source/yasio/Private/yasio/yasio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/*
The MIT License (MIT)
Copyright (c) 2012-2021 HALX99
Copyright (c) 2012-2022 HALX99
HAL: Hardware Abstraction Layer
X99: Intel X99 Mainboard Platform
Expand Down Expand Up @@ -330,7 +330,8 @@ int io_channel::__builtin_decode_len(void* d, int n)
if (n >= (loffset + lsize))
{
::memcpy(&len, (uint8_t*)d + loffset, lsize);
len = yasio::network_to_host(len, lsize);
if (!uparams_.no_bswap)
len = yasio::network_to_host(len, lsize);
len += uparams_.length_adjustment;
if (len > uparams_.max_frame_length)
len = -1;
Expand Down Expand Up @@ -936,12 +937,12 @@ void io_service::run()
process_ares_requests(fds_array);
#endif

// process active channels
process_channels(fds_array);

// process active transports
process_transports(fds_array);

// process active channels
process_channels(fds_array);

// process timeout timers
process_timers();
} while (!this->stop_flag_ || !this->transports_.empty());
Expand Down Expand Up @@ -2283,6 +2284,12 @@ void io_service::set_option_internal(int opt, va_list ap) // lgtm [cpp/poorly-do
channel->uparams_.initial_bytes_to_strip = yasio::clamp(va_arg(ap, int), 0, YASIO_UNPACK_MAX_STRIP);
break;
}
case YOPT_C_UNPACK_NO_BSWAP: {
auto channel = channel_at(static_cast<size_t>(va_arg(ap, int)));
if (channel)
channel->uparams_.no_bswap = va_arg(ap, int);
break;
}
case YOPT_S_EVENT_CB:
options_.on_event_ = *va_arg(ap, event_cb_t*);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/*
The MIT License (MIT)
Copyright (c) 2012-2021 HALX99
Copyright (c) 2012-2022 HALX99
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion Plugins/yasio/Source/yasio/Public/yasio/cxx17/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/*
The MIT License (MIT)
Copyright (c) 2012-2021 HALX99
Copyright (c) 2012-2022 HALX99
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 872040c

Please sign in to comment.