message
stringlengths
6
474
diff
stringlengths
8
5.22k
Add initial security editor TokenDefaultDacl support
@@ -754,7 +754,7 @@ _Callback_ NTSTATUS PhStdGetObjectSecurity( status = PhpGetObjectSecurityWithTimeout(handle, SecurityInformation, SecurityDescriptor); NtClose(handle); } - if ( + else if ( PhEqualString2(this->ObjectType, L"LsaAccount", TRUE) || PhEqualString2(this->ObjectType, L"LsaPolicy", TRUE) || PhEqualString2(this->ObjectType, L"LsaSecret", TRUE) || @@ -807,6 +807,37 @@ _Callback_ NTSTATUS PhStdGetObjectSecurity( // //SamCloseHandle(handle); } + else if (PhEqualString2(this->ObjectType, L"TokenDefault", TRUE)) // HACK: Fake non-system type (dmex) + { + PTOKEN_DEFAULT_DACL defaultDacl; + + status = PhQueryTokenVariableSize( + handle, + TokenDefaultDacl, + &defaultDacl + ); + + if (NT_SUCCESS(status)) + { + PSECURITY_DESCRIPTOR securityDescriptor; + PTOKEN_OWNER tokenOwner; + + securityDescriptor = PhAllocateZero(SECURITY_DESCRIPTOR_MIN_LENGTH); + RtlCreateSecurityDescriptor(securityDescriptor, SECURITY_DESCRIPTOR_REVISION); + RtlSetDaclSecurityDescriptor(securityDescriptor, TRUE, defaultDacl->DefaultDacl, FALSE); + + if (NT_SUCCESS(PhGetTokenOwner(handle, &tokenOwner))) + { + RtlSetOwnerSecurityDescriptor(securityDescriptor, tokenOwner->Owner, FALSE); + PhFree(tokenOwner); + } + + *SecurityDescriptor = securityDescriptor; + PhFree(defaultDacl); + } + + NtClose(handle); + } else { status = PhGetObjectSecurity(handle, SecurityInformation, SecurityDescriptor); @@ -881,6 +912,10 @@ _Callback_ NTSTATUS PhStdSetObjectSecurity( // //SamCloseHandle(handle); } + else if (PhEqualString2(this->ObjectType, L"TokenDefault", TRUE)) + { + // TODO + } else { status = PhSetObjectSecurity(handle, SecurityInformation, SecurityDescriptor);
distro-packages/python-rpm-macros: strip proj_delim from name for specfile search
--- a/macros.lua 2017-12-07 11:46:04.000000000 -0800 -+++ b/macros.lua 2017-12-07 15:30:01.000000000 -0800 -@@ -56,15 +56,15 @@ - specpath = rpm.expand("%_specfile") ++++ b/macros.lua 2017-12-08 12:47:48.000000000 -0800 +@@ -14,7 +14,7 @@ + -- ...but check that it is actually in the buildset + if insert_last_python then table.insert(pythons, last_python) end - -- search possible locations - shouldn't be necessary anymore ---- local locations = { rpm.expand("%_sourcedir"), rpm.expand("%_specdir"), posix.getcwd(), posix.getcwd() .. "/" .. name } ---- for _,loc in ipairs(locations) do ---- local filename = loc .. "/" .. name .. ".spec" ---- if posix.stat(filename, "mode") ~= nil then ---- io.stderr:write("could not find spec as " .. filename .. "\n") ---- specpath = filename ---- break ---- end ---- end -+ local locations = { rpm.expand("%_sourcedir"), rpm.expand("%_specdir"), posix.getcwd(), posix.getcwd() .. "/" .. name } -+ for _,loc in ipairs(locations) do -+ local filename = loc .. "/" .. name .. ".spec" -+ if posix.stat(filename, "mode") ~= nil then -+ io.stderr:write("could not find spec as " .. filename .. "\n") -+ specpath = filename -+ break -+ end -+ end - end - - function python_subpackages() +- modname = rpm.expand("%name") ++ modname = string.gsub(rpm.expand("%name"), "-ohpc", "") + local spec_name_prefix = "python" + -- modname from name + local name = modname
Update docstrings in boot.janet Elaborate on usage of reduce and accumulate.
(defn reduce "Reduce, also know as fold-left in many languages, transforms - an indexed type (array, tuple) with a function to produce a value." + an indexed type (array, tuple) with a function to produce a value by applying f to + each element in order. f is a function of 2 arguments, (f accum el), where + accum is the initial value and el is the next value in the indexed type ind. + f returns a value that will be used as accum in the next call to f. reduce + returns the value of the final call to f." [f init ind] - (var res init) - (each x ind (set res (f res x))) - res) + (var accum init) + (each el ind (set accum (f accum el))) + accum) (defn reduce2 "The 2-argument version of reduce that does not take an initialization value. (defn accumulate "Similar to reduce, but accumulates intermediate values into an array. The last element in the array is what would be the return value from reduce. - The init value is not added to the array. + The init value is not added to the array (the return value will have the same + number of elements as ind). Returns a new array." [f init ind] (var res init) ret) (defn accumulate2 - "The 2-argument version of accumulate that does not take an initialization value." + "The 2-argument version of accumulate that does not take an initialization value. + The first value in ind will be added to the array as is, so the length of the + return value will be (length ind)." [f ind] (var k (next ind)) (def ret (array/new (length ind)))
charge_state_v2: dump_charge_state: Add cflush The dump_charge_state (chgstate console command) is quite large, and may get truncated, let's add 2 cflush at approximately each third of the output. BRANCH=none TEST=On wand, type chgstate in EC console
@@ -297,6 +297,7 @@ static void dump_charge_state(void) DUMP_CHG(status, "0x%x"); DUMP_CHG(option, "0x%x"); DUMP_CHG(flags, "0x%x"); + cflush(); ccprintf("batt.*:\n"); ccprintf("\ttemperature = %dC\n", DECI_KELVIN_TO_CELSIUS(curr.batt.temperature)); @@ -309,6 +310,7 @@ static void dump_charge_state(void) DUMP_BATT(remaining_capacity, "%dmAh"); DUMP_BATT(full_capacity, "%dmAh"); ccprintf("\tis_present = %s\n", batt_pres[curr.batt.is_present]); + cflush(); DUMP(requested_voltage, "%dmV"); DUMP(requested_current, "%dmA"); ccprintf("chg_ctl_mode = %d\n", chg_ctl_mode);
Don't resize the window Should have been removed in an earlier patch.
@@ -302,12 +302,6 @@ void resize_renderer(int sizeX, int sizeY) { std::cout << "Textured destroyed" << std::endl; - current_width = sizeX; - current_height = sizeY; - SDL_SetWindowSize(window, sizeX, sizeY); - - std::cout << "Window size set" << std::endl; - __fb_texture_RGB24 = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGB24, SDL_TEXTUREACCESS_TARGET, SYSTEM_WIDTH, SYSTEM_HEIGHT); __ltdc_texture_RGB565 = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGB565, SDL_TEXTUREACCESS_TARGET, SYSTEM_WIDTH * 2, SYSTEM_HEIGHT * 2);
luci-theme-argon: Remove renderModeMenu function luci-theme-argon no '#modemenu' , should remove renderModeMenu function.
@@ -9,9 +9,15 @@ return baseclass.extend({ render: function (tree) { var node = tree, - url = ''; + url = '', + children = ui.menu.getChildren(tree); - this.renderModeMenu(node); + for (var i = 0; i < children.length; i++) { + var isActive = (L.env.requestpath.length ? children[i].name == L.env.requestpath[0] : i == 0); + + if (isActive) + this.renderMainMenu(children[i], children[i].name); + } if (L.env.dispatchpath.length >= 3) { for (var i = 0; i < 3 && node; i++) { @@ -89,31 +95,6 @@ return baseclass.extend({ return ul; }, - renderModeMenu: function (tree) { - var menu = document.querySelector('#modemenu'), - children = ui.menu.getChildren(tree); - - for (var i = 0; i < children.length; i++) { - var isActive = (L.env.requestpath.length ? children[i].name == L.env.requestpath[0] : i == 0); - - if (i > 0) - menu.appendChild(E([], ['\u00a0|\u00a0'])); - - menu.appendChild(E('li', {}, [ - E('a', { - 'href': L.url(children[i].name), - 'class': isActive ? 'active' : null - }, [_(children[i].title)]) - ])); - - if (isActive) - this.renderMainMenu(children[i], children[i].name); - } - - if (menu.children.length > 1) - menu.style.display = ''; - }, - renderTabMenu: function (tree, url, level) { var container = document.querySelector('#tabmenu'), l = (level || 0) + 1,
send_message: fix unknown erc20 example Since adding more tokens in the previous commit, this erc20 token became known. I just modify the contract address a bit to make it unknown.
@@ -602,7 +602,7 @@ class SendMessage: ) elif inp == "4": tx = binascii.unhexlify( - "f8aa81b9843b9aca0083010985949c23d67aea7b95d80942e3836bcdf7e708a747c280b844a9059cbb000000000000000000000000857b3d969eacb775a9f79cabc62ec4bb1d1cd60e000000000000000000000000000000000000000000000098a63cbeb859d027b026a0d3b1a9ba4aff7ebf81dca7dafdbe6d803d174f7805276f45530f2c30e74f5ffca02d86d5290f6ba2c5100e08764d8ab34cf33b03dff3f63219fd839ac9a95f7068" + "f8aa81b9843b9aca0083010985949c23d67aea7b95d80942e3836bcdf7e708a747c180b844a9059cbb000000000000000000000000857b3d969eacb775a9f79cabc62ec4bb1d1cd60e000000000000000000000000000000000000000000000098a63cbeb859d027b026a0d3b1a9ba4aff7ebf81dca7dafdbe6d803d174f7805276f45530f2c30e74f5ffca02d86d5290f6ba2c5100e08764d8ab34cf33b03dff3f63219fd839ac9a95f7068" ) else: print("None selected")
Fixes an incorrect loop that installed bundles multiple times
@@ -599,9 +599,7 @@ static void framework_autoStartConfiguredBundles(bundle_context_t *fwCtx) { framework_autoInstallConfiguredBundlesForList(fwCtx, autoStart, installedBundles); } } - for (int i = 0; i < len; ++i) { framework_autoStartConfiguredBundlesForList(fwCtx, installedBundles); - } celix_arrayList_destroy(installedBundles); }
syscalls: Fixed syscalls array bound check
@@ -1213,7 +1213,7 @@ void *syscalls_dispatch(int n, char *ustack) { void *retval; - if (n > sizeof(syscalls) / sizeof(syscalls[0])) + if (n >= sizeof(syscalls) / sizeof(syscalls[0])) return (void *)-EINVAL; proc_threadProtect();
Update NO_INVARIANCE change log entry
@@ -40,9 +40,10 @@ cost:quality trade off. `cl.exe` and `clangcl.exe` compilers. * **Feature:** The core codec now supports arm64 for both MSVC `cl.exe` and `clangcl.exe` compilers. - * **Feature:** `NO_INVARIANCE` builds with AVX2 will enable `-mfma` and - `-ffp-contract=fast` when using Clang or GCC. This reduces image quality - by up to 0.2dB (normally much less), but improves performance by 10-15%. + * **Feature:** `NO_INVARIANCE` builds will enable the `-ffp-contract=fast` + option for all targets when using Clang or GCC. In addition AVX2 targets + will also set the `-mfma` option. This reduces image quality by up to 0.2dB + (normally much less), but improves performance by up to 5-20%. * **Optimization:** Angular endpoint min/max weight selection is restricted to weight `QUANT_11` or lower. Higher quantization levels assume default 0-1 range, which is less accurate but much faster.
Ugh restructured text sucks
@@ -48,7 +48,7 @@ The first step in attaching the FIR filter as a MMIO peripheral is to create an :end-before: DOC include end: GenericFIRBlock chisel Connecting DspBlock by TileLink ----------------------- +------------------------------- With these classes implemented, you can begin to construct the chain by extending ``GenericFIRBlock`` while using the ``TLDspBlock`` trait via mixin. .. literalinclude:: ../../generators/chipyard/src/main/scala/example/dsptools/GenericFIR.scala
Add static assert check
#if defined(MBEDTLS_SSL_TLS_C) +#include <assert.h> + #if defined(MBEDTLS_PLATFORM_C) #include "mbedtls/platform.h" #else @@ -3160,35 +3162,35 @@ static int ssl_handshake_init( mbedtls_ssl_context *ssl ) { const int *md; const int *sig_hashes = ssl->conf->sig_hashes; - size_t sig_algs_len = sizeof( uint16_t ); - size_t sig_algs_len_per_hash = 0; + size_t sig_algs_len = 0; uint16_t *p; -#if defined(MBEDTLS_ECDSA_C) - sig_algs_len_per_hash += sizeof( uint16_t ); -#endif -#if defined(MBEDTLS_RSA_C) - sig_algs_len_per_hash += sizeof( uint16_t ); +#if defined(static_assert) + static_assert( MBEDTLS_SSL_MAX_SIG_ALG_LIST_LEN + <= ( SIZE_MAX - ( 2 * sizeof(uint16_t) ) ), + "MBEDTLS_SSL_MAX_SIG_ALG_LIST_LEN too big" ); #endif for( md = sig_hashes; *md != MBEDTLS_MD_NONE; md++ ) { if( mbedtls_ssl_hash_from_md_alg( *md ) == MBEDTLS_SSL_HASH_NONE ) continue; - if( sig_algs_len > - ( MBEDTLS_SSL_MAX_SIG_ALG_LIST_LEN + sizeof( uint16_t ) - - sig_algs_len_per_hash ) ) - { - return( MBEDTLS_ERR_SSL_BAD_CONFIG ); - } +#if defined(MBEDTLS_ECDSA_C) + sig_algs_len += sizeof( uint16_t ); +#endif - sig_algs_len += sig_algs_len_per_hash; +#if defined(MBEDTLS_RSA_C) + sig_algs_len += sizeof( uint16_t ); +#endif + if( sig_algs_len > MBEDTLS_SSL_MAX_SIG_ALG_LIST_LEN ) + return( MBEDTLS_ERR_SSL_BAD_CONFIG ); } - if( sig_algs_len < MBEDTLS_SSL_MIN_SIG_ALG_LIST_LEN + sizeof( uint16_t )) + if( sig_algs_len < MBEDTLS_SSL_MIN_SIG_ALG_LIST_LEN ) return( MBEDTLS_ERR_SSL_BAD_CONFIG ); - ssl->handshake->sig_algs = mbedtls_calloc( 1, sig_algs_len ); + ssl->handshake->sig_algs = mbedtls_calloc( 1, sig_algs_len + + sizeof( uint16_t )); if( ssl->handshake->sig_algs == NULL ) return( MBEDTLS_ERR_SSL_ALLOC_FAILED );
Fix-up to Define OSSL_SIGNATURE_PARAM_NONCE_TYPE as "nonce-type" (rather than "nonce_type") so that it is consistent with the documentation.
@@ -466,7 +466,7 @@ extern "C" { #define OSSL_SIGNATURE_PARAM_MGF1_PROPERTIES \ OSSL_PKEY_PARAM_MGF1_PROPERTIES #define OSSL_SIGNATURE_PARAM_DIGEST_SIZE OSSL_PKEY_PARAM_DIGEST_SIZE -#define OSSL_SIGNATURE_PARAM_NONCE_TYPE "nonce_type" +#define OSSL_SIGNATURE_PARAM_NONCE_TYPE "nonce-type" /* Asym cipher parameters */ #define OSSL_ASYM_CIPHER_PARAM_DIGEST OSSL_PKEY_PARAM_DIGEST
Fix aix build failure
@@ -159,6 +159,10 @@ ifneq "$(findstring $(BLD_ARCH),suse11_x86_64 sles11_x86_64)" "" APU_CONFIG=--with-apu-config=$(BLD_THIRDPARTY_BIN_DIR)/apu-1-config endif +ifneq "$(findstring $(BLD_ARCH),aix7_ppc_64 aix5_ppc_64 aix5_ppc_32)" "" +APR_CONFIG=--with-apr-config=$(BLD_THIRDPARTY_BIN_DIR)/apr-1-config +endif + aix7_ppc_64_CONFIGFLAGS=--disable-gpcloud --without-readline --without-libcurl --disable-orca --disable-pxf --without-zstd $(APR_CONFIG) win32_CONFIGFLAGS=--with-gssapi --without-libcurl --disable-orca --disable-pxf --disable-gpcloud --without-libbz2 $(APR_CONFIG) sol10_x86_64_CONFIGFLAGS= --with-libxml $(APR_CONFIG)
Change win config location to mangohud folder
@@ -40,7 +40,7 @@ void enumerate_config_files(std::vector<std::string>& paths) if (!env_config.empty()) paths.push_back(env_config + mangohud_dir + "MangoHud.conf"); #ifdef _WIN32 - paths.push_back("C:\\MangoHud.conf"); + paths.push_back("C:\\mangohud\\MangoHud.conf"); #endif std::string exe_path = get_exe_path(); auto n = exe_path.find_last_of('/');
Fix client crash
@@ -739,6 +739,10 @@ int Client::extend_max_stream_data(int64_t stream_id, uint64_t max_data) { namespace { int recv_new_token(ngtcp2_conn *conn, const ngtcp2_vec *token, void *user_data) { + if (config.token_file.empty()) { + return 0; + } + auto f = BIO_new_file(config.token_file.data(), "w"); if (f == nullptr) { std::cerr << "Could not write token in " << config.token_file << std::endl;
Fixes an issues with C++ properties using std::string and being assigned nullptr values.
@@ -201,7 +201,7 @@ int CServiceDependency<T,I>::invokeCallback(std::function<void(const I*, Propert hash_map_iterator_t iter = hashMapIterator_construct((hash_map_pt)props); while(hashMapIterator_hasNext(&iter)) { key = (const char*) hashMapIterator_nextKey(&iter); - value = celix_properties_get(props, key, NULL); + value = celix_properties_get(props, key, ""); //note. C++ does not allow nullptr entries for std::string //std::cout << "got property " << key << "=" << value << "\n"; properties[key] = value; }
server session BUGFIX do not consider -1 as pending socket
@@ -3149,6 +3149,7 @@ nc_connect_ch_endpt(struct nc_ch_endpt *endpt, struct nc_session **session) sock = nc_sock_connect(endpt->address, endpt->port, NC_SOCKET_CH_TIMEOUT, &endpt->ka, &endpt->sock_pending, &ip_host); if (sock < 0) { + if (endpt->sock_pending > -1) { ++endpt->sock_retries; if (endpt->sock_retries == NC_SOCKET_CH_RETRIES) { ERR("Failed to connect socket %d after %d retries, closing.", endpt->sock_pending, NC_SOCKET_CH_RETRIES); @@ -3156,6 +3157,7 @@ nc_connect_ch_endpt(struct nc_ch_endpt *endpt, struct nc_session **session) endpt->sock_pending = -1; endpt->sock_retries = 0; } + } return NC_MSG_ERROR; } /* no need to store the socket as pending any longer */
hw/drivers/lps33thw: small fixes * hw/drivers/lps33thw: Small coding style fixes Missing spaces Code/declaration mix Fix build warning When LPS33THW_ONE_SHOT_MODE was NOT specified variable lps33thw was redeclared in a block leaving previous declaration unused.
@@ -109,12 +109,9 @@ static const struct sensor_driver g_lps33thw_sensor_driver = { static void lps33thw_one_shot_read_cb(struct os_event *ev) { int rc; - struct lps33thw *lps33thw; - struct sensor *sensor; - lps33thw = (struct lps33thw *)ev->ev_arg; - sensor = &lps33thw->sensor; - struct sensor_itf *itf; - itf = SENSOR_GET_ITF(sensor); + struct lps33thw *lps33thw = (struct lps33thw *)ev->ev_arg; + struct sensor *sensor = &lps33thw->sensor; + struct sensor_itf *itf = SENSOR_GET_ITF(sensor); if (lps33thw->type & SENSOR_TYPE_PRESSURE) { if (lps33thw->cfg.int_cfg.data_rdy) { @@ -1085,15 +1082,15 @@ lps33thw_sensor_read(struct sensor *sensor, sensor_type_t type, sensor_data_func_t data_func, void *data_arg, uint32_t timeout) { int rc = SYS_EINVAL; - struct sensor_itf *itf; - itf = SENSOR_GET_ITF(sensor); + struct sensor_itf *itf = SENSOR_GET_ITF(sensor); uint8_t rate; + struct lps33thw *lps33thw = (struct lps33thw *)SENSOR_GET_DEVICE(sensor); + rc = lps33thw_get_value(itf, LPS33THW_CTRL_REG1_ODR, &rate); if (rc) { return rc; } - struct lps33thw *lps33thw; - lps33thw = (struct lps33thw *)SENSOR_GET_DEVICE(sensor); + (void)timeout; #if MYNEWT_VAL(LPS33THW_ONE_SHOT_MODE) @@ -1115,8 +1112,6 @@ lps33thw_sensor_read(struct sensor *sensor, sensor_type_t type, #endif if (type & SENSOR_TYPE_PRESSURE) { - struct lps33thw *lps33thw; - lps33thw = (struct lps33thw *)SENSOR_GET_DEVICE(sensor); if (lps33thw->cfg.int_cfg.data_rdy) { /* Stream read */ lps33thw->pdd.user_ctx.user_func = data_func;
Add workaround for RS5 insider build version checking
@@ -217,7 +217,7 @@ static VOID PhInitializeWindowsVersion( WindowsVersion = WINDOWS_10_RS4; break; default: - WindowsVersion = WINDOWS_10; + WindowsVersion = WindowsVersion > 17134 ? WINDOWS_10_RS4 : WINDOWS_10; break; } }
Clamp cursor to within scene bounds in point and click scenes
#include "GameTime.h" #include "ScriptRunner.h" #include "Camera.h" +#include "DataManager.h" #include "rand.h" #define POINT_N_CLICK_CAMERA_DEADZONE 24 @@ -43,14 +44,14 @@ void Update_PointNClick() { dir_y = 0; // Move - if (INPUT_LEFT) { + if (INPUT_LEFT && Gt16(player.pos.x, 0)) { dir_x = -1; - } else if (INPUT_RIGHT) { + } else if (INPUT_RIGHT && Lt16(player.pos.x, image_width - 8)) { dir_x = 1; } - if (INPUT_UP) { + if (INPUT_UP && Gt16(player.pos.y, 8)) { dir_y = -1; - } else if (INPUT_DOWN) { + } else if (INPUT_DOWN && Lt16(player.pos.y, image_height)) { dir_y = 1; }
add contentid param id.
@@ -368,7 +368,7 @@ int sceAppMgrAppDataMountById(int id, char *titleid, char *mount_point); * * @return 0 on success, < 0 on error. * - * @note param: 8 (category), 9 (stitle/title?), 10 (title/stitle?), 12 (titleid) + * @note param: 6 (contentid) 8 (category), 9 (stitle/title?), 10 (title/stitle?), 12 (titleid) */ int sceAppMgrAppParamGetString(int pid, int param, char *string, int length);
better formatting in error messages
|= [k=beak v=(unit dome:clay)] ^- tank =/ received=tape ?~(v "missing" "received") - leaf+"{<k>} {received}" + leaf+"{<(en-beam k ~)>} {received}" :_ discarded leaf+"fusing into {<syd>} from {<bas>} {<con>} - overwriting prior fuse" =. fiz (make-melt bas con) :: responses we get for the merge will cause take-fuse to crash :: =. fiz *melt - ((slog [leaf+"clay: fuse failed, missing {<bec>}"]~) ..take-fuse) + =/ msg=tape <(en-beam bec ~)> + ((slog [leaf+"clay: fuse failed, missing {msg}"]~) ..take-fuse) ?. (~(has by sto.fiz) bec) - ((slog [leaf+"clay: got strange fuse response {<bec>}"]~) ..take-fuse) + =/ msg=tape <(en-beam bec ~)> + ((slog [leaf+"clay: got strange fuse response {<msg>}"]~) ..take-fuse) =. fiz :+ bas.fiz con.fiz (~(put by sto.fiz) bec `!<(dome:clay q.r.u.riot))
docs(discord): typo
@@ -36,7 +36,7 @@ struct discord_voice_cbs; /** @defgroup DiscordLimitsGeneral * @note assume the worst-case scenario for strings, - * where each character is 4 bytes long (UTF32) + * where each character is 4 bytes long (UTF8) * @{ */ #define DISCORD_MAX_NAME_LEN 4*100 + 1 #define DISCORD_MAX_TOPIC_LEN 4*1024 + 1 @@ -52,7 +52,7 @@ struct discord_voice_cbs; /** @defgroup DiscordLimitsEmbed * @see https://discord.com/developers/docs/resources/channel#embed-limits * @note assume the worst-case scenario for strings, - * where each character is 4 bytes long (UTF32) + * where each character is 4 bytes long (UTF8) * @{ */ #define DISCORD_EMBED_TITLE_LEN 4*256 + 1 #define DISCORD_EMBED_DESCRIPTION_LEN 4*2048 + 1
schema tree BUGFIX always set features of a module
@@ -800,12 +800,6 @@ lys_set_implemented_r(struct lys_module *mod, const char **features, struct lys_ assert(!mod->implemented); - if (mod->ctx->flags & LY_CTX_EXPLICIT_COMPILE) { - /* do not compile the module yet */ - mod->to_compile = 1; - return LY_SUCCESS; - } - /* we have module from the current context */ m = ly_ctx_get_module_implemented(mod->ctx, mod->name); if (m) { @@ -820,6 +814,12 @@ lys_set_implemented_r(struct lys_module *mod, const char **features, struct lys_ /* enable features */ LY_CHECK_RET(lys_enable_features(mod->parsed, features)); + if (mod->ctx->flags & LY_CTX_EXPLICIT_COMPILE) { + /* do not compile the module yet */ + mod->to_compile = 1; + return LY_SUCCESS; + } + /* add the module into newly implemented module set */ LY_CHECK_RET(ly_set_add(&unres->implementing, mod, 1, NULL));
Fix ChibiOS ADCv2 config struct
@@ -105,6 +105,8 @@ HRESULT Library_win_dev_adc_native_Windows_Devices_Adc_AdcChannel::NativeReadVal ADC_CR2_SWSTART, /* CR2 */ ADC_SMPR1_SMP_AN11(ADC_SAMPLE_3), /* SMPR1 */ 0, /* SMPR2 */ + 0, /* HTR */ + 0, /* LTR */ 0, /* SQR1 */ 0, /* SQR2 */ ADC_SQR3_SQ1_N(adcDefinition.adcChannel)
Deploy only for STM32
@@ -39,6 +39,14 @@ jobs: gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib + before_deploy: + - make install + - tar -zcf ${TRAVIS_BUILD_DIR}${REPO}-${BUILD_ENV}-${TRAVIS_TAG}-${TRAVIS_BUILD_NUMBER}.tar.gz bin + deploy: + provider: releases + file: ${TRAVIS_BUILD_DIR}${REPO}-${BUILD_ENV}-${TRAVIS_TAG}-${TRAVIS_BUILD_NUMBER}.tar.gz + on: + tags: true - name: "MinGW" env: @@ -111,15 +119,6 @@ jobs: script: - ccache --zero-stats || true - mkdir build && cd build - - cmake -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN $CMAKE_ARGS .. + - cmake -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN -DCMAKE_INSTALL_PREFIX=`pwd` $CMAKE_ARGS .. - cmake --build . - ccache --show-stats || true - -before_deploy: - - make install - - tar -zcf ${TRAVIS_BUILD_DIR}${REPO}-${BUILD_ENV}-${TRAVIS_TAG}-${TRAVIS_BUILD_NUMBER}.tar.gz bin -deploy: - provider: releases - file: ${TRAVIS_BUILD_DIR}${REPO}-${BUILD_ENV}-${TRAVIS_TAG}-${TRAVIS_BUILD_NUMBER}.tar.gz - on: - tags: true \ No newline at end of file
add halt call instead log in console
@@ -56,6 +56,6 @@ void init_clock(heap backed_virtual) write_msr(MSR_KVM_SYSTEM_TIME, physical_from_virtual(vclock)| 1); if (0 == vclock->system_time) { - console("FATAL ERROR:system clock is inaccessible\n"); + halt("FATAL ERROR:system clock is inaccessible\n"); } }
YAML CPP: Move key creation into separate function
@@ -20,6 +20,22 @@ using namespace kdb; namespace { +/** + * @brief This function creates a new key from the given parameters. + * + * @param name This string specifies the postfix of the name of the key produced by this function. + * @param parent This key specifies the prefix of the name of the key produced by this function. + * + * @returns The function returns a new key that combines the name of the parent key and `name`. + */ +Key newKey (string const & name, Key const & parent) +{ + Key key{ parent.getFullName (), KEY_END }; + key.addBaseName (name); + + return key; +} + /** * @brief Convert a YAML node to a key set * @@ -39,8 +55,7 @@ void convertNodeToKeySet (YAML::Node const & node, KeySet & mappings, Key const { for (auto element : node) { - Key key (parent.getFullName (), KEY_END); - key.addBaseName (element.first.as<string> ()); + Key const & key = newKey (element.first.as<string> (), parent); mappings.append (key); convertNodeToKeySet (element.second, mappings, key); }
Add entry point in docker compose image for gitlab ci.
@@ -35,8 +35,10 @@ variables: build: type: build image: docker/compose:1.23.2 + entrypoint: sh script: - $CI_PROJECT_DIR/docker-compose.sh build - $CI_PROJECT_DIR/docker-compose.sh push only: - develop +# - master
The call to put_unwind_info is what makes pi invalid, so clear the valid bit here, and soon stop bothering to clear it in other places.
@@ -499,6 +499,7 @@ put_unwind_info (struct dwarf_cursor *c, unw_proc_info_t *pi) mempool_free (&dwarf_cie_info_pool, pi->unwind_info); pi->unwind_info = NULL; } + c->pi_valid = 0; } static inline int
Remove node loader process exit handler, as it is not needed (for now) in the loader.
@@ -3563,25 +3563,6 @@ void *node_loader_impl_register(void *node_impl_ptr, void *env_ptr, void *functi } } - /* Set up the process exit handler */ -#if NODE_MAJOR_VERSION >= 12 || (NODE_MAJOR_VERSION == 12 && NODE_MINOR_VERSION >= 13) - // TODO: Review this - { - v8::Isolate *isolate = v8::Isolate::GetCurrent(); - v8::Local<v8::Context> context = isolate->GetCurrentContext(); - node::Environment *nodeEnv = node::GetCurrentEnvironment(context); - auto handler = [&](node::Environment *nodeEnv, int exit_code) { - (void)node::Stop(nodeEnv); - /* uv_library_shutdown(); */ // Does not allow reinitialization - if (exit_code != 0) - { - exit(exit_code); - } - }; - node::SetProcessExitHandler(nodeEnv, handler); - } -#endif - /* Run test function, this one can be called without thread safe mechanism */ /* because it is run already in the correct V8 thread */ #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__))
fix typo in redis.conf. Interfece changed to interface
# the "bind" configuration directive, followed by one or more IP addresses. # Each address can be prefixed by "-", which means that redis will not fail to # start if the address is not available. Being not available only refers to -# addresses that does not correspond to any network interfece. Addresses that +# addresses that does not correspond to any network interface. Addresses that # are already in use will always fail, and unsupported protocols will always BE # silently skipped. #
[config_tool] vCAT widget behavior let vCAT chunk no longer fixed-drag
@@ -23,9 +23,9 @@ export default { computed: { sliderOptions() { let options = {} - if (this.isVcat) { - options['behaviour'] = 'drag-fixed' - } + // if (this.isVcat) { + // options['behaviour'] = 'drag-fixed' + // } return options }, hexField: {
dnstap io, make sure to free current message when stream closes.
@@ -306,6 +306,16 @@ static int dtio_find_msg(struct dt_io_thread* dtio) return 0; } +/** delete the current message in the dtio, and reset counters */ +static void dtio_cur_msg_free(struct dt_io_thread* dtio) +{ + free(dtio->cur_msg); + dtio->cur_msg = NULL; + dtio->cur_msg_len = 0; + dtio->cur_msg_done = 0; + dtio->cur_msg_len_done = 0; +} + /** del the output file descriptor event for listening */ static void dtio_del_output_event(struct dt_io_thread* dtio) { @@ -328,6 +338,13 @@ static void dtio_close_output(struct dt_io_thread* dtio) closesocket(dtio->fd); #endif dtio->fd = -1; + + /* if there is a (partial) message, discard it + * we cannot send (the remainder of) it, and a new + * connection needs to start with a control frame. */ + if(dtio->cur_msg) { + dtio_cur_msg_free(dtio); + } } /** check for pending nonblocking connect errors, @@ -622,11 +639,7 @@ static void dtio_output_cb(int ATTR_UNUSED(fd), short bits, void* arg) } /* done with the current message */ - free(dtio->cur_msg); - dtio->cur_msg = NULL; - dtio->cur_msg_len = 0; - dtio->cur_msg_done = 0; - dtio->cur_msg_len_done = 0; + dtio_cur_msg_free(dtio); } } @@ -792,11 +805,7 @@ static void dtio_stop_ev_cb(int ATTR_UNUSED(fd), short bits, void* arg) } verbose(VERB_ALGO, "dnstap io: stop flush completed " "last frame"); - free(dtio->cur_msg); - dtio->cur_msg = NULL; - dtio->cur_msg_len = 0; - dtio->cur_msg_done = 0; - dtio->cur_msg_len_done = 0; + dtio_cur_msg_free(dtio); } /* write stop frame */ if(info->stop_frame_done < info->stop_frame_len) { @@ -908,8 +917,7 @@ static void dtio_desetup(struct dt_io_thread* dtio) _close(dtio->commandpipe[0]); #endif dtio->commandpipe[0] = -1; - free(dtio->cur_msg); - dtio->cur_msg = NULL; + dtio_cur_msg_free(dtio); ub_event_base_free(dtio->event_base); }
Support the deprecated SDL callback in the new renderer.
#include <SDL.h> #include "../vendor/lodepng.h" +#include "libtcod_int.h" // ---------------------------------------------------------------------------- // SDL2 Atlas @@ -337,7 +338,32 @@ static int sdl2_accumulate(struct TCOD_Renderer* self, TCOD_sdl2_render_console(context->atlas, console, &context->cache_console); SDL_SetRenderTarget(context->renderer, NULL); if (err < 0) { return err; } + if (!TCOD_ctx.sdl_cbk) { + // Normal rendering. SDL_RenderCopy(context->renderer, context->cache_texture, NULL, viewport); + } else { + // Deprecated callback rendering. + int tex_width; + int tex_height; + SDL_QueryTexture(context->cache_texture, NULL, NULL, + &tex_width, &tex_height); + SDL_Surface* canvas = SDL_CreateRGBSurfaceWithFormat( + 0, tex_width, tex_height, 32, SDL_PIXELFORMAT_RGBA32); + SDL_SetRenderTarget(context->renderer, context->cache_texture); + SDL_RenderReadPixels( + context->renderer, + NULL, + SDL_PIXELFORMAT_RGBA32, + canvas->pixels, + tex_width * 4); + SDL_SetRenderTarget(context->renderer, NULL); + TCOD_ctx.sdl_cbk(canvas); + SDL_Texture* canvas_tex = SDL_CreateTextureFromSurface( + context->renderer, canvas); + SDL_RenderCopy(context->renderer, canvas_tex, NULL, viewport); + SDL_DestroyTexture(canvas_tex); + SDL_FreeSurface(canvas); + } return TCOD_E_OK; } static int sdl2_present(struct TCOD_Renderer* self,
gppylib: remove race in WorkerPool progress test Despite my best efforts to avoid races on overloaded test containers, test_join_and_indicate_progress_prints_dots_until_pool_is_done() has been failing fairly often. Replace the simple-but-flaky time-based test with an implementation that serializes the components of the race.
-import unittest +import os import StringIO import threading import time +import unittest import mock @@ -245,26 +246,52 @@ class WorkerPoolTest(unittest.TestCase): self.assertEqual(stdout.getvalue(), '') def test_join_and_indicate_progress_prints_dots_until_pool_is_done(self): - # To avoid false negatives from the race conditions here, let's set up a - # situation where we'll print ten dots on average, and verify that there - # were at least five dots printed. - duration = 0.01 - cmd = mock.Mock(spec=Command) - def wait_for_duration(): - time.sleep(duration) - cmd.run.side_effect = wait_for_duration + + # cmd.run() will block until this Event is set. + event = threading.Event() + def wait_for_event(): + event.wait() + cmd.run.side_effect = wait_for_event + + # Open up a pipe and wrap each end in a file-like object. + read_end, write_end = os.pipe() + read_end = os.fdopen(read_end, 'r') + write_end = os.fdopen(write_end, 'w') + + # Create a thread to perform join_and_indicate_progress(). + def tmain(): + join_and_indicate_progress(self.pool, write_end, interval=0.001) + write_end.close() + join_thread = threading.Thread(target=tmain) + + try: + # Add the command, then join the WorkerPool. self.pool.addCommand(cmd) + join_thread.start() - stdout = StringIO.StringIO() - join_and_indicate_progress(self.pool, stdout, interval=(duration / 10)) + # join_and_indicate_progress() is now writing to our pipe. Wait for + # a few dots... + for _ in range(3): + byte = read_end.read(1) + self.assertEqual(byte, '.') - results = stdout.getvalue() - self.assertIn('.....', results) - self.assertTrue(results.endswith('\n')) + # ...then stop the command. + event.set() + + # Make sure the rest of the output consists of dots ending in a + # newline. (tmain() closes the write end of the pipe so that this + # read() will complete.) + remaining = read_end.read() + self.assertRegexpMatches(remaining, r'^[.]*\n$') + + finally: + # Make sure that we unblock and join all threads, even on a test + # failure. + event.set() + join_thread.join() def test_join_and_indicate_progress_flushes_every_dot(self): - # Set up a test scenario like the progress test above. duration = 0.005 cmd = mock.Mock(spec=Command)
cmake: fix getting component requirements
@@ -87,7 +87,7 @@ foreach(__component_target ${__component_targets}) list(REMOVE_ITEM __component_requires ${__component_alias} ${__component_name}) endif() - if(__component_requires) + if(__component_priv_requires) list(REMOVE_DUPLICATES __component_priv_requires) list(REMOVE_ITEM __component_priv_requires ${__component_alias} ${__component_name}) endif()
esp_http_client_read: Add check for esp_http_client_is_complete_data_received before returning ESP_FAIL Closes:
@@ -991,7 +991,7 @@ int esp_http_client_read(esp_http_client_handle_t client, char *buffer, int len) } ESP_LOG_LEVEL(sev, TAG, "esp_transport_read returned:%d and errno:%d ", rlen, errno); } - if (rlen < 0 && ridx == 0) { + if (rlen < 0 && ridx == 0 && !esp_http_client_is_complete_data_received(client)) { return ESP_FAIL; } else { return ridx;
dpdk: bump to 22.07 Type: feature This patch bumps DPDK version to 22.07.
@@ -22,9 +22,10 @@ DPDK_FAILSAFE_PMD ?= n DPDK_MACHINE ?= default DPDK_MLX_IBV_LINK ?= static -dpdk_version ?= 22.03 +dpdk_version ?= 22.07 dpdk_base_url ?= http://fast.dpdk.org/rel dpdk_tarball := dpdk-$(dpdk_version).tar.xz +dpdk_tarball_md5sum_22.07 := fb73b58b80b1349cd05fe9cf6984afd4 dpdk_tarball_md5sum_22.03 := a07ca8839f98062f46e1cc359735cce8 dpdk_tarball_md5sum_21.11 := 58660bbbe9e95abce86e47692b196555 dpdk_tarball_md5sum_21.08 := de33433a1806280996a0ecbe66e3642f
Updated function comment under parser.c.
@@ -2010,7 +2010,7 @@ set_spec_visitor_key (char **fdate, const char *ftime) } /* Generate a unique key for the visitors panel from the given logitem - * structure and assign it to out key data structure. + * structure and assign it to the output key data structure. * * On error, or if no date is found, 1 is returned. * On success, the date key is assigned to our key data structure.
cmake: rename THIRD-PARTY-LICENSES in PackagingFedora
@@ -19,15 +19,15 @@ set (CPACK_RPM_PACKAGE_AUTOREQPROV 1) set (CPACK_RPM_CHANGELOG_FILE "${CMAKE_SOURCE_DIR}/scripts/packaging/fedora/changelog") -execute_process (COMMAND bash "${CMAKE_SOURCE_DIR}/scripts/packaging/fedora/map_licenses.sh" "${CMAKE_SOURCE_DIR}/doc/THIRD-PARTY-LICENSES" +execute_process (COMMAND bash "${CMAKE_SOURCE_DIR}/scripts/packaging/fedora/map_licenses.sh" "${CMAKE_SOURCE_DIR}/.reuse/dep5" OUTPUT_VARIABLE THIR_PARTY_LICENSES_STR) -set (CPACK_RPM_PACKAGE_LICENSE "${THIR_PARTY_LICENSES_STR} \n # For a breakdown of the licensing, see THIRD-PARTY-LICENSES") +set (CPACK_RPM_PACKAGE_LICENSE "${THIR_PARTY_LICENSES_STR} \n # For a breakdown of the licensing, see .reuse/dep5") # install license files configure_file ("${CMAKE_SOURCE_DIR}/LICENSE.md" "${CMAKE_BINARY_DIR}/doc/LICENSE" COPYONLY) -configure_file ("${CMAKE_SOURCE_DIR}/doc/THIRD-PARTY-LICENSES" "${CMAKE_BINARY_DIR}/doc/THIRD-PARTY-LICENSES" COPYONLY) +configure_file ("${CMAKE_SOURCE_DIR}/.reuse/dep5" "${CMAKE_BINARY_DIR}/.reuse/dep5" COPYONLY) foreach (component ${PACKAGES}) install ( - FILES "${CMAKE_BINARY_DIR}/doc/LICENSE" "${CMAKE_BINARY_DIR}/doc/THIRD-PARTY-LICENSES" + FILES "${CMAKE_BINARY_DIR}/doc/LICENSE" "${CMAKE_BINARY_DIR}/.reuse/dep5" COMPONENT ${component} DESTINATION "share/licenses/${component}") endforeach ()
BugID:16966632:fix drop incoming PUBLISH data issue.
@@ -308,11 +308,24 @@ static int iotx_mc_handle_recv_PUBLISH(iotx_mc_client_t *c, char *topic, char *m return FAIL_RETURN; } mal_debug("iotx_mc_handle_recv_PUBLISH topic=%s msg=%s", topic, msg); + /* flowControl for specific topic */ + static uint64_t time_prev = 0; + uint64_t time_curr = 0; char *filterStr = "{\"method\":\"thing.service.property.set\""; int filterLen = strlen(filterStr); + if (0 == memcmp(msg, filterStr, filterLen)) { mal_debug("iotx_mc_handle_recv_PUBLISH match filterstring"); + time_curr = HAL_UptimeMs(); + if (time_curr < time_prev) { + time_curr = time_prev; + } + if ((time_curr - time_prev) <= (uint64_t)50) { + mal_info("mal over threshould"); return SUCCESS_RETURN; + } else { + time_prev = time_curr; + } } /* we have to find the right message handler - indexed by topic */
bugid:23646919:Add RHINO_BIT_CTZ to improve performance
@@ -49,11 +49,11 @@ RHINO_INLINE uint8_t krhino_clz32(uint32_t x) uint8_t n = 0; if (x == 0) { - return 32; + return BITMAP_UNIT_SIZE; } #ifdef RHINO_BIT_CLZ - n += RHINO_BIT_CLZ(x); + n = RHINO_BIT_CLZ(x); #else if ((x & 0XFFFF0000) == 0) { x <<= 16; @@ -86,9 +86,12 @@ RHINO_INLINE uint8_t krhino_ctz32(uint32_t x) uint8_t n = 0; if (x == 0) { - return 32; + return BITMAP_UNIT_SIZE; } +#ifdef RHINO_BIT_CTZ + n = RHINO_BIT_CTZ(x); +#else if ((x & 0X0000FFFF) == 0) { x >>= 16; n += 16; @@ -108,6 +111,7 @@ RHINO_INLINE uint8_t krhino_ctz32(uint32_t x) if ((x & 0X00000001) == 0) { n += 1; } +#endif return n; } @@ -121,41 +125,13 @@ RHINO_INLINE uint8_t krhino_ctz32(uint32_t x) RHINO_INLINE int32_t krhino_find_first_bit(uint32_t *bitmap) { int32_t nr = 0; - uint32_t tmp = 0; while (*bitmap == 0UL) { nr += BITMAP_UNIT_SIZE; bitmap++; } - tmp = *bitmap; -#ifdef RHINO_BIT_CLZ - nr += RHINO_BIT_CLZ(tmp); -#else - if (!(tmp & 0XFFFF0000)) { - tmp <<= 16; - nr += 16; - } - - if (!(tmp & 0XFF000000)) { - tmp <<= 8; - nr += 8; - } - - if (!(tmp & 0XF0000000)) { - tmp <<= 4; - nr += 4; - } - - if (!(tmp & 0XC0000000)) { - tmp <<= 2; - nr += 2; - } - - if (!(tmp & 0X80000000)) { - nr += 1; - } -#endif + nr += krhino_clz32(*bitmap); return nr; }
skip GPU tests when no GPU available
@@ -146,8 +146,12 @@ Unit_Test_UBSan: Unit_Test_GPU: image: nvidia/cuda:10.2-devel-ubuntu18.04 stage: test1 - script: - - AUTOCLEAN=0 CUDA=1 CUDA_BASE=/usr/local/cuda CUDA_LIB=lib64 make utest_gpu + script: | + if nvidia-smi ; then + AUTOCLEAN=0 CUDA=1 CUDA_BASE=/usr/local/cuda CUDA_LIB=lib64 make utest_gpu + else + printf "No usable GPU found, skipping GPU tests!\n" + fi needs: [Build_GPU] dependencies: - Build_GPU @@ -202,8 +206,12 @@ Integration_Test_Python: Integration_Test_GPU: image: nvidia/cuda:10.2-devel-ubuntu18.04 stage: test2 - script: - - AUTOCLEAN=0 CUDA=1 CUDA_BASE=/usr/local/cuda CUDA_LIB=lib64 make gputest + script: | + if nvidia-smi ; then + AUTOCLEAN=0 CUDA=1 CUDA_BASE=/usr/local/cuda CUDA_LIB=lib64 make gputest + else + printf "No usable GPU found, skipping GPU tests!\n" + fi needs: [Build_GPU] dependencies: - Build_GPU
Updated make rules for MSPSim as submodule to Cooja
# $Id: Makefile.msp430,v 1.35 2011/01/19 07:30:31 adamdunkels Exp $ +COOJA_PATH ?= $(CONTIKI)/tools/cooja + ifdef nodeid CFLAGS += -DNODEID=$(nodeid) endif @@ -215,19 +217,24 @@ else $(OBJCOPY) $^ -O ihex $@ endif -$(CONTIKI)/tools/mspsim/build.xml: +$(COOJA_PATH)/build.xml: + @echo '----------------' + @echo 'Could not find the COOJA build file. Did you run "git submodule update --init --recursive"?' + @echo '----------------' + +$(COOJA_PATH)/mspsim/build.xml: $(COOJA_PATH)/build.xml @echo '----------------' - @echo 'Could not find the MSPSim build file. Did you run "git submodule update --init"?' + @echo 'Could not find the MSPSim build file. Did you run "git submodule update --init --recursive"?' @echo '----------------' -$(CONTIKI)/tools/mspsim/mspsim.jar: $(CONTIKI)/tools/mspsim/build.xml - (cd $(CONTIKI)/tools/mspsim && ant jar) +$(COOJA_PATH)/mspsim/mspsim.jar: $(COOJA_PATH)/mspsim/build.xml + (cd $(COOJA_PATH)/mspsim && ant jar) -%.mspsim: %.${TARGET} ${CONTIKI}/tools/mspsim/mspsim.jar - java -jar ${CONTIKI}/tools/mspsim/mspsim.jar -platform=${TARGET} $< +%.mspsim: %.${TARGET} ${COOJA_PATH}/mspsim/mspsim.jar + java -jar ${COOJA_PATH}/mspsim/mspsim.jar -platform=${TARGET} $< mspsim-maptable: contiki-${TARGET}.map - java -classpath ${CONTIKI}/tools/mspsim/mspsim.jar se.sics.mspsim.util.MapTable $< + java -classpath ${COOJA_PATH}/mspsim/mspsim.jar se.sics.mspsim.util.MapTable $< core-labels.o: core.${TARGET} ${CONTIKI}/tools/msp430-make-labels core.${TARGET} > core-labels.S
ZCLDB: Add IKEA manufacturer specific clusters and attributes
<value name="Emergency mains and transfer switch" value="6"></value> <value name="Mains (single phase) with battery backup" value="0x81"></value> </attribute> + <attribute id="0x0008" name="Unknown 1" type="enum8" access="r" required="o" > + <description>IKEA control outlet specific.</description> + </attribute> + <attribute id="0x0009" name="Unknown 2" type="enum8" access="r" required="o" > + <description>IKEA control outlet specific.</description> + </attribute> + <attribute id="0x000a" name="IKEA type" type="ostring" access="r" required="o" > + <description>IKEA type as printed on the product.</description> + </attribute> <attribute id="0x4000" name="SW Build ID" type="cstring" access="r" required="o" range="0,16"></attribute> <attribute id="0xff0d" name="Xiaomi Sensitivity" type="u8" access="rw" required="o" mfcode="0x115f"></attribute> <!-- <attribute id="0xff0d" name="Xiaomi Sensitivity" type="u8" access="rw" required="o" mfcode="0x1037"></attribute> --> <attribute id="0x0032" name="Usertest" type="bool" default="0" access="rw" required="o" mfcode="0x100b"></attribute> <attribute id="0x0033" name="LED Indication" type="bool" default="0" access="rw" required="o" mfcode="0x100b"></attribute> </attribute-set> + <attribute id="0xfffd" name="Cluster Revision" type="u16" default="0" access="rw" required="o"></attribute> <command id="00" dir="recv" name="Reset to Factory Defaults" required="o"></command> </server> <client> @@ -2487,6 +2497,22 @@ devices can operate on either battery or mains power, and can have a wide variet <client> </client> </cluster> + + <!-- IKEA --> + <cluster id="0xfc7c" name="IKEA" mfcode="0x117c"> + <description>IKEA control outlet cluster.</description> + <server> + <attribute id="0x0010" name="Unknown 1" type="u8" access="rw" required="m" showas="hex" mfcode="0x117c"> + <description></description> + </attribute> + <attribute id="0xfffd" name="Unknown 2" type="u16" required="m" access="rw" showas="hex" mfcode="0x117c"> + <description></description> + </attribute> + </server> + <client> + </client> + </cluster> + </domain> <profile id="0104" name="Home Automation" description="This profile defines device descriptions and standard practices for applications needed in a residential or light commercial environment. Installation scenarios range from a single room to an entire home up to 20,000 square feet (approximately 1850m2)." version="1.0" rev="25" icon="ha.png">
Update the TestRunner This makes the TestRunner run each test class individually Although we can run them all tests in a single run command by running each individually makes finding failurs from the error much simpler.
@@ -11,16 +11,65 @@ public class TestRunner { public static void main(String args[]) { JUnitCore junit = new JUnitCore(); junit.addListener(new TextListener(System.out)); - Result result = junit.run( - OCMainTest.class, - OCRepresentationTest.class, - OCUuidTest.class); + Result result; + int exit_status = 0; + System.out.println("Running OCCredTest tests."); + result = junit.run(OCCredTest.class); if (result.getFailureCount() > 0) { - System.out.println("Test failed."); - System.exit(1); + System.out.println("OCCredTest Tests FAILED."); + exit_status = 1; } else { - System.out.println("Test finished successfully."); - System.exit(0); + System.out.println("OCCredTest tests finished SUCCESSFULLY."); } + + System.out.println("Running OCEndpointTest tests."); + result = junit.run(OCEndpointTest.class); + if (result.getFailureCount() > 0) { + System.out.println("OCEndpointTest Tests FAILED."); + exit_status = 1; + } else { + System.out.println("OCEndpointTest tests finished SUCCESSFULLY."); + } + + + /* Currently OCMainTest contains not runnable test code. + System.out.println("Running OCMainTest tests."); + result = junit.run(OCMainTest.class); + if (result.getFailureCount() > 0) { + System.out.println("OCMainTest Tests FAILED."); + exit_status = 1; + } else { + System.out.println("OCMainTest tests finished SUCCESSFULLY."); + } + */ + + System.out.println("Running OCOwnershipTransferMethodsTest tests."); + result = junit.run(OCOwnershipTransferMethodsTest.class); + if (result.getFailureCount() > 0) { + System.out.println("OCOwnershipTransferMethodsTest Tests FAILED."); + exit_status = 1; + } else { + System.out.println("OCOwnershipTransferMethodsTest tests finished SUCCESSFULLY."); + } + + System.out.println("Running OCRepresentationTest tests."); + result = junit.run(OCRepresentationTest.class); + if (result.getFailureCount() > 0) { + System.out.println("OCRepresentationTest Tests FAILED."); + exit_status = 1; + } else { + System.out.println("OCRepresentationTest tests finished SUCCESSFULLY."); + } + + System.out.println("Running OCUuidTest tests."); + result = junit.run(OCUuidTest.class); + if (result.getFailureCount() > 0) { + System.out.println("OCUuidTest Tests FAILED."); + exit_status = 1; + } else { + System.out.println("OCUuidTest tests finished SUCCESSFULLY."); + } + + System.exit(exit_status); } }
test: fix coverity & argument cannot be negative
@@ -666,12 +666,12 @@ static int rfc7919_test(void) DH_get0_key(b, &bpub_key, NULL); alen = DH_size(a); - if (!TEST_ptr(abuf = OPENSSL_malloc(alen)) + if (!TEST_int_gt(alen, 0) || !TEST_ptr(abuf = OPENSSL_malloc(alen)) || !TEST_true((aout = DH_compute_key(abuf, bpub_key, a)) != -1)) goto err; blen = DH_size(b); - if (!TEST_ptr(bbuf = OPENSSL_malloc(blen)) + if (!TEST_int_gt(blen, 0) || !TEST_ptr(bbuf = OPENSSL_malloc(blen)) || !TEST_true((bout = DH_compute_key(bbuf, apub_key, b)) != -1)) goto err;
Fixed API Query parameter handling
@@ -224,8 +224,8 @@ namespace MiningCore.Api if (pool == null) return; - var page = context.GetQueryParameter<int>("page"); - var pageSize = context.GetQueryParameter<int?>("pageSize") ?? 20; + var page = context.GetQueryParameter<int>("page", 0); + var pageSize = context.GetQueryParameter<int>("pageSize", 20); if (pageSize == 0) { @@ -247,8 +247,8 @@ namespace MiningCore.Api if (pool == null) return; - var page = context.GetQueryParameter<int>("page"); - var pageSize = context.GetQueryParameter<int?>("pageSize") ?? 20; + var page = context.GetQueryParameter<int>("page", 0); + var pageSize = context.GetQueryParameter<int>("pageSize", 20); if (pageSize == 0) {
added full support for WPA2 SHA384 AES-128-CMAC (802.11w SUITE B)
@@ -26,7 +26,7 @@ Detailed description -------------- | Tool | Description | -| -------------- | ---------------------------------------------------------------------------------------------------- | +| -------------- | ------------------------------------------------------------------------------------------------------ | | wlandump-ng | Small, fast and powerfull deauthentication/authentication/response tool | | wlanresponse | Extreme fast deauthentication/authentication/response tool (unattended use on Raspberry Pi's) | | wlanrcascan | Small, fast and simple passive WLAN channel assignment scanner (status output) | @@ -41,7 +41,7 @@ Detailed description | wlanhcxinfo | Shows detailed info from contents of hccapxfile | | wlanhcxmnc | Manually do nonce correction on byte number xx of a nonce | | wlanhashhcx | Generate hashlist from hccapx hashfile (md5_64 hash:mac_ap:mac_sta:essid) | -| wlanhcxcat | Simple password recovery tool for WPA/WPA2/WPA2 AES-128-CMAC (hash-modes 2500, 2501) | +| wlanhcxcat | Simple password recovery tool for WPA/WPA2/WPA2 (SHA256 & SHA384) AES-128-CMAC (hash-modes 2500, 2501) | | wlanpmk2hcx | Converts plainmasterkey and ESSID for use with hashcat hash-mode 12000 | | wlancow2hcxpmk | Converts pre-computed cowpatty hashfiles for use with hashcat hash-mode 2501 | | wlanhcx2john | Converts hccapx to format expected by John the Ripper |
Add error check to prevent corrupt files trying to unpack
@@ -439,6 +439,12 @@ exr_read_scanline_chunk_info ( fsize); } } + + if (cinfo->packed_size == 0 && cinfo->unpacked_size > 0) + return pctxt->report_error ( + pctxt, + EXR_ERR_INVALID_ARGUMENT, + "Invalid packed size of 0"); return EXR_ERR_SUCCESS; } @@ -942,6 +948,13 @@ exr_read_tile_chunk_info ( cinfo->sample_count_data_offset = 0; cinfo->sample_count_table_size = 0; } + + if (cinfo->packed_size == 0 && cinfo->unpacked_size > 0) + return pctxt->report_error ( + pctxt, + EXR_ERR_INVALID_ARGUMENT, + "Invalid packed size of 0"); + return EXR_ERR_SUCCESS; }
CI: keep ccache size within limits The ccache configuration done by the action is not available inside the docker container, so perform it manually before running the tests.
@@ -128,6 +128,8 @@ jobs: # Set permissions for Docker mount sudo chown -R 1000:1000 . # Run test - docker run --privileged --sysctl net.ipv6.conf.all.disable_ipv6=0 -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -e RELSTR=citest $DOCKER_ARGS -v `pwd`:/home/user/contiki-ng -v $GITHUB_WORKSPACE/.ccache:/home/user/.ccache $DOCKER_IMG bash --login -c "make -C tests/??-${{ matrix.test }};" + # FIXME: (2023) Remove "ccache -c", workaround for cache growing + # too large from ccache CI/ccache configuration mismatch. + docker run --privileged --sysctl net.ipv6.conf.all.disable_ipv6=0 -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -e RELSTR=citest $DOCKER_ARGS -v `pwd`:/home/user/contiki-ng -v $GITHUB_WORKSPACE/.ccache:/home/user/.ccache $DOCKER_IMG bash --login -c "ccache --set-config=max_size='250M' && make -C tests/??-${{ matrix.test }}; ccache -c" # Check outcome of the test ./tests/check-test.sh `pwd`/tests/??-${{ matrix.test }}
Don't reactivate deleted ZGP switches
@@ -1515,7 +1515,7 @@ void DeRestPluginPrivate::gpDataIndication(const deCONZ::GpDataIndication &ind) } } - if (!sensor) + if (!sensor || sensor->deletedState() == Sensor::StateDeleted) { if (searchSensorsState != SearchSensorsActive) { @@ -1590,24 +1590,6 @@ void DeRestPluginPrivate::gpDataIndication(const deCONZ::GpDataIndication &ind) indexRulesTriggers(); gpProcessButtonEvent(ind); } - else if (sensor && sensor->deletedState() == Sensor::StateDeleted) - { - if (searchSensorsState == SearchSensorsActive) - { - sensor->setDeletedState(Sensor::StateNormal); - checkSensorGroup(sensor); - sensor->setNeedSaveDatabase(true); - sensor->rx(); - DBG_Printf(DBG_INFO, "SensorNode %u: %s reactivated\n", sensor->id().toUInt(), qPrintable(sensor->name())); - updateSensorEtag(sensor); - - Event e(RSensors, REventAdded, sensor->id()); - enqueueEvent(e); - queSaveDb(DB_SENSORS , DB_SHORT_SAVE_DELAY); - - gpProcessButtonEvent(ind); - } - } else if (sensor && sensor->deletedState() == Sensor::StateNormal) { if (searchSensorsState == SearchSensorsActive)
scheduler: schedule retries immediately if engine is shutting down
@@ -286,8 +286,13 @@ int flb_sched_request_create(struct flb_config *config, void *data, int tries) timer->data = request; timer->event.mask = MK_EVENT_EMPTY; - /* Get suggested wait_time for this request */ - seconds = backoff_full_jitter((int)config->sched_base, (int)config->sched_cap, tries); + /* Get suggested wait_time for this request. If shutting down, set to 0. */ + if (config->is_shutting_down == FLB_TRUE) { + seconds = 0; + } else { + seconds = backoff_full_jitter((int)config->sched_base, (int)config->sched_cap, + tries); + } seconds += 1; /* Populare request */
[cmake] Turn on MA57 in defaut options
@@ -54,7 +54,7 @@ option(WITH_MUMPS "Compilation with the MUMPS solver. Default = OFF" OFF) option(WITH_UMFPACK "Compilation with the UMFPACK solver. Default = OFF" OFF) option(WITH_SUPERLU "Compilation with the SuperLU solver. Default = OFF" OFF) option(WITH_SUPERLU_MT "Compilation with the SuperLU solver, multithreaded version. Default = OFF" OFF) -option(WITH_MA57 "Compilation with the MA57 solver (License HSL). Default = OFF" OFF) +option(WITH_MA57 "Compilation with the MA57 solver (License HSL). Default = OFF" ON) option(WITH_FCLIB "link with fclib when this mode is enable. Default = OFF" ON) option(WITH_FREECAD "Use FreeCAD. Default = OFF" OFF) option(WITH_RENDERER "Install OCC renderer. Default = OFF" OFF)
improved warnings
@@ -685,21 +685,21 @@ if(sequenceerrorcount > 0) { printf("\nWarning: out of sequence timestamps!\n" "This dump file contains frames with out of sequence timestamps.\n" - "It is a bug of the capturing tool.\n"); + "That is a bug of the capturing tool.\n"); } if(zeroedtimestampcount > 0) { printf("\nWarning: missing timestamps!\n" "This dump file contains frames with zeroed timestamps.\n" - "That prevent calculation of EAPOL TIMEOUT values.\n" - "It is a bug of the capturing tool.\n"); + "It prevent calculation of EAPOL TIMEOUT values.\n" + "That is a bug of the capturing/cleaning tool.\n"); } if(eapolmsgtimestamperrorcount > 0) { printf("\nWarning: wrong timestamps!\n" "This dump file contains frames with wrong timestamps.\n" - "That prevent calculation of EAPOL TIMEOUT values.\n" - "It is a bug of the capturing tool.\n"); + "It prevent calculation of EAPOL TIMEOUT values.\n" + "That is a bug of the capturing tool.\n"); } if((deauthenticationcount +disassociationcount) > 100) {
Fixed read/write permissions of Core_A Private Timer registers
@@ -650,14 +650,14 @@ typedef struct __IOM uint32_t LOAD; //!< \brief Offset: 0x000 (R/W) Private Timer Load Register __IOM uint32_t COUNTER; //!< \brief Offset: 0x004 (R/W) Private Timer Counter Register __IOM uint32_t CONTROL; //!< \brief Offset: 0x008 (R/W) Private Timer Control Register - __IM uint32_t ISR; //!< \brief Offset: 0x00C (R/ ) Private Timer Interrupt Status Register + __IOM uint32_t ISR; //!< \brief Offset: 0x00C (R/W) Private Timer Interrupt Status Register uint32_t RESERVED[4]; __IOM uint32_t WLOAD; //!< \brief Offset: 0x020 (R/W) Watchdog Load Register __IOM uint32_t WCOUNTER; //!< \brief Offset: 0x024 (R/W) Watchdog Counter Register __IOM uint32_t WCONTROL; //!< \brief Offset: 0x028 (R/W) Watchdog Control Register __IOM uint32_t WISR; //!< \brief Offset: 0x02C (R/W) Watchdog Interrupt Status Register __IOM uint32_t WRESET; //!< \brief Offset: 0x030 (R/W) Watchdog Reset Status Register - __IM uint32_t WDISABLE; //!< \brief Offset: 0x034 (R/ ) Watchdog Disable Register + __OM uint32_t WDISABLE; //!< \brief Offset: 0x034 ( /W) Watchdog Disable Register } Timer_Type; #define PTIM ((Timer_Type *) TIMER_BASE ) /*!< \brief Timer configuration struct */ #endif
SOVERSION bump to version 2.20.23
@@ -66,7 +66,7 @@ set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_ # set version of the library set(LIBYANG_MAJOR_SOVERSION 2) set(LIBYANG_MINOR_SOVERSION 20) -set(LIBYANG_MICRO_SOVERSION 22) +set(LIBYANG_MICRO_SOVERSION 23) set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION}) set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
Fix OMV2 build.
#define OMV_DMA_MEMORY SRAM2 // Misc DMA buffers #define OMV_FB_SIZE (151K) // FB memory: header + QVGA/GS image -#define OMV_FB_ALLOC_SIZE (14K) // minimum fb alloc size +#define OMV_FB_ALLOC_SIZE (12K) // minimum fb alloc size #define OMV_STACK_SIZE (4K) #define OMV_HEAP_SIZE (52K)
s5j/irq: tidy up a bit Fixes trivial coding style issues, replacing spaces with tabs.
* language governing permissions and limitations under the License. * ****************************************************************************/ -/**************************************************************************************************** +/**************************************************************************** * arch/arm/include/s5j/soc/s5jt200_irq.h * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ****************************************************************************************************/ + ****************************************************************************/ -/* This file should never be included directed but, rather, only indirectly through tinyara/irq.h */ +/* + * This file should never be included directed but, + * rather, only indirectly through tinyara/irq.h + */ #ifndef __ARCH_ARM_INCLUDE_S5J_S5JT200_IRQ_H #define __ARCH_ARM_INCLUDE_S5J_S5JT200_IRQ_H -#define NR_VECTORS (512) -#define NR_IRQS (512) +#define NR_VECTORS 512 +#define NR_IRQS 512 #define S5J_IRQ_INVALID 0x3FF #define IRQ_INVALID 0x3FF -#define IRQ_SPI(x) (x + 32) +#define IRQ_SPI(x) (32 + (x)) #define IRQ_EINT0 IRQ_SPI(0) #define IRQ_EINT1 IRQ_SPI(1) #define IRQ_CR4_VALIRQ IRQ_SPI(91) #define IRQ_CR4_VALFIQ IRQ_SPI(92) -#endif //__ARCH_ARM_INCLUDE_S5J_S5JT200_IRQ_H +#endif /* __ARCH_ARM_INCLUDE_S5J_S5JT200_IRQ_H */
apps/cmp.c: Fix bug on -path option introduced in commit
@@ -527,7 +527,7 @@ static varref cmp_vars[] = { /* must be in same order as enumerated above! */ {&opt_oldcert}, {(char **)&opt_revreason}, - {&opt_server}, {&opt_proxy}, {&opt_no_proxy}, {&opt_path}, + {&opt_server}, {&opt_path}, {&opt_proxy}, {&opt_no_proxy}, {(char **)&opt_msg_timeout}, {(char **)&opt_total_timeout}, {&opt_trusted}, {&opt_untrusted}, {&opt_srvcert},
cmake: add hidden option to link components as group Adds a hidden option to link components in projects as one big group for debugging purposes. Makes it easy to single out if symbols are not really defined or some requirements are missing for components leading to undefined link errors.
@@ -440,6 +440,10 @@ macro(project project_name) add_executable(${project_elf} "${project_elf_src}") add_dependencies(${project_elf} _project_elf_src) + if(__PROJECT_GROUP_LINK_COMPONENTS) + target_link_libraries(${project_elf} "-Wl,--start-group") + endif() + if(test_components) target_link_libraries(${project_elf} "-Wl,--whole-archive") foreach(test_component ${test_components})
VERSION bump to version 2.0.190
@@ -61,7 +61,7 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) # set version of the project set(LIBYANG_MAJOR_VERSION 2) set(LIBYANG_MINOR_VERSION 0) -set(LIBYANG_MICRO_VERSION 189) +set(LIBYANG_MICRO_VERSION 190) set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION}) # set version of the library set(LIBYANG_MAJOR_SOVERSION 2)
Fix typos in kretfunc documentation Fixes an incorrect link to kretfunc documentation section and fixes example to use proper macro
@@ -17,7 +17,7 @@ This guide is incomplete. If something feels missing, check the bcc and kernel s - [7. Raw Tracepoints](#7-raw-tracepoints) - [8. system call tracepoints](#8-system-call-tracepoints) - [9. kfuncs](#9-kfuncs) - - [10. kretfuncs](#9-kretfuncs) + - [10. kretfuncs](#10-kretfuncs) - [Data](#data) - [1. bpf_probe_read_kernel()](#1-bpf_probe_read_kernel) - [2. bpf_probe_read_kernel_str()](#2-bpf_probe_read_kernel_str) @@ -354,7 +354,7 @@ The last argument of the probe is the return value of the instrumented function. For example: ```C -KFUNC_PROBE(do_sys_open, int dfd, const char *filename, int flags, int mode, int ret) +KRETFUNC_PROBE(do_sys_open, int dfd, const char *filename, int flags, int mode, int ret) { ... ```
main shm BUGFIX wrong value used
@@ -1993,7 +1993,7 @@ sr_shmmain_ly_int_data_sched_apply(sr_conn_ctx_t *conn, struct lyd_node *sr_mods goto cleanup; } - if (change) { + if (*change) { /* check that persistent module data can be loaded with updated modules */ if ((err_info = sr_shmmain_sched_check_data(sr_mods, old_ctx, new_ctx, &fail)) || fail) { goto cleanup;
tree data BUGFIX handle opaque nodes in lists Refs
@@ -3902,7 +3902,7 @@ lyd_path_list_predicate(const struct lyd_node *node, char **buffer, size_t *bufl const char *val; char quot; - for (key = lyd_child(node); key && (key->schema->flags & LYS_KEY); key = key->next) { + for (key = lyd_child(node); key && key->schema && (key->schema->flags & LYS_KEY); key = key->next) { val = lyd_get_value(key); len = 1 + strlen(key->schema->name) + 2 + strlen(val) + 2; LY_CHECK_RET(lyd_path_str_enlarge(buffer, buflen, *bufused + len, is_static));
Update cipher definition
@@ -838,8 +838,7 @@ static SSL_CIPHER ssl3_ciphers[] = { 1, TLS1_3_TXT_AES_128_GCM_SHA256, TLS1_3_CK_AES_128_GCM_SHA256, - SSL_kRSA, - SSL_aRSA, + 0, 0, SSL_AES128GCM, SSL_AEAD, TLS1_3_VERSION, TLS1_3_VERSION,
Remove some old filters - small test results are the same as in the previous commit.
@@ -27,17 +27,6 @@ int chimericAlignScore (ChimericSegment & seg1, ChimericSegment & seg2) bool ReadAlign::chimericDetectionMult() { bool chimRecord=false; - - //////////////////// chimeras - //stich windows => chimeras - //stich only the best window with one of the lower score ones for now - do not stich 2 lower score windows - //stitch only one window on each end of the read - - if (nTr>P.pCh.mainSegmentMultNmax && nTr!=2) - {//multimapping main segment, nTr==2 is a special case to be checked later - return chimRecord; - }; - vector <ChimericAlign> chimAligns; int chimScoreBest=0; @@ -110,15 +99,6 @@ bool ReadAlign::chimericDetectionMult() { };//cycle over window1 aligns };//cycle over window1 - if (nTr>P.pCh.mainSegmentMultNmax) - {//check main segment for multi-aligns - //this is nTr==2 - a special case: chimeras are allowed only if the 2nd chimeric segment is the next best alignment - if ( &chimAligns[0].seg2.align!=trMult[0] && &chimAligns[0].seg2.align!=trMult[1] ) - { - return chimRecord; - }; - }; - if (chimScoreBest==0) return chimRecord;
fix compilation with MI_DEBUG>3, issue
@@ -84,9 +84,10 @@ static bool mi_page_is_valid_init(mi_page_t* page) { mi_assert_internal(mi_page_list_is_valid(page,page->local_free)); #if MI_DEBUG>3 // generally too expensive to check this - if (page->flags.is_zero) { - for(mi_block_t* block = page->free; block != NULL; mi_block_next(page,block)) { - mi_assert_expensive(mi_mem_is_zero(block + 1, page->block_size - sizeof(mi_block_t))); + if (page->is_zero) { + const size_t ubsize = mi_page_usable_block_size(page); + for(mi_block_t* block = page->free; block != NULL; block = mi_block_next(page,block)) { + mi_assert_expensive(mi_mem_is_zero(block + 1, ubsize - sizeof(mi_block_t))); } } #endif
out_azure: fix leak on exception
@@ -176,6 +176,7 @@ static int build_headers(struct flb_http_client *c, str_hash = flb_sds_create_size(256); if (!str_hash) { flb_errno(); + flb_sds_destroy(rfc1123date); return -1; }
fs/smartfs : Add logic to check journal contents before recovery Before calculate journal crc, check validation of its contents first.
@@ -5552,12 +5552,30 @@ static int smart_journal_scan(FAR struct smart_struct_s *dev, bool print_dump) static int smart_journal_recovery(FAR struct smart_struct_s *dev, journal_log_t *log) { int ret = OK; - int type; + uint8_t type; size_t mtd_size = sizeof(struct smart_sect_header_s); uint32_t address = smart_journal_get_writeaddress(dev); uint16_t psector = UINT8TOUINT16(log->psector); - fvdbg("Printf recovery data journal_seq : %d!!\n", dev->journal_seq); + fvdbg("recovery data journal_seq : %d!!\n", dev->journal_seq); + + /* Before calculate journal, check the journal contents first */ + if (psector >= (dev->geo.neraseblocks * dev->sectorsPerBlk)) { + fdbg("invalid psector : %d\n", psector); + return -EINVAL; + } + + if (UINT8TOUINT16(log->seq) != dev->journal_seq) { + fdbg("journal sequence is not match log->seq : %d dev->journal_seq : %d\n", UINT8TOUINT16(log->seq), dev->journal_seq); + return -EINVAL; + } + + type = GET_JOURNAL_TYPE(log->status); + + if ((type == 0) || (type > SMART_JOURNAL_TYPE_ERASE)) { + fdbg("invalid type : %d\n", type); + return -EINVAL; + } /* Recovery step is Check crc -> Check something more based on type -> checkout -> verify based on type */ if (smart_validate_journal_crc(log) != OK) { @@ -5571,7 +5589,6 @@ static int smart_journal_recovery(FAR struct smart_struct_s *dev, journal_log_t } fvdbg("address : %u\n", address); - type = GET_JOURNAL_TYPE(log->status); switch (type) { /* Check committed data and redo if crc is valid, otherwise release it */ @@ -5644,11 +5661,7 @@ static int smart_journal_recovery(FAR struct smart_struct_s *dev, journal_log_t dev->erasecounts[psector]++; } #endif - break; - - default: - return -EIO; } ret = smart_journal_checkout(dev, log, address);
Fix Cassandra Xms and Xmx to 2G
# the same value to avoid stop-the-world GC pauses during resize, and # so that we can lock the heap in memory on startup to prevent any # of it from being swapped out. -#-Xms4G -#-Xmx4G +-Xms2G +-Xmx2G # Young generation size is automatically calculated by cassandra-env # based on this formula: min(100 * num_cores, 1/4 * heap size)
system/termcurses/tcurses_vt100.c: Fix spelling error in last commit.
@@ -827,7 +827,7 @@ static int tcurses_vt100_getkeycode(FAR struct termcurses_s *dev, FAR int *speci *keymodifiers = 0; *specialkey = 0; ismodifier = false; - buildkeycount = 0; + keybuildcount = 0; while (keycode == -1) {
Fixing hud width issues
@@ -445,20 +445,6 @@ parse_overlay_config(struct overlay_params *params, params->font_size = 24; } - //increase hud width if io read and write - if (!params->width) { - if (((params->enabled[OVERLAY_PARAM_ENABLED_gpu_core_clock] && !params->enabled[OVERLAY_PARAM_ENABLED_gpu_power]) - || (!params->enabled[OVERLAY_PARAM_ENABLED_gpu_core_clock] && params->enabled[OVERLAY_PARAM_ENABLED_gpu_power])) - && params->enabled[OVERLAY_PARAM_ENABLED_gpu_temp] - && params->enabled[OVERLAY_PARAM_ENABLED_gpu_stats]) { - params->tableCols = 4; - params->width = 20 * params->font_size; - } else if ((params->enabled[OVERLAY_PARAM_ENABLED_io_read] || params->enabled[OVERLAY_PARAM_ENABLED_io_write])) { - params->width = 15 * params->font_size; - } else { - params->width = params->font_size * 11.7; - } - } // set frametime limit if (params->fps_limit >= 0)
libc; fix integer overflow of alloc size due to multiplication. Pointed out by
#include <stdlib.h> #include <string.h> - -/* FIXME: This should look for multiplication overflow */ +#include <stdint.h> void *calloc(size_t nmemb, size_t size) { void *ptr; + int nb; + nb = sizeof(size_t) * 4; + if (size >= SIZE_MAX >> nb || nmemb >= SIZE_MAX >> nb) { + return NULL; + } size *= nmemb; ptr = malloc(size); if (ptr)
build/tools/esp32: Modify command and operator that "dash" not support. In ubuntu environment, "dash" is default shell, it does not support built-in "let" command and comparsion operator "==", so modify it to work in both "bash" and "dash".
@@ -31,11 +31,11 @@ i=0 #find romfs partition number for pname in $flash_type_list do - if [ "$pname" == "romfs" ]; then + if [ "$pname" = "romfs" ]; then isromfs_exist=1 break fi - let "romfs_num += 1" + romfs_num=`expr $romfs_num + 1` done #find romfs partition start address @@ -51,7 +51,7 @@ do break fi romfs_addr=`expr $romfs_addr + $psize` - let "i += 1" + i=`expr $i + 1` done if [ $isromfs_exist -eq 0 ]; then
Enable ch2 ADC/DAC on stream start only if ch2 is used
@@ -616,10 +616,11 @@ int ILimeSDRStreaming::Streamer::UpdateThreads(bool stopAll) lmsControl.Modify_SPI_Reg_bits(LMS7param(LML2_MODE), 0, fromChip); lmsControl.Modify_SPI_Reg_bits(LMS7param(LML1_FIDM), 0, fromChip); lmsControl.Modify_SPI_Reg_bits(LMS7param(LML2_FIDM), 0, fromChip); + lmsControl.Modify_SPI_Reg_bits(LMS7param(PD_RX_AFE1), 0, fromChip); lmsControl.Modify_SPI_Reg_bits(LMS7param(PD_TX_AFE1), 0, fromChip); - lmsControl.Modify_SPI_Reg_bits(LMS7param(PD_RX_AFE2), 0, fromChip); - lmsControl.Modify_SPI_Reg_bits(LMS7param(PD_TX_AFE2), 0, fromChip); + lmsControl.Modify_SPI_Reg_bits(LMS7param(PD_RX_AFE2), (channelEnables&2 ? 0 : 1), fromChip); + lmsControl.Modify_SPI_Reg_bits(LMS7param(PD_TX_AFE2), (channelEnables&2 ? 0 : 1), fromChip); if (lmsControl.Get_SPI_Reg_bits(LMS7_MASK, true) == 0) {
u3: cleans up comments in u3s_sift_ud()
@@ -875,9 +875,7 @@ u3s_sift_ud_bytes(c3_w len_w, c3_y* byt_y) return ( 1 == len_w ) ? (u3_noun)0 : u3_none; } - // if ( (1 == len_w) && ('0' == *byt_y) ) return (u3_noun)val_s; - - // +ted:ab: leading nonzero, 0-2 digits + // +ted:ab: leading nonzero, 0-2 additional digits // if ( NOT_DEC(*byt_y) ) return u3_none; @@ -885,7 +883,7 @@ u3s_sift_ud_bytes(c3_w len_w, c3_y* byt_y) val_s = *byt_y++ - '0'; if ( 0 == --len_w ) return (u3_noun)val_s; - // 1 digit + // 1 additional digit // if ( '.' == *byt_y ) goto tid_ab; if ( NOT_DEC(*byt_y) ) return u3_none; @@ -895,7 +893,7 @@ u3s_sift_ud_bytes(c3_w len_w, c3_y* byt_y) val_s += *byt_y++ - '0'; if ( 0 == --len_w ) return (u3_noun)val_s; - // 2 digits + // 2 additional digits // if ( '.' == *byt_y ) goto tid_ab; if ( NOT_DEC(*byt_y) ) return u3_none;
snprintf: Remove the %o and %p support %x could be used to replace the %o print option. %x could be used to replace the %p print option also. Acked-by: Eddie Dong
@@ -508,19 +508,6 @@ void do_print(const char *fmt_arg, struct print_param *param, uint32_t)); } } - /* octal number */ - else if (ch == 'o') { - if ((param->vars.flags & - PRINT_FLAG_LONG_LONG) != 0U) { - print_pow2(param, - __builtin_va_arg(args, - uint64_t), 3U); - } else { - print_pow2(param, - __builtin_va_arg(args, - uint32_t), 3U); - } - } /* hexadecimal number */ else if ((ch == 'X') || (ch == 'x')) { if (ch == 'X') { @@ -546,12 +533,6 @@ void do_print(const char *fmt_arg, struct print_param *param, } print_string(param, s); } - /* pointer argument */ - else if (ch == 'p') { - param->vars.flags |= PRINT_FLAG_ALTERNATE_FORM; - print_pow2(param, (uint64_t) - __builtin_va_arg(args, void *), 4U); - } /* single character argument */ else if (ch == 'c') { char c[2];
ManifoldAPI fix POST entity UTF8 format
@@ -4,6 +4,7 @@ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; @@ -293,7 +294,7 @@ public class ManifoldAPI { try { if (verb.equals("PUT") || verb.equals("POST")) { - final StringEntity params = new StringEntity(jsonObject.toString()); + final StringEntity params = new StringEntity(jsonObject.toString(), StandardCharsets.UTF_8.name()); if (verb.equals("POST")) { request = new HttpPost(url); ((HttpPost) request).setEntity(params);
doc: add some comments for coding guidelines This patch adds some comments for coding guidelines.
.. _coding_guidelines: +.. This document is being generated with a python script. +.. If you would like to update this document, please contact Shiqing. +.. Shiqing Gao <[email protected]> + Coding Guidelines #################
Remove double error messages
@@ -756,30 +756,26 @@ SSL_TEST_CTX *SSL_TEST_CTX_create(const CONF *conf, const char *test_section) /* Subsections */ if (strcmp(option->name, "client") == 0) { - if (!parse_client_options(&ctx->extra.client, conf, - option->value)) + if (!parse_client_options(&ctx->extra.client, conf, option->value)) goto err; } else if (strcmp(option->name, "server") == 0) { - if (!TEST_true(parse_server_options(&ctx->extra.server, conf, - option->value))) + if (!parse_server_options(&ctx->extra.server, conf, option->value)) goto err; } else if (strcmp(option->name, "server2") == 0) { - if (!TEST_true(parse_server_options(&ctx->extra.server2, conf, - option->value))) + if (!parse_server_options(&ctx->extra.server2, conf, option->value)) goto err; } else if (strcmp(option->name, "resume-client") == 0) { - if (!TEST_true(parse_client_options(&ctx->resume_extra.client, conf, - option->value))) + if (!parse_client_options(&ctx->resume_extra.client, conf, + option->value)) goto err; } else if (strcmp(option->name, "resume-server") == 0) { - if (!TEST_true(parse_server_options(&ctx->resume_extra.server, conf, - option->value))) + if (!parse_server_options(&ctx->resume_extra.server, conf, + option->value)) goto err; } else if (strcmp(option->name, "resume-server2") == 0) { if (!parse_server_options(&ctx->resume_extra.server2, conf, option->value)) goto err; - } else { for (j = 0; j < OSSL_NELEM(ssl_test_ctx_options); j++) { if (strcmp(option->name, ssl_test_ctx_options[j].name) == 0) {
better detection of crappy cap files
@@ -1480,6 +1480,17 @@ if((apstaessidlistecleaned != NULL) && (hccapxbestoutname != NULL)) continue; } } + + for(ec = 0; ec < zeigeressid->essidlen; ec++) + { + if((zeigeressid->essid[ec] > 0x7e) && (essidchangecount > 2)) + { + zeigeressid++; + continue; + } + } + + zeiger->essidlen = zeigeressid->essidlen; memset(zeiger->essid, 0, 32); memcpy(zeiger->essid, zeigeressid->essid, zeigeressid->essidlen); @@ -3151,14 +3162,6 @@ if(pmkid->type != 0x04) { return; } -if(memcmp(mac_ap, &mac_null, 6) == 0) - { - return; - } -if(memcmp(mac_sta, &mac_null, 6) == 0) - { - return; - } if(memcmp(mac_ap, &mac_broadcast, 6) == 0) { return; @@ -5098,6 +5101,16 @@ if((filtermacflag == true) && (caplen >= (uint32_t)MAC_SIZE_NORM)) } } +if(memcmp(macf->addr2, &mac_null, 6) == 0) + { + skippedpacketcount++; + return; + } +if(memcmp(macf->addr1, &mac_null, 6) == 0) + { + skippedpacketcount++; + return; + } if(macf->type == IEEE80211_FTYPE_MGMT) { if(macf->subtype == IEEE80211_STYPE_BEACON)
test BUGFIX wrong dereference
@@ -386,7 +386,7 @@ clb_trusted_cert_lists(const char *name, void *UNUSED(user_data), char ***cert_p *cert_data_count = 1; return 0; } else if (!strcmp(name, "client_cert_list")) { - *cert_paths = malloc(sizeof *cert_paths); + *cert_paths = malloc(sizeof **cert_paths); (*cert_paths)[0] = strdup(TESTS_DIR"/data/client.crt"); *cert_path_count = 1; return 0;
rl->enc_ctx must be non-NULL and cipher must be set Otherwise ssl3_cipher() cannot work properly. Fixes Coverity CID
@@ -98,10 +98,8 @@ static int ssl3_cipher(OSSL_RECORD_LAYER *rl, SSL3_RECORD *inrecs, size_t n_recs return 0; ds = rl->enc_ctx; - if (rl->enc_ctx == NULL) - enc = NULL; - else - enc = EVP_CIPHER_CTX_get0_cipher(rl->enc_ctx); + if (ds == NULL || (enc = EVP_CIPHER_CTX_get0_cipher(ds)) == NULL) + return 0; provided = (EVP_CIPHER_get0_provider(enc) != NULL);
Set C standard for all compilers in compile options (cmake).
@@ -36,19 +36,13 @@ include(Portability) set(DEFAULT_PROJECT_OPTIONS DEBUG_POSTFIX "d" - CXX_STANDARD 11 # Not available before CMake 3.1; see below for manual command line argument addition + CXX_STANDARD 11 + C_STANDARD 11 # TODO: Provide support for older standards LINKER_LANGUAGE "CXX" POSITION_INDEPENDENT_CODE ON CXX_VISIBILITY_PRESET "hidden" ) -if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) - set(DEFAULT_PROJECT_OPTIONS - ${DEFAULT_PROJECT_OPTIONS} - C_STANDARD 11 # TODO: Provide preprocessor support for older standards (GCC) - ) -endif() - # # Include directories # @@ -163,7 +157,6 @@ if(WIN32 AND MSVC) #add_compile_options(/wd4251 /wd4592) #add_compile_options(/ZH:SHA_256) # use SHA256 for generating hashes of compiler processed source files. - # Release if(CMAKE_BUILD_TYPE STREQUAL "Debug") # Disable optimizations add_compile_options(/Od)
network: change keepalive type to char
/* Network connection setup */ struct flb_net_setup { /* enable/disable keepalive support */ - int keepalive; + char keepalive; /* max time in seconds that a keepalive connection can be idle */ int keepalive_idle_timeout;
enabled valid report
@@ -39,7 +39,7 @@ namespace (ebi::vcf::VERSION_OPTION, "Display version of the assembly checker") (ebi::vcf::INPUT_OPTION, po::value<std::string>()->default_value(ebi::vcf::STDIN), "Path to the input VCF file, or stdin") (ebi::vcf::FASTA_OPTION, po::value<std::string>(), "Path to the input FASTA file; please note that the index file must have the same name as the FASTA file and saved with a .idx extension") - (ebi::vcf::REPORT_OPTION, po::value<std::string>()->default_value(ebi::vcf::SUMMARY), "Comma separated values for types of reports (summary, text)") + (ebi::vcf::REPORT_OPTION, po::value<std::string>()->default_value(ebi::vcf::SUMMARY), "Comma separated values for types of reports (summary, text, valid)") ; return description; @@ -92,7 +92,14 @@ namespace auto timestamp = std::chrono::duration_cast<std::chrono::milliseconds>(epoch).count(); std::string filetype = ".txt"; - if (out == ebi::vcf::TEXT) { + if (out == ebi::vcf::VALID) { + std::string filename = input + ".valid_assembly_report." + std::to_string(timestamp) + filetype; + boost::filesystem::path file{filename}; + if (boost::filesystem::exists(file)) { + throw std::runtime_error{"Report file already exists on " + filename + ", please delete it or rename it"}; + } + outputs.emplace_back(new ebi::vcf::TextAssemblyReportWriter(filename)); + } else if (out == ebi::vcf::TEXT) { std::string filename = input + ".text_assembly_report." + std::to_string(timestamp) + filetype; boost::filesystem::path file{filename}; if (boost::filesystem::exists(file)) {
save config after ootx data is completed
@@ -31,6 +31,8 @@ static void reset_calibration( struct SurviveCalData * cd ); void ootx_packet_clbk_d(ootx_decoder_context *ct, ootx_packet* packet) { + static uint8_t lighthouses_completed = 0; + SurviveContext * ctx = (SurviveContext*)(ct->user); SurviveCalData * cd = ctx->calptr; int id = ct->user1; @@ -57,7 +59,11 @@ void ootx_packet_clbk_d(ootx_decoder_context *ct, ootx_packet* packet) b->OOTXSet = 1; config_set_lighthouse(ctx->lh_config,b,id); -// config_save("config.json"); + lighthouses_completed++; + + if (lighthouses_completed >= NUM_LIGHTHOUSES) { + config_save(ctx, "config.json"); + } } int survive_cal_get_status( struct SurviveContext * ctx, char * description, int description_length )
[CUDA] Implement CL_MEM_ALLOC_HOST_PTR
@@ -242,17 +242,15 @@ cl_int pocl_cuda_alloc_mem_obj(cl_device_id device, cl_mem mem_obj) mem_obj->mem_host_ptr, 0); CUDA_CHECK(result, "cuMemHostGetDevicePointer"); } + else if (flags & CL_MEM_ALLOC_HOST_PTR) + { + result = cuMemHostAlloc(&b, mem_obj->size, CU_MEMHOSTREGISTER_DEVICEMAP); + CUDA_CHECK(result, "cuMemHostAlloc"); + } else { result = cuMemAlloc((CUdeviceptr*)&b, mem_obj->size); - if (result != CUDA_SUCCESS) - { - const char *err; - cuGetErrorName(result, &err); - POCL_MSG_PRINT2(__FUNCTION__, __LINE__, - "-> Failed to allocate memory: %s\n", err); - return CL_MEM_OBJECT_ALLOCATION_FAILURE; - } + CUDA_CHECK(result, "cuMemAlloc"); } mem_obj->device_ptrs[device->global_mem_id].mem_ptr = b;
Added 'facebookexternalhit' to the default crawler list.
@@ -163,6 +163,7 @@ static const char *browsers[][2] = { /* Crawlers/Bots (Possible Safari based) */ {"AppleBot", "Crawlers"}, + {"facebookexternalhit", "Crawlers"}, {"Twitter", "Crawlers"}, {"Safari", "Safari"},
doc: Upgrade RT kernel to 5.15 in sample app guide
@@ -117,7 +117,7 @@ As a normal (e.g., **acrn**) user, follow these steps: cd ~/acrn-work/acrn-hypervisor git fetch --all - git checkout v3.1 + git checkout master #. Build the ACRN sample application source code:: @@ -162,13 +162,12 @@ Make the RT_VM Image ********************* 1. Check out the ``acrn-kernel`` source code branch (already cloned from the - ``acrn-kernel`` repo when you followed the :ref:`gsg`). We've tagged a - specific version of the ``acrn-kernel`` you should use for the sample app's - RT VM:: + ``acrn-kernel`` repo when you followed the :ref:`gsg`). We use preempt-rt + branch of ``acrn-kernel`` for the sample app's RT VM:: cd ~/acrn-work/acrn-kernel git fetch --all - git checkout -b sample_rt acrn-tag-sample-application-rt + git checkout -b sample_rt origin/5.15/preempt-rt #. Build the preempt-rt patched kernel used by the RT VM:: @@ -190,10 +189,10 @@ Make the RT_VM Image .. code-block:: console - linux-headers-5.10.120-rt70-acrn-kernel-rtvm+_5.10.120-rt70-acrn-kernel-rtvm+-1_amd64.deb - linux-image-5.10.120-rt70-acrn-kernel-rtvm+_5.10.120-rt70-acrn-kernel-rtvm+-1_amd64.deb - linux-image-5.10.120-rt70-acrn-kernel-rtvm+-dbg_5.10.120-rt70-acrn-kernel-rtvm+-1_amd64.deb - linux-libc-dev_5.10.120-rt70-acrn-kernel-rtvm+-1_amd64.deb + linux-headers-5.15.44-rt46-acrn-kernel-rtvm+_5.15.44-rt46-acrn-kernel-rtvm+-1_amd64.deb + linux-image-5.15.44-rt46-acrn-kernel-rtvm+-dbg_5.15.44-rt46-acrn-kernel-rtvm+-1_amd64.deb + linux-image-5.15.44-rt46-acrn-kernel-rtvm+_5.15.44-rt46-acrn-kernel-rtvm+-1_amd64.deb + linux-libc-dev_5.15.44-rt46-acrn-kernel-rtvm+-1_amd64.deb #. Make the RT VM image:: @@ -607,7 +606,7 @@ Install and Run ACRN on the Target System ubuntu login: root Password: - Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.10.120-rt70-acrn-kernel-rtvm X86_64) + Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.44-rt46-acrn-kernel-rtvm+ x86_64) . . .
tests: internal: ra: Use putenv() for Windows compatibility MSVC supports putenv(), but not setenv(). This has been causing build errors on AppVeyor. Fix it.
@@ -113,7 +113,7 @@ void cb_translate() } /* Set environment variables */ - setenv("FLB_ENV", "translated", 1); + putenv("FLB_ENV=translated"); /* Formatter */ fmt = \
language-server: address review issues
++ on-watch |= =path ?: ?=([%primary ~] path) - :_ this - ~ + `this ?. ?=([%http-response @ ~] path) (on-watch:def path) `this |= res=out:notification:lsp-sur ^- (list card) :_ ~ - [%give %fact `/primary %language-server-rpc-notification !>(res)] + [%give %fact ~[/primary] %language-server-rpc-notification !>(res)] :: ++ on-notification |= not=all:notification:lsp-sur ^- (quip card _state) =^ cards state ?+ -.not [~ state] - %text-document--did-open - (handle-did-open +.not) - %text-document--did-change - (handle-did-change +.not) - %text-document--did-save - (handle-did-save +.not) - %text-document--did-close - (handle-did-close +.not) - %exit - handle-exit + %text-document--did-open (handle-did-open +.not) + %text-document--did-change (handle-did-change +.not) + %text-document--did-save (handle-did-save +.not) + %text-document--did-close (handle-did-close +.not) + %exit handle-exit == [cards state] ++ on-request |= res=all:response:lsp-sur ^- (list card) :_ ~ - [%give %fact `/primary %language-server-rpc-response !>(res)] + [%give %fact ~[/primary] %language-server-rpc-response !>(res)] :: ++ handle-exit ^- (quip card _state)
Fix SAL warning when passing 0 to PhPrintPointer
@@ -437,7 +437,7 @@ FORCEINLINE VOID PhPrintUInt64( FORCEINLINE VOID PhPrintPointer( _Out_writes_(PH_PTR_STR_LEN_1) PWSTR Destination, - _In_ PVOID Pointer + _In_opt_ PVOID Pointer ) { Destination[0] = L'0';
Fallback to current song waveforms in song preview
@@ -144,6 +144,10 @@ const preview = (note, type, instrument, square2, waves = []) => { console.log(note, instrument, square2); const noteFreq = note2freq[note]; + if (waves.length === 0) { + waves = current_song.waves; + } + switch (type) { case "duty": if (!square2) {
Add recording circle to render_mango
@@ -1257,6 +1257,8 @@ void render_mango(swapchain_stats& data, struct overlay_params& params, ImVec2& ImGui::PopStyleColor(); } + if(logger->is_active()) + ImGui::GetWindowDrawList()->AddCircleFilled(ImVec2(data.main_window_pos.x + window_size.x - 15, data.main_window_pos.y + 15), 10, params.engine_color, 20); ImGui::End(); window_size = ImVec2(window_size.x, 200); }
Fixed syntax error for SceKernelBootimage.yml.
@@ -8,4 +8,4 @@ modules: kernel: true nid: 0x17E65BD7 variables: - - sceKernelBootimageEntries: 0x9C08E88A \ No newline at end of file + sceKernelBootimageEntries: 0x9C08E88A
Clear the Websocket protocol object in the handler
@@ -73,8 +73,10 @@ static VALUE iodine_ws_write(VALUE self, VALUE data) { // fprintf(stderr, "iodine_ws_write: self = %p ; data = %p\n" // "\t\tString ptr: %p, String length: %lu\n", // (void *)ws, (void *)data, RSTRING_PTR(data), RSTRING_LEN(data)); - if (!ws || ((protocol_s *)ws)->service != WEBSOCKET_ID_STR) + if (!ws || ((protocol_s *)ws)->service != WEBSOCKET_ID_STR) { + rb_raise(rb_eIOError, "Connection is closed"); return Qfalse; + } websocket_write(ws, RSTRING_PTR(data), RSTRING_LEN(data), rb_enc_get(data) == IodineUTF8Encoding); return Qtrue; @@ -427,6 +429,7 @@ void ws_on_close(intptr_t uuid, void *handler_) { "ERROR: (iodine websockets) Closing a handlerless websocket?!\n"); return; } + set_ws(handler, NULL); set_uuid(handler, 0); RubyCaller.call(handler, iodine_on_close_func_id); Registry.remove(handler);