message
stringlengths
6
474
diff
stringlengths
8
5.22k
One last output fix for asan test
@@ -48,7 +48,7 @@ jobs: echo "No leaks detected in picoquic_ct" fi ./picohttp_ct -n -r 1>http_ct.txt 2>sanity.txt || QUICHTTPRESULT=$? - echo "running picohttp_ct returns $QUICHTTPRESULT " + echo "running picohttp_ct returns <$QUICHTTPRESULT> " cat sanity.txt if [ ! -z ${QUICHTTPRESULT} ]; then if [ ${QUICHTTPRESULT} != 0 ]; then exit 1; fi;
website: two minor fixes
@@ -21,7 +21,7 @@ elektra-glossary(7) -- glossary of Elektra - **Global key database**: provides global access to all configuration storages of all applications in a system. - Abbreviated as ^KDB^. + Abbreviated as `KDB`. - **LibElektra**: is a set of [libraries](/src/libs/) to access configuration parameters in a global,
GH Actions: keep docker image with tag 'latest' up-to-date
@@ -80,11 +80,15 @@ jobs: MERGE_BRANCH_REF=$(echo ${{ github.ref }} | sed -e 's|refs/heads/||g') echo This is a build for branch $MERGE_BRANCH_REF and it updates the docker container echo Push images to Dockerhub - echo Will push $DOCKER_IMG as well as $DOCKER_BASE_IMG:$MERGE_BRANCH_REF echo ${{ secrets.DOCKERHUB_PASSWD }} | docker login --username contiker --password-stdin - docker tag $DOCKER_IMG $DOCKER_BASE_IMG:$MERGE_BRANCH_REF docker push $DOCKER_IMG + docker tag $DOCKER_IMG $DOCKER_BASE_IMG:$MERGE_BRANCH_REF docker push $DOCKER_BASE_IMG:$MERGE_BRANCH_REF + if [ $MERGE_BRANCH_REF == develop ]; then + # When develop is updated, also push docker image with tag 'latest' + docker tag $DOCKER_IMG $DOCKER_BASE_IMG:latest + docker push $DOCKER_BASE_IMG:latest + fi # Clone the repo used for out-of-tree builds if required - name: Clone the repo used for out-of-tree builds if required
[x86_64] Meson cross-compile template is arch-agnostic
# https://github.com/mesonbuild/meson/issues/309 # axle_repo_root will be filled in when the .ini is generated for the first time -toolchain_root = axle_repo_root + '/i686-toolchain' +arch = 'x86_64' +toolchain_root = axle_repo_root + '/' + arch + '-toolchain' sysroot = axle_repo_root + '/axle-sysroot' [properties] -c_args = ['-I' + sysroot + '/usr/i686-axle/include', '-g', '-fdiagnostics-color=always'] -c_link_args = ['-T', axle_repo_root + '/programs/linker.ld', '-lc', '-L' + sysroot + '/usr/i686-axle/lib', '-nostartfiles', '-Bstatic'] +c_args = ['-I' + sysroot + '/usr/' + arch + '-axle/include', '-g', '-fdiagnostics-color=always'] +c_link_args = ['-T', axle_repo_root + '/programs/linker.ld', '-lc', '-L' + sysroot + '/usr/' + arch + '-axle/lib', '-nostartfiles', '-Bstatic'] # Exposed to build scripts initrd_dir = axle_repo_root + '/initrd/' -include_root = sysroot + '/usr/i686-axle/include' -libraries_root = sysroot + '/usr/i686-axle/lib' +include_root = sysroot + '/usr/' + arch + '-axle/include' +libraries_root = sysroot + '/usr/' + arch + '-axle/lib' [binaries] -c = toolchain_root + '/bin/i686-elf-gcc' -ar = toolchain_root + '/bin/i686-elf-ar' -ranlib = toolchain_root + '/bin/i686-elf-ranlib' +c = toolchain_root + '/bin/' + arch + '-elf-gcc' +ar = toolchain_root + '/bin/' + arch + '-elf-ar' +ranlib = toolchain_root + '/bin/' + arch + '-elf-ranlib' [host_machine] system = 'axle' cpu_family = 'x86' -cpu = 'i686' +cpu = arch endian = 'little'
Rename default custom events
"command": "EVENT_CALL_CUSTOM_EVENT", "args": { "customEventId": "bc9f67e9-b6f2-4216-b8b6-63505f3b7118", - "__name": "Configure Menu" + "__name": "Init Menu" }, "children": { "script": [ "command": "EVENT_CALL_CUSTOM_EVENT", "args": { "customEventId": "bc9f67e9-b6f2-4216-b8b6-63505f3b7118", - "__name": "Configure Menu" + "__name": "Init Menu" }, "children": { "script": [ "command": "EVENT_CALL_CUSTOM_EVENT", "args": { "customEventId": "bc9f67e9-b6f2-4216-b8b6-63505f3b7118", - "__name": "Configure Menu" + "__name": "Init Menu" }, "children": { "script": [ "command": "EVENT_CALL_CUSTOM_EVENT", "args": { "customEventId": "bc9f67e9-b6f2-4216-b8b6-63505f3b7118", - "__name": "Configure Menu" + "__name": "Init Menu" }, "children": { "script": [ "command": "EVENT_CALL_CUSTOM_EVENT", "args": { "customEventId": "a02c8ee7-1478-4317-80d7-1c3fc9704e8d", - "__name": "Configure Weapons" + "__name": "Init Weapons" }, "children": { "script": [ "id": "bc9f67e9-b6f2-4216-b8b6-63505f3b7118", "variables": {}, "actors": {}, - "name": "Configure Menu", + "name": "Init Menu", "description": "Attach Quest Menu to Start Button", "script": [ { "id": "a02c8ee7-1478-4317-80d7-1c3fc9704e8d", "variables": {}, "actors": {}, - "name": "Configure Weapons", + "name": "Init Weapons", "script": [ { "id": "72f90b54-19db-4794-9cdd-e89647b95af0",
Default haptic on cal off
@@ -85,7 +85,7 @@ STATIC_CONFIG_ITEM(CENTER_ON_LH0, "center-on-lh0", 'b', "Alternative scheme for setting initial position; LH0 is 0, 0 looking in the +X direction", 0) STATIC_CONFIG_ITEM(HAPTIC_ON_CALIBRATE, "haptic-on-calibrate", 'b', - "Trigger a haptic pulse when lighthouse positions are solved", 1); + "Trigger a haptic pulse when lighthouse positions are solved", 0); STATIC_CONFIG_ITEM(LIGHTHOUSE_NORMALIZE_ANGLE, "normalize-lighthouse-angle", 'f', "Angle about Z to adust calibration by", 0.);
chip/npcx/clock.c: Format with clang-format BRANCH=none TEST=none
@@ -79,7 +79,6 @@ void clock_disable_peripheral(uint32_t offset, uint32_t mask, uint32_t mode) /* Set PD bit to 1 */ NPCX_PWDWN_CTL(offset) |= reg_mask; - } /*****************************************************************************/ @@ -100,8 +99,8 @@ void clock_init(void) * unstable for a little which can affect peripheral communication like * eSPI. Skip this if not needed (e.g. RW jump) */ - if (NPCX_HFCGN != HFCGN || NPCX_HFCGML != HFCGML - || NPCX_HFCGMH != HFCGMH) { + if (NPCX_HFCGN != HFCGN || NPCX_HFCGML != HFCGML || + NPCX_HFCGMH != HFCGMH) { /* * Configure frequency multiplier M/N values according to * the requested OSC_CLK (Unit:Hz). @@ -255,7 +254,8 @@ int clock_get_apb3_freq(void) void clock_wait_cycles(uint32_t cycles) { asm volatile("1: subs %0, #1\n" - " bne 1b\n" : "+r"(cycles)); + " bne 1b\n" + : "+r"(cycles)); } #ifdef CONFIG_LOW_POWER_IDLE @@ -382,8 +382,7 @@ void __idle(void) "wfi\n" "ldm %0, {r0-r5}\n" "pop {r0-r5}\n" - "isb\n" :: "r" (0x100A8000) - ); + "isb\n" ::"r"(0x100A8000)); /* Get time delay cause of deep idle */ next_evt_us = __hw_clock_get_sleep_time(evt_count); @@ -435,8 +434,7 @@ void __idle(void) "wfi\n" "ldm %0, {r0-r5}\n" "pop {r0-r5}\n" - "isb\n" :: "r" (0x100A8000) - ); + "isb\n" ::"r"(0x100A8000)); } /* @@ -448,7 +446,6 @@ void __idle(void) } #endif /* CONFIG_LOW_POWER_IDLE */ - #ifdef CONFIG_LOW_POWER_IDLE /** * Print low power idle statistics @@ -464,8 +461,7 @@ static int command_idle_stats(int argc, char **argv) ccprintf("Total time on: %.6llds\n", ts.val); return EC_SUCCESS; } -DECLARE_CONSOLE_COMMAND(idlestats, command_idle_stats, - "", +DECLARE_CONSOLE_COMMAND(idlestats, command_idle_stats, "", "Print last idle stats"); /** @@ -506,8 +502,7 @@ static int command_dsleep(int argc, char **argv) return EC_SUCCESS; } -DECLARE_CONSOLE_COMMAND(dsleep, command_dsleep, - "[ on | off | <timeout> sec]", +DECLARE_CONSOLE_COMMAND(dsleep, command_dsleep, "[ on | off | <timeout> sec]", "Deep sleep clock settings:\nUse 'on' to force deep " "sleep not to use low speed clock.\nUse 'off' to " "allow deep sleep to auto-select using the low speed "
Add tinyalsa to contrib (via yamaker)
- source_filter: "^contrib/libs/libpq" includes: - local.h + +- source_filter: "^contrib/libs/tinyalsa" + # TinyALSA references linux kernel headers for kernel ALSA interface + includes: + - sound/asound.h
doc: update release notes with cpu_affinity notice The acrn-dm ``--cpu_affinity`` parameter is now mandatory.
@@ -92,7 +92,7 @@ User-Friendly VM names Extend Use of CAT Cache Tuning to VMs In previous releases, Cache Allocation Technology (vCAT) was available only at the hypervisor level and with per-VM granularity. In this v2.7 release, - each VM with exclusive cache resources can partition its cache resources with + each VM with exclusive cache resources can partition them with per-thread granularity and allocate cache resources to prioritized tasks. Expand Passthrough Device Use Cases to Pre-Launched VMs @@ -100,7 +100,7 @@ Expand Passthrough Device Use Cases to Pre-Launched VMs graphics device passthrough for improved performance, a feature previously available to only post-launched VMs. - We've extended Trusted Platform Module (TPM) 2.0 and its associated resource + Trusted Platform Module (TPM) 2.0 and its associated resource can also be passthrough to post-launched VMs. Upgrading to v2.7 From Previous Releases @@ -138,6 +138,13 @@ The following elements were removed. - ``KATA_VM`` VM type. - ``hv.CAPACITIES.MAX_EFI_MMAP_ENTRIES`` +In v2.7, the ``acrn-dm`` command line parameter ``--cpu_affinity`` is now mandatory +when launching a User VM. If the launch XML settings, used to generate the launch +scripts, do not specify a ``cpu_affinity`` value, the ACRN Configurator will look for +it from the scenario XML settings. Verify that your existing launch scripts +specify this ``--cpu_affinity`` parameter as ``acrn-dm`` will now complain if it's +missing. + Document Updates ****************
dispatch_removelistener: acquire exclusive lock for closing socks to avoid race in case of UDP connections
@@ -279,8 +279,16 @@ dispatch_removelistener(listener *lsnr) if (lsnr->transport == W_SSL) SSL_CTX_free(lsnr->ctx); #endif - for (socks = lsnr->socks; *socks != -1; socks++) + /* acquire a write lock on connections, which is a bit wrong, but it + * ensures all dispatchers are stopped while we close the sockets, + * which avoids a race on the reading thereof if this is a UDP + * connection */ + pthread_rwlock_wrlock(&connectionslock); + for (socks = lsnr->socks; *socks != -1; socks++) { close(*socks); + *socks = -1; + } + pthread_rwlock_unlock(&connectionslock); if (lsnr->saddrs) freeaddrinfo(lsnr->saddrs); }
Syscalls: stub fchown, fchownat and lchown We don't need to deal with file ownership. Closes
@@ -39,8 +39,8 @@ void register_other_syscalls(struct syscall *map) register_syscall(map, link, 0); register_syscall(map, chmod, syscall_ignore); register_syscall(map, fchmod, syscall_ignore); - register_syscall(map, fchown, 0); - register_syscall(map, lchown, 0); + register_syscall(map, fchown, syscall_ignore); + register_syscall(map, lchown, syscall_ignore); register_syscall(map, ptrace, 0); register_syscall(map, syslog, 0); register_syscall(map, getgid, syscall_ignore); @@ -153,7 +153,7 @@ void register_other_syscalls(struct syscall *map) register_syscall(map, inotify_rm_watch, 0); register_syscall(map, migrate_pages, 0); register_syscall(map, mknodat, 0); - register_syscall(map, fchownat, 0); + register_syscall(map, fchownat, syscall_ignore); register_syscall(map, futimesat, 0); register_syscall(map, linkat, 0); register_syscall(map, fchmodat, syscall_ignore);
Completions: Add suggestions for command `mount`
@@ -172,6 +172,16 @@ function __fish_kdb_subcommand_info_needs_clause_name -d 'Check if the subcomman and test (__number_arguments_input_left) -eq 3 end +function __fish_kdb_subcommand_mount_needs_namespace -d 'Check if the subcommand mount needs a namespace completion' + __fish_kdb_subcommand_includes mount + and test (__number_arguments_input_left) -eq 3 +end + +function __fish_kdb_subcommand_mount_needs_storage_plugin -d 'Check if the subcommand mount needs a storage plugin completion' + __fish_kdb_subcommand_includes mount + and test (__number_arguments_input_left) -eq 4 +end + function __fish_kdb_subcommand_needs_storage_plugin -d 'Check if the current subcommand need a storage plugin completion' set -l subcommands editor export import @@ -349,8 +359,10 @@ set -l completion_function '__fish_kdb_needs_namespace complete editor export fi complete -c kdb -n "$completion_function" -x -a '(__fish_kdb_print_namespaces)' complete -c kdb -n '__fish_kdb_needs_namespace cp 2' -x -a '(__fish_kdb_print_namespaces)' complete -c kdb -n '__fish_kdb_needs_namespace merge 4' -x -a '(__fish_kdb_print_namespaces)' +complete -c kdb -n '__fish_kdb_subcommand_mount_needs_namespace' -x -a '(__fish_kdb_print_namespaces)' complete -c kdb -n '__fish_kdb_needs_plugin' -x -a '(__fish_kdb_print_plugins)' complete -c kdb -n '__fish_kdb_subcommand_convert_needs_storage_plugin' -x -a '(__fish_kdb_print_storage_plugins)' +complete -c kdb -n '__fish_kdb_subcommand_mount_needs_storage_plugin' -x -a '(__fish_kdb_print_storage_plugins)' complete -c kdb -n '__fish_kdb_subcommand_fstab_needs_filesystem' -x -a '(__fish_print_filesystems)' complete -c kdb -n '__fish_kdb_subcommand_info_needs_clause_name' -x -a '(__fish_kdb_print_clause_names)' complete -c kdb -n '__fish_kdb_subcommand_needs_storage_plugin' -x -a '(__fish_kdb_print_storage_plugins)'
Added additional validation for cluster SETSLOT
@@ -4652,6 +4652,10 @@ NULL (char*)c->argv[4]->ptr); return; } + if (nodeIsSlave(n)) { + addReplyError(c,"Target node is not a master"); + return; + } server.cluster->migrating_slots_to[slot] = n; } else if (!strcasecmp(c->argv[3]->ptr,"importing") && c->argc == 5) { if (server.cluster->slots[slot] == myself) { @@ -4664,6 +4668,10 @@ NULL (char*)c->argv[4]->ptr); return; } + if (nodeIsSlave(n)) { + addReplyError(c,"Target node is not a master"); + return; + } server.cluster->importing_slots_from[slot] = n; } else if (!strcasecmp(c->argv[3]->ptr,"stable") && c->argc == 4) { /* CLUSTER SETSLOT <SLOT> STABLE */
added the const back in
@@ -589,7 +589,7 @@ ParallelCoordinatesViewerEnginePluginInfo::InitializePlotAtts( } else { - Expression *exp = + Expression const *exp = ParsingExprList::GetExpression(plot.GetVariableName()); if (exp == NULL || exp->GetType() != Expression::ArrayMeshVar) {
Fix incorrect maximum vertex streams value.
@@ -1204,7 +1204,7 @@ typedef struct SceGxmPrecomputedDraw { } SceGxmPrecomputedDraw; #define SCE_GXM_MAX_VERTEX_ATTRIBUTES 16 -#define SCE_GXM_MAX_VERTEX_STREAMS 4 +#define SCE_GXM_MAX_VERTEX_STREAMS 16 #define SCE_GXM_MAX_TEXTURE_UNITS 16 #define SCE_GXM_MAX_UNIFORM_BUFFERS 8 #define SCE_GXM_MAX_AUXILIARY_SURFACES 3
makefile: use pkg-config (when available) to determine openssl flags (helps building on Mac OS X with openssl installed via Mac ports)
@@ -88,6 +88,8 @@ ifndef CPPSTD CPPSTD:=gnu++11 endif +PKG_CONFIG ?= pkg-config + # for internal use - don't change LINKER_LIBS_EXT:= @@ -414,6 +416,14 @@ int main(void) { \\n\ # automatic library adjustments for possible BearSSL library LIB_PRIVATE_SUBFOLDERS:=$(LIB_PRIVATE_SUBFOLDERS) $(if $(wildcard lib/bearssl),bearssl) +ifeq ($(shell $(PKG_CONFIG) -- openssl 2>&1 >/dev/null; echo $$?), 0) + OPENSSL_CFLAGS = $(shell $(PKG_CONFIG) --cflags openssl) + OPENSSL_LDFLAGS = $(shell $(PKG_CONFIG) --libs openssl) + OPENSSL_LIBS = +endif + +OPENSSL_LDFLAGS ?= "-lssl" "-lcrypto" + # add BearSSL/OpenSSL library flags (exclusive) ifdef FIO_NO_TLS else ifeq ($(call TRY_COMPILE, $(FIO_TLS_TEST_BEARSSL_SOURCE), $(EMPTY)), 0) @@ -423,10 +433,12 @@ else ifeq ($(call TRY_COMPILE, $(FIO_TLS_TEST_BEARSSL_EXT), "-lbearssl"), 0) $(info * Detected the BearSSL library, setting HAVE_BEARSSL) FLAGS:=$(FLAGS) HAVE_BEARSSL LINKER_LIBS_EXT:=$(LINKER_LIBS_EXT) bearssl -else ifeq ($(call TRY_COMPILE, $(FIO_TLS_TEST_OPENSSL), "-lcrypto" "-lssl"), 0) +else ifeq ($(call TRY_COMPILE, $(FIO_TLS_TEST_OPENSSL), $(OPENSSL_CFLAGS) $(OPENSSL_LDFLAGS)), 0) $(info * Detected the OpenSSL library, setting HAVE_OPENSSL) FLAGS:=$(FLAGS) HAVE_OPENSSL HAVE_TLS - LINKER_LIBS_EXT:=$(LINKER_LIBS_EXT) crypto ssl + LINKER_LIBS_EXT:=$(LINKER_LIBS_EXT) $(OPENSSL_LIBS) + LDFLAGS += $(OPENSSL_LDFLAGS) + CFLAGS += $(OPENSSL_CFLAGS) else $(info * No compatible SSL/TLS library detected.) endif
Adapt help to terminal size If the error stream is a terminal, and we can retrieve the terminal size, wrap the help content according to the terminal width.
#include "util/log.h" #include "util/strbuf.h" #include "util/str_util.h" +#include "util/term.h" #define STR_IMPL_(x) #x #define STR(x) STR_IMPL_(x) @@ -740,7 +741,23 @@ print_shortcut(const struct sc_shortcut *shortcut, unsigned cols) { void scrcpy_print_usage(const char *arg0) { - const unsigned cols = 80; // For now, use a hardcoded value +#define SC_TERM_COLS_DEFAULT 80 + unsigned cols; + + if (!isatty(STDERR_FILENO)) { + // Not a tty + cols = SC_TERM_COLS_DEFAULT; + } else { + bool ok = sc_term_get_size(NULL, &cols); + if (!ok) { + // Could not get the terminal size + cols = SC_TERM_COLS_DEFAULT; + } + if (cols < 20) { + // Do not accept a too small value + cols = 20; + } + } fprintf(stderr, "Usage: %s [options]\n\n" "Options:\n", arg0);
admin/examples: fix install path for nagios compute.cfg example
@@ -55,7 +55,7 @@ install -D -m 0644 %SOURCE5 %{buildroot}%{OHPC_HOME}/pub/examples/slurm/job.mpi install -D -m 0644 %SOURCE6 %{buildroot}%{OHPC_HOME}/pub/examples/udev/60-ipath.rules install -D -m 0644 %SOURCE7 %{buildroot}%{OHPC_HOME}/pub/examples/ganglia/gmond.conf install -D -m 0644 %SOURCE8 %{buildroot}%{OHPC_HOME}/pub/examples/pbspro/job.mpi -install -D -m 0644 %SOURCE9 %{buildroot}%{OHPC_HOME}/pub/examples/ganglia/compute.cfg +install -D -m 0644 %SOURCE9 %{buildroot}%{OHPC_HOME}/pub/examples/nagios/compute.cfg install -D -m 0644 %SOURCE10 %{buildroot}%{OHPC_HOME}/pub/examples/example.modulefile install -D -m 0644 %SOURCE11 %{buildroot}%{OHPC_HOME}/pub/examples/example-mpi-dependent.modulefile
Documentation for the -precert flag for "openssl req"
@@ -37,6 +37,7 @@ B<openssl> B<req> [B<-newhdr>] [B<-extensions section>] [B<-reqexts section>] +[B<-precert>] [B<-utf8>] [B<-nameopt>] [B<-reqopt>] @@ -253,6 +254,14 @@ request extensions. This allows several different sections to be used in the same configuration file to specify requests for a variety of purposes. +=item B<-precert> + +a poison extension will be added to the certificate, making it a +"pre-certificate" (see RFC6962). This can be submitted to Certificate +Transparency logs in order to obtain signed certificate timestamps (SCTs). +These SCTs can then be embedded into the pre-certificate as an extension, before +removing the poison and signing the certificate. + =item B<-utf8> this option causes field values to be interpreted as UTF8 strings, by
fix v2.0.5 version
-<<<<<<< HEAD set(mi_version_major 2) set(mi_version_minor 0) -set(mi_version_patch 4) -======= -set(mi_version_major 1) -set(mi_version_minor 7) set(mi_version_patch 5) ->>>>>>> dev set(mi_version ${mi_version_major}.${mi_version_minor}) set(PACKAGE_VERSION ${mi_version})
navigation: Remove acc estimate not implemented note
@@ -435,8 +435,7 @@ definitions: type: u16 units: mm/s desc: | - Velocity accuracy estimate (not implemented). Defaults - to 0. + Velocity accuracy estimate - n_sats: type: u8 desc: Number of satellites used in solution @@ -482,14 +481,12 @@ definitions: type: u16 units: mm/s desc: | - Horizontal velocity accuracy estimate (not - implemented). Defaults to 0. + Horizontal velocity accuracy estimate - v_accuracy: type: u16 units: mm/s desc: | - Vertical velocity accuracy estimate (not - implemented). Defaults to 0. + Vertical velocity accuracy estimate - n_sats: type: u8 desc: Number of satellites used in solution @@ -801,8 +798,7 @@ definitions: type: u16 units: mm desc: | - Position accuracy estimate (not implemented). Defaults - to 0. + Position accuracy estimate - n_sats: type: u8 desc: Number of satellites used in solution
Add 'Lib/objc' to 'sys.path'
@@ -797,7 +797,7 @@ int initialize_python(int argc, char *argv[]) { putenv((char *)[[NSString stringWithFormat:@"ZIPPEDLIB=%@", zippedLib] UTF8String]); putenv((char *)[[NSString stringWithFormat:@"TMP=%@", NSTemporaryDirectory()] UTF8String]); putenv((char *)[[NSString stringWithFormat:@"PYTHONHOME=%@", pythonBundle.bundlePath] UTF8String]); - NSString* path = [NSString stringWithFormat:@"PYTHONPATH=%@:%@:%@:%@", [[NSFileManager.defaultManager URLsForDirectory:NSLibraryDirectory inDomains:NSAllDomainsMask].firstObject URLByAppendingPathComponent:@"python38"].path, [mainBundle() pathForResource: @"Lib" ofType:NULL], [mainBundle() pathForResource:@"site-packages" ofType:NULL], zippedLib]; + NSString* path = [NSString stringWithFormat:@"PYTHONPATH=%@:%@:%@:%@:%@", [[NSFileManager.defaultManager URLsForDirectory:NSLibraryDirectory inDomains:NSAllDomainsMask].firstObject URLByAppendingPathComponent:@"python38"].path, [mainBundle() pathForResource: @"Lib" ofType:NULL], [mainBundle() pathForResource: @"Lib/objc" ofType:NULL], [mainBundle() pathForResource:@"site-packages" ofType:NULL], zippedLib]; #if WIDGET path = [path stringByAppendingString: [NSString stringWithFormat:@":%@:%@", [NSFileManager.defaultManager sharedDirectory], [NSFileManager.defaultManager.sharedDirectory URLByAppendingPathComponent:@"modules"]]]; #endif
anim_util: fix leaks on error in ReadAnimatedWebP() & ReadAnimatedGIF() when AllocateFrames() fails due to OOM Tested: for i in `seq 1 278`; do export MALLOC_FAIL_AT=$i ./examples/anim_diff webp1 webp2 ./examples/anim_diff gif1 gif2 done
@@ -241,7 +241,7 @@ static int ReadAnimatedWebP(const char filename[], image->bgcolor = anim_info.bgcolor; // Allocate frames. - if (!AllocateFrames(image, anim_info.frame_count)) return 0; + if (!AllocateFrames(image, anim_info.frame_count)) goto End; // Decode frames. while (WebPAnimDecoderHasMoreFrames(dec)) { @@ -558,7 +558,10 @@ static int ReadAnimatedGIF(const char filename[], AnimatedImage* const image, } } // Allocate frames. - AllocateFrames(image, frame_count); + if (!AllocateFrames(image, frame_count)) { + DGifCloseFile(gif, NULL); + return 0; + } canvas_width = image->canvas_width; canvas_height = image->canvas_height;
updated /doc/news/_preparation_next_release.md updated contributing-windows.md with hints regarding source code location
@@ -77,3 +77,16 @@ Commands to change your WSL version can be found, for example, in the blog post For further information, consider the official [Linux with Visual Studio C++ documentation](https://docs.microsoft.com/en-us/cpp/linux/?view=msvc-160). + +If you choose to work with source code residing on a Windows filesystem mounted in WSL (e.g.`/mnt/c/...`), please enable the `metadata` option to prevent problems due to permissions not being persisted: + +- Create or modify `/etc/wsl.conf` to contain the following section and setting: + +```conf +[automount] +options = "metadata" +``` + +- Restart the WSL VM by issuing `wsl --shutdown` in your window console. + +Building from sources residing on a mounted windows file system may incur a signifcant performance penalty. Consider using your WSL home directory (e.g. `~/`) as your location for the Elektra sources.
Python-package: Add one more param check
@@ -265,7 +265,9 @@ class Pool(_PoolBase): self._check_data_type(data) self._check_data_empty(data) if pairs is not None and isinstance(data, STRING_TYPES) != isinstance(pairs, STRING_TYPES): - raise CatboostError("Data and pairs should be the same types.") + raise CatboostError("data and pairs parameters should be the same types.") + if column_description is not None and not isinstance(data, STRING_TYPES): + raise CatboostError("data should be the string type if column_description parameter is specified.") if isinstance(data, STRING_TYPES): if any(v is not None for v in [cat_features, weight, group_id, group_weight, subgroup_id, pairs_weight, baseline, feature_names]): raise CatboostError("cat_features, weight, group_id, group_weight, subgroup_id, pairs_weight, \
ur: updates +mug
@@ -338,20 +338,23 @@ ur_mug ur_mug_bytes(const uint8_t *byt, uint64_t len) { uint32_t seed = 0xcafebabe; - ur_mug mug; + uint8_t i = 0; - while ( 1 ) { + while ( i < 8 ) { + ur_mug mug; uint32_t raw; MurmurHash3_x86_32(byt, len, seed, &raw); mug = (raw >> 31) ^ ( ur_mask_31(raw) ); if ( 0 == mug ) { - seed++; + seed++; i++; } else { return mug; } } + + return (ur_mug)0x7fff; } ur_mug @@ -387,9 +390,35 @@ ur_mug64(uint64_t x) ur_mug ur_mug_both(ur_mug hed, ur_mug tal) { - // XX not correct per u3r_mug, but necessary to avoid collisions - // - return ur_mug32(hed ^ (0x7fffffff ^ ur_mug32(tal))); + uint32_t seed = 0xdeadbeef; + uint8_t len = 4 + ur_bloq_up3(ur_met0_32(tal)); + uint8_t i = 0; + uint8_t byt[8] = { + ur_mask_8(hed >> 0), + ur_mask_8(hed >> 8), + ur_mask_8(hed >> 16), + ur_mask_8(hed >> 24), + ur_mask_8(tal >> 0), + ur_mask_8(tal >> 8), + ur_mask_8(tal >> 16), + ur_mask_8(tal >> 24) + }; + + while ( i < 8 ) { + ur_mug mug; + uint32_t raw; + MurmurHash3_x86_32(byt, len, seed, &raw); + mug = (raw >> 31) ^ ( ur_mask_31(raw) ); + + if ( 0 == mug ) { + seed++; i++; + } + else { + return mug; + } + } + + return (ur_mug)0xfffe; } ur_mug
Fix logging window if bg alpha is 0
@@ -1024,23 +1024,33 @@ void render_benchmark(swapchain_stats& data, struct overlay_params& params, ImVe vector<pair<string, float>> benchmark_data = {{"97%", benchmark.ninety}, {"AVG", benchmark.avg}, {"1% ", benchmark.oneP}}; float display_time = float(now - log_end) / 1000000; - float display_for = 10.0f; + static float display_for = 10.0f; float alpha; + if(params.background_alpha != 0){ if (display_for >= display_time){ alpha = display_time * params.background_alpha; if (alpha >= params.background_alpha){ - ImGui::SetNextWindowBgAlpha(0.5f); + ImGui::SetNextWindowBgAlpha(params.background_alpha); }else{ ImGui::SetNextWindowBgAlpha(alpha); } } else { alpha = 6.0 - display_time * params.background_alpha; if (alpha >= params.background_alpha){ - ImGui::SetNextWindowBgAlpha(0.5f); + ImGui::SetNextWindowBgAlpha(params.background_alpha); }else{ ImGui::SetNextWindowBgAlpha(alpha); } } + } else { + if (display_for >= display_time){ + alpha = display_time * 0.0001; + ImGui::SetNextWindowBgAlpha(params.background_alpha); + } else { + alpha = 6.0 - display_time * 0.0001; + ImGui::SetNextWindowBgAlpha(params.background_alpha); + } + } ImGui::Begin("Benchmark", &open, ImGuiWindowFlags_NoDecoration); static const char* finished = "Logging Finished"; ImGui::SetCursorPosX((ImGui::GetWindowSize().x / 2 )- (ImGui::CalcTextSize(finished).x / 2)); @@ -1058,9 +1068,9 @@ void render_benchmark(swapchain_stats& data, struct overlay_params& params, ImVe } float max = *max_element(benchmark.fps_data.begin(), benchmark.fps_data.end()); ImVec4 plotColor = ImGui::ColorConvertU32ToFloat4(params.frametime_color); - plotColor.w = alpha; + plotColor.w = alpha / params.background_alpha; ImGui::PushStyleColor(ImGuiCol_PlotLines, plotColor); - ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(0.0, 0.0, 0.0, alpha / 0.8)); + ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(0.0, 0.0, 0.0, alpha / params.background_alpha)); ImGui::Dummy(ImVec2(0.0f, 8.0f)); if (params.enabled[OVERLAY_PARAM_ENABLED_histogram]) ImGui::PlotHistogram("", benchmark.fps_data.data(), benchmark.fps_data.size(), 0, "", 0.0f, max + 10, ImVec2(ImGui::GetContentRegionAvailWidth(), 50));
Make code shorter by using the MATCH macro.
@@ -344,34 +344,13 @@ namespace NJsonWriter { } switch (c) { - case '"': - UnsafeWriteRawBytes(beg, cur - beg); - UnsafeWriteRawBytes("\\\"", 2); - return true; - case '\\': - UnsafeWriteRawBytes(beg, cur - beg); - UnsafeWriteRawBytes("\\\\", 2); - return true; - case '\b': - UnsafeWriteRawBytes(beg, cur - beg); - UnsafeWriteRawBytes("\\b", 2); - return true; - case '\f': - UnsafeWriteRawBytes(beg, cur - beg); - UnsafeWriteRawBytes("\\f", 2); - return true; - case '\n': - UnsafeWriteRawBytes(beg, cur - beg); - UnsafeWriteRawBytes("\\n", 2); - return true; - case '\r': - UnsafeWriteRawBytes(beg, cur - beg); - UnsafeWriteRawBytes("\\r", 2); - return true; - case '\t': - UnsafeWriteRawBytes(beg, cur - beg); - UnsafeWriteRawBytes("\\t", 2); - return true; + MATCH('"', "\\\""); + MATCH('\\', "\\\\"); + MATCH('\b', "\\b"); + MATCH('\f', "\\f"); + MATCH('\n', "\\n"); + MATCH('\r', "\\r"); + MATCH('\t', "\\t"); } if (c < 0x20) { UnsafeWriteRawBytes(beg, cur - beg);
ini: cleanup
@@ -1562,7 +1562,6 @@ int elektraIniSet (Plugin * handle, KeySet * returned, Key * parentKey) ksRewind (returned); while ((cur = ksNext (returned)) != NULL) { - ELEKTRA_LOG_DEBUG ("INI: set key: %s, %s", keyName (cur), keyString (cur)); if (keyGetMeta (cur, "internal/ini/order")) { ksAppendKey (newKS, cur); @@ -1627,7 +1626,6 @@ int elektraIniSet (Plugin * handle, KeySet * returned, Key * parentKey) elektraPluginSetData (handle, pluginConfig); - ELEKTRA_LOG_DEBUG ("INI: set ret: %d", ret); return (rootNeededSync || ret); /* success */ }
tcmu: add scsi name designator in vpd83 response [mnc] fixed conflict in first chunk.
@@ -397,6 +397,7 @@ int tcmu_emulate_evpd_inquiry( char *ptr, *p, *wwn; size_t len, used = 0; uint16_t *tot_len = (uint16_t*) &data[2]; + uint32_t padding; bool next; int i; @@ -498,6 +499,56 @@ int tcmu_emulate_evpd_inquiry( ptr[6] = (port->grp->id >> 8) & 0xff; ptr[7] = port->grp->id & 0xff; used += 8; + ptr += 8; + + /* SCSI name */ + ptr[0] = port->proto_id << 4; + ptr[0] |= 0x3; /* CODE SET = UTF-8 */ + ptr[1] = 0x80; /* PIV=1 */ + ptr[1] |= 0x10; /* ASSOCIATION = target port: 01b */ + ptr[1] |= 0x8; /* DESIGNATOR TYPE = SCSI name string */ + len = snprintf(&ptr[4], sizeof(data) - used - 4, "%s,t,0x%04x", port->wwn, port->tpgt); + len += 1; /* Include NULL terminator */ + /* + * The null-terminated, null-padded (see 4.4.2) SCSI + * NAME STRING field contains a UTF-8 format string. + * The number of bytes in the SCSI NAME STRING field + * (i.e., the value in the DESIGNATOR LENGTH field) + * shall be no larger than 256 and shall be a multiple + * of four. + */ + padding = ((-len) & 3); + if (padding) + len += padding; + if (len > 256) + len=256; + ptr[3] = len; + used += len + 4; + ptr += len + 4; + + /* Target device designator */ + ptr[0] = port->proto_id << 4; + ptr[0] |= 0x3; /* CODE SET = UTF-8 */ + ptr[1] = 0x80; /* PIV=1 */ + ptr[1] |= 0x20; /* ASSOCIATION = target device: 10b */ + ptr[1] |= 0x8; /* DESIGNATOR TYPE = SCSI name string */ + len = snprintf(&ptr[4], sizeof(data) - used -4, "%s", port->wwn); + len +=1; /* Include NULL terminator */ + /* + * The null-terminated, null-padded (see 4.4.2) SCSI + * NAME STRING field contains a UTF-8 format string. + * The number of bytes in the SCSI NAME STRING field + * (i.e., the value in the DESIGNATOR LENGTH field) + * shall be no larger than 256 and shall be a multiple + * of four. + */ + padding = ((-len) & 3); + if (padding) + len += padding; + if (len >256) + len = 256; + ptr[3] = len; + used += len + 4; finish_page83: /* Done with descriptor list */
Reserve OPAL API numbers for XIVE (requested by benh)
#define OPAL_XIVE_SET_VP_INFO 138 #define OPAL_XIVE_ALLOCATE_IRQ 139 #define OPAL_XIVE_FREE_IRQ 140 -#define OPAL_LAST 140 +#define OPAL_XIVE_RESERVED1 141 +#define OPAL_XIVE_RESERVED2 142 +#define OPAL_XIVE_RESERVED3 143 +#define OPAL_XIVE_RESERVED4 144 +#define OPAL_LAST 144 /* Device tree flags */
correct sample default expression to detect XML HTTP Requests
# to return 401 for requests in an iframe or requests that load an image: # OIDCUnAuthAction 401 "%{HTTP:Sec-Fetch-Dest} == 'iframe' || %{HTTP:Sec-Fetch-Dest} == 'image'" # or just as a more complex example, which equals the default XML request detection algorithm: -# OIDCUnAuthAction 401 "%{HTTP:X-Requested-With} == 'XMLHttpRequest' || %{HTTP:Sec-Fetch-Mode} != 'navigate' || ( ( %{HTTP_ACCEPT} !~ m#text/html# ) && ( %{HTTP_ACCEPT} !~ m#application/xhtml\+xml# ) && ( %{HTTP_ACCEPT} !~ m#\*/\*# ) )" +# OIDCUnAuthAction 401 "%{HTTP:X-Requested-With} == 'XMLHttpRequest' || ( -n %{HTTP:Sec-Fetch-Mode} && %{HTTP:Sec-Fetch-Mode} != 'navigate' ) || ( ( %{HTTP_ACCEPT} !~ m#text/html# ) && ( %{HTTP_ACCEPT} !~ m#application/xhtml\+xml# ) && ( %{HTTP_ACCEPT} !~ m#\*/\*# ) )" # To disable auto-detection of XML HTTP request altogether and uncondtionally return "auth" for all clients: # OIDCUnAuthAction auth true # Note that actually *any* expression value in "OIDCUnAuthAction auth <expr>" will *always* render "auth"
Firmware update: Use parameter -t 60 to try harder in difficult setups
@@ -118,7 +118,7 @@ void DeRestPluginPrivate::updateFirmware() fwProcess = new QProcess(this); } - fwProcessArgs << "-f" << fwUpdateFile; + fwProcessArgs << "-t" << "60" << "-f" << fwUpdateFile; fwUpdateState = FW_UpdateWaitFinished; updateEtag(gwConfigEtag);
zero volume->type in ocf_volume_deinit() After deinitialization of volume there is no need to call back to type ops. Currently we would erroneously call on_deinit() callback multiple times if ocf_volume_deinit() is performed more than once, which we expect to happen and treat as a correct use of API.
@@ -161,6 +161,7 @@ void ocf_volume_deinit(ocf_volume_t volume) env_free(volume->priv); volume->priv = NULL; + volume->type = NULL; if (volume->uuid_copy && volume->uuid.data) { env_vfree(volume->uuid.data); @@ -191,6 +192,7 @@ void ocf_volume_move(ocf_volume_t volume, ocf_volume_t from) from->opened = false; from->priv = NULL; from->uuid.data = NULL; + from->type = NULL; } int ocf_volume_create(ocf_volume_t *volume, ocf_volume_type_t type,
Minimize `realloc` calls when writing header line
@@ -92,6 +92,8 @@ static int write_header(FIOBJ o, void *w_) { fio_cstr_s str = fiobj_obj2cstr(o); if (!str.data) return 0; + fiobj_str_capa_assert(w->dest, + fiobj_obj2cstr(w->dest).len + name.len + str.len + 5); fiobj_str_write(w->dest, name.data, name.len); fiobj_str_write(w->dest, ":", 1); fiobj_str_write(w->dest, str.data, str.len); @@ -110,7 +112,7 @@ static FIOBJ headers2str(http_s *h, uintptr_t padding) { struct header_writer_s w; { const uintptr_t header_length_guess = - fiobj_hash_count(h->private_data.out_headers) * 96; + fiobj_hash_count(h->private_data.out_headers) * 48; w.dest = fiobj_str_buf(header_length_guess + padding); } http1pr_s *p = handle2pr(h);
Check Bashisms: Reformat file with `shfmt`
@@ -4,7 +4,10 @@ echo echo ELEKTRA SCRIPTS BASHISMS TEST echo -command -v checkbashisms >/dev/null 2>&1 || { echo "checkbashisms command needed for this test, aborting" >&2; exit 0; } +command -v checkbashisms > /dev/null 2>&1 || { + echo "checkbashisms command needed for this test, aborting" >&2 + exit 0 +} cd "@CMAKE_SOURCE_DIR@" @@ -15,7 +18,7 @@ find -version > /dev/null 2>&1 > /dev/null && FIND='find scripts -regextype egre # The script `check-env-dep` uses process substitution which is **not** a standard `sh` feature! # See also: https://unix.stackexchange.com/questions/151925 scripts=$($FIND -type f -not -regex \ - '.+(check-env-dep|gitignore|kdb_zsh_completion|run_dev_env|sed|(Docker|Jenkins|Vagrant)file.*|\.(cmake|fish|in|md|txt|hs))$' | \ + '.+(check-env-dep|gitignore|kdb_zsh_completion|run_dev_env|sed|(Docker|Jenkins|Vagrant)file.*|\.(cmake|fish|in|md|txt|hs))$' | xargs) exit_if_fail 'Unable to locate shell scripts via `find`' checkbashisms $scripts
Changed implementation of vma_aligned_alloc to only use aligned_alloc when C++17 is enabled, where the function is defined. See May break on some platforms! If it affects you, please enable C++17 or later in your compiler or provide custom implementation of macro VMA_SYSTEM_ALIGNED_MALLOC (and VMA_SYSTEM_ALIGNED_FREE if needed) using the API of your system.
@@ -2745,11 +2745,17 @@ static void* vma_aligned_alloc(size_t alignment, size_t size) { return _aligned_malloc(size, alignment); } -#else +#elif __cplusplus >= 201703L // Compiler conforms to C++17. static void* vma_aligned_alloc(size_t alignment, size_t size) { return aligned_alloc(alignment, size); } +#else +static void* vma_aligned_alloc(size_t alignment, size_t size) +{ + VMA_ASSERT(0 && "Could not implement aligned_alloc automatically. Please enable C++17 or later in your compiler or provide custom implementation of macro VMA_SYSTEM_ALIGNED_MALLOC (and VMA_SYSTEM_ALIGNED_FREE if needed) using the API of your system."); + return VMA_NULL; +} #endif #if defined(_WIN32)
Added some missing nids to SceProcessmgr.
@@ -2494,7 +2494,17 @@ modules: nid: 0x2DD91812 functions: sceKernelCallAbortHandler: 0xEB6E50BB + sceKernelCDialogSessionClose: 0xDB4CC1D0 + sceKernelCDialogSetLeaseLimit: 0xEC8DDAAD + sceKernelGetCurrentProcess: 0xCD248267 + sceKernelGetExtraTty: 0x2D635A00 + sceKernelGetProcessName: 0x10C52C95 sceKernelGetProcessParam: 0x2BE3E066 + sceKernelGetProcessTimeCore: 0xD37A8437 + sceKernelGetProcessTimeLowCore: 0xF5D0D4C6 + sceKernelGetProcessTimeWideCore: 0x89DA0967 + sceKernelGetProcessTitleId: 0x03A48771 + sceKernelGetRemoteProcessTime: 0xE6E9FCA3 sceKernelGetStderr: 0xFA5E3ADA sceKernelGetStdin: 0xC1727F59 sceKernelGetStdout: 0xE5AA625C
Note where this needs improvement
@@ -3249,6 +3249,8 @@ static bool handle_in_body(GumboParser* parser, GumboToken* token) { // TODO(jdtang): Do I need to add a parse error here? The condition in // the spec seems like it's the inverse of the loop condition above, and // so would never fire. + // XXX(sfc): Yes, an error is needed here + // I think <p><div></p> is an example. while (node != pop_current_node(parser)) ; // Pop everything. return true; @@ -4251,6 +4253,7 @@ static bool handle_in_foreign_content(GumboParser* parser, GumboToken* token) { assert(token->type == GUMBO_TOKEN_END_TAG); GumboNode* node = get_current_node(parser); assert(node != NULL); + // XXX(sfc): This doesn't properly handle replacements. GumboStringPiece token_tagname = token->original_text; GumboStringPiece node_tagname = node->v.element.original_tag; gumbo_tag_from_original_text(&token_tagname);
move include 'limits.h' outside of definition
@@ -238,13 +238,12 @@ static inline bool mi_malloc_satisfies_alignment(size_t alignment, size_t size) } // Overflow detecting multiply -static inline bool mi_mul_overflow(size_t count, size_t size, size_t* total) { #if __has_builtin(__builtin_umul_overflow) || __GNUC__ >= 5 #include <limits.h> // UINT_MAX, ULONG_MAX -#if defined(_CLOCK_T) +#if defined(_CLOCK_T) // for Illumos #undef _CLOCK_T #endif - +static inline bool mi_mul_overflow(size_t count, size_t size, size_t* total) { #if (SIZE_MAX == UINT_MAX) return __builtin_umul_overflow(count, size, total); #elif (SIZE_MAX == ULONG_MAX) @@ -252,13 +251,15 @@ static inline bool mi_mul_overflow(size_t count, size_t size, size_t* total) { #else return __builtin_umulll_overflow(count, size, total); #endif +} #else /* __builtin_umul_overflow is unavailable */ +static inline bool mi_mul_overflow(size_t count, size_t size, size_t* total) { #define MI_MUL_NO_OVERFLOW ((size_t)1 << (4*sizeof(size_t))) // sqrt(SIZE_MAX) *total = count * size; return ((size >= MI_MUL_NO_OVERFLOW || count >= MI_MUL_NO_OVERFLOW) && size > 0 && (SIZE_MAX / size) < count); -#endif } +#endif // Safe multiply `count*size` into `total`; return `true` on overflow. static inline bool mi_count_size_overflow(size_t count, size_t size, size_t* total) {
dsync: report when sync is complete At INFO debug level, it would be useful to report when the dsync finishes. This allows the user to extract timing data after the fact, for example when many dsyncs are run through some automated system.
@@ -1923,6 +1923,10 @@ static int dsync_strmap_compare( } } + if (rank == 0) { + MFU_LOG(MFU_LOG_INFO, "Completed updating timestamps"); + } + /* done with our list of files for refreshing metadata */ strmap_delete(&metadata_refresh); @@ -3398,6 +3402,10 @@ dsync_common_cleanup: mfu_file_delete(&mfu_src_file); mfu_file_delete(&mfu_dst_file); + if (rank == 0) { + MFU_LOG(MFU_LOG_INFO, "Completed sync"); + } + /* shut down */ mfu_finalize(); MPI_Finalize();
hww/api: simplify protobuf encoding Use encode_to_vec, recently introduced in Prost.
@@ -50,9 +50,7 @@ pub fn encode(response: Response) -> Vec<u8> { let response = pb::Response { response: Some(response), }; - let mut out = Vec::<u8>::new(); - response.encode(&mut out).unwrap(); - out + response.encode_to_vec() } /// Decodes a protofbuf Request message.
Add a way to garbage collect the files
@@ -24,6 +24,7 @@ extern "C" { /// Keeping the shared directory clean: /// - to avoid clashes in the shared directory, plugins are encourraged to organize their files in /// sub-folders, for example create one subdirectory using the vendor name +/// - don't use symbolic links or hard links which points outside of the directory /// /// Resource life-time: /// - exclusive folder content is managed by the plugin instance @@ -52,6 +53,14 @@ typedef struct clap_plugin_resource_directory { // factory content unless the param all is true. // [main-thread] void(CLAP_ABI *collect)(const clap_plugin_t *plugin, bool all); + + // Returns true if the plugin is using the file pointed by path or any file under the path + // directory. + // + // path must be absolute. + // + // [main-thread] + bool(CLAP_ABI *is_using_file)(const clap_plugin *plugin, const char *path); } clap_plugin_resource_directory_t; typedef struct clap_host_resource_directory {
Go operators.
%ignore tinyspline::BSpline::operator=; %ignore tinyspline::DeBoorNet::operator=; %ignore tinyspline::Domain::operator=; +%ignore tinyspline::Frame::operator=; +%ignore tinyspline::FrameSeq::operator=; %ignore tinyspline::Morphism::operator(); +%ignore tinyspline::Vec3::operator=; +%ignore tinyspline::Vec3::operator+; +%ignore tinyspline::Vec3::operator-; +%ignore tinyspline::Vec3::operator*; %rename (string) tinyspline::BSpline::toString; %rename (string) tinyspline::DeBoorNet::toString; %rename (string) tinyspline::Domain::toString; +%rename (string) tinyspline::Frame::toString; +%rename (string) tinyspline::FrameSeq::toString; +%rename (string) tinyspline::Vec3::toString; %insert(cgo_comment_typedefs) %{ #cgo !windows LDFLAGS: -L${SRCDIR} -lm -lstdc++ -ltinysplinego
update with all the goals we want to achieve
Orca is a discord bot framework that is designed with minimum dependencies to make bot deployment dead simple. The primary design goals of this framework are: -- easy to debug (networking and logic) errors with extensive logging facilities -- easy to reason about the code +- easy to debug (networking and logic) errors with extensive logging facilities. + +- easy to reason about the code: we use the most native data structures, + the simplest algorithms, and intuitive interfaces. + - easy to use for the end users: asynchrous programming model is hard to reasonable. Our lib uses multi-threading and synchronous IO to support concurrency. +- superior reliability + ## Build ### Install dependencies: - gcc, make
pluginprocess-improvements: more child/parent key memleak fixes
@@ -307,13 +307,16 @@ int elektraPluginProcessSend (const ElektraPluginProcess * pp, pluginprocess_t c ELEKTRA_SET_ERRORF (191, key, "Received invalid return code or no KeySet: %s", keyString (resultKey)); lresult = ELEKTRA_PLUGIN_STATUS_ERROR; } - else + else // Copy everything back into the actual keysets { Key * parentKeyInOriginalKeySet = keySet != NULL ? ksLookup (originalKeySet, key, KDB_O_NONE) : NULL; // maybe there are just 2 keys with the same name, can happen in theory, so compare memory int parentKeyExistsInOriginalKeySet = parentKeyInOriginalKeySet == key; + // if the child added the parent key to the keyset pop it from the keyset + // then reinsert key after we copied the data and delete this serialized copy + Key * parentKeyInKeySet = keySet != NULL ? ksLookup (keySet, key, KDB_O_POP) : NULL; + int childAddedParentKey = parentKeyInKeySet != NULL; - // Copy everything back into the actual keysets // Unfortunately we can't use keyCopy here as ksAppendKey locks it so it will fail // This is the case if the parent key is also contained in the originalKeySet / has been appended // As an invariant we assume plugins don't change the parent key's name during a plugin call @@ -328,6 +331,7 @@ int elektraPluginProcessSend (const ElektraPluginProcess * pp, pluginprocess_t c keySetMeta (key, keyName (currentMeta), 0); } keyCopyAllMeta (key, parentDeserializedKey); + if (childAddedParentKey) keyCopyAllMeta (key, parentKeyInKeySet); if (keySet != NULL) { @@ -335,7 +339,8 @@ int elektraPluginProcessSend (const ElektraPluginProcess * pp, pluginprocess_t c // thus remove it here and re-add it afterwards if (parentKeyExistsInOriginalKeySet) ksLookup (originalKeySet, parentKeyInOriginalKeySet, KDB_O_POP); ksCopy (originalKeySet, keySet); - if (parentKeyExistsInOriginalKeySet) ksAppendKey (originalKeySet, key); + if (parentKeyExistsInOriginalKeySet || childAddedParentKey) ksAppendKey (originalKeySet, key); + if (childAddedParentKey) keyDel (parentKeyInKeySet); } } errno = prevErrno;
User: Fix compilation
@@ -23,7 +23,7 @@ EFI_SYSTEM_TABLE mSystemTable = { .ConOut = &mConOut }; -EFI_RUNTIME_SERVICES mRuntimeServices = { 0 }; +EFI_RUNTIME_SERVICES mRuntimeServices = { { 0 } }; EFI_SYSTEM_TABLE *gST = &mSystemTable; EFI_BOOT_SERVICES *gBS = &mBootServices;
hereobrine: Duplicate file interrupts.dts include Remove a duplicate DTS file include TEST=zmake configure -b herobrine_npcx9 BRANCH=none
@@ -15,7 +15,6 @@ def register_variant(project_name, extra_dts_overlays=(), extra_kconfig_files=() here / "common.dts", here / "i2c.dts", here / "interrupts.dts", - here / "interrupts.dts", here / "motionsense.dts", here / "pwm.dts", here / "switchcap.dts",
out_kafka_rest: use flb_msgpack_raw_to_json_sds() instead of old ...raw_to_json_str()
#include <fluent-bit/flb_utils.h> #include <fluent-bit/flb_time.h> #include <fluent-bit/flb_pack.h> +#include <fluent-bit/flb_sds.h> #include <fluent-bit/flb_http_client.h> #include <msgpack.h> * Convert the internal Fluent Bit data representation to the required * one by Kafka REST Proxy. */ -static char *kafka_rest_format(const void *data, size_t bytes, - const char *tag, int tag_len, size_t *out_size, +static flb_sds_t kafka_rest_format(const void *data, size_t bytes, + const char *tag, int tag_len, + size_t *out_size, struct flb_kafka_rest *ctx) { int i; - int ret; int len; int arr_size = 0; int map_size; size_t s; size_t off = 0; + flb_sds_t out_buf; char time_formatted[256]; msgpack_unpacked result; msgpack_object root; @@ -51,8 +53,6 @@ static char *kafka_rest_format(const void *data, size_t bytes, msgpack_object *obj; msgpack_object key; msgpack_object val; - char *json_buf; - size_t json_size; struct tm tm; struct flb_time tms; msgpack_sbuffer mp_sbuf; @@ -157,15 +157,14 @@ static char *kafka_rest_format(const void *data, size_t bytes, msgpack_unpacked_destroy(&result); /* Convert to JSON */ - ret = flb_msgpack_raw_to_json_str(mp_sbuf.data, mp_sbuf.size, - &json_buf, &json_size); + out_buf = flb_msgpack_raw_to_json_sds(mp_sbuf.data, mp_sbuf.size); msgpack_sbuffer_destroy(&mp_sbuf); - if (ret != 0) { + if (!out_buf) { return NULL; } - *out_size = json_size; - return json_buf; + *out_size = flb_sds_len(out_buf); + return out_buf; } static int cb_kafka_init(struct flb_output_instance *ins, @@ -197,7 +196,7 @@ static void cb_kafka_flush(const void *data, size_t bytes, struct flb_config *config) { int ret; - char *js; + flb_sds_t js; size_t js_size; size_t b_sent; struct flb_http_client *c; @@ -259,14 +258,14 @@ static void cb_kafka_flush(const void *data, size_t bytes, /* Cleanup */ flb_http_client_destroy(c); - flb_free(js); + flb_sds_destroy(js); flb_upstream_conn_release(u_conn); FLB_OUTPUT_RETURN(FLB_OK); /* Issue a retry */ retry: flb_http_client_destroy(c); - flb_free(js); + flb_sds_destroy(js); flb_upstream_conn_release(u_conn); FLB_OUTPUT_RETURN(FLB_RETRY); }
Update contract key names ".../spec/token" and ".../spec/mounted" in HL API code generator. This is an addendum to and .
@@ -624,7 +624,7 @@ kainjow::mustache::data HighlevelGenTemplate::getTemplateData (const std::string contract.append (kdb::Key ("system:/elektra/contract/highlevel/helpmode/ignore/require", KEY_VALUE, "1", KEY_END)); // enable check for properly mounted specification - contract.append (kdb::Key ("system:/elektra/contract/highlevel/check/specproperlymounted", KEY_VALUE, "1", KEY_END)); + contract.append (kdb::Key ("system:/elektra/contract/highlevel/check/spec/mounted", KEY_VALUE, "1", KEY_END)); // calculate specification token char token[65]; @@ -636,7 +636,7 @@ kainjow::mustache::data HighlevelGenTemplate::getTemplateData (const std::string kdb::printError (std::cerr, parentKeyMaybeWithErrors, false, false); throw CommandAbortException ("Error during calculation of specification token."); } - contract.append (kdb::Key ("system:/elektra/contract/highlevel/check/spectoken/token", KEY_VALUE, token, KEY_END)); + contract.append (kdb::Key ("system:/elektra/contract/highlevel/check/spec/token", KEY_VALUE, token, KEY_END)); data["keys_count"] = std::to_string (keys.size ());
fix(docs) add `BT_PRV` as suggested
@@ -10,7 +10,7 @@ between the keyboard and the host. By default, ZMK supports five "profiles" for computer/laptop/keyboard should receive the keyboard input; many of the commands here operate on those profiles. :::note Connection Management -When pairing to a host device ZMK saves bond information to the selected profile. It will not replace this when you initiate pairing with another device. To pair with a new device select an unused profile with `BT_SEL`, `BT_NXT` or by clearing an existing profile using `BT_CLR`. +When pairing to a host device ZMK saves bond information to the selected profile. It will not replace this when you initiate pairing with another device. To pair with a new device select an unused profile with `BT_SEL`, `BT_NXT` or `BT_PRV` bindings, or by clearing an existing profile using `BT_CLR`. A ZMK device may show as "connected" on multiple hosts at the same time. This is working as intended, and only the host associated with the active profile will receive keystrokes. :::
scripts: add
@@ -25,7 +25,7 @@ configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/run_nokdbtests.in" "${CMAKE_CURRENT configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/run_checkshell.in" "${CMAKE_CURRENT_BINARY_DIR}/run_checkshell" @ONLY) configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/run_nocheckshell.in" "${CMAKE_CURRENT_BINARY_DIR}/run_nocheckshell" @ONLY) -configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/make-source-package.in" "${CMAKE_CURRENT_BINARY_DIR}/make-source-package") +configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/make-source-package.in" "${CMAKE_CURRENT_BINARY_DIR}/make-source-package" @ONLY) configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/configure-firefox.in" "${CMAKE_CURRENT_BINARY_DIR}/configure-firefox" @ONLY) install (PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/configure-firefox" DESTINATION ${TARGET_TOOL_EXEC_FOLDER})
[Rust] AwmWindow sets an element's parent when it's added to the hierarchy
@@ -83,9 +83,13 @@ impl AwmWindow { } } - pub fn add_component(&self, elem: Rc<dyn UIElement>) { + pub fn add_component(self: Rc<Self>, elem: Rc<dyn UIElement>) { // Ensure the component has a frame by running its sizer elem.handle_superview_resize(*self.current_size.borrow()); + + // Set up a link to the parent + elem.set_parent(Rc::downgrade(&(Rc::clone(&self) as _))); + self.ui_elements.borrow_mut().push(elem); }
Simplelink: disable framer logging, as it can be called in interrupt context
/* Include CPU-related configurations */ #include "cc13xx-cc26xx-conf.h" /*---------------------------------------------------------------------------*/ +#ifdef LOG_CONF_LEVEL_FRAMER +#pragma message "LOG_CONF_LEVEL_FRAMER defined, undefining to disable printing in interrupt context" +#undef LOG_CONF_LEVEL_FRAMER +#endif +/*---------------------------------------------------------------------------*/ #endif /* CONTIKI_CONF_H_ */ /*---------------------------------------------------------------------------*/ /**
distro-packages/python-rpm-macros: conform to centos python naming
---- a/functions.lua 2017-12-07 11:46:04.907000000 -0800 -+++ b/functions.lua 2017-12-18 20:29:50.982000000 -0800 -@@ -56,10 +56,19 @@ +--- a/functions.lua 2017-12-07 11:46:04.000000000 -0800 ++++ b/functions.lua 2018-01-26 09:32:27.000000000 -0800 +@@ -56,10 +56,23 @@ end function package_name(flavor, modname, subpkg, append) + local compiler_family = rpm.expand("%compiler_family") + local mpi_family = rpm.expand("%mpi_family") + local ohpc_suffix = rpm.expand("%PROJ_DELIM") ++ local is_centos = rpm.expand("%centos_version") ~= "" + if string.match(rpm.expand("%name"), mpi_family) then + ohpc_suffix = "-" .. mpi_family .. ohpc_suffix + end flavor = "python" end - local name = flavor .. "-" .. modname ++ if flavor == "python3" and is_centos then ++ flavor = "python34" ++ end + local name = flavor .. "-" .. modname .. ohpc_suffix if subpkg and subpkg ~= "" then name = name .. "-" .. subpkg
Trying to fix docker limits in travis (again).
@@ -26,13 +26,13 @@ sub_pull() { exit 1 fi - docker pull $IMAGE_NAME:deps || true + docker pull $IMAGE_NAME:deps && docker tag $IMAGE_NAME:deps metacall/core:deps || true - docker pull $IMAGE_NAME:dev || true + docker pull $IMAGE_NAME:dev && docker tag $IMAGE_NAME:dev metacall/core:dev || true - docker pull $IMAGE_NAME:runtime || true + docker pull $IMAGE_NAME:runtime && docker tag $IMAGE_NAME:runtime metacall/core:runtime || true - docker pull $IMAGE_NAME:cli || true + docker pull $IMAGE_NAME:cli && docker tag $IMAGE_NAME:cli metacall/core:cli || true } # Build MetaCall Docker Compose (link manually dockerignore files)
admin/test-suite: bump test suite version on 1.3.6 branch
Summary: Integration test suite for OpenHPC Name: test-suite%{PROJ_DELIM} -Version: 1.3.5 +Version: 1.3.6 Release: 1 License: Apache-2.0 Group: %{PROJ_NAME}/admin
sysdeps/managarm: Add stub for TIOCGWINSZ
@@ -2036,6 +2036,11 @@ int sys_ioctl(int fd, unsigned long request, void *arg) { __ensure(resp.error() == managarm::fs::Errors::SUCCESS); return resp.result(); } + case TIOCGWINSZ: { + mlibc::infoLogger() << "\e[31mmlibc: TIOCGWINSZ is not implemented correctly\e[39m" + << frg::endlog; + return -1; + } case TIOCSWINSZ: { mlibc::infoLogger() << "\e[31mmlibc: TIOCSWINSZ is not implemented correctly\e[39m" << frg::endlog;
Tidy-up CC2538 SHR search handling
@@ -565,7 +565,7 @@ init(void) set_channel(rf_channel); /* Enable SHR search */ - set_shr_search(1); + set_shr_search(RADIO_SHR_SEARCH_EN); /* Acknowledge all RF Error interrupts */ REG(RFCORE_XREG_RFERRM) = RFCORE_XREG_RFERRM_RFERRM; @@ -1010,6 +1010,9 @@ set_value(radio_param_t param, radio_value_t value) set_cca_threshold(value); return RADIO_RESULT_OK; case RADIO_PARAM_SHR_SEARCH: + if((value != RADIO_SHR_SEARCH_EN) && (value != RADIO_SHR_SEARCH_DIS)) { + return RADIO_RESULT_INVALID_VALUE; + } set_shr_search(value); return RADIO_RESULT_OK; default:
[chain] Make "CREATED" receipt only if recipient of transaction is empty
@@ -549,7 +549,7 @@ func executeTx(bs *state.BlockState, tx *types.Tx, blockNo uint64, ts int64, pre bs.BpReward += txFee - if receiver.IsNew() { + if receiver.IsNew() && txBody.Recipient == nil { bs.AddReceipt(types.NewReceipt(receiver.ID(), "CREATED", rv)) return nil
initialize map
@@ -90,7 +90,7 @@ func startAttach(allowProcs []allowProcConfig) error { // Iterate over all allowed processses for _, process := range allowProcs { - var pidsToAttach util.PidScopeMapState + pidsToAttach := make(util.PidScopeMapState) cfgSingleProc, err := yaml.Marshal(process.Config) if err != nil { log.Error().
VOM: fix cflags override the default CXXFLAGS (which provides a -O2) with the system set CFLAGS (providing -O0/-O2 for debug/release builds)
@@ -15,7 +15,8 @@ AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I m4 AM_LIBTOOLFLAGS = --quiet -AM_CXXFLAGS = -Wall -std=gnu++11 -I${top_srcdir} -I${top_builddir}/vpp-api/vapi/ -I$(top_srcdir)/vpp-api/ -I${libdir}/../include -O0 +CXXFLAGS = ${CFLAGS} +AM_CXXFLAGS = ${CXXFLAGS} -Wall -Werror -std=gnu++11 -I${top_srcdir} -I${top_builddir}/vpp-api/vapi/ -I$(top_srcdir)/vpp-api/ -I${libdir}/../include AM_LDFLAGS = -shared -no-undefined bin_PROGRAMS =
Fix the issue that ACK is not written timely
@@ -2095,6 +2095,27 @@ static ssize_t conn_write_pkt(ngtcp2_conn *conn, uint8_t *dest, size_t destlen, /* We don't retransmit PATH_RESPONSE. */ } + rv = conn_create_ack_frame(conn, &ackfr, &pktns->acktr, ts, + conn_compute_ack_delay(conn), + conn->local.settings.ack_delay_exponent); + if (rv != 0) { + assert(ngtcp2_err_is_fatal(rv)); + return rv; + } + + if (ackfr) { + rv = conn_ppe_write_frame(conn, &ppe, &hd, ackfr); + if (rv != 0) { + assert(NGTCP2_ERR_NOBUF == rv); + } else { + ngtcp2_acktr_commit_ack(&pktns->acktr); + ngtcp2_acktr_add_ack(&pktns->acktr, hd.pkt_num, ackfr->ack.largest_ack); + pkt_empty = 0; + } + ngtcp2_mem_free(conn->mem, ackfr); + ackfr = NULL; + } + for (pfrc = &pktns->tx.frq; *pfrc;) { switch ((*pfrc)->fr.type) { case NGTCP2_FRAME_STOP_SENDING: @@ -2385,31 +2406,6 @@ tx_strmq_finish: send_stream = 0; } - /* It might be better to avoid ACK only packet here. It can be sent - without flow control limits later. */ - if (!pkt_empty) { - rv = conn_create_ack_frame(conn, &ackfr, &pktns->acktr, ts, - conn_compute_ack_delay(conn), - conn->local.settings.ack_delay_exponent); - if (rv != 0) { - assert(ngtcp2_err_is_fatal(rv)); - return rv; - } - - if (ackfr) { - rv = conn_ppe_write_frame(conn, &ppe, &hd, ackfr); - if (rv != 0) { - assert(NGTCP2_ERR_NOBUF == rv); - } else { - ngtcp2_acktr_commit_ack(&pktns->acktr); - ngtcp2_acktr_add_ack(&pktns->acktr, hd.pkt_num, ackfr->ack.largest_ack); - pkt_empty = 0; - } - ngtcp2_mem_free(conn->mem, ackfr); - ackfr = NULL; - } - } - if (pkt_empty) { assert(rv == 0 || NGTCP2_ERR_NOBUF == rv); if (rv == 0 && stream_blocked) {
fix score iteration print for depthwise trees
@@ -546,8 +546,9 @@ namespace NCatboostCuda { PrintBestScore(FeaturesManager, split, bestSplit.Score, depth); } else { ui32 iteration = subsets.Leaves.size(); + if (Options.Policy == EGrowPolicy::Depthwise) { - ui32 iteration = 0; + iteration = 0; for (auto& leaf : subsets.Leaves) { iteration = Max(iteration, leaf.Path.GetDepth()); }
refactor: bot-elitebgs.cpp doesn't load from external files
@@ -243,7 +243,7 @@ void embed_from_json(char *str, size_t len, void *p_embed) void on_ready(discord::client *client, const discord::user::dati *me) { - fprintf(stderr, "\n\nEddbapi-Bot succesfully connected to Discord as %s#%s!\n\n", + fprintf(stderr, "\n\nEliteBGS-Bot succesfully connected to Discord as %s#%s!\n\n", me->username, me->discriminator); (void)client; @@ -264,15 +264,14 @@ void on_command( /* Initialize embed struct that will be loaded to */ embed::dati *new_embed = embed::dati_alloc(); - orka_dati_from_fjson( - "cee/embed.json", - (void*)new_embed, - &embed::dati_from_json); /* Set embed fields */ strncpy(new_embed->title, msg->content, sizeof(new_embed->title)); new_embed->timestamp = orka_timestamp_ms(); new_embed->color = 15844367; //gold + embed::change_footer(new_embed, + "designed & built by https://cee.dev", + "https://cee.dev/static/images/cee.png", NULL); char query[512]; int ret = query_inject(query, sizeof(query), @@ -316,7 +315,7 @@ int main(int argc, char *argv[]) else config_file = "bot.config"; - /* Initialized ELITEBGS User Agent */ + /* Initialize ELITEBGS User Agent */ orka::user_agent::init(&g_elitebgs_ua, ELITEBGS_API_URL); /* Initialize Discord User Agent */ @@ -328,14 +327,12 @@ int main(int argc, char *argv[]) discord::setcb(client, discord::READY, &on_ready); discord::setcb(client, discord::COMMAND, &on_command, "!system "); - /* Set bot presence */ - discord::presence::dati *new_presence = discord::presence::dati_alloc(); - orka_dati_from_fjson( - "cee/presence.json", - (void*)new_presence, - &discord::presence::dati_from_json); - - discord::replace_presence(client, new_presence); //client takes ptr ownership + /* Set bot presence activity */ + discord::presence::activity::dati *new_activity; + new_activity = discord::presence::activity::dati_alloc(); + strcpy(new_activity->name, "!h | cee.dev"); + new_activity->type = 0; // Playing + discord::set_presence(client, new_activity, "online", false); /* Start a connection to Discord */ discord::run(client);
hdzero: add timeout waiting for intro
@@ -132,8 +132,12 @@ void hdzero_init() { } void hdzero_intro() { - while (!hdzero_is_ready()) - ; + const uint32_t start = time_millis(); + while (!hdzero_is_ready()) { + if ((time_millis() - start) > 500) { + return; + } + } osd_transaction_t *txn = osd_txn_init(); osd_txn_start(OSD_ATTR_TEXT, COLS / 2 - 6, ROWS / 2 - 1);
win32: dblock little correction
#undef open #undef close #endif - #endif +#include "sync/RhoconnectClientManager.h" +#include "common/RhoSystem.h" + namespace rho { namespace db { @@ -117,7 +119,7 @@ boolean CRubyMutexImpl::isMainRubyThread() if ( (!sync::RhoconnectClientManager::haveRhoconnectClientImpl()) || (!sync::RhoconnectClientManager::haveSyncThread())) return true; - return sync::RhoconnectClientManager::syncThreadGetThreadID() != CSystem::getThreadID(); + return sync::RhoconnectClientManager::syncThreadGetThreadID() != rho::common::CSystem::getThreadID(); } void CRubyMutexImpl::Lock()
VERSION bump to version 2.1.78
@@ -64,7 +64,7 @@ endif() # micro version is changed with a set of small changes or bugfixes anywhere in the project. set(SYSREPO_MAJOR_VERSION 2) set(SYSREPO_MINOR_VERSION 1) -set(SYSREPO_MICRO_VERSION 77) +set(SYSREPO_MICRO_VERSION 78) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
Adjusted FPORT Telemetry for Integer Pids
@@ -824,7 +824,18 @@ void processFPORT(void) { } // end frame received } +vector_t *get_pid_value(uint8_t term) { + switch (term) { + case 0: + return &profile.pid.pid_rates[profile.pid.pid_profile].kp; + case 1: + return &profile.pid.pid_rates[profile.pid.pid_profile].ki; + case 2: + return &profile.pid.pid_rates[profile.pid.pid_profile].kd; + } + return NULL; +} void sendFPORTTelemetry() { if (telemetryCounter > 1 && rx_frame_position >= 41 && frameStatus == 3) { // Send telemetry back every other packet. This gives the RX time to send ITS telemetry back @@ -885,22 +896,22 @@ void sendFPORTTelemetry() { } else if (telemetryPosition == 4) { //PID-P telemetryPacket[3] = telemetryIDs[telemetryPosition]; telemetryPacket[4] = telemetryIDs[telemetryPosition] >> 8; - telemetryPacket[5] = (int)(profile_current_pid_rates()->kp.axis[current_pid_axis] * 10000); - telemetryPacket[6] = (int)(profile_current_pid_rates()->kp.axis[current_pid_axis] * 10000) >> 8; + telemetryPacket[5] = (int)(get_pid_value(0)->axis[current_pid_axis] * 100); + telemetryPacket[6] = (int)(get_pid_value(0)->axis[current_pid_axis] * 100) >> 8; telemetryPacket[7] = 0x00; telemetryPacket[8] = 0x00; } else if (telemetryPosition == 5) { //PID-I telemetryPacket[3] = telemetryIDs[telemetryPosition]; telemetryPacket[4] = telemetryIDs[telemetryPosition] >> 8; - telemetryPacket[5] = (int)(profile_current_pid_rates()->ki.axis[current_pid_axis] * 1000); - telemetryPacket[6] = (int)(profile_current_pid_rates()->ki.axis[current_pid_axis] * 1000) >> 8; + telemetryPacket[5] = (int)(get_pid_value(1)->axis[current_pid_axis] * 100); + telemetryPacket[6] = (int)(get_pid_value(1)->axis[current_pid_axis] * 100) >> 8; telemetryPacket[7] = 0x00; telemetryPacket[8] = 0x00; } else if (telemetryPosition == 6) { //PID-D telemetryPacket[3] = telemetryIDs[telemetryPosition]; telemetryPacket[4] = telemetryIDs[telemetryPosition] >> 8; - telemetryPacket[5] = (int)(profile_current_pid_rates()->kd.axis[current_pid_axis] * 1000); - telemetryPacket[6] = (int)(profile_current_pid_rates()->kd.axis[current_pid_axis] * 1000) >> 8; + telemetryPacket[5] = (int)(get_pid_value(2)->axis[current_pid_axis] * 100); + telemetryPacket[6] = (int)(get_pid_value(2)->axis[current_pid_axis] * 100) >> 8; telemetryPacket[7] = 0x00; telemetryPacket[8] = 0x00; }
BugID:20235446: [ota] bk7231 patch revert
@@ -25,9 +25,3 @@ GLOBAL_CFLAGS += -DSYSINFO_PRODUCT_MODEL=\"$(CONFIG_SYSINFO_PRODUCT_MODEL)\" GLOBAL_CFLAGS += -DSYSINFO_DEVICE_NAME=\"$(CONFIG_SYSINFO_DEVICE_NAME)\" GLOBAL_LDS_INCLUDES += $($(NAME)_LOCATION)/bk7231udevkitc.ld - -ifeq ($(PING_PONG_OTA),1) -EXTRA_TARGET_MAKEFILES += $($(HOST_MCU_FAMILY)_LOCATION)/gen_pingpong_bin.mk -else -EXTRA_TARGET_MAKEFILES += $($(HOST_MCU_FAMILY)_LOCATION)/gen_image_bin.mk -endif
Fix build error after ninja clean
@@ -436,10 +436,9 @@ endif() ecbuild_add_library( TARGET eccodes - SOURCES grib_api_version.c + SOURCES ${CMAKE_CURRENT_BINARY_DIR}/grib_api_version.c # griby.c gribl.c ${grib_api_srcs} - GENERATED grib_api_version.c #PRIVATE_LIBS ${ECCODES_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${CMATH_LIBRARIES} PRIVATE_INCLUDES "${AEC_INCLUDE_DIRS}" PRIVATE_LIBS ${ECCODES_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${AEC_LIBRARIES} ${PNG_LIBRARIES}
Fix locking when updating menu.
{ @public - pappl_system_t *system; // I - System object - NSStatusItem *statusItem; // I - Status item in menubar - NSMenu *statusMenu; // I - Menu associated with status item + pappl_system_t *system; // System object + size_t event_count; // Event counter + NSStatusItem *statusItem; // Status item in menubar + NSMenu *statusMenu; // Menu associated with status item } + (id)newStatusUI:(pappl_system_t *)system; @@ -52,6 +53,9 @@ void _papplSystemStatusUI( pappl_system_t *system) // I - System { + size_t last_count = 0; // Last count + + // Create a menu bar status item... [NSApplication sharedApplication]; @@ -66,9 +70,16 @@ _papplSystemStatusUI( // Do a run loop that exits once the system is no longer running... while (papplSystemIsRunning(system)) { - NSEvent *event = [NSApp nextEventMatchingMask:NSEventMaskAny untilDate:[NSDate dateWithTimeIntervalSinceNow:1.0] inMode:NSDefaultRunLoopMode dequeue:YES]; + NSEvent *event = [NSApp nextEventMatchingMask:NSEventMaskAny untilDate:[NSDate dateWithTimeIntervalSinceNow:0.5] inMode:NSDefaultRunLoopMode dequeue:YES]; if (event) [NSApp sendEvent:event]; + + if (ui->event_count > last_count) + { + last_count = ui->event_count; + + [ui updateMenu]; + } } } @@ -205,12 +216,12 @@ printer_cb( pappl_preason_t reasons; // State reasons... - snprintf(name_status, sizeof(name_status), "%s (%s)", papplPrinterGetName(printer), ippEnumString("printer-state", (int)papplPrinterGetState(printer))); - reasons = papplPrinterGetReasons(printer); + snprintf(name_status, sizeof(name_status), "%s (%s)", printer->name, ippEnumString("printer-state", (int)printer->state)); + reasons = printer->state_reasons; NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:[NSString stringWithUTF8String:name_status] action:@selector(showPrinter:) keyEquivalent:@""]; item.target = ui; - item.tag = papplPrinterGetID(printer); + item.tag = printer->printer_id; [ui->statusMenu addItem:item]; if (reasons & (PAPPL_PREASON_MEDIA_NEEDED | PAPPL_PREASON_MEDIA_EMPTY)) @@ -242,6 +253,7 @@ status_cb( pappl_event_t event, // I - Event void *data) // I - System UI data { + (void)system; (void)printer; (void)job; (void)data; @@ -250,7 +262,7 @@ status_cb( { // Printer or system change event, update the menu... PAPPLSystemStatusUI *ui = (__bridge PAPPLSystemStatusUI *)system->systemui_data; - [ui updateMenu]; + ui->event_count ++; } #if 0 // TODO: Migrate to new UNUserNotification API @@ -259,7 +271,7 @@ status_cb( pappl_preason_t reasons; // State reasons... NSString *message = nil; // Message for notification - reasons = papplPrinterGetReasons(printer); + reasons = printer->state_reasons; if (reasons & (PAPPL_PREASON_MEDIA_NEEDED | PAPPL_PREASON_MEDIA_EMPTY)) message = @"Out of paper."; else if (reasons & PAPPL_PREASON_MARKER_SUPPLY_EMPTY)
Fix insertion of allows "os" options.
premake.action._list["vs2017"].valid_kinds = table.join(premake.action._list["vs2017"].valid_kinds, { p.ANDROIDPROJ }) -- TODO: can I api.addAllowed() a key-value pair? - local os = p.fields["os"]; + local os = p.option.get("os") if os ~= nil then - table.insert(sys.allowed, { "android", "Android" }) + table.insert(os.allowed, { "android", "Android" }) end
Re-enabled parallel compilation
@@ -82,7 +82,7 @@ $(OBJS): $(filter clean,$(MAKECMDGOALS)) subsystems: $(ARCHS) -%/$(ARCH): .FORCE +%/$(ARCH): .FORCE $(filter clean,$(MAKECMDGOALS)) @+echo "\033[1;32mCOMPILE $(@D)\033[0m";\ if ! $(MAKE) -C "$(@D)"; then\ exit 1;\
Always try to find the best dag
@@ -762,13 +762,10 @@ rpl_select_dag(rpl_instance_t *instance, rpl_parent_t *p) old_rank = instance->current_dag->rank; last_parent = instance->current_dag->preferred_parent; - best_dag = instance->current_dag; - if(best_dag->rank != ROOT_RANK(instance)) { - if(rpl_select_parent(p->dag) != NULL) { - if(p->dag != best_dag) { - best_dag = instance->of->best_dag(best_dag, p->dag); + if(instance->current_dag->rank != ROOT_RANK(instance)) { + rpl_select_parent(p->dag); } - } else if(p->dag == best_dag) { + best_dag = NULL; for(dag = &instance->dag_table[0], end = dag + RPL_MAX_DAG_PER_INSTANCE; dag < end; ++dag) { if(dag->used && dag->preferred_parent != NULL && dag->preferred_parent->rank != RPL_INFINITE_RANK) { @@ -779,8 +776,6 @@ rpl_select_dag(rpl_instance_t *instance, rpl_parent_t *p) } } } - } - } if(best_dag == NULL) { /* No parent found: the calling function handle this problem. */
Support lockup preparation This action spawns stars and sends them to the ceremony address.
== :: ++ batch - $% [%single =call] + $% :: %single: execute a single ecliptic function call + :: + [%single =call] + :: %deed: deed ships based on json, assumes spawnable + :: [%deed deeds-json=cord] + :: %lock-prep: prepare for lockup by transfering ships to the ceremony address + :: + [%lock-prep what=(list ship)] + :: %lock: put ships into lockup for the target address + :: [%lock what=(list ship) to=address =lockup] == :: ?- -.batch.command %single [(single nonce [network as +.batch]:command) ~] %deed (deed nonce [network as +.batch]:command) + %lock-prep (lock-prep nonce [network as +.batch]:command) %lock (lock nonce [network as +.batch]:command) == == %key ;~(pose (stag ~ hex) (cold ~ (jest ''))) == :: +++ lock-prep + |= [nonce=@ud =network as=address what=(list ship)] + ^- (list transaction) + =| txs=(list transaction) + |^ + ?~ what (flop txs) + =. txs + %- do-here + (spawn:dat i.what as) + =. txs + %- do-here + %+ transfer-ship:dat i.what + 0x740d.6d74.1711.163d.3fca.cecf.1f11.b867.9a7c.7964 + $(what t.what) + ++ do-here + |= dat=tape + :_ txs + (do network (add nonce (lent txs)) ecliptic dat) + -- +:: ::TODO need secondary kind of lockup logic, where :: 1) we need to batch-transfer stars to the ceremony :: 2) (not forget to register and) deposit already-active stars
dev-tools/numpy: bump to v1.14.3
@@ -23,7 +23,7 @@ Requires: openblas-%{compiler_family}%{PROJ_DELIM} %define PNAME %(echo %{pname} | tr [a-z] [A-Z]) Name: %{python_prefix}-%{pname}-%{compiler_family}%{PROJ_DELIM} -Version: 1.14.2 +Version: 1.14.3 Release: 1%{?dist} Url: http://sourceforge.net/projects/numpy Summary: NumPy array processing for numbers, strings, records and objects
bootutil: fix broken bootstrap functionality Fix bootstrap functionality which was broken by the fault injection hardening support.
@@ -1636,11 +1636,11 @@ boot_prepare_image_for_update(struct boot_loader_state *state, if (rc == 0 || fih_not_eq(fih_rc, FIH_SUCCESS)) { - rc = boot_img_hdr(state, BOOT_SECONDARY_SLOT)->ih_magic == IMAGE_MAGIC; + rc = (boot_img_hdr(state, BOOT_SECONDARY_SLOT)->ih_magic == IMAGE_MAGIC) ? 1: 0; FIH_CALL(boot_validate_slot, fih_rc, state, BOOT_SECONDARY_SLOT, bs); - if (rc == 0 && fih_eq(fih_rc, FIH_SUCCESS)) { + if (rc == 1 && fih_eq(fih_rc, FIH_SUCCESS)) { /* Set swap type to REVERT to overwrite the primary * slot with the image contained in secondary slot * and to trigger the explicit setting of the
stm32/main: default to REPL without bluetooth This will temporarily make it easier to debug stm32 ports that do not have Bluetooth support yet.
@@ -332,6 +332,23 @@ soft_reset: uint8_t *program; uint32_t len = get_user_program(&program); + // If we have no bluetooth, make a fake message + // that would otherwise be sent by the IDE to get + // the hub into REPL. We can delete this once all + // stm32 hubs have bluetooth enabled. Then we can + // Use the IDE to send this message instead. + #ifndef PYBRICKS_MPY_MAIN_MODULE + #if !PBDRV_CONFIG_BLUETOOTH + // Mimic the otherwise dynamic read since we free it later + len = 4; + program = m_malloc(len); + program[0] = 'R'; + program[1] = 'E'; + program[2] = 'P'; + program[3] = 'L'; + #endif + #endif + // Get system hardware ready pbsys_prepare_user_program(&user_program_callbacks);
OcAppleKernelLib: Correctly assign symbol count.
@@ -1332,7 +1332,7 @@ InternalPrelinkKext64 ( DySymtab = MachoContext->DySymtab; Symtab->SymbolsOffset = (LinkEditSegment->FileOffset + SymbolTableOffset); - Symtab->NumSymbols -= NumSymbols; + Symtab->NumSymbols = NumSymbols; Symtab->StringsOffset = (LinkEditSegment->FileOffset + StringTableOffset); DySymtab->LocalRelocationsOffset = (LinkEditSegment->FileOffset + RelocationsOffset);
RTX5: removed duplicated library reference
osRtxInfo_t osRtxInfo __attribute__((section(".data.os"))) = { .os_id = osRtxKernelId, .version = osRtxVersionKernel, .kernel.state = osRtxKernelInactive }; -// Library reference to irq module -extern uint8_t irqRtxLib; -extern const uint8_t *irqRtxLibRef __attribute__((weak)); - const uint8_t* irqRtxLibRef = &irqRtxLib; - // ==== Helper functions ====
add .list ad .map files to build
@@ -39,7 +39,7 @@ CXXFLAGS = $(COMMON_FLAGS) $(OPTIMIZE_FLAGS) $(ARCH_FLAGS) $(DEVICE_FLAGS) \ LDFLAGS = $(COMMON_FLAGS) $(ARCH_FLAGS) $(DEVICE_FLAGS) \ -Wl,--start-group -lc -lm -Wl,--end-group \ - -static -Wl,-L$(SYSTEM_DIR),-T$(SYSTEM_LD_SCRIPT),-Map,output.map,--gc-sections + -static -Wl,-L$(SYSTEM_DIR),-T$(SYSTEM_LD_SCRIPT),-Map,$(BUILD_DIR)/$(BINARY).map,--gc-sections ASFLAGS = $(COMMON_FLAGS) $(ARCH_FLAGS) -x assembler-with-cpp $(addprefix -I,$(INCLUDE)) -MMD -MP @@ -55,7 +55,7 @@ all: $(TARGET) FORCE: -$(TARGET): $(BUILD_DIR)/target $(BUILD_DIR)/$(BINARY).bin $(BUILD_DIR)/$(BINARY).hex +$(TARGET): $(BUILD_DIR)/target $(BUILD_DIR)/$(BINARY).bin $(BUILD_DIR)/$(BINARY).hex $(BUILD_DIR)/$(BINARY).list $(BUILD_DIR)/target: FORCE @mkdir -p $(BUILD_DIR) @@ -73,6 +73,9 @@ $(BUILD_DIR)/$(BINARY).bin: $(BUILD_DIR)/$(BINARY).elf $(BUILD_DIR)/$(BINARY).hex: $(BUILD_DIR)/$(BINARY).elf $(CP) -O ihex $(BUILD_DIR)/$(BINARY).elf $(BUILD_DIR)/$(BINARY).hex +$(BUILD_DIR)/$(BINARY).list: $(BUILD_DIR)/$(BINARY).elf + $(OD) -h -S $(BUILD_DIR)/$(BINARY).elf > $(BUILD_DIR)/$(BINARY).list + $(BUILD_DIR)/$(BINARY).elf: $(OBJS) $(LD) $(LDFLAGS) -o $@ $^
feat(docs): Document locality for power management behaviors
@@ -62,3 +62,7 @@ Here is a table describing the command for each define: ``` &ext_power EP_TOG ``` + +## Split Keyboards + +Power management behaviors are global: This means that when triggered, they affects both the central and peripheral side of split keyboards.
custom_calyptia: do not print tls.x empty values
@@ -75,15 +75,6 @@ static int is_sensitive_property(char *key) return FLB_FALSE; } -static char *get_str(char *p) -{ - if (p) { - return p; - } - - return "(not set)"; -} - static void pipeline_config_add_properties(flb_sds_t *buf, struct mk_list *props) { struct mk_list *head; @@ -169,14 +160,25 @@ flb_sds_t custom_calyptia_pipeline_config_get(struct flb_config *ctx) flb_sds_printf(&buf, " tls %s\n", o_ins->use_tls ? "on" : "off"); flb_sds_printf(&buf, " tls.verify %s\n", o_ins->tls_verify ? "on": "off"); + + if (o_ins->tls_ca_file) { flb_sds_printf(&buf, " tls.ca_file %s\n", - get_str(o_ins->tls_ca_file)); + o_ins->tls_ca_file); + } + + if (o_ins->tls_crt_file) { flb_sds_printf(&buf, " tls.crt_file %s\n", - get_str(o_ins->tls_crt_file)); + o_ins->tls_crt_file); + } + + if (o_ins->tls_key_file) { flb_sds_printf(&buf, " tls.key_file %s\n", - get_str(o_ins->tls_key_file)); - flb_sds_printf(&buf, " tls.key_passwd %s\n", - o_ins->tls_key_passwd ? "--redacted--" : "(not set)"); + o_ins->tls_key_file); + } + + if (o_ins->tls_key_passwd) { + flb_sds_printf(&buf, " tls.key_passwd --redacted--\n"); + } } #endif if (o_ins->retry_limit == FLB_OUT_RETRY_UNLIMITED) {
examples UPDATE support ds param for changes example
* @brief example of an application handling changes * * @copyright - * Copyright (c) 2019 CESNET, z.s.p.o. + * Copyright (c) 2019 - 2022 CESNET, z.s.p.o. * * This source code is licensed under BSD 3-Clause License (the "License"). * You may not use this file except in compliance with the License. @@ -232,6 +232,41 @@ sigint_handler(int signum) exit_application = 1; } +static const char * +ds2str(sr_datastore_t ds) +{ + switch (ds) { + case SR_DS_RUNNING: + return "running"; + case SR_DS_OPERATIONAL: + return "operational"; + case SR_DS_STARTUP: + return "startup"; + case SR_DS_CANDIDATE: + return "candidate"; + default: + return NULL; + } +} + +static int +str2ds(const char *str, sr_datastore_t *ds) +{ + if (!strcmp(str, "running")) { + *ds = SR_DS_RUNNING; + } else if (!strcmp(str, "operational")) { + *ds = SR_DS_OPERATIONAL; + } else if (!strcmp(str, "startup")) { + *ds = SR_DS_STARTUP; + } else if (!strcmp(str, "candidate")) { + *ds = SR_DS_CANDIDATE; + } else { + return 1; + } + + return 0; +} + int main(int argc, char **argv) { @@ -240,17 +275,27 @@ main(int argc, char **argv) sr_subscription_ctx_t *subscription = NULL; int rc = SR_ERR_OK; const char *mod_name, *xpath = NULL; + sr_datastore_t ds = SR_DS_RUNNING; - if ((argc < 2) || (argc > 3)) { - printf("%s <module-to-subscribe> [<xpath-to-subscribe>]\n", argv[0]); + if ((argc < 2) || (argc > 4)) { + printf("%s <module-to-subscribe> [<xpath-to-subscribe>] [startup/running/operational/candidate]\n", argv[0]); return EXIT_FAILURE; } mod_name = argv[1]; - if (argc == 3) { + if (argc > 2) { + if (str2ds(argv[2], &ds)) { + /* 2nd arg xpath */ xpath = argv[2]; } + } + if (argc > 3) { + if (str2ds(argv[3], &ds)) { + printf("Invalid datastore %s\n", argv[3]); + return EXIT_FAILURE; + } + } - printf("Application will watch for changes in \"%s\".\n", xpath ? xpath : mod_name); + printf("Application will watch for \"%s\" changes in \"%s\" datastore.\n", xpath ? xpath : mod_name, ds2str(ds)); /* turn logging on */ sr_log_stderr(SR_LL_WRN); @@ -262,7 +307,7 @@ main(int argc, char **argv) } /* start session */ - rc = sr_session_start(connection, SR_DS_RUNNING, &session); + rc = sr_session_start(connection, ds, &session); if (rc != SR_ERR_OK) { goto cleanup; }
Issue Hardcoded installation path of verilator in unit tests verilator is in the PATH, so switch to command line instead of absolute path.
@@ -105,7 +105,7 @@ def run_unit_test(filename, _): verilator_args = [ 'sh', - '/usr/local/bin/verilator', + 'verilator', '--unroll-count', '512', '--assert', '-I' + test_harness.PROJECT_TOP + '/hardware/core',
Fix tls1_generate_master_secret
@@ -460,7 +460,7 @@ int tls1_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p, hash, hashlen, NULL, 0, NULL, 0, - NULL, 0, p, len, s->session->master_key, + NULL, 0, p, len, out, SSL3_MASTER_SECRET_SIZE); OPENSSL_cleanse(hash, hashlen); } else { @@ -470,7 +470,7 @@ int tls1_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p, s->s3->client_random, SSL3_RANDOM_SIZE, NULL, 0, s->s3->server_random, SSL3_RANDOM_SIZE, - NULL, 0, p, len, s->session->master_key, + NULL, 0, p, len, out, SSL3_MASTER_SECRET_SIZE); } #ifdef SSL_DEBUG
Fix related logging bugs
@@ -289,12 +289,19 @@ int quic_server(const char* server_name, int server_port, cnx_server = picoquic_get_first_cnx(qserver); memset(&client_from, 0, sizeof(client_from)); memcpy(&client_from, &addr_from, from_length); + if (client_from.ss_family == AF_INET) { + struct sockaddr_in* addr = (struct sockaddr_in*) & client_from; + addr->sin_port = ntohs(addr->sin_port); + } + else { + struct sockaddr_in6* addr = (struct sockaddr_in6*) & client_from; + addr->sin6_port = ntohs(addr->sin6_port); + } if (F_log != NULL) { - fprintf(F_log, "%llx: ", (unsigned long long)picoquic_val64_connection_id(picoquic_get_logging_cnxid(cnx_server))); + fprintf(F_log, "%16llx: ", (unsigned long long)picoquic_val64_connection_id(picoquic_get_logging_cnxid(cnx_server))); picoquic_log_time(F_log, cnx_server, picoquic_current_time(), "", " : "); fprintf(F_log, "Connection established, state = %d, from length: %d\n", picoquic_get_cnx_state(picoquic_get_first_cnx(qserver)), from_length); - print_address(F_log, (struct sockaddr*)&client_from, "Client address:", picoquic_get_logging_cnxid(cnx_server)); picoquic_log_transport_extension(F_log, cnx_server, 1);
netkvm: ack packed ring feature if suggested The driver acks the feature if VERSION_1 is also set. The device will use packed ring if enabled in the command-line. Currently the device suppress this feature when vhost is on.
@@ -858,6 +858,10 @@ NDIS_STATUS ParaNdis_InitializeContext( pContext->nVirtioHeaderSize = sizeof(virtio_net_hdr_v1); pContext->bAnyLayout = true; DPrintf(0, "[%s] Assuming VIRTIO_F_ANY_LAYOUT for V1 device\n", __FUNCTION__); + if (AckFeature(pContext, VIRTIO_F_RING_PACKED)) + { + DPrintf(0, "[%s] Using PACKED ring\n", __FUNCTION__); + } } if (pContext->bControlQueueSupported)
runtime: TCP - account for pushed struct tx_net_hdr
@@ -183,7 +183,7 @@ int tcp_tx_ctl(tcpconn_t *c, uint8_t flags) ret = net_tx_ip(m, IPPROTO_TCP, c->e.raddr.ip); if (unlikely(ret)) { /* pretend the packet was sent */ - mbuf_push(m, sizeof(struct eth_hdr) + sizeof(struct ip_hdr)); + mbuf_push(m, sizeof(struct tx_net_hdr) + sizeof(struct eth_hdr) + sizeof(struct ip_hdr)); atomic_write(&m->ref, 1); } return ret; @@ -265,7 +265,7 @@ ssize_t tcp_tx_send(tcpconn_t *c, const void *buf, size_t len, bool push) ret = net_tx_ip(m, IPPROTO_TCP, c->e.raddr.ip); if (unlikely(ret)) { /* pretend the packet was sent */ - mbuf_push(m, sizeof(struct eth_hdr) + + mbuf_push(m, sizeof(struct tx_net_hdr) + sizeof(struct eth_hdr) + sizeof(struct ip_hdr)); atomic_write(&m->ref, 1); } @@ -299,7 +299,7 @@ void tcp_tx_retransmit(tcpconn_t *c) break; /* strip headers and reset ref count */ - mbuf_pull(m, sizeof(struct eth_hdr) + sizeof(struct ip_hdr) + + mbuf_pull(m, sizeof(struct tx_net_hdr) + sizeof(struct eth_hdr) + sizeof(struct ip_hdr) + sizeof(struct tcp_hdr)); atomic_write(&m->ref, 2); @@ -322,7 +322,7 @@ void tcp_tx_retransmit(tcpconn_t *c) ret = net_tx_ip(m, IPPROTO_TCP, c->e.raddr.ip); if (unlikely(ret)) { /* pretend the packet was sent */ - mbuf_push(m, sizeof(struct eth_hdr) + + mbuf_push(m, sizeof(struct tx_net_hdr) + sizeof(struct eth_hdr) + sizeof(struct ip_hdr)); atomic_write(&m->ref, 1); }
dsssframegen: returning appropriate value when setting header length
@@ -230,7 +230,7 @@ int dsssframegen_set_header_len(dsssframegen _q, unsigned int _len) _q->header_dec_len = DSSSFRAME_H_DEC + _q->header_user_len; _q->header = (unsigned char *)realloc(_q->header, _q->header_dec_len * sizeof(unsigned char)); - dsssframegen_reconfigure_header(_q); + return dsssframegen_reconfigure_header(_q); } int dsssframegen_set_header_props(dsssframegen _q, dsssframegenprops_s * _props)
Update face tracking example
# script finds a face in the image using the frontalface Haar Cascade. # After which the script uses the keypoints feature to automatically learn your # face and track it. Keypoints can be used to automatically track anything. -# -# NOTE: LOTS OF KEYPOINTS MAY CAUSE THE SYSTEM TO RUN OUT OF MEMORY! import sensor, time, image -# Normalized keypoints are not rotation invariant... -NORMALIZED=False -# Keypoint extractor threshold, range from 0 to any number. -# This threshold is used when extracting keypoints, the lower -# the threshold the higher the number of keypoints extracted. -KEYPOINTS_THRESH=32 -# Keypoint-level threshold, range from 0 to 100. -# This threshold is used when matching two keypoint descriptors, it's the -# percentage of the distance between two descriptors to the max distance. -# In other words, the minimum matching percentage between 2 keypoints. -MATCHING_THRESH=80 - # Reset sensor sensor.reset() @@ -50,12 +36,12 @@ while (kpts1 == None): img = sensor.snapshot() img.draw_string(0, 0, "Looking for a face...") # Find faces - objects = img.find_features(face_cascade, threshold=0.5, scale_factor=1.5) + objects = img.find_features(face_cascade, threshold=0.5, scale=1.5) if objects: - # Expand the ROI by 11 pixels in each direction (half the pattern scale) - face = (objects[0][0]-22, objects[0][1]-22,objects[0][2]+22*2, objects[0][3]+22*2) + # Expand the ROI by 31 pixels in every direction + face = (objects[0][0]-31, objects[0][1]-31,objects[0][2]+31*2, objects[0][3]+31*2) # Extract keypoints using the detect face size as the ROI - kpts1 = img.find_keypoints(threshold=KEYPOINTS_THRESH, normalized=NORMALIZED, roi=face) + kpts1 = img.find_keypoints(scale_factor=1.2, max_keypoints=100, roi=face) # Draw a rectangle around the first face img.draw_rectangle(objects[0]) @@ -71,15 +57,16 @@ while (True): clock.tick() img = sensor.snapshot() # Extract keypoints using the detect face size as the ROI - kpts2 = img.find_keypoints(threshold=KEYPOINTS_THRESH, normalized=NORMALIZED) + kpts2 = img.find_keypoints(scale_factor=1.2, max_keypoints=100) if (kpts2): # Match the first set of keypoints with the second one - c=image.match_descriptor(image.FREAK, kpts1, kpts2, threshold=MATCHING_THRESH) - # If more than 10% of the keypoints match draw the matching set - if (c[2]>25): - img.draw_cross(c[0], c[1], size=5) - img.draw_string(0, 10, "Match %d%%"%(c[2])) + c=image.match_descriptor(image.ORB, kpts1, kpts2) + match = c[6] # C[6] contains the number of matches. + if (match>2): + img.draw_rectangle(c[2:6]) + img.draw_cross(c[0], c[1], size=10) + print(kpts2, "matched:%d dt:%d"%(match, c[7])) # Draw FPS img.draw_string(0, 0, "FPS:%.2f"%(clock.fps()))
Define load addresses using macros This patch defines load addresses of regions using macros to increase readability. BRANCH=none TEST=Diff firmware_image.lds before and after the change.
#include "config.h" #include "rwsig.h" +#ifdef NPCX_RO_HEADER +/* Replace *_MEM_OFF with *_STORAGE_OFF to indicate flat file contains header + * or some struture which doesn't belong to FW */ +#define IMAGE_RO_AT (CONFIG_PROGRAM_MEMORY_BASE + \ + CONFIG_EC_PROTECTED_STORAGE_OFF) +/* npcx uses *STORAGE_OFF to plan the layout of flash image */ +#define IMAGE_RW_AT (CONFIG_PROGRAM_MEMORY_BASE + \ + CONFIG_EC_WRITABLE_STORAGE_OFF + \ + CONFIG_RW_STORAGE_OFF) + +#elif (CONFIG_RO_MEM_OFF == CONFIG_RW_MEM_OFF) +#define IMAGE_RO_AT (CONFIG_PROGRAM_MEMORY_BASE + CONFIG_RO_MEM_OFF) +/* This is applicable to ECs in which RO and RW execution is +mapped to the same location but we still have to generate an ec.bin with RO +and RW images at different Flash offset */ +#define IMAGE_RW_AT (CONFIG_PROGRAM_MEMORY_BASE + \ + CONFIG_RO_MEM_OFF + CONFIG_RO_SIZE) + +#else +#define IMAGE_RO_AT (CONFIG_PROGRAM_MEMORY_BASE + CONFIG_RO_MEM_OFF) +#define IMAGE_RW_AT (CONFIG_PROGRAM_MEMORY_BASE + CONFIG_RW_MEM_OFF) +#endif + OUTPUT_FORMAT(BFD_FORMAT, BFD_FORMAT, BFD_FORMAT) OUTPUT_ARCH(BFD_ARCH) MEMORY @@ -14,14 +37,7 @@ MEMORY } SECTIONS { -#if defined(NPCX_RO_HEADER) -/* Replace *_MEM_OFF with *_STORAGE_OFF to indicate flat file contains header - * or some struture which doesn't belong to FW */ - .image.RO : AT(CONFIG_PROGRAM_MEMORY_BASE + CONFIG_EC_PROTECTED_STORAGE_OFF\ - ) { -#else - .image.RO : AT(CONFIG_PROGRAM_MEMORY_BASE + CONFIG_RO_MEM_OFF) { -#endif + .image.RO : AT(IMAGE_RO_AT) { *(.image.RO) } > FLASH =0xff @@ -44,19 +60,7 @@ SECTIONS } > FLASH =0xff #endif -#if defined(NPCX_RO_HEADER) - /* npcx uses *STORAGE_OFF to plan the layout of flash image */ - .image.RW : AT(CONFIG_PROGRAM_MEMORY_BASE + CONFIG_EC_WRITABLE_STORAGE_OFF \ - + CONFIG_RW_STORAGE_OFF) { -#elif (CONFIG_RO_MEM_OFF == CONFIG_RW_MEM_OFF) -/* This is applicable to ECs in which RO and RW execution is -mapped to the same location but we still have to generate an ec.bin with RO -and RW images at different Flash offset */ - .image.RW : AT(CONFIG_PROGRAM_MEMORY_BASE + CONFIG_RO_MEM_OFF + \ - CONFIG_RO_SIZE) { -#else - .image.RW : AT(CONFIG_PROGRAM_MEMORY_BASE + CONFIG_RW_MEM_OFF) { -#endif + .image.RW : AT(IMAGE_RW_AT) { *(.image.RW) } > FLASH =0xff #ifdef CONFIG_RWSIG_TYPE_RWSIG
ble: Fix some AT response issues At some places in the code both uAtClientCommandStop() and uAtClientCommandStopReadResponse() was called for the same AT command resulting in undetected AT errors.
@@ -88,7 +88,6 @@ static int32_t setStartupMode(const uAtClientHandle_t atHandle, int32_t mode) uAtClientLock(atHandle); uAtClientCommandStart(atHandle, "AT+UMSM="); uAtClientWriteInt(atHandle, mode); - uAtClientCommandStop(atHandle); uAtClientCommandStopReadResponse(atHandle); error = uAtClientUnlock(atHandle); @@ -116,7 +115,6 @@ static int32_t setBleRole(const uAtClientHandle_t atHandle, int32_t role) uAtClientLock(atHandle); uAtClientCommandStart(atHandle, "AT+UBTLE="); uAtClientWriteInt(atHandle, role); - uAtClientCommandStop(atHandle); uAtClientCommandStopReadResponse(atHandle); error = uAtClientUnlock(atHandle); @@ -167,7 +165,6 @@ static int32_t disableServer(const uAtClientHandle_t atHandle, int32_t serverId) uAtClientCommandStart(atHandle, "AT+UDSC="); uAtClientWriteInt(atHandle, serverId); uAtClientWriteInt(atHandle, 0); - uAtClientCommandStop(atHandle); uAtClientCommandStopReadResponse(atHandle); error = uAtClientUnlock(atHandle); @@ -203,7 +200,6 @@ static int32_t setServer(const uAtClientHandle_t atHandle, uShortRangeServerType uAtClientCommandStart(atHandle, "AT+UDSC="); uAtClientWriteInt(atHandle, id); uAtClientWriteInt(atHandle, (int32_t) type); - uAtClientCommandStop(atHandle); uAtClientCommandStopReadResponse(atHandle); error = uAtClientUnlock(atHandle); } @@ -218,7 +214,6 @@ static int32_t restart(const uAtClientHandle_t atHandle, bool store) if (store) { uAtClientLock(atHandle); uAtClientCommandStart(atHandle, "AT&W"); - uAtClientCommandStop(atHandle); uAtClientCommandStopReadResponse(atHandle); error = (int32_t)uAtClientUnlock(atHandle); } @@ -226,7 +221,6 @@ static int32_t restart(const uAtClientHandle_t atHandle, bool store) if (error == (int32_t)U_ERROR_COMMON_SUCCESS) { uAtClientLock(atHandle); uAtClientCommandStart(atHandle, "AT+CPWROFF"); - uAtClientCommandStop(atHandle); uAtClientCommandStopReadResponse(atHandle); error = (int32_t)uAtClientUnlock(atHandle);
Hyundai safety: fixed wrong param
@@ -2,7 +2,7 @@ const int HYUNDAI_MAX_STEER = 250; const int HYUNDAI_MAX_RT_DELTA = 128; // max delta torque allowed for real time checks const int32_t HYUNDAI_RT_INTERVAL = 250000; // 250ms between real time checks const int HYUNDAI_MAX_RATE_UP = 4; -const int HYUNDAI_MAX_RATE_DOWN = 8; +const int HYUNDAI_MAX_RATE_DOWN = 10; const int HYUNDAI_DRIVER_TORQUE_ALLOWANCE = 50; const int HYUNDAI_DRIVER_TORQUE_FACTOR = 4;
entry_log: Convert to use new-style interrupt disable Update this file to use the irq_lock/unlock() method. BRANCH=none TEST=make -j30 BOARD=volteer
@@ -51,22 +51,23 @@ void log_add_event(uint8_t type, uint8_t size, uint16_t data, size_t payload_size = EVENT_LOG_SIZE(size); size_t total_size = ENTRY_SIZE(payload_size); size_t current_tail, first; + uint32_t lock_key; /* --- critical section : reserve queue space --- */ - interrupt_disable(); + lock_key = irq_lock(); current_tail = log_tail_next; log_tail_next = current_tail + total_size; - interrupt_enable(); + irq_unlock(lock_key); /* --- end of critical section --- */ /* Out of space : discard the oldest entry */ while ((UNIT_COUNT - (current_tail - log_head)) < total_size) { struct event_log_entry *oldest; /* --- critical section : atomically free-up space --- */ - interrupt_disable(); + lock_key = irq_lock(); oldest = log_events + (log_head & UNIT_COUNT_MASK); log_head += ENTRY_SIZE(EVENT_LOG_SIZE(oldest->size)); - interrupt_enable(); + irq_unlock(lock_key); /* --- end of critical section --- */ } @@ -95,6 +96,7 @@ int log_dequeue_event(struct event_log_entry *r) unsigned int total_size, first; struct event_log_entry *entry; size_t current_head; + uint32_t lock_key; retry: current_head = log_head; @@ -113,13 +115,13 @@ retry: memcpy(r + first, log_events, (total_size-first) * UNIT_SIZE); /* --- critical section : remove the entry from the queue --- */ - interrupt_disable(); + lock_key = irq_lock(); if (log_head != current_head) { /* our entry was thrown away */ - interrupt_enable(); + irq_unlock(lock_key); goto retry; } log_head += total_size; - interrupt_enable(); + irq_unlock(lock_key); /* --- end of critical section --- */ /* fixup the timestamp : number of milliseconds in the past */
Expose the default for channel_binding in PQconndefaults(). If there's a static default value for a connection option, it should be shown in the PQconninfoOptions array. Daniele Varrazzo Discussion:
@@ -215,7 +215,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = { "Database-Password-File", "", 64, offsetof(struct pg_conn, pgpassfile)}, - {"channel_binding", "PGCHANNELBINDING", NULL, NULL, + {"channel_binding", "PGCHANNELBINDING", DefaultChannelBinding, NULL, "Channel-Binding", "", 8, /* sizeof("require") == 8 */ offsetof(struct pg_conn, channel_binding)},
+has:in typecheck hack
?~ b a $(b t.b, a (put i.b)) + :: +has: does :b exist in :a? :: - ++ has :: b exists in a check + ++ has ~/ %has - |* b/* + |* b=* + ^- ? + :: wrap extracted item type in a unit because bunting fails + :: + :: If we used the real item type of _?^(a n.a !!) as the sample type, + :: then hoon would bunt it to create the default sample for the gate. + :: + :: However, bunting that expression fails if :a is ~. If we wrap it + :: in a unit, the bunted unit doesn't include the bunted item type. + :: + :: This way we can ensure type safety of :b without needing to perform + :: this failing bunt. It's a hack. + :: + %. [~ b] + |= b=(unit _?>(?=(^ a) n.a)) + => .(b ?>(?=(^ b) u.b)) |- ^- ? ?~ a |
hslua-packaging: fix docs for hslua_udindex
@@ -137,12 +137,12 @@ int hsluaP_get_numerical(lua_State *L) ** ** Does the following, in order, and returns the first non-nil result: ** -** - Checks the userdata's uservalue table for the given key; -** -** - Looks up a `getter` for the key and calls it with the userdata and +** + Checks the userdata's uservalue table for the given key; +** + looks up a `getter` for the key and calls it with the userdata and ** key as arguments; -** -** - Looks up the key in the table in the `methods` metafield. +** + tries to lookup the key as an alias and retrieves the value of the +** alias; +** + looks up the key in the table in the `methods` metafield. */ int hslua_udindex(lua_State *L) {
[mod_deflate] do not cache 206 Partial Content
@@ -1642,12 +1642,12 @@ REQUEST_FUNC(mod_deflate_handle_response_start) { * (This module does not aim to be a full caching proxy) * response must be complete (not streaming response) * must not have prior Vary response header (before Accept-Encoding added) - * must not have Range response header * must have ETag * must be file * must be single FILE_CHUNK in chunkqueue * must not be chunkqueue temporary file * must be whole file, not partial content + * must not be HTTP status 206 Partial Content * Note: small files (< 32k (see http_chunk.c)) will have been read into * memory (if streaming HTTP/1.1 chunked response) and will end up * getting stream-compressed rather than cached on disk as compressed @@ -1662,7 +1662,7 @@ REQUEST_FUNC(mod_deflate_handle_response_start) { && r->write_queue.first->type == FILE_CHUNK && r->write_queue.first->offset == 0 && !r->write_queue.first->file.is_temp - && !light_btst(r->resp_htags, HTTP_HEADER_RANGE)) { + && r->http_status != 206) { tb = mod_deflate_cache_file_name(r, p->conf.cache_dir, vb); /*(checked earlier and skipped if Transfer-Encoding had been set)*/ stat_cache_entry *sce = stat_cache_get_entry_open(tb, 1);