message
stringlengths
6
474
diff
stringlengths
8
5.22k
Need to look for POLLHUP on stderr pipe to know when the command has finished.
@@ -57,7 +57,8 @@ serverTransformJob( int mystdout[2] = {-1, -1}, /* Pipe for stdout */ mystderr[2] = {-1, -1}; /* Pipe for stderr */ struct pollfd polldata[2]; /* Poll data */ - int pollcount; /* Number of pipes to poll */ + int pollcount, /* Number of pipes to poll */ + pollret; /* Return value from poll() */ char data[32768], /* Data from stdout */ line[2048], /* Line from stderr */ *ptr, /* Pointer into line */ @@ -273,8 +274,10 @@ serverTransformJob( pollcount ++; } - while (poll(polldata, (nfds_t)pollcount, -1)) + while ((pollret = poll(polldata, (nfds_t)pollcount, -1)) > 0) { + serverLogJob(SERVER_LOGLEVEL_DEBUG, job, "poll() returned %d, polldata[0].revents=%d, polldata[1].revents=%d", pollret, polldata[0].revents, polldata[1].revents); + if (polldata[0].revents & POLLIN) { if ((bytes = read(mystderr[0], endptr, sizeof(line) - (size_t)(endptr - line) - 1)) > 0) @@ -318,6 +321,9 @@ serverTransformJob( if ((bytes = read(mystdout[0], data, sizeof(data))) > 0) httpWrite2(client->http, data, (size_t)bytes); } + + if (polldata[0].revents & POLLHUP) + break; } if (mystdout[0] >= 0)
test: add platon test case test_004ParametersInit_0003TxInitSuccessNullGasPrice fix the issue teambition task id
@@ -91,7 +91,7 @@ END_TEST START_TEST(test_004ParametersInit_0002TxInitFailureNullParam) { BSINT32 rtnVal; - BoatEthTx tx_ptr; + BoatPlatONTx tx_ptr; BoatIotSdkInit(); @@ -129,6 +129,23 @@ START_TEST(test_004ParametersInit_0002TxInitFailureNullParam) } END_TEST +START_TEST(test_004ParametersInit_0003TxInitSuccessNullGasPrice) +{ + BSINT32 rtnVal; + BoatPlatONTx tx_ptr; + + BoatIotSdkInit(); + + rtnVal = platonWalletPrepare(); + ck_assert_int_eq(rtnVal, BOAT_SUCCESS); + + rtnVal = BoatPlatONTxInit(g_platon_wallet_ptr, &tx_ptr, TEST_IS_SYNC_TX, NULL, + TEST_GAS_LIMIT, TEST_RECIPIENT_ADDRESS, hrp); + ck_assert_int_eq(rtnVal, BOAT_SUCCESS); + BoatIotSdkDeInit(); +} +END_TEST + Suite *make_parameters_suite(void) { /* Create Suite */ @@ -145,6 +162,7 @@ Suite *make_parameters_suite(void) /* Test cases are added to the test set */ tcase_add_test(tc_param_api, test_004ParametersInit_0001TxInitSuccess); tcase_add_test(tc_param_api, test_004ParametersInit_0002TxInitFailureNullParam); + tcase_add_test(tc_param_api, test_004ParametersInit_0003TxInitSuccessNullGasPrice); return s_param; } \ No newline at end of file
BugID:16846667:support multi app compilation modified: Makefile
@@ -23,7 +23,7 @@ MAKEFILE_TARGETS := clean # targets used by makefile BINS ?= MBINS ?= -LDS ?= +MBINS_APP ?= #define BUILD_STRING, AOS toolchain commands on different hosts include $(MAKEFILES_PATH)/aos_host_cmd.mk
ipsec: fix coverity 249212 zero-initialize the variables Type: fix
@@ -156,8 +156,8 @@ ipsec_tun_protect_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node, while (n_left_from > 0) { u32 sw_if_index0, len0, hdr_sz0; - clib_bihash_kv_24_16_t bkey60; - clib_bihash_kv_8_16_t bkey40; + clib_bihash_kv_24_16_t bkey60 = { 0 }; + clib_bihash_kv_8_16_t bkey40 = { 0 }; ipsec4_tunnel_kv_t *key40; ipsec6_tunnel_kv_t *key60; ip4_header_t *ip40;
Asynchronously load the contents of long scripts
-import React, { useCallback, useRef } from "react"; +import React, { useCallback, useEffect, useRef, useState } from "react"; import { DragSourceMonitor, DropTargetMonitor, @@ -41,6 +41,7 @@ const ItemTypes = { }; const COMMENT_PREFIX = "//"; +const INITIAL_EVENT_LOAD_COUNT = 3; const ScriptEditorEvent = ({ id, @@ -54,6 +55,22 @@ const ScriptEditorEvent = ({ const dispatch = useDispatch(); const dragRef = useRef<HTMLDivElement>(null); const dropRef = useRef<HTMLDivElement>(null); + const timerRef = useRef<number>(0); + const [visible, setVisible] = useState( + nestLevel + index < INITIAL_EVENT_LOAD_COUNT + ); + + // Load long scripts asynchronously + useEffect(() => { + timerRef.current = setTimeout(() => { + setVisible(true); + }, Math.min(0, nestLevel + index - INITIAL_EVENT_LOAD_COUNT)); + return () => { + if (timerRef.current) { + clearTimeout(timerRef.current); + } + }; + }, [index, nestLevel]); const [{ handlerId, isOverCurrent }, drop] = useDrop({ accept: ItemTypes.SCRIPT_EVENT, @@ -244,7 +261,7 @@ const ScriptEditorEvent = ({ </div> </ScriptEventHeader> </div> - {isOpen && !commented && ( + {visible && isOpen && !commented && ( <ScriptEventFormWrapper conditional={!!scriptEvent.children} nestLevel={nestLevel}
mousestate: fix nopoll on free
@@ -216,7 +216,7 @@ static void mousestate_reset(t_mousestate *x) static void mousestate_free(t_mousestate *x) { - mousestate_nopoll(x); + if(x->x_ispolling == 1) mousestate_nopoll(x); hammergui_unbindmouse((t_pd *)x); }
refactor: Added error logs
@@ -628,16 +628,19 @@ BBOOL UtilityStringIsHex(const BCHAR *input) if (input == NULL) { + BoatLog(BOAT_LOG_CRITICAL, "The UtilityStringIsHex input is null"); return BOAT_FALSE; } if (input[0] != '0') { + BoatLog(BOAT_LOG_CRITICAL, "The UtilityStringIsHex input can not find prefix 0"); return BOAT_FALSE; } if ((input[1] != 'x') && (input[1] != 'X')) { + BoatLog(BOAT_LOG_CRITICAL, "The UtilityStringIsHex input can not find prefix x or X"); return BOAT_FALSE; } @@ -649,9 +652,11 @@ BBOOL UtilityStringIsHex(const BCHAR *input) } if ((input[i] < '0') || ((input[i] > '9') && (input[i] < 'A')) || ((input[i] > 'F') && (input[i] < 'a')) || (input[i] > 'f')) { + BoatLog(BOAT_LOG_CRITICAL, "The UtilityStringIsHex find illegal character %d.", input[i]); return BOAT_FALSE; } } + BoatLog(BOAT_LOG_CRITICAL, "The UtilityStringIsHex input can not find \\0"); return BOAT_FALSE; }
boot/mcuboot: Add support for using Mbed TLS as crypto backend
@@ -26,6 +26,10 @@ choice prompt "Cryptographic backend" default MCUBOOT_USE_TINYCRYPT +config MCUBOOT_USE_MBED_TLS + bool "Mbed TLS" + depends on CRYPTO_MBEDTLS + config MCUBOOT_USE_TINYCRYPT bool "TinyCrypt"
ocpasswordgen: Convert to EDK-II codestyle
#include <stdio.h> -#include <Base.h> +#include <Library/DebugLib.h> #include <Library/OcCryptoLib.h> #include <UserPseudoRandom.h> int main(void) { - int Char; + CHAR8 Char; UINT8 Password[OC_PASSWORD_MAX_LEN]; UINT8 PasswordLen; UINT32 Salt[4]; UINT8 Index; UINT8 PasswordHash[SHA512_DIGEST_SIZE]; - printf("Please enter your password: "); + DEBUG ((DEBUG_ERROR, "Please enter your password: ")); for (PasswordLen = 0; PasswordLen < OC_PASSWORD_MAX_LEN; ++PasswordLen) { Char = getchar (); @@ -40,17 +40,16 @@ int main(void) { PasswordHash ); - printf ("\nPasswordHash: <"); + DEBUG ((DEBUG_ERROR, "\nPasswordHash: <")); for (Index = 0; Index < sizeof (PasswordHash); ++Index) { - printf ("%02x", PasswordHash[Index]); + DEBUG ((DEBUG_ERROR, "%02x", PasswordHash[Index])); } printf (">\nPasswordSalt: <"); for (Index = 0; Index < sizeof (Salt); ++Index) { - printf ("%02x", ((unsigned char *) Salt)[Index]); + DEBUG ((DEBUG_ERROR, "%02x", ((UINT8 *) Salt)[Index])); } - - printf ("> \n"); + DEBUG ((DEBUG_ERROR, ">\n")); SecureZeroMem (Password, sizeof (Password)); SecureZeroMem (PasswordHash, sizeof (PasswordHash));
build: add STATIC and FULL linked builds
@@ -89,6 +89,10 @@ CMAKE_FLAGS_DEBUG = ['ENABLE_DEBUG': 'ON'] CMAKE_FLAGS_LOGGER = ['ENABLE_LOGGER': 'ON'] CMAKE_FLAGS_OPTIMIZATIONS_OFF = ['ENABLE_OPTIMIZATIONS': 'OFF'] +// CMAKE_FLAGS_BUILD_SHARED = ['BUILD_SHARED': 'ON'] is ON per default +CMAKE_FLAGS_BUILD_FULL = ['BUILD_FULL': 'ON'] +CMAKE_FLAGS_BUILD_STATIC = ['BUILD_STATIC': 'ON'] + // Define TEST enum used in buildAndTest helper enum TEST { MEM, NOKDB, ALL, INSTALL @@ -299,7 +303,10 @@ def generateMainBuildStages() { "debian-stable-full", DOCKER_IMAGES.stretch, CMAKE_FLAGS_BUILD_ALL + - CMAKE_FLAGS_COVERAGE, + CMAKE_FLAGS_BUILD_FULL + + CMAKE_FLAGS_BUILD_STATIC + + CMAKE_FLAGS_COVERAGE + , [TEST.ALL, TEST.MEM, TEST.INSTALL] ) tasks << buildIcheck() @@ -348,7 +355,8 @@ def generateFullBuildStages() { "debian-unstable-full-clang", DOCKER_IMAGES.sid, CMAKE_FLAGS_BUILD_ALL + - CMAKE_FLAGS_CLANG, + CMAKE_FLAGS_CLANG + , [TEST.ALL, TEST.MEM, TEST.INSTALL] ) tasks << buildAndTestMingwW64()
GitHub CI: ensure that unifdef is installed This is required for 'make update' and fips checksums
@@ -15,6 +15,10 @@ jobs: check_update: runs-on: ubuntu-latest steps: + - name: install unifdef + run: | + sudo apt-get update + sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install unifdef - uses: actions/checkout@v2 - name: config run: ./config --strict-warnings enable-fips && perl configdata.pm --dump
api: mark cr_tst and cr_sts sections as used This prevents LTO from removing the sections at link-time, which caused tests to not be detected and run.
@@ -173,6 +173,7 @@ static const char *const cr_msg_test_fini_other_exception = "Caught some unexpec CR_IDENTIFIER_(Category, Name, jmp), \ &CR_IDENTIFIER_(Category, Name, extra) \ }; \ + CR_ATTRIBUTE(used) \ CR_SECTION_("cr_tst") \ struct criterion_test *CR_IDENTIFIER_(Category, Name, ptr) \ = &CR_IDENTIFIER_(Category, Name, meta) CR_SECTION_SUFFIX_; \ @@ -189,6 +190,7 @@ static const char *const cr_msg_test_fini_other_exception = "Caught some unexpec #Name, \ &CR_SUITE_IDENTIFIER_(Name, extra), \ }; \ + CR_ATTRIBUTE(used) \ CR_SECTION_("cr_sts") \ struct criterion_suite *CR_SUITE_IDENTIFIER_(Name, ptr) \ = &CR_SUITE_IDENTIFIER_(Name, meta) CR_SECTION_SUFFIX_
build CHANGE somewhat improved description
cmake_minimum_required(VERSION 2.8.12) project(sysrepo) -set(SYSREPO_DESC "YANG-based system repository") +set(SYSREPO_DESC "YANG-based system repository for all-around configuration management.") include(GNUInstallDirs) include(CheckSymbolExists) include(CheckFunctionExists)
Added comment to the preprocessor
* PPM -8.544922 / 40000 = -0.000214 */ #define TSCH_CONF_BASE_DRIFT_PPM -214 -#else +#else /* CPU_FAMILY_CC13XX */ /* The drift compared to "true" 10ms slots. * Enable adaptive sync to enable compensation for this. * Slot length 10000 usec * TSCH_CONF_BASE_DRIFT_PPM -977 */ #define TSCH_CONF_BASE_DRIFT_PPM -977 -#endif -#endif +#endif /* CPU_FAMILY_CC13XX */ +#endif /* TSCH_CONF_BASE_DRIFT_PPM */ /* 10 times per second */ #ifndef TSCH_CONF_CHANNEL_SCAN_DURATION
Export http3_server.h to C++
#ifndef h2o__http3_server_h #define h2o__http3_server_h +#ifdef __cplusplus +extern "C" { +#endif + #include <sys/socket.h> #include "quicly.h" #include "h2o/http3_common.h" @@ -49,4 +53,8 @@ h2o_http3_conn_t *h2o_http3_server_accept(h2o_http3_server_ctx_t *ctx, quicly_ad */ void h2o_http3_server_amend_quicly_context(h2o_globalconf_t *conf, quicly_context_t *quic); +#ifdef __cplusplus +} +#endif + #endif
simplfy buil-tester
@@ -20,7 +20,6 @@ SCRIPT_FOLDER="$(dirname "$0")" SOURCE_FOLDER="$SCRIPT_FOLDER/.." BUILD_FOLDER="$SOURCE_FOLDER/build" -INDEX_PAGE="$OUTPUT_FOLDER/quicksilver.html" CONFIG_FILE="$SOURCE_FOLDER/src/main/config/config.h" TARGETS_FILE="$SCRIPT_FOLDER/targets.json" @@ -47,16 +46,6 @@ function setConfig() { rm -rf $OUTPUT_FOLDER mkdir $OUTPUT_FOLDER -echo '<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta http-equiv="X-UA-Compatible" content="ie=edge"> - <title>QUICKSILVER Builds</title> -</head><body>' > $INDEX_PAGE -echo "<h1>QUICKSILVER Builds $VERSION</h1>" >> $INDEX_PAGE - for target in $(jq -r '.[] | @base64' $TARGETS_FILE); do target_get() { echo ${target} | base64 --decode | jq -r "${1}" @@ -75,7 +64,6 @@ for target in $(jq -r '.[] | @base64' $TARGETS_FILE); do if make -j32 -C "$SOURCE_FOLDER" MODE="$MODE" $TARGET_NAME &> /dev/null; then cp "$BUILD_FOLDER/$MODE/quicksilver.$TARGET_NAME.$MODE.hex" "$OUTPUT_FOLDER/$BUILD_NAME.hex" - upload "$OUTPUT_FOLDER/$BUILD_NAME.hex" &> /dev/null echo "<div><a target=\"_blank\" href=\"$BUILD_NAME.hex\">$BUILD_NAME</a></div>" >> $INDEX_PAGE echo -e "\e[32mSuccessfully\e[39m built target $BUILD_NAME" @@ -84,6 +72,3 @@ for target in $(jq -r '.[] | @base64' $TARGETS_FILE); do fi done done \ No newline at end of file - -echo '</body></html>' >> $INDEX_PAGE -upload $INDEX_PAGE &> /dev/null \ No newline at end of file
krew: Add tag to release artifact. Fixes: ("ci: Add version tag to release artifacts.")
@@ -35,33 +35,33 @@ spec: matchLabels: os: linux arch: amd64 - {{addURIAndSha "https://github.com/inspektor-gadget/inspektor-gadget/releases/download/{{ .TagName }}/kubectl-gadget-linux-amd64.tar.gz" .TagName }} + {{addURIAndSha "https://github.com/inspektor-gadget/inspektor-gadget/releases/download/{{ .TagName }}/kubectl-gadget-linux-amd64-{{ .TagName }}.tar.gz" .TagName }} bin: kubectl-gadget - selector: matchLabels: os: linux arch: arm64 - {{addURIAndSha "https://github.com/inspektor-gadget/inspektor-gadget/releases/download/{{ .TagName }}/kubectl-gadget-linux-arm64.tar.gz" .TagName }} + {{addURIAndSha "https://github.com/inspektor-gadget/inspektor-gadget/releases/download/{{ .TagName }}/kubectl-gadget-linux-arm64-{{ .TagName }}.tar.gz" .TagName }} bin: kubectl-gadget - selector: matchLabels: os: darwin arch: amd64 - {{addURIAndSha "https://github.com/inspektor-gadget/inspektor-gadget/releases/download/{{ .TagName }}/kubectl-gadget-darwin-amd64.tar.gz" .TagName }} + {{addURIAndSha "https://github.com/inspektor-gadget/inspektor-gadget/releases/download/{{ .TagName }}/kubectl-gadget-darwin-amd64-{{ .TagName }}.tar.gz" .TagName }} bin: kubectl-gadget - selector: matchLabels: os: darwin arch: arm64 - {{addURIAndSha "https://github.com/inspektor-gadget/inspektor-gadget/releases/download/{{ .TagName }}/kubectl-gadget-darwin-arm64.tar.gz" .TagName }} + {{addURIAndSha "https://github.com/inspektor-gadget/inspektor-gadget/releases/download/{{ .TagName }}/kubectl-gadget-darwin-arm64-{{ .TagName }}.tar.gz" .TagName }} bin: kubectl-gadget - selector: matchLabels: os: windows arch: amd64 - {{addURIAndSha "https://github.com/inspektor-gadget/inspektor-gadget/releases/download/{{ .TagName }}/kubectl-gadget-windows-amd64.tar.gz" .TagName }} + {{addURIAndSha "https://github.com/inspektor-gadget/inspektor-gadget/releases/download/{{ .TagName }}/kubectl-gadget-windows-amd64-{{ .TagName }}.tar.gz" .TagName }} bin: kubectl-gadget
log.c is portable now
@@ -293,9 +293,9 @@ extern int xdag_set_log_level(int level) #include <string.h> #include <signal.h> #include <unistd.h> -#include <execinfo.h> #if defined (__MACOS__) || defined (__APPLE__) +#include <execinfo.h> #include <sys/ucontext.h> #define RIP_sig(context) (*((unsigned long*)&(context)->uc_mcontext->__ss.__rip)) #define RSP_sig(context) (*((unsigned long*)&(context)->uc_mcontext->__ss.__rsp)) @@ -321,7 +321,8 @@ extern int xdag_set_log_level(int level) #define REG_(name) sprintf(buf + strlen(buf), #name "=%llx, ",(unsigned long long)name##_sig(uc)) -#else +#elif defined (__linux__) +#include <execinfo.h> #include <ucontext.h> #define REG_(name) sprintf(buf + strlen(buf), #name "=%llx, ", (unsigned long long)uc->uc_mcontext.gregs[REG_ ## name]) #endif @@ -329,11 +330,15 @@ extern int xdag_set_log_level(int level) static void sigCatch(int signum, siginfo_t *info, void *context) { + + xdag_fatal("Signal %d delivered", signum); + +#if defined (__linux__) || ( defined (__MACOS__) || defined (__APPLE__) ) + static void *callstack[100]; int frames, i; char **strs; - xdag_fatal("Signal %d delivered", signum); #ifdef __x86_64__ { static char buf[0x100]; *buf = 0; @@ -352,6 +357,7 @@ static void sigCatch(int signum, siginfo_t *info, void *context) for (i = 0; i < frames; ++i) { xdag_fatal("%s", strs[i]); } +#endif signal(signum, SIG_DFL); kill(getpid(), signum);
specs: elide linkat tests with AT_SYMLINK_FOLLOW if necessary. On my Mac, running OS X 10.10, and using a local HFS+ volume, calling linkat without AT_SYMLINK_FOLLOW returns ENOTSUPP. * specs/posix_unistd_spec.yaml (linkat): If such a call returns non-zero, skip the examples that would always fail.
@@ -273,9 +273,10 @@ specify posix.unistd: expect (st_after.st_nlink).to_be(st_link.st_nlink) expect (S_ISREG (st_link.st_mode)).not_to_be(0) - it creates hard link to file symbolic link: + # linkat without AT_SYMLINK_FOLLOW returns ENOTSUPP on some filesystems link (dir .. "/file", dir .. "/soft", true) st_before = lstat (dir .. "/file") - linkat (dirfd, "soft", dirfd, "hard", 0) + if linkat (dirfd, "soft", dirfd, "hard", 0) == 0 then st_after = lstat (dir .. "/file") st_hard = lstat (dir .. "/hard") st_soft = lstat (dir .. "/soft") @@ -283,6 +284,7 @@ specify posix.unistd: expect (st_soft.st_nlink).to_be(st_hard.st_nlink) expect (S_ISREG (st_hard.st_mode)).to_be(0) expect (S_ISLNK (st_hard.st_mode)).not_to_be(0) + end - it creates hard link to file referenced by symbolic link: link (dir .. "/file", dir .. "/soft", true) st_before = lstat (dir .. "/file")
LICENSE,docs: Update copyright year range to include 2020.
The MIT License (MIT) -Copyright (c) 2013-2019 Damien P. George +Copyright (c) 2013-2020 Damien P. George Copyright (c) 2014-2019 Paul Sokolovsky Permission is hereby granted, free of charge, to any person obtaining a copy
fix search counter
@@ -179,15 +179,15 @@ void searches_debug( int fd ) { struct search_t *search; struct result_t *result; int result_counter; - int searche_counter; + int search_counter; - searche_counter = 0; + search_counter = 0; searches = &g_searches[0]; dprintf( fd, "Result buckets:\n" ); while( *searches ) { search = *searches; + dprintf( fd, " query: '%s'\n", &search->query[0] ); dprintf( fd, " id: %s\n", str_id( search->id ) ); - dprintf( fd, " query: %s\n", &search->query[0] ); dprintf( fd, " done: %s\n", search->done ? "true" : "false" ); result_counter = 0; result = search->results; @@ -199,9 +199,10 @@ void searches_debug( int fd ) { } dprintf( fd, " Found %d results.\n", result_counter ); result_counter += 1; + search_counter += 1; searches++; } - dprintf( fd, " Found %d searches.\n", searche_counter ); + dprintf( fd, " Found %d searches.\n", search_counter ); } void search_restart( struct search_t *search ) {
doc fix- pljava_classpath_insecure GUC - requires restart not reload
<body> <p>Sets the frequency that the Greenplum Database server processes send query execution updates to the data collection agent processes used to populate the - <codeph>gpperfmon</codeph> database for Command Center. Query operations - executed during this interval are sent through UDP to the segment monitor agents. If you - find that an excessive number of UDP packets are dropped during long-running, complex - queries, you may consider increasing this value.</p> + <codeph>gpperfmon</codeph> database for Command Center. Query operations executed during + this interval are sent through UDP to the segment monitor agents. If you find that an + excessive number of UDP packets are dropped during long-running, complex queries, you may + consider increasing this value.</p> <table id="gp_gpperfmon_send_interval_table"> <tgroup cols="3"> <colspec colnum="1" colname="col1" colwidth="1*"/> <row> <entry colname="col1">Boolean</entry> <entry colname="col2">false</entry> - <entry colname="col3">master<p>session</p><p>reload</p><p>superuser</p></entry> + <entry colname="col3">master<p>session</p><p>restart</p><p>superuser</p></entry> </row> </tbody> </tgroup>
Add support for it8603 sensor
@@ -442,6 +442,9 @@ bool CPUStats::GetCpuFile() { } else if (name == "atk0110") { find_temp_input(path, input, "CPU Temperature"); break; + } else if (name == "it8603") { + find_temp_input(path, input, "temp1"); + break; } else { path.clear(); }
Update Makefile for Android Minor updates for Android.
# Linux: make OS=linux # Android: # Set ANDROID_API and ANDROID_BASE in this makefile: make OS=android -# or invoke like this: make OS=android NDK_HOME=/opt/android-ndk ANDROID_API=21 +# or invoke like this: make OS=android NDK_HOME=/opt/android-ndk ANDROID_API=23 # JAVA_HOME ?= $(shell readlink -e "$$(dirname "$$(readlink -e "$$(which javac)")")"/..) @@ -83,7 +83,7 @@ ifeq ($(OS),android) HEADER_FILE += -I../port/android LDFLAG += -llog ifeq ($(ANDROID_API),) - EXTRA_FLAG += -D__ANDROID_API__=21 + EXTRA_FLAG += -D__ANDROID_API__=23 else EXTRA_FLAG += -D__ANDROID_API__=$(ANDROID_API) endif
[core] _WIN32 impl of fdevent_mkostemp()
#include <errno.h> #include <fcntl.h> +#ifdef _WIN32 +#include <sys/stat.h> /* _S_IREAD _S_IWRITE */ +#include <io.h> +#include <share.h> /* _SH_DENYRW */ +#endif + #ifdef SOCK_CLOEXEC static int use_sock_cloexec; #endif @@ -639,7 +645,17 @@ int fdevent_pipe_cloexec (int * const fds, const unsigned int bufsz_hint) { int fdevent_mkostemp(char *path, int flags) { - #if defined(HAVE_MKOSTEMP) + #ifdef _WIN32 + /* future: if _sopen_s() returns EEXIST, might reset template (path) with + * trailing "XXXXXX", and then loop to try again */ + int fd; /*(flags might have _O_APPEND)*/ + return (0 == _mktemp_s(path, strlen(path)+1)) + && (0 == _sopen_s(&fd, path, _O_CREAT | _O_EXCL | _O_TEMPORARY + | flags | _O_BINARY | _O_NOINHERIT, + _SH_DENYRW, _S_IREAD | _S_IWRITE)) + ? fd + : -1; + #elif defined(HAVE_MKOSTEMP) return mkostemp(path, O_CLOEXEC | flags); #else #ifdef __COVERITY__ @@ -660,6 +676,7 @@ int fdevent_mkostemp(char *path, int flags) { fdevent_setfd_cloexec(fd); return fd; + #endif }
feat(venachain):annotate useless Nodes find api
@@ -87,12 +87,12 @@ BOAT_RESULT BoatVenachainTxSetTxtype(BoatVenachainTx *tx_ptr, BoatVenachainTxtyp } */ - +/* void venachainNodeResFree(venachain_nodesResult *result_out) { for (size_t i = 0; i < result_out->num; i++) { - /* code */ + if (result_out->nodeInfo[i].IP != NULL) { BoatFree(result_out->nodeInfo[i].IP); @@ -100,7 +100,8 @@ void venachainNodeResFree(venachain_nodesResult *result_out) } result_out->num = 0; } - +*/ +/* BCHAR *web3_eth_call_getNodesManagerAddr(Web3IntfContext *web3intf_context_ptr, BCHAR *node_url_str, const Param_eth_call *param_ptr, @@ -278,7 +279,7 @@ BCHAR *web3_eth_call_getNodesManagerAddr(Web3IntfContext *web3intf_context_ptr, return return_value_ptr; } - +*/ BCHAR *BoatVenachainCallContractFunc(BoatVenachainTx *tx_ptr, BUINT8 *rlp_param_ptr, BUINT32 rlp_param_len) { @@ -331,7 +332,7 @@ BCHAR *BoatVenachainCallContractFunc(BoatVenachainTx *tx_ptr, BUINT8 *rlp_param_ } return retval_str; } - +/* BCHAR *BoatVenachainCallContractGetNodesInfoFunc(BoatVenachainTx *tx_ptr, BUINT8 *rlp_param_ptr, BUINT32 rlp_param_len , venachain_nodesResult *result_out) @@ -383,8 +384,8 @@ BCHAR *BoatVenachainCallContractGetNodesInfoFunc(BoatVenachainTx *tx_ptr, BUINT8 return retval_str; } - - +*/ +/* BCHAR * BoatVenachainGetNodesInfo(BoatVenachainTx *tx_ptr,venachain_nodesResult *result_out) { BCHAR *call_result_str = NULL; @@ -427,6 +428,7 @@ BCHAR * BoatVenachainGetNodesInfo(BoatVenachainTx *tx_ptr,venachain_nodesResult return(call_result_str); } +*/ BOAT_RESULT BoatVenachainSendRawtxWithReceipt(BOAT_INOUT BoatVenachainTx *tx_ptr) {
Always log HSE version during startup
@@ -130,10 +130,8 @@ hse_platform_init(void) /* We only need the name pointer, the error is superfluous */ hse_program_name(&name, &basename); - if (strcmp(basename, "hse")) - /* [HSE_REVISIT] don't use the work queue in constructors */ - hse_log_sync( - HSE_NOTICE "%s: version %s, image %s", HSE_UTIL_DESC, hse_version, name ?: "unknown"); + hse_log_sync(HSE_NOTICE "%s: version %s, image %s", + HSE_UTIL_DESC, hse_version, name ?: "unknown"); free(name); return 0;
pg: fix packet coalescing cli Small fix to the packet coalescing cli. Type: fix
@@ -673,6 +673,8 @@ create_pg_if_cmd_fn (vlib_main_t * vm, { if (unformat (line_input, "interface pg%u", &if_id)) ; + else if (unformat (line_input, "coalesce-enabled")) + coalesce_enabled = 1; else if (unformat (line_input, "gso-enabled")) { gso_enabled = 1; @@ -683,8 +685,6 @@ create_pg_if_cmd_fn (vlib_main_t * vm, error = clib_error_create ("gso enabled but gso size missing"); goto done; } - if (unformat (line_input, "coalesce-enabled")) - coalesce_enabled = 1; } else {
Fixed typo: 'lenght' Note that the word 'lenght' is wrong, so that 'lenght' should been replaced with 'length'.
@@ -306,7 +306,7 @@ snmp_authfail_trap(void) * * @param vb_len varbind-list length * @param rhl points to returned header lengths - * @return the required lenght for encoding the response header + * @return the required length for encoding the response header */ static u16_t snmp_resp_header_sum(struct snmp_msg_pstat *m_stat, u16_t vb_len) @@ -353,7 +353,7 @@ snmp_resp_header_sum(struct snmp_msg_pstat *m_stat, u16_t vb_len) * * @param vb_len varbind-list length * @param thl points to returned header lengths - * @return the required lenght for encoding the trap header + * @return the required length for encoding the trap header */ static u16_t snmp_trap_header_sum(struct snmp_msg_trap *m_trap, u16_t vb_len)
overlays: Add "vc4-kms-dsi-7inch.dtbo" In theory, this would allow one to use the official 7-inch touchscreen in combination with the (non-firmware) kms driver by adding the following lines to config.txt: ignore_lcd=1 dtoverlay=vc4-kms-v3d dtoverlay=vc4-kms-dsi-7inch
@@ -44,6 +44,7 @@ RPI_KERNEL_DEVICETREE_OVERLAYS ?= " \ overlays/rpi-poe.dtbo \ overlays/vc4-fkms-v3d.dtbo \ overlays/vc4-kms-v3d.dtbo \ + overlays/vc4-kms-dsi-7inch.dtbo \ overlays/w1-gpio.dtbo \ overlays/w1-gpio-pullup.dtbo \ "
Improve random number generation on Linux and Windows. Thanks to Felix Wilhelm for suggesting the improvement.
@@ -88,6 +88,47 @@ read_random(void *buf, size_t count) { arc4random_buf(buf, count); } +#elif defined(_WIN32) +init_random(void) +{ + return; +} + +void +read_random(void *buf, size_t size) +{ + unsigned int randval; + size_t position, remaining; + + position = 0; + while (position < size) { + if (rand_s(&randval) == 0) { + remaining = MIN(count - i, sizeof(unsigned int)); + memcpy((char *)buf + position, &randval, remaining); + position += sizeof(unsigned int) + } + } +} +#elif defined(__linux__) +init_random(void) +{ + return; +} + +void +read_random(void *buf, size_t size) +{ + size_t position; + ssize_t n; + + position = 0; + while (position < size) { + n = getrandom((char *)buf + position, size - position, 0); + if (n > 0) { + position += n; + } + } +} #else void init_random(void)
mesh: Add some more BT_DBG() calls to cfg_srv.c
@@ -1463,6 +1463,7 @@ static void mod_sub_add(struct bt_mesh_model *model, if (bt_mesh_model_find_group(mod, sub_addr)) { /* Tried to add existing subscription */ + BT_DBG("found existing subscription"); status = STATUS_SUCCESS; goto send_status; } @@ -3413,6 +3414,8 @@ void bt_mesh_cfg_reset(void) struct bt_mesh_cfg_srv *cfg = conf; int i; + BT_DBG(""); + if (!cfg) { return; }
Assert reset when enabling debug Fixes stm issues that cannot recover from bad binaries if not under reset.
@@ -892,6 +892,10 @@ uint8_t swd_set_target_state_hw(TARGET_RESET_STATE state) return 0; } + // Assert reset + swd_set_target_reset(1); + os_dly_wait(2); + // Enable debug while(swd_write_word(DBG_HCSR, DBGKEY | C_DEBUGEN) == 0) { if( --ap_retries <=0 ) @@ -908,9 +912,7 @@ uint8_t swd_set_target_state_hw(TARGET_RESET_STATE state) return 0; } - // Reset again - swd_set_target_reset(1); - os_dly_wait(2); + // Deassert reset swd_set_target_reset(0); os_dly_wait(2);
add supported v3 collateral version number
@@ -91,12 +91,12 @@ oe_result_t oe_get_sgx_quote_verification_collateral( OE_RAISE(OE_QUOTE_PROVIDER_CALL_ERROR); } - if (collateral->version != SGX_QL_QVE_COLLATERAL_VERSION) + if (collateral->version != SGX_QL_QVE_COLLATERAL_VERSION_1 && + collateral->version != SGX_QL_QVE_COLLATERAL_VERSION_3) { OE_RAISE_MSG( OE_INVALID_ENDORSEMENT, - "Expected version to be %d, but got %d", - SGX_QL_QVE_COLLATERAL_VERSION, + "Invalid collateral version %d", collateral->version); }
Fill in transactionID on any error in OSSL_CMP_SRV_process_request()
@@ -485,6 +485,7 @@ OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx, tid = OPENSSL_buf2hexstr(ctx->transactionID->data, ctx->transactionID->length); + if (tid != NULL) ossl_cmp_log1(WARN, ctx, "Assuming that last transaction with ID=%s got aborted", tid); @@ -500,9 +501,6 @@ OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx, if (ctx->transactionID == NULL) { #ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION CMPerr(0, CMP_R_UNEXPECTED_PKIBODY); - /* ignore any (extra) error in next two function calls: */ - (void)OSSL_CMP_CTX_set1_transactionID(ctx, hdr->transactionID); - (void)ossl_cmp_ctx_set1_recipNonce(ctx, hdr->senderNonce); goto err; #endif } @@ -568,6 +566,12 @@ OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx, /* TODO fail_info could be more specific */ OSSL_CMP_PKISI *si = NULL; + if (ctx->transactionID == NULL) { + /* ignore any (extra) error in next two function calls: */ + (void)OSSL_CMP_CTX_set1_transactionID(ctx, hdr->transactionID); + (void)ossl_cmp_ctx_set1_recipNonce(ctx, hdr->senderNonce); + } + if ((si = OSSL_CMP_STATUSINFO_new(OSSL_CMP_PKISTATUS_rejection, fail_info, NULL)) == NULL) return 0;
board/beadrix/board.h: Format with clang-format BRANCH=none TEST=none
#define CONFIG_CHARGE_RAMP_HW #undef CONFIG_CHARGER_SINGLE_CHIP #define CONFIG_OCPC -#define CONFIG_OCPC_DEF_RBATT_MOHMS 22 /* R_DS(on) 11.6mOhm + 10mOhm sns rstr */ +#define CONFIG_OCPC_DEF_RBATT_MOHMS 22 /* R_DS(on) 11.6mOhm + 10mOhm sns rstr \ + */ /* * GPIO for C1 interrupts, for baseboard use @@ -110,11 +111,7 @@ enum adc_channel { ADC_CH_COUNT }; -enum temp_sensor_id { - TEMP_SENSOR_1, - TEMP_SENSOR_2, - TEMP_SENSOR_COUNT -}; +enum temp_sensor_id { TEMP_SENSOR_1, TEMP_SENSOR_2, TEMP_SENSOR_COUNT }; /* List of possible batteries */ enum battery_type {
DM USB: fix guest kernel short packets warning There are many 'short packet' warnings in the UOS kernel dmesg output, which are result from bad short packet identification algorithm. This patch is used to fix it. Acked-by: Yu Wang
@@ -106,6 +106,13 @@ usb_dev_comp_req(struct libusb_transfer *libusb_xfer) for (i = 0; i < req->blk_count; i++) { done = 0; block = &xfer->data[idx % USB_MAX_XFER_BLOCKS]; + + /* Link TRB need to be skipped */ + if (!block->buf || !block->blen) { + idx = (idx + 1) % USB_MAX_XFER_BLOCKS; + continue; + } + if (len > buf_idx) { done = block->blen; if (done > len - buf_idx) { @@ -203,6 +210,7 @@ usb_dev_prepare_xfer(struct usb_data_xfer *xfer, int *count, int *size) if (block->processed) { idx = (idx + 1) % USB_MAX_XFER_BLOCKS; + c++; continue; } if (block->buf && block->blen > 0) {
balloon: Don't call virtqueue_notify while holding queue locks virtqueue_notify() is a vmexit and may take a long time. Don't run it under a lock if possible to minimize the time spent in the DPC waiting for these to get released.
@@ -278,6 +278,7 @@ BalloonTellHost( PDEVICE_CONTEXT devCtx = GetDeviceContext(WdfDevice); NTSTATUS status; LARGE_INTEGER timeout = {0}; + bool do_notify; TraceEvents(TRACE_LEVEL_INFORMATION, DBG_HW_ACCESS, "--> %s\n", __FUNCTION__); @@ -290,9 +291,14 @@ BalloonTellHost( TraceEvents(TRACE_LEVEL_ERROR, DBG_HW_ACCESS, "<-> %s :: Cannot add buffer\n", __FUNCTION__); return; } - virtqueue_kick(vq); + do_notify = virtqueue_kick_prepare(vq); WdfSpinLockRelease(devCtx->InfDefQueueLock); + if (do_notify) + { + virtqueue_notify(vq); + } + timeout.QuadPart = Int32x32To64(1000, -10000); status = KeWaitForSingleObject ( &devCtx->HostAckEvent, @@ -334,6 +340,7 @@ BalloonMemStats( { VIO_SG sg; PDEVICE_CONTEXT devCtx = GetDeviceContext(WdfDevice); + bool do_notify; TraceEvents(TRACE_LEVEL_INFORMATION, DBG_HW_ACCESS, "--> %s\n", __FUNCTION__); @@ -345,8 +352,13 @@ BalloonMemStats( { TraceEvents(TRACE_LEVEL_ERROR, DBG_HW_ACCESS, "<-> %s :: Cannot add buffer\n", __FUNCTION__); } - virtqueue_kick(devCtx->StatVirtQueue); + do_notify = virtqueue_kick_prepare(devCtx->StatVirtQueue); WdfSpinLockRelease(devCtx->StatQueueLock); + if (do_notify) + { + virtqueue_notify(devCtx->StatVirtQueue); + } + TraceEvents(TRACE_LEVEL_INFORMATION, DBG_HW_ACCESS, "<-- %s\n", __FUNCTION__); }
Add even more padding to stb zlib;
@@ -571,7 +571,7 @@ static bool zip_read(Archive* archive, const char* path, size_t bytes, size_t* b *bytesRead = (bytes == (size_t) -1 || bytes > dstSize) ? (uint32_t) dstSize : bytes; if (compressed) { - srcSize++; // pad buffer to fix an stb_image "bug" + srcSize += 4; // pad buffer to fix an stb_image "bug" if (stbi_zlib_decode_noheader_buffer(*dst, (int) dstSize, src, (int) srcSize) < 0) { free(*dst); *dst = NULL;
pyapi CHANGE checking for input data when creating edit-config request
@@ -223,7 +223,7 @@ ncRPCEditConfig(ncSessionObject *self, PyObject *args, PyObject *keywords) if (PyUnicode_Check(content_o)) { content_str = PyUnicode_AsUTF8(content_o); - } else if (!strcmp(Py_TYPE(content_o)->tp_name, "Data_Node")) { + } else if (SWIG_Python_GetSwigThis(content_o)) { py_lyd_node = PyObject_CallMethod(content_o, "C_lyd_node", NULL); if (!SWIG_IsOK(SWIG_Python_ConvertPtr(py_lyd_node, (void**)&content_tree, SWIG_Python_TypeQuery("lyd_node *"), SWIG_POINTER_DISOWN))) { PyErr_SetString(PyExc_TypeError, "Invalid object representing <edit-config> content. Data_Node is accepted.");
Set error on nonconvertible SDL keys. This output only supports the char type, but the input was int. I'm not 100% sure this error can be triggered.
@@ -113,7 +113,7 @@ int oldFade = -1; /* convert SDL vk to a char (depends on the keyboard layout) */ typedef struct { SDL_Keycode sdl_key; - int tcod_key; + char tcod_key; } vk_to_c_entry; #define NUM_VK_TO_C_ENTRIES 10 static vk_to_c_entry vk_to_c[NUM_VK_TO_C_ENTRIES]; @@ -476,10 +476,14 @@ static void TCOD_sys_convert_event(const SDL_Event* ev, TCOD_key_t* ret) { /* SDL2 does not map keycodes and modifiers to characters, this is on the developer. Presumably in order to avoid problems with different keyboard layouts, they are expected to write their own key mapping editing code for the user. */ - if (SDLK_SCANCODE_MASK == (kev->keysym.sym & SDLK_SCANCODE_MASK)) + if (SDLK_SCANCODE_MASK == (kev->keysym.sym & SDLK_SCANCODE_MASK)) { ret->c = 0; - else - ret->c = kev->keysym.sym; + } else if (kev->keysym.sym < 0 || kev->keysym.sym >= 256) { + TCOD_set_errorvf("Old event API does not support key: %s", SDL_GetKeyName(kev->keysym.sym)); + ret->c = 0; + } else { + ret->c = (char)kev->keysym.sym; + } if ((kev->keysym.mod & (KMOD_LCTRL | KMOD_RCTRL)) != 0) { /* when pressing CTRL-A, we don't get unicode for 'a', but unicode for CTRL-A = 1. Fix it */ if (kev->keysym.sym >= SDLK_a && kev->keysym.sym <= SDLK_z) {
fix(draw_img): radius mask doesn't work in specific condition
@@ -358,7 +358,8 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_map(const lv_area_t * map_area, const draw_area.x2 -= disp_area->x1; draw_area.y2 -= disp_area->y1; - bool mask_any = lv_draw_mask_is_any(&draw_area); + bool mask_any = lv_draw_mask_is_any(clip_area); + /*The simplest case just copy the pixels into the draw_buf*/ if(!mask_any && draw_dsc->angle == 0 && draw_dsc->zoom == LV_IMG_ZOOM_NONE && chroma_key == false && alpha_byte == false && draw_dsc->recolor_opa == LV_OPA_TRANSP) {
Update version to 0.3.20
# # This library's version -VERSION = 0.3.19.dev +VERSION = 0.3.20 # If you set the suffix, the library name will be libopenblas_$(LIBNAMESUFFIX).a # and libopenblas_$(LIBNAMESUFFIX).so. Meanwhile, the soname in shared library
Fixing compilation issue with Visual Studio 2022 in Arm64EC
@@ -95,7 +95,11 @@ extern "C" #endif #if defined(ARM_MATH_NEON) + #if defined(_MSC_VER) && defined(_M_ARM64EC) + #include <arm64_neon.h> + #else #include <arm_neon.h> + #endif #if defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) && __ARM_FEATURE_FP16_VECTOR_ARITHMETIC #if !defined(ARM_MATH_NEON_FLOAT16) #define ARM_MATH_NEON_FLOAT16
interface: links should render even when a link is not deleted
@@ -27,7 +27,7 @@ export const LinkItem = React.forwardRef((props: LinkItemProps, ref): ReactEleme ...rest } = props; - if (typeof node.post === 'string' || !note.post) { + if (typeof node.post === 'string' || !node.post) { return <Redirect to="/~404" />; }
uses explicit static paths for parsing in +ivory
.^(@t %cx (welp sys /hoon/hoon)) :: compiler-hoon: compiler as hoon expression :: -:: We parse with +ream for reproducibility. +:: Parsed with a static path for reproducibility. :: ~& %ivory-parsing -=/ compiler-hoon (ream compiler-source) +=/ compiler-hoon (rain /sys/hoon/hoon compiler-source) ~& %ivory-parsed :: arvo-source: hoon source file producing arvo kernel, `sys/arvo` :: .^(@t %cx (welp sys /arvo/hoon)) :: whole-hoon: arvo within compiler :: +:: Parsed with a static path for reproducibility. +:: =/ whole-hoon=hoon :+ %tsbn compiler-hoon - :+ %tsld (ream arvo-source) + :+ %tsld (rain /sys/arvo/hoon arvo-source) [%$ 7] :: compile the whole schmeer :: ~& %ivory-compiled :: zuse-ovo: standard library installation event :: -:: Arvo parses the %veer payload with +rain, so -:: we pass the empty path / for reproducibility. +:: Arvo parses the %veer card contents with +rain; +:: we include a static path for reproducibility. :: =/ zuse-ovo=ovum :- /vane/zuse - [%veer %$ / .^(@ %cx (weld sys /zuse/hoon))] + [%veer %$ /sys/zuse/hoon .^(@ %cx (weld sys /zuse/hoon))] :: installed: Arvo gate (formal instance) with %zuse installed :: :: The :zuse-ovo event occurs at a defaulted date for reproducibility.
network/netmgr: fix svace 637321 fix svace 637321
@@ -37,9 +37,13 @@ static sock_type _get_socktype(int fd) { if (fd < CONFIG_NFILE_DESCRIPTORS) { return TR_LWNL; - } else if (fd < CONFIG_NFILE_DESCRIPTORS + CONFIG_NUDS_DESCRIPTORS) { + } +#ifdef CONFIG_NET_LOCAL + else if (fd < CONFIG_NFILE_DESCRIPTORS + CONFIG_NUDS_DESCRIPTORS) { return TR_UDS; - } else if (fd < CONFIG_NFILE_DESCRIPTORS + CONFIG_NSOCKET_DESCRIPTORS) { + } +#endif + else if (fd < CONFIG_NFILE_DESCRIPTORS + CONFIG_NSOCKET_DESCRIPTORS) { return TR_SOCKET; } return TR_UNKNOWN;
[io] serializers generation: scan all components for xml
@@ -47,7 +47,7 @@ def get_classes_conditional(doxy_xml_files, cond): }) return found -def classes_from_build_path(build_path): +def classes_from_build_path(build_path, targets): """Get classes and members from all Doxygen XML files found on the provided build path.""" doxy_xml_path = os.path.join(build_path,'docs/build/doxygen/xml4rst') @@ -55,10 +55,8 @@ def classes_from_build_path(build_path): print('%s: Error, path "%s" does not exist.'%(sys.argv[0], doxy_xml_path)) sys.exit(1) - components = ["kernel"] # FP : review this. Which components are to be included - # in serialization/generation process ? doxy_xml_files = [] - for component in components: + for component in targets: doxypath = os.path.join(doxy_xml_path, component) doxy_xml_files += glob(os.path.join(doxypath, 'class*.xml')) doxy_xml_files += glob(os.path.join(doxypath, 'struct*.xml')) @@ -148,7 +146,7 @@ if __name__=='__main__': all_headers = get_headers(targets) - doxygen_classes = classes_from_build_path(build_path) + doxygen_classes = classes_from_build_path(build_path, targets) header_classes = classes_from_headers(all_headers, include_paths)
Small correction in NEWS
@@ -9,7 +9,7 @@ CHANGES IN V2.0.0 - driverless: Removed the support quality check from Pull request #235 as it takes significant time for each printer being listed, making cups-driverd (`lpinfo -m`) timing out - when there are many printers (OP CUPS Issue #65). + when there are many printers (OpenPrinting CUPS issue #65). - libcupsfilters: Let the filter functions not load the PPD and not mark options in the PPD files to make them better usable with Printer Applications and to avoid race
fs_epoll: [bug fix] epoll node use-after-free in epoll extend list
@@ -171,6 +171,7 @@ static int epoll_do_close(FAR struct file *filep) { FAR epoll_head_t *eph = filep->f_priv; FAR epoll_node_t *epn; + FAR epoll_node_t *tmp; int ret; ret = nxmutex_lock(&eph->lock); @@ -189,7 +190,7 @@ static int epoll_do_close(FAR struct file *filep) poll_fdsetup(epn->pfd.fd, &epn->pfd, false); } - list_for_every_entry(&eph->extend, epn, epoll_node_t, node) + list_for_every_entry_safe(&eph->extend, epn, tmp, epoll_node_t, node) { kmm_free(epn); }
decisions: clarify that reviewers help authors
@@ -13,6 +13,10 @@ Decisions by supervisors are undemocratic and decisions in meetings are nontrans A text file which contains the content as [explained here](EXPLANATIONS.md). - `Decision PR`: A pull request that contains changes for decisions. +- `Decision author`: + Is the person who creates the decision PR. +- `Decision reviewer`: + Is the person who reviews the decision PR. ### Main Purpose @@ -36,7 +40,7 @@ Decisions by supervisors are undemocratic and decisions in meetings are nontrans Committing a suggestion directly on GitHub does this automatically. - As generally recommended in Elektra, do not squash commits after they are visible on the pull request. - Rebase only if the decision was already accepted and has a merge conflict. -- For reviewers: +- For decision reviewers: - Prefer to directly give suggestions how to change sentences. - General questions should be asked in the root of "Conversation" and not at vaguely related sentences in the review. - Decision PRs only modify a *single* decision. @@ -54,14 +58,17 @@ Decisions by supervisors are undemocratic and decisions in meetings are nontrans - Reviewers are only required to read the files in the PR. They may ignore the discussions surrounding the decision. Reviews should focus on the "Problem" section first, and only when that is agreed upon focus in the other parts. - It is encouraged that at least one reviewer provides a review _without_ participating in the discussion. + It is encouraged that at least one decision reviewer provides a review _without_ participating in the discussion. This ensures that there aren't any unintentional shared assumptions between discussion participants. ## Assumptions - People want to be informed about or even participate in what Elektra looks like in the future. -- People writing or reviewing decisions want Elektra to improve, so they also want to accept (acceptable) decisions. +- Decision authors and reviewers want Elektra to improve, so they also want to accept (acceptable) decisions. In general people want change if it brings Elektra towards its [goals](/doc/GOALS.md). +- All decision reviewers want to help the decision authors to write a good decision. +- Decision authors are the main force behind a decision and possibly also of specific solutions. + Nevertheless they don't want to avoid other solutions, are open to arguments/facts/etc. and incorporate all input of decision PR fairly. - We will always be able to reach an consensus even if it requires that the core or plugins get multiple implementations. We don't need a vote (besides the approved review) or a benevolent dictatorship. - Unlike the Rust Decision process, decisions in Elektra do not have a disadvantage if they were flawed in early stages.
docs: add charliecloud post config to aarch64
@@ -226,6 +226,7 @@ both the base OS and EPEL repositories for which mirrors are freely available on \vspace*{0.2cm} \subsubsection{Optional kernel arguments} \label{sec:optional_kargs} +\input{common/charliecloud_centos_warewulf_post} \input{common/conman_post} \subsubsection{Optionally configure stateful provisioning}
Update DSP history
- removed macro UNALIGNED_SUPPORT_DISABLE - added const-correctness - replaced SIMD pointer construct with memcopy solution + - replaced macro combination "CMSIS_INLINE __STATIC_INLINE with "__STATIC_FORCEINLINE" + Reworked DSP library documentation + Changed DSP folder structure - moved DSP libraries to ./DSP/Lib + ARM DSP Libraries are built with ARMCLANG + Added DSP Libraries source variant </td> + </tr> + <tr> <td>V1.5.4</td> <td> - Note: binaries NOT rebuild! - Updated IAR projects + + Note: binaries NOT rebuild! </td> </tr> <tr> Merged PullRequests - #439, #430, #369, #265, #166 + Modified arm_math.h - reworked macros ARM_MATH_CMx - removed macros __FPU_USED, __DSP_PRESENT - used different include files + Modified source files (because of new arm_math.h) - FilteringFunctions\arm_biquad_cascade_df2T_f32.c - FilteringFunctions\arm_biquad_cascade_df2T_f64.c
complete reco on GPU
@@ -582,11 +582,27 @@ int main_pics(int argc, char* argv[argc]) if ((NULL != psf_ifile) && (NULL == psf_ofile)) nuconf.nopsf = true; + const complex float* traj_tmp = traj; + + //for computation of psf on GPU + #ifdef USE_CUDA + if (conf.gpu) + traj_tmp = md_gpu_move(DIMS, traj_dims, traj, CFL_SIZE); + #endif + forward_op = sense_nc_init(max_dims, map_dims, maps, ksp_dims, - traj_dims, traj, nuconf, + traj_dims, traj_tmp, nuconf, pat_dims, pattern, basis_dims, basis, &nufft_op, lowmem_flags); + if (conf.gpu) { + + md_free(traj_tmp); + auto tmp = linop_gpu_wrapper((struct linop_s*)forward_op); + linop_free(forward_op); + forward_op = tmp; + } + if (NULL != psf_ofile) { int D = nufft_get_psf_dims(nufft_op, 0, NULL);
SFTP: increase maximum packet size to 256K to match implementations like OpenSSH.
/* This is the maximum packet length to accept, as larger than this indicate some kind of server problem. */ -#define LIBSSH2_SFTP_PACKET_MAXLEN 80000 +#define LIBSSH2_SFTP_PACKET_MAXLEN (256 * 1024) static int sftp_packet_ask(LIBSSH2_SFTP *sftp, unsigned char packet_type, uint32_t request_id, unsigned char **data,
config-tools: show confirm info for deleting VMs Show different confirm windows for Service_VM and other VMs.
@@ -177,14 +177,27 @@ export default { }, deleteVM() { let currentVMIndex = -1; + let vmConfigcurrent = [] + let msg='' this.scenario.vm.map((vmConfig, vmIndex) => { if (vmConfig['@id'] === this.activeVMID) { currentVMIndex = vmIndex + vmConfigcurrent = vmConfig } }) + if (vmConfigcurrent['load_order'] === 'SERVICE_VM') { + msg = "Post-launched VMs require the Service VM. If you proceed, all post-launched VMs and their settings will also be deleted. Are you sure you want to proceed?" + } else { + msg = `Delete this virtual machine VM${this.activeVMID}?` + } + confirm(msg).then((r) => { + if (r) { + console.log("remove VM") this.scenario.vm.splice(currentVMIndex, 1); this.updateCurrentFormSchema() this.updateCurrentFormData() + } + }) }, scenarioConfigFormDataUpdate(vmid, data) { if (vmid === -1) {
spi_flash: enable spi_flash write unit-test on esp32c3
@@ -141,13 +141,18 @@ TEST_CASE("Test spi_flash_read", "[spi_flash][esp_flash]") #endif } -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C3) -// TODO ESP32C3 IDF-2579 - +#if CONFIG_IDF_TARGET_ESP32 +static void IRAM_ATTR fix_rom_func(void) +{ + return; // ESP32 ROM has no compatible issue for now +} +# else +extern void spi_common_set_dummy_output(esp_rom_spiflash_read_mode_t mode); +extern void spi_dummy_len_fix(uint8_t spi, uint8_t freqdiv); static void IRAM_ATTR fix_rom_func(void) { -#ifdef CONFIG_IDF_TARGET_ESP32S2 esp_rom_spiflash_read_mode_t read_mode; + uint8_t freqdiv; #if defined CONFIG_ESPTOOLPY_FLASHMODE_QIO read_mode = ESP_ROM_SPIFLASH_QIO_MODE; #elif defined CONFIG_ESPTOOLPY_FLASHMODE_QOUT @@ -157,12 +162,27 @@ static void IRAM_ATTR fix_rom_func(void) #elif defined CONFIG_ESPTOOLPY_FLASHMODE_DOUT read_mode = ESP_ROM_SPIFLASH_DOUT_MODE; #endif - //Currently only call this can fix the rom_read issue, maybe we need to call more functions (freq, dummy, etc) in the future + +# if defined CONFIG_ESPTOOLPY_FLASHFREQ_80M + freqdiv = 1; +# elif defined CONFIG_ESPTOOLPY_FLASHFREQ_40M + freqdiv = 2; +# elif defined CONFIG_ESPTOOLPY_FLASHFREQ_26M + freqdiv = 3; +# elif defined CONFIG_ESPTOOLPY_FLASHFREQ_20M + freqdiv = 4; +#endif + spi_flash_disable_interrupts_caches_and_other_cpu(); + esp_rom_spiflash_config_clk(freqdiv, 1); + spi_dummy_len_fix(1, freqdiv); esp_rom_spiflash_config_readmode(read_mode); +#if !CONFIG_IDF_TARGET_ESP32S2 + spi_common_set_dummy_output(read_mode); +#endif //!CONFIG_IDF_TARGET_ESP32S2 spi_flash_enable_interrupts_caches_and_other_cpu(); -#endif } +#endif static void IRAM_ATTR test_write(int dst_off, int src_off, int len) { @@ -267,8 +287,6 @@ TEST_CASE("Test spi_flash_write", "[spi_flash][esp_flash]") #endif } -#endif //TEMPORARY_DISABLED_FOR_TARGETS(ESP32C3) - #ifdef CONFIG_SPIRAM TEST_CASE("spi_flash_read can read into buffer in external RAM", "[spi_flash]")
Do not free twice
@@ -5862,7 +5862,6 @@ neat_shutdown_via_kernel(struct neat_ctx *ctx, struct neat_flow *flow) if (SSL_get_shutdown(private->ssl) & SSL_RECEIVED_SHUTDOWN) { neat_log(ctx, NEAT_LOG_DEBUG, "SSL_shutdown received: close socket"); flow->closefx(ctx, flow); - free_dtlsdata(flow->socket->dtls_data); private->state = DTLS_CLOSED; return NEAT_OK; }
Ruby: Disable tests on macOS if ASAN is enabled
+if (NOT (APPLE AND ENABLE_ASAN)) file (GLOB TESTS testruby_*.rb) +endif (NOT (APPLE AND ENABLE_ASAN)) + foreach (file ${TESTS}) get_filename_component (name ${file} NAME_WE) add_test ( @@ -21,8 +24,10 @@ foreach (file ${TESTS}) endforeach (file ${TESTS}) +if (NOT (APPLE AND ENABLE_ASAN)) # special label for kdb set_property ( TEST "testruby_kdb" APPEND PROPERTY LABELS kdbtests ) +endif (NOT (APPLE AND ENABLE_ASAN))
io: remove pio emulation restriction Currently, the serial log is printed through IO(0x3f8). Secure World will print serial log by port 0x3f8. So remove the ASSERT for Secure World booting.
@@ -45,8 +45,6 @@ int dm_emulate_pio_post(struct vcpu *vcpu) 0xFFFFFFFFul >> (32 - 8 * vcpu->req.reqs.pio_request.size); uint64_t *rax; - ASSERT(cur_context == 0, "pio emulation only happen in normal wrold"); - rax = &vcpu->arch_vcpu.contexts[cur_context].guest_cpu_regs.regs.rax; vcpu->req.reqs.pio_request.value = req_buf->req_queue[cur].reqs.pio_request.value; @@ -92,9 +90,6 @@ int io_instr_handler(struct vcpu *vcpu) struct run_context *cur_context; int status = -EINVAL; - ASSERT(cur_context_idx == 0, - "pio emulation only happen in normal wrold"); - cur_context = &vcpu->arch_vcpu.contexts[cur_context_idx]; exit_qual = vcpu->arch_vcpu.exit_qualification;
Harden be-gssapi-common.h for headerscheck Surround the contents with a test that the feature is enabled by configure, to silence header checking tools on systems without GSSAPI installed. Backpatch to 12, where the file appeared. Discussion:
#ifndef BE_GSSAPI_COMMON_H #define BE_GSSAPI_COMMON_H +#ifdef ENABLE_GSS + #if defined(HAVE_GSSAPI_H) #include <gssapi.h> #else extern void pg_GSS_error(const char *errmsg, OM_uint32 maj_stat, OM_uint32 min_stat); +#endif /* ENABLE_GSS */ + #endif /* BE_GSSAPI_COMMON_H */
gitresolver: fixed warnings
@@ -434,7 +434,7 @@ typedef struct git_oid * oid; } fetch_cb_data; -static int fetchhead_ref_cb (const char * name, const char * url, const git_oid * oid, unsigned int is_merge, void * payload) +static int fetchhead_ref_cb (const char * name, const char * url ELEKTRA_UNUSED, const git_oid * oid, unsigned int is_merge, void * payload) { if (is_merge) { @@ -485,13 +485,16 @@ static MergeAnalysis mergeAnalysis (git_repository * repo, const git_annotated_c { return UNBORN; } + else + { + return ERROR; + } } static int doMerge (git_repository * repo, const git_annotated_commit ** heads) { - git_merge_options mergeOpts = GIT_MERGE_OPTIONS_INIT; - git_checkout_options checkoutOpts = GIT_CHECKOUT_OPTIONS_INIT; - checkoutOpts.checkout_strategy = GIT_CHECKOUT_FORCE; + git_merge_options mergeOpts = { GIT_MERGE_OPTIONS_VERSION, .flags = GIT_MERGE_FAIL_ON_CONFLICT }; + git_checkout_options checkoutOpts = { GIT_CHECKOUT_OPTIONS_VERSION, .checkout_strategy = GIT_CHECKOUT_FORCE }; int rc = git_merge (repo, (const git_annotated_commit **)heads, 1, &mergeOpts, &checkoutOpts); if (rc < 0) @@ -515,7 +518,7 @@ static int setFFTarget (git_repository * repo, git_oid * oid) return 0; } -static int hasMergeConflicts (git_repository * repo) +static int ELEKTRA_UNUSED hasMergeConflicts (git_repository * repo) { git_index * cIdx; int hasConflicts = 0; @@ -529,7 +532,7 @@ static int hasMergeConflicts (git_repository * repo) return 0; } -static int pullFromRemote (GitData * data, git_repository * repo) +static int pullFromRemote (GitData * data ELEKTRA_UNUSED, git_repository * repo) { git_remote * remote; int rc = git_remote_lookup (&remote, repo, "origin"); @@ -553,7 +556,7 @@ static int pullFromRemote (GitData * data, git_repository * repo) return -1; } - MergeAnalysis res = mergeAnalysis (repo, heads); + MergeAnalysis res = mergeAnalysis (repo, (const git_annotated_commit **)heads); rc = 0; switch (res) { @@ -569,7 +572,7 @@ static int pullFromRemote (GitData * data, git_repository * repo) goto PULL_CLEANUP; break; case FASTFORWARD: - rc = doMerge (repo, heads); + rc = doMerge (repo, (const git_annotated_commit **)heads); if (rc) { goto PULL_CLEANUP;
fix memleak and buffer read overflow in kvt
@@ -1761,6 +1761,7 @@ kvt_create( if (kvs_listc > 0 && !force) { if (keyfile || keyfmt || keymax < ULONG_MAX) { + hse_kvdb_kvs_names_free(kvdb, kvs_listv); eprint(EEXIST, "kvdb %s appears to exist, use -F to force re-creation", mpname); return EX_DATAERR; } @@ -1775,6 +1776,8 @@ kvt_create( hse_kvdb_kvs_drop(kvdb, kvs_listv[i]); } + hse_kvdb_kvs_names_free(kvdb, kvs_listv); + /* Create the file name indexes. */ for (i = 0; i < kvs_inodesc; ++i) { @@ -1820,8 +1823,6 @@ kvt_create( return EX_CANTCREAT; } - hse_kvdb_kvs_names_free(kvdb, kvs_listv); - err = hse_kvdb_kvs_names_get(kvdb, &kvs_listc, &kvs_listv); if (err) { eprint(err, "unable to get kvs list from %s", mpname); @@ -1878,6 +1879,7 @@ kvt_create( open: rc = kvt_open(kvs_listc, kvs_listv); + hse_kvdb_kvs_names_free(kvdb, kvs_listv); if (rc) return rc; @@ -1889,8 +1891,6 @@ open: *dump = false; } - free(kvs_listv); - return 0; } @@ -2527,14 +2527,18 @@ kvt_init_main(void *arg) } if (work->keyfmt) { + + const ssize_t valign = alignof(uint64_t); + rid = __atomic_fetch_add(&workq.rid, 1, __ATOMIC_RELAXED); work->fnlen = snprintf(work->fn, sizeof(work->fn), work->keyfmt, rid, rid, rid); cc = vlenmin + (xrand64() % (vlenmax - vlenmin + 1)); - datasrc = workq.randbuf + (xrand64() % (workq.randbufsz - cc + 1)); - datasrc = (char *)roundup((uintptr_t)datasrc, alignof(uint64_t)); + datasrc = workq.randbuf + (xrand64() % (workq.randbufsz - valign - cc + 1)); + datasrc = (char *)roundup((uintptr_t)datasrc, valign); + } else { struct stat sb;
board/collis/sensors.c: Format with clang-format BRANCH=none TEST=none
@@ -36,17 +36,13 @@ static struct bmi_drv_data_t g_bmi160_data; static struct icm_drv_data_t g_icm426xx_data; /* Rotation matrix for the lid accelerometer */ -static const mat33_fp_t lid_standard_ref = { - { FLOAT_TO_FP(1), 0, 0}, +static const mat33_fp_t lid_standard_ref = { { FLOAT_TO_FP(1), 0, 0 }, { 0, FLOAT_TO_FP(1), 0 }, - { 0, 0, FLOAT_TO_FP(1)} -}; + { 0, 0, FLOAT_TO_FP(1) } }; -const mat33_fp_t base_standard_ref = { - { FLOAT_TO_FP(1), 0, 0}, +const mat33_fp_t base_standard_ref = { { FLOAT_TO_FP(1), 0, 0 }, { 0, FLOAT_TO_FP(-1), 0 }, - { 0, 0, FLOAT_TO_FP(-1)} -}; + { 0, 0, FLOAT_TO_FP(-1) } }; const mat33_fp_t base_standard_ref_icm = { { 0, FLOAT_TO_FP(1), 0 },
[core] mark log_error_write*() funcs cold
@@ -10,7 +10,10 @@ int log_clock_gettime_realtime (struct timespec *ts); ssize_t write_all(int fd, const void* buf, size_t count); +__attribute_cold__ int log_error_write(server *srv, const char *filename, unsigned int line, const char *fmt, ...); + +__attribute_cold__ int log_error_write_multiline_buffer(server *srv, const char *filename, unsigned int line, buffer *multiline, const char *fmt, ...); #endif
Move starting log message. Move the initial start up message so it is logged to the correct file.
@@ -985,8 +985,6 @@ int main(int argc, char **argv) int fd; int ret; - tcmu_info("Starting...\n"); - while (1) { int option_index = 0; int c, nr_files; @@ -1046,6 +1044,8 @@ int main(int argc, char **argv) if (tcmu_setup_log(log_dir)) goto free_config; + tcmu_info("Starting...\n"); + if (tcmu_watch_config(tcmu_cfg)) { tcmu_warn("Dynamic config file changes is not supported.\n"); } else {
Disable Failing Loopback Tests on Shared EC Linux
@@ -451,7 +451,7 @@ stages: extraTestArgs: -ExtraArtifactDir _SharedEC ${{ if ne(parameters.testToRun, 'all') }}: testToRun: ${{ parameters.testToRun }} - testTypes: ${{ parameters.testTypes }} + testTypes: 'Remote' ${{ if eq(parameters.pgo_mode, false) }}: extraArgs: -SharedEC -Publish ${{ if eq(parameters.pgo_mode, true) }}:
compiler.h: add MSVC(Microsoft Visual C++)-specific definitions
# define no_builtin(n) +/* MSVC(Microsoft Visual C++)-specific definitions **************************/ + +#elif defined(_MSC_VER) + +/* Define these here and allow specific architectures to override as needed */ + +# define CONFIG_HAVE_LONG_LONG 1 +# define CONFIG_HAVE_FLOAT 1 +# define CONFIG_HAVE_DOUBLE 1 +# define CONFIG_HAVE_LONG_DOUBLE 1 + +/* Pre-processor */ + +# define CONFIG_CPP_HAVE_VARARGS 1 /* Supports variable argument macros */ + +/* Intriniscs */ + +# define CONFIG_HAVE_FUNCTIONNAME 1 /* Has __FUNCTION__ */ +# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */ + +# undef CONFIG_CPP_HAVE_WARNING +# undef CONFIG_HAVE_WEAKFUNCTIONS +# define weak_alias(name, aliasname) +# define weak_data +# define weak_function +# define weak_const_function +# define restrict +# define noreturn_function +# define farcall_function +# define aligned_data(n) +# define locate_code(n) +# define locate_data(n) +# define begin_packed_struct +# define end_packed_struct +# define reentrant_function +# define naked_function +# define always_inline_function +# define noinline_function +# define noinstrument_function +# define nosanitize_address +# define nosanitize_undefined +# define nostackprotect_function +# define unused_code +# define unused_data +# define used_code +# define used_data +# define formatlike(a) +# define printflike(a, b) +# define sysloglike(a, b) +# define scanflike(a, b) +# define strftimelike(a) + +# define FAR +# define NEAR +# define DSEG +# define CODE +# define IOBJ +# define IPTR + +# undef CONFIG_SMALL_MEMORY +# undef CONFIG_LONG_IS_NOT_INT +# undef CONFIG_PTR_IS_NOT_INT + +# define UNUSED(a) ((void)(1 || &(a))) + +# define offsetof(a, b) ((size_t)(&(((a *)(0))->b))) + +# define no_builtin(n) + /* Unknown compiler *********************************************************/ #else
yin parser BUGFIX free when value correctly in all error cases
@@ -1912,9 +1912,13 @@ static LY_ERR yin_parse_when(struct yin_parser_ctx *ctx, struct yin_arg_record *attrs, const char **data, struct lysp_when **when_p) { struct lysp_when *when; + LY_ERR ret = LY_SUCCESS; + when = calloc(1, sizeof *when); LY_CHECK_ERR_RET(!when, LOGMEM(ctx->xml_ctx.ctx), LY_EMEM); - LY_CHECK_RET(yin_parse_attribute(ctx, attrs, YIN_ARG_CONDITION, &when->cond, Y_STR_ARG, YANG_WHEN)); + ret = yin_parse_attribute(ctx, attrs, YIN_ARG_CONDITION, &when->cond, Y_STR_ARG, YANG_WHEN); + LY_CHECK_ERR_RET(ret, free(when), ret); + *when_p = when; struct yin_subelement subelems[3] = { {YANG_DESCRIPTION, &when->dsc, YIN_SUBELEM_UNIQUE},
Remove note about testing github linking. This is a description.
**WARNING PROJECT NOT YET IN EXPERIMENTAL PHASE** Discord: https://discordapp.com/invite/7QbCAGS -Testing if git is linked to discord. ## Livestream collection | Note | Youtube URL | Run time |
Correct number of rows in Lily58 shield
default_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <16>; - rows = <4>; + rows = <5>; // | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | // | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | // | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |
sysdeps/managarm: convert sys_getrusage to helix_ng
@@ -562,37 +562,26 @@ int sys_getrusage(int scope, struct rusage *usage) { memset(usage, 0, sizeof(struct rusage)); SignalGuard sguard; - HelAction actions[3]; - globalQueue.trim(); managarm::posix::CntRequest<MemoryAllocator> req(getSysdepsAllocator()); req.set_request_type(managarm::posix::CntReqType::GET_RESOURCE_USAGE); req.set_mode(scope); - frg::string<MemoryAllocator> ser(getSysdepsAllocator()); - req.SerializeToString(&ser); - actions[0].type = kHelActionOffer; - actions[0].flags = kHelItemAncillary; - actions[1].type = kHelActionSendFromBuffer; - actions[1].flags = kHelItemChain; - actions[1].buffer = ser.data(); - actions[1].length = ser.size(); - actions[2].type = kHelActionRecvInline; - actions[2].flags = 0; - HEL_CHECK(helSubmitAsync(getPosixLane(), actions, 3, - globalQueue.getQueue(), 0, 0)); - - auto element = globalQueue.dequeueSingle(); - auto offer = parseHandle(element); - auto send_req = parseSimple(element); - auto recv_resp = parseInline(element); + auto [offer, send_head, recv_resp] = + exchangeMsgsSync( + getPosixLane(), + helix_ng::offer( + helix_ng::sendBragiHeadOnly(req, getSysdepsAllocator()), + helix_ng::recvInline() + ) + ); - HEL_CHECK(offer->error); - HEL_CHECK(send_req->error); - HEL_CHECK(recv_resp->error); + HEL_CHECK(offer.error()); + HEL_CHECK(send_head.error()); + HEL_CHECK(recv_resp.error()); managarm::posix::SvrResponse<MemoryAllocator> resp(getSysdepsAllocator()); - resp.ParseFromArray(recv_resp->data, recv_resp->length); + resp.ParseFromArray(recv_resp.data(), recv_resp.length()); __ensure(resp.error() == managarm::posix::Errors::SUCCESS); usage->ru_utime.tv_sec = resp.ru_user_time() / 1'000'000'000;
print actual address the socket is bound to
@@ -359,7 +359,7 @@ int kad_status( char buf[], size_t size ) { // Get address the DHT listens to len = sizeof(listen_addr); - getsockname( s4 < 0 ? s6 : s4, (struct sockaddr *) &listen_addr, &len ); + getsockname( g_dht_socket4 < 0 ? g_dht_socket6 : g_dht_socket4, (struct sockaddr *) &listen_addr, &len ); // Use dht data structure! //numvalues = announces_count();
Add fallthru comment
@@ -206,6 +206,10 @@ static int new_value (json_state * state, return 1; } +#define whitespace \ + case '\n': ++ state.cur_line; state.cur_col = 0; /* FALLTHRU */ \ + case ' ': /* FALLTHRU */ case '\t': /* FALLTHRU */ case '\r' /* FALLTHRU */ + #define string_add(b) \ do { if (!state.first_pass) string [string_length] = b; ++ string_length; } while (0); @@ -510,13 +514,7 @@ json_value * json_parse_ex (json_settings * settings, switch (b) { - case '\n': - ++state.cur_line; - state.cur_col = 0; - continue; - case ' ': - case '\t': - case '\r': + whitespace: continue; default: @@ -532,13 +530,7 @@ json_value * json_parse_ex (json_settings * settings, { switch (b) { - case '\n': - ++state.cur_line; - state.cur_col = 0; - continue; - case ' ': - case '\t': - case '\r': + whitespace: continue; case ']': @@ -717,13 +709,7 @@ json_value * json_parse_ex (json_settings * settings, switch (b) { - case '\n': - ++state.cur_line; - state.cur_col = 0; - continue; - case ' ': - case '\t': - case '\r': + whitespace: continue; case '"': @@ -751,7 +737,7 @@ json_value * json_parse_ex (json_settings * settings, { flags &= ~ flag_need_comma; break; - } + } /* FALLTHRU */ default: sprintf (error, "%d:%d: Unexpected `%c` in object", line_and_col, b);
Small simplification/refactoring of EIP712 solidity typenames matching
@@ -21,14 +21,14 @@ enum IDX_COUNT }; -static bool find_enum_matches(const uint8_t (*enum_to_idx)[TYPES_COUNT - 1][IDX_COUNT], uint8_t s_idx) +static bool find_enum_matches(const uint8_t enum_to_idx[TYPES_COUNT - 1][IDX_COUNT], uint8_t s_idx) { uint8_t *enum_match = NULL; // loop over enum/typename pairs - for (uint8_t e_idx = 0; e_idx < ARRAY_SIZE(*enum_to_idx); ++e_idx) + for (uint8_t e_idx = 0; e_idx < (TYPES_COUNT - 1); ++e_idx) { - if (s_idx == (*enum_to_idx)[e_idx][IDX_STR_IDX]) // match + if (s_idx == enum_to_idx[e_idx][IDX_STR_IDX]) // match { if (enum_match != NULL) // in case of a previous match, mark it { @@ -39,7 +39,7 @@ static bool find_enum_matches(const uint8_t (*enum_to_idx)[TYPES_COUNT - 1][IDX_ apdu_response_code = APDU_RESPONSE_INSUFFICIENT_MEMORY; return false; } - *enum_match = (*enum_to_idx)[e_idx][IDX_ENUM]; + *enum_match = enum_to_idx[e_idx][IDX_ENUM]; } } return (enum_match != NULL); @@ -77,7 +77,7 @@ bool sol_typenames_init(void) for (uint8_t s_idx = 0; s_idx < ARRAY_SIZE(typenames); ++s_idx) { // if at least one match was found - if (find_enum_matches(&enum_to_idx, s_idx)) + if (find_enum_matches(enum_to_idx, s_idx)) { if ((typename_len_ptr = mem_alloc(sizeof(uint8_t))) == NULL) {
doc: prettify OPAL_PCI_SET_PHB_MEM_WINDOW
+.. _OPAL_PCI_SET_PHB_MEM_WINDOW: + OPAL_PCI_SET_PHB_MEM_WINDOW =========================== -:: + +.. code-block:: c #define OPAL_PCI_SET_PHB_MEM_WINDOW 28 - static int64_t opal_pci_set_phb_mem_window(uint64_t phb_id, + int64_t opal_pci_set_phb_mem_window(uint64_t phb_id, uint16_t window_type, uint16_t window_num, uint64_t addr, uint64_t pci_addr, - uint64_t size) + uint64_t size); + +.. note:: Appears to be POWER7 p7ioc specific. Likely to be removed soon. **WARNING:** following documentation is from old sources, and is possibly not representative of OPALv3 as implemented by skiboot. This should be @@ -71,7 +76,9 @@ segment_size times the number of segments within this MMIO window. The host must set PHB memory windows to be within the system real address ranges indicated in the PHB parent HDT hub node ibm,opal-mmio-real property. -Return value: :: +Return value: + +.. code-block:: c if (!phb) return OPAL_PARAMETER;
api: fix ipsec custom_dump function The protocol value was changed to 50 and 51 (rather than 0 and 1), but the custom_dump function wasn't updated to reflect this. Also the is_add value wasn't being shown. Fix both these issues. Type: fix
@@ -3092,11 +3092,6 @@ static const char *policy_strs[] = { "PROTECT", }; -static const char *proto_strs[] = { - "ESP", - "AH", -}; - static const char *algo_strs[] = { "NONE", "AES_CBC_128", @@ -3202,11 +3197,13 @@ static void *vl_api_ipsec_sad_entry_add_del_t_print ep = (vl_api_ipsec_sad_entry_t *) & mp->entry; - s = format (0, "SCRIPT: ipsec_sad_entry_add_del is_add ", mp->is_add); + s = format (0, "SCRIPT: ipsec_sad_entry_add_del is_add %d ", mp->is_add); tmp = (ep->protocol); - if (tmp < ARRAY_LEN (proto_strs)) - protocol_str = proto_strs[tmp]; + if (tmp == IPSEC_API_PROTO_ESP) + protocol_str = "ESP"; + else if (tmp == IPSEC_API_PROTO_AH) + protocol_str = "AH"; tmp = (ep->crypto_algorithm); if (tmp < ARRAY_LEN (algo_strs))
landscape: fixes white background on scrollbars
@@ -43,7 +43,7 @@ const Root = styled.div` * { scrollbar-width: thin; - scrollbar-color: ${ p => p.theme.colors.gray } ${ p => p.theme.colors.white }; + scrollbar-color: ${ p => p.theme.colors.gray } transparent; } /* Works on Chrome/Edge/Safari */
os/kernel/binary_manager: Fix build failure with debug enable.
@@ -323,7 +323,7 @@ void binary_manager_recovery(int bin_idx) /* Exclude its all children from scheduling if the binary is registered with the binary manager */ ret = binary_manager_deactivate_binary(bidx); if (ret != OK) { - bmlldbg("Failure during recovery excluding binary pid = %d\n", binid); + bmlldbg("Failure during recovery excluding binary pid = %d\n", bidx); goto reboot_board; }
Hang forever instead of exit early on channel deadlock. While not technically needed, the behavior is more intuitive and will prevent people from writing bad scripts.
@@ -830,8 +830,8 @@ static int janet_channel_push(JanetChannel *channel, Janet x, int mode) { pending.mode = mode ? JANET_CP_MODE_CHOICE_WRITE : JANET_CP_MODE_WRITE; janet_q_push(&channel->write_pending, &pending, sizeof(pending)); janet_chan_unlock(channel); - if (is_threaded) { janet_ev_inc_refcount(); + if (is_threaded) { janet_gcroot(janet_wrap_fiber(pending.fiber)); } return 1; @@ -848,6 +848,7 @@ static int janet_channel_push(JanetChannel *channel, Janet x, int mode) { msg.argj = x; janet_ev_post_event(vm, janet_thread_chan_cb, msg); } else { + janet_ev_dec_refcount(); if (reader.mode == JANET_CP_MODE_CHOICE_READ) { janet_schedule(reader.fiber, make_read_result(channel, x)); } else { @@ -880,8 +881,8 @@ static int janet_channel_pop(JanetChannel *channel, Janet *item, int is_choice) pending.mode = is_choice ? JANET_CP_MODE_CHOICE_READ : JANET_CP_MODE_READ; janet_q_push(&channel->read_pending, &pending, sizeof(pending)); janet_chan_unlock(channel); - if (is_threaded) { janet_ev_inc_refcount(); + if (is_threaded) { janet_gcroot(janet_wrap_fiber(pending.fiber)); } return 0; @@ -899,6 +900,7 @@ static int janet_channel_pop(JanetChannel *channel, Janet *item, int is_choice) msg.argj = janet_wrap_nil(); janet_ev_post_event(vm, janet_thread_chan_cb, msg); } else { + janet_ev_dec_refcount(); if (writer.mode == JANET_CP_MODE_CHOICE_WRITE) { janet_schedule(writer.fiber, make_write_result(channel)); } else { @@ -1102,6 +1104,7 @@ JANET_CORE_FN(cfun_channel_close, msg.argj = janet_wrap_nil(); janet_ev_post_event(vm, janet_thread_chan_cb, msg); } else { + janet_ev_dec_refcount(); if (writer.mode == JANET_CP_MODE_CHOICE_WRITE) { janet_schedule(writer.fiber, janet_wrap_nil()); } else { @@ -1121,6 +1124,7 @@ JANET_CORE_FN(cfun_channel_close, msg.argj = janet_wrap_nil(); janet_ev_post_event(vm, janet_thread_chan_cb, msg); } else { + janet_ev_dec_refcount(); if (reader.mode == JANET_CP_MODE_CHOICE_READ) { janet_schedule(reader.fiber, janet_wrap_nil()); } else {
Try simplifying and updating appveyor
-image: Visual Studio 2015 +image: + - Visual Studio 2015 + - Visual Studio 2022 version: '{build}' branches: except: - gh-pages -platform: x64 +platform: + - x64 + - x86 -environment: - matrix: - - CMAKE_GENERATOR: "Visual Studio 14 2015 Win64" - # Via https://github.com/apitrace/apitrace/blob/master/appveyor.yml before_build: -- cmake -H. -Bbuild -G "%CMAKE_GENERATOR%" -- C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe /? +- cmake -H. -Bbuild build_script: - if "%APPVEYOR_REPO_TAG%"=="true" (set CONFIGURATION=RelWithDebInfo) else (set CONFIGURATION=Debug)
Update sample application links Most of the samples apps have been moved from mynewt-core to mynewt-nimble project. test project no longer appears to exist.
@@ -83,27 +83,24 @@ There are also some sample applications that show how to Apache Mynewt NimBLE stack. These sample applications are located in the `apps/` directory of Apache Mynewt [repo](https://github.com/apache/mynewt-core). Some examples: -* [blecent](https://github.com/apache/mynewt-core/tree/master/apps/blecent): +* [blecent](https://github.com/apache/mynewt-nimble/tree/master/apps/blecent): A basic central device with no user interface. This application scans for a peripheral that supports the alert notification service (ANS). Upon discovering such a peripheral, blecent connects and performs a characteristic read, characteristic write, and notification subscription. -* [blehci](https://github.com/apache/mynewt-core/tree/master/apps/blehci): +* [blehci](https://github.com/apache/mynewt-nimble/tree/master/apps/blehci): Implements a BLE controller-only application. A separate host-only implementation, such as Linux's BlueZ, can interface with this application via HCI over UART. -* [bleprph](https://github.com/apache/mynewt-core/tree/master/apps/bleprph): An +* [bleprph](https://github.com/apache/mynewt-nimble/tree/master/apps/bleprph): An implementation of a minimal BLE peripheral. -* [btshell](https://github.com/apache/mynewt-core/tree/master/apps/btshell): A +* [btshell](https://github.com/apache/mynewt-nimble/tree/master/apps/btshell): A shell-like application allowing to configure and use most of NimBLE functionality from command line. * [bleuart](https://github.com/apache/mynewt-core/tree/master/apps/bleuart): Implements a simple BLE peripheral that supports the Nordic UART / Serial Port Emulation service (https://developer.nordicsemi.com/nRF5_SDK/nRF51_SDK_v8.x.x/doc/8.0.0/s110/html/a00072.html). -* [test](https://github.com/apache/mynewt-core/tree/master/apps/test): Test - project which can be compiled either with the simulator, or on a per-architecture basis. - Test will run all the package's unit tests. # Getting Help
Travis: Add Haskell enabled build
@@ -30,6 +30,13 @@ matrix: compiler: gcc env: [ FULL=ON ] + # HASKELL: Only build Haskell binding and plugin + + - os: osx + osx_image: xcode8.3 + compiler: clang + env: [ HASKELL=ON ] + - os: osx osx_image: xcode8.3 compiler: gcc @@ -55,7 +62,7 @@ before_install: brew install ninja fi - | - if [[ "$TRAVIS_OS_NAME" == "osx" && "$FAST" != "ON" ]]; then + if [[ "$TRAVIS_OS_NAME" == "osx" && "$FAST" != "ON" && "$HASKELL" != "ON" ]]; then rvm install 2.3.1 rvm use 2.3.1 gem install test-unit --no-document @@ -88,6 +95,14 @@ before_install: pip2 install cheetah # Required by kdb-gen export Qt5_DIR=/usr/local/opt/qt5 fi + - | + if [[ "$TRAVIS_OS_NAME" == "osx" && "$HASKELL" == "ON" ]] ; then + brew install cabal-install + cabal update + cabal install happy alex + PATH=$PATH:"$HOME/.cabal/bin" + cabal install QuickCheck hspec c2hs + fi - | if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update @@ -115,6 +130,7 @@ before_script: CMAKE_OPT+=("-DCOMMON_FLAGS=-Werror") fi - plugins="ALL;-jni" + - if [[ $HASKELL == ON ]]; then bindings="ALL;haskell"; fi - | if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then python2_ver=$(python2 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') && \ @@ -131,7 +147,7 @@ before_script: -GNinja -DBUILD_STATIC=OFF -DPLUGINS="${plugins:-ALL}" - -DBINDINGS=ALL + -DBINDINGS="${bindings:-ALL}" -DENABLE_DEBUG=ON -DTOOLS=ALL -DINSTALL_SYSTEM_FILES=OFF @@ -149,6 +165,7 @@ script: if [[ "$FAST" == "ON" || "$ASAN" = "ON" ]]; then ninja run_all else + if [[ "$HASKELL" == "ON" ]]; then ninja run_all; fi ninja install ninja run_all kdb run_all
Fix silly broken hack to get sprite size
using namespace blit; -Size boar_ship_size(boar_ship[10], boar_ship[12]); - -/*uint8_t __ss[64 * 64]; -surface ss((uint8_t *)__ss, boar_ship_size, pixel_format::P); -spritesheet ss_boar_ship(ss, 8, 8);*/ - Pen alternate_palettes[NUM_PALETTES][5] = { { Pen(87, 37, 59), @@ -53,7 +47,6 @@ Point position[NUM_PALETTES] = { void init() { set_screen_mode(ScreenMode::hires); - //ss_boar_ship.s.load_from_packed(boar_ship); screen.sprites = SpriteSheet::load(boar_ship); } @@ -78,8 +71,8 @@ void all_ships_at_once_demo(uint32_t time) { pos.y += sinf(time / 500.0f + p) * 10.0f; screen.stretch_blit(screen.sprites, - Rect(0, 0, boar_ship_size.w, boar_ship_size.h), - Rect(pos.x, pos.y, boar_ship_size.w * 2, boar_ship_size.h * 2) + Rect(0, 0, screen.sprites->bounds.w, screen.sprites->bounds.h), + Rect(pos.x, pos.y, screen.sprites->bounds.w * 2, screen.sprites->bounds.h * 2) ); } @@ -103,11 +96,11 @@ void single_ship_cycling_demo(uint32_t time) { } screen.stretch_blit(screen.sprites, - Rect(0, 0, boar_ship_size.w, boar_ship_size.h), + Rect(0, 0, screen.sprites->bounds.w, screen.sprites->bounds.h), Rect( - (screen.bounds.w - boar_ship_size.w * 4) / 2, - 5 + (screen.bounds.h - ((SWATCH_SIZE + 10) * 2) - boar_ship_size.h * 4) / 2, - boar_ship_size.w * 4, boar_ship_size.h * 4 + (screen.bounds.w - screen.sprites->bounds.w * 4) / 2, + 5 + (screen.bounds.h - ((SWATCH_SIZE + 10) * 2) - screen.sprites->bounds.h * 4) / 2, + screen.sprites->bounds.w * 4, screen.sprites->bounds.h * 4 ) );
component/bt: add local irk to controller
@@ -240,6 +240,12 @@ BOOLEAN BTM_SecRegister(tBTM_APPL_INFO *p_cb_info) if (memcmp(btm_cb.devcb.id_keys.ir, &temp_value, sizeof(BT_OCTET16)) == 0) { btm_ble_reset_id(); } +#if (!BLE_UPDATE_BLE_ADDR_TYPE_RPA) + BD_ADDR peer_addr = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; + BT_OCTET16 peer_irk = {0x0}; + /* add local irk to controller */ + btsnd_hcic_ble_add_device_resolving_list (0, peer_addr, peer_irk, btm_cb.devcb.id_keys.irk); +#endif } else { BTM_TRACE_WARNING("%s p_cb_info->p_le_callback == NULL\n", __func__); }
groups: show invites in home workspace
@@ -19,6 +19,7 @@ import { useLocalStorageState } from "~/logic/lib/useLocalStorageState"; import { getGroupFromWorkspace } from "~/logic/lib/workspace"; import { SidebarAppConfigs } from './types'; import { SidebarList } from "./SidebarList"; +import { SidebarInvite } from './SidebarInvite'; interface SidebarProps { children: ReactNode; @@ -50,6 +51,27 @@ const SidebarStickySpacer = styled(Box)` } `; +const inviteItems = (invites, api) => { + const returned = []; + Object.keys(invites).filter((e) => { + return e !== '/contacts'; + }).map((appKey) => { + const app = invites[appKey]; + Object.keys(app).map((uid) => { + const invite = app[uid]; + const inviteItem = + <SidebarInvite + key={uid} + invite={invite} + onAccept={() => api.invite.accept(appKey, uid)} + onDecline={() => api.invite.decline(appKey, uid)} + />; + returned.push(inviteItem); + }); + }); + return returned; +}; + export function Sidebar(props: SidebarProps) { const { invites, api, associations, selected, apps, workspace } = props; const groupPath = getGroupFromWorkspace(workspace); @@ -65,6 +87,8 @@ export function Sidebar(props: SidebarProps) { hideUnjoined: false, } ); + const sidebarInvites = (workspace?.type === 'home') + ? inviteItems(invites, api) : null; return ( <Col display={display} @@ -85,6 +109,7 @@ export function Sidebar(props: SidebarProps) { workspace={props.workspace} /> <SidebarListHeader initialValues={config} handleSubmit={setConfig} /> + {sidebarInvites} <SidebarList config={config} associations={associations}
set read timeout
@@ -85,6 +85,8 @@ connection * tcpConnect(const char* h, int port) server.sin_addr = *((struct in_addr *) host->h_addr); bzero(&(server.sin_zero), 8); + uint32_t timeout = 1000*10; + setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)); error = connect(sock,(struct sockaddr *) &server, sizeof(struct sockaddr)); if(error == -1) {
[bluetrum] update link.lds
/* Define the flash max size */ -__max_flash_size = 768k; +__max_flash_size = 1024k; -__data_ram_size = 5k; +__data_ram_size = 8k; __stack_ram_size = 4k; -__comm_ram_size = 86k; +__comm_ram_size = 83k; __heap_ram_size = 29k; __base = 0x10000000; @@ -34,13 +34,8 @@ SECTIONS } > init .ram1 __ram1_vma : { - *hal_drivers**.o(.text*) - *hal_libraries*ab32vg1_hal**.o(.text*) *components*drivers**.o(.text* .rodata*) - *components*libc**.o(.text*) - *ab32vg1_hal_msp.o(.text*) - *components.o(.text* .rodata*) - *ipc.o(.text* .rodata*) + *device.o(.text*) . = ALIGN(32); } > ram1 AT > flash @@ -66,7 +61,13 @@ SECTIONS .comm : { KEEP (*(.vector)) - EXCLUDE_FILE (*romfs.o *lib_a**.o) *(.text*) + EXCLUDE_FILE (*hal_drivers**.o *ab32vg1_hal**.o *components*finsh**.o *components*libc**.o *rt-thread*src**.o *kernel*src**.o *romfs.o *lib_a**.o) *(.text*) + *idle.o (.text*) + *ipc.o (.text*) + *irq.o (.text*) + *scheduler.o (.text*) + *timer.o (.text*) + *kservice.o (.text*) EXCLUDE_FILE (*romfs.o *lib_a**.o) *(.rodata*) *(.srodata*) *(.rela*) @@ -75,12 +76,6 @@ SECTIONS . = ALIGN(512); } > comm AT > flash - .flash : { - *romfs.o *(.text* .rodata*) - *lib_a**.o *(.text* .rodata*) - . = ALIGN(512); - } > flash - .bss (NOLOAD): { __bss_start = .; @@ -99,11 +94,17 @@ SECTIONS } > stack __irq_stack_size = __irq_stack - __irq_stack_start; - .heap : { + .heap (NOLOAD) : { __heap_start = .; . = __heap_ram_size; __heap_end = .; } > heap + + .flash : { + *(.text*) + *(.rodata*) + . = ALIGN(512); + } > flash } /* Calc the lma */
web-ui: update README.md
@@ -11,12 +11,18 @@ Elektra-web requires: * A recent [node.js](https://nodejs.org/en/) installation (at least 6.x) -## Getting started +## Building with elektra-web tool - * Install dependencies (see above) - * Configure elektra build with the elektra-web tool, e.g. `cmake .. -DTOOLS="web"` +To build Elektra with the elektra-web tool: + + * Install Node.js (see above) + * Configure elektra build with the elektra-web tool, e.g. `cmake .. -DTOOLS="kdb;web"` (yajl plugin is included by default now) * Build elektra: `make` * Install elektra: `sudo make install` + + +## Getting started + * Start an elektrad instance: `kdb run-elektrad` * Start the client: `kdb run-web` * You can now access the client on: [http://localhost:33334](http://localhost:33334)
Do not #undef in example project-conf.h (nrf52dk)
#define __PROJECT_ERBIUM_CONF_H__ /* Disabling TCP on CoAP nodes. */ -#undef UIP_CONF_TCP #define UIP_CONF_TCP 0 /* Increase rpl-border-router IP-buffer when using more than 64. */ -#undef REST_MAX_CHUNK_SIZE #define REST_MAX_CHUNK_SIZE 48 /* Estimate your header size, especially when using Proxy-Uri. */ /* - #undef COAP_MAX_HEADER_SIZE #define COAP_MAX_HEADER_SIZE 70 */ /* Multiplies with chunk size, be aware of memory constraints. */ -#undef COAP_MAX_OPEN_TRANSACTIONS #define COAP_MAX_OPEN_TRANSACTIONS 4 /* Must be <= open transactions, default is COAP_MAX_OPEN_TRANSACTIONS-1. */ /* - #undef COAP_MAX_OBSERVERS #define COAP_MAX_OBSERVERS 2 */ /* Filtering .well-known/core per query can be disabled to save space. */ -#undef COAP_LINK_FORMAT_FILTERING #define COAP_LINK_FORMAT_FILTERING 0 -#undef COAP_PROXY_OPTION_PROCESSING #define COAP_PROXY_OPTION_PROCESSING 0 /* Enable client-side support for COAP observe */
Fix wps config for support with gnu++11 as well as c99.
@@ -71,13 +71,20 @@ typedef struct { wps_factory_information_t factory_info; } esp_wps_config_t; +/* C & C++ compilers have different rules about C99-style named initializers */ +#ifdef __cplusplus +#define WPS_AGG(X) { X } +#else +#define WPS_AGG(X) X +#endif + #define WPS_CONFIG_INIT_DEFAULT(type) { \ .wps_type = type, \ .factory_info = { \ - .manufacturer = "ESPRESSIF", \ - .model_number = "ESP32", \ - .model_name = "ESPRESSIF IOT", \ - .device_name = "ESP STATION", \ + WPS_AGG( .manufacturer = "ESPRESSIF" ), \ + WPS_AGG( .model_number = "ESP32" ), \ + WPS_AGG( .model_name = "ESPRESSIF IOT" ), \ + WPS_AGG( .device_name = "ESP STATION" ), \ } \ }
vere: remove (no-op) handler for obsolete %init effect
@@ -1719,14 +1719,6 @@ _term_io_kick(u3_auto* car_u, u3_noun wir, u3_noun cad) u3_Host.xit_i = dat; } break; - // XX obsolete, remove in %zuse and %dill - case c3__init: { - // daemon ignores %init - // u3A->own = u3nc(u3k(p_fav), u3A->own); - // u3l_log("kick: init: %d\n", p_fav); - ret_o = c3y; - } break; - case c3__mass: { ret_o = c3y;
Use official 3.10 Python version.
@@ -34,7 +34,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10-dev"] + python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] steps: - uses: "actions/checkout@v2" - uses: "actions/setup-python@v2"
Fix hexcode render pass clear;
@@ -540,7 +540,7 @@ static Canvas luax_checkcanvas(lua_State* L, int index) { } } } else if (lua_isnumber(L, -1) || lua_isuserdata(L, -1)) { - luax_optcolor(L, -1, canvas.clears[1]); + luax_optcolor(L, -1, canvas.clears[0]); } else if (!lua_isnil(L, -1)) { LoadAction load = lua_toboolean(L, -1) ? LOAD_DISCARD : LOAD_KEEP; canvas.loads[0] = canvas.loads[1] = canvas.loads[2] = canvas.loads[3] = load;
Adding version command to console
@@ -858,6 +858,15 @@ static void onConsoleKeymapCommand(Console* console, const char* param) commandDone(console); } +static void onConsoleVersionCommand(Console* console, const char* param) +{ + printBack(console, "\n"); + char msg[64] = {0}; + sprintf(msg, "%i.%i.%i", TIC_VERSION_MAJOR, TIC_VERSION_MINOR, TIC_VERSION_PATCH); + consolePrint(console, msg, CONSOLE_BACK_TEXT_COLOR); + commandDone(console); +} + static void onConsoleConfigCommand(Console* console, const char* param) { if(param == NULL) @@ -1832,6 +1841,7 @@ static const struct {"demo", NULL, "install demo carts", onConsoleInstallDemosCommand}, {"config", NULL, "edit TIC config", onConsoleConfigCommand}, {"keymap", NULL, "configure keyboard mapping", onConsoleKeymapCommand}, + {"version", NULL, "show the current version", onConsoleVersionCommand}, {"surf", NULL, "open carts browser", onConsoleSurfCommand}, };
time to test ANSNA
@@ -156,6 +156,14 @@ void Table_Test() printf("<<Table test successful\n"); } +void ANSNA_Test() +{ + printf(">>ANSNA test start\n"); + ANSNA_AddInput(Encode_Term("a"), EVENT_TYPE_BELIEF, (Truth) { .frequency = 1.0, .confidence = 0.9 }); + //ANSNA_Cycles(1); + printf("<<ANSNA test successful\n"); +} + int main() { srand(1337); @@ -165,7 +173,7 @@ int main() FIFO_Test(); PriorityQueue_Test(); Table_Test(); - + ANSNA_Test(); /* // memory Memory memory;
sse2: ignore broken _mm_loadu_si{16,32} on GCC Pending a fix for Fixes
@@ -4600,7 +4600,6 @@ simde__m128i simde_mm_loadu_si16 (void const* mem_addr) { #if defined(SIMDE_X86_SSE2_NATIVE) && ( \ SIMDE_DETECT_CLANG_VERSION_CHECK(8,0,0) || \ - HEDLEY_GCC_VERSION_CHECK(11,0,0) || \ HEDLEY_INTEL_VERSION_CHECK(20,21,1)) return _mm_loadu_si16(mem_addr); #else @@ -4645,7 +4644,6 @@ simde__m128i simde_mm_loadu_si32 (void const* mem_addr) { #if defined(SIMDE_X86_SSE2_NATIVE) && ( \ SIMDE_DETECT_CLANG_VERSION_CHECK(8,0,0) || \ - HEDLEY_GCC_VERSION_CHECK(11,0,0) || \ HEDLEY_INTEL_VERSION_CHECK(20,21,1)) return _mm_loadu_si32(mem_addr); #else
Raise C++ version to C++14
@@ -57,7 +57,7 @@ unix:!macx { TEMPLATE = lib CONFIG += plugin \ += debug_and_release \ - += c++11 \ + += c++14 \ -= qtquickcompiler QT += network
Fix vrapi_getAxis;
@@ -131,15 +131,15 @@ static bool vrapi_isTouched(Device device, DeviceButton button, bool* touched) { return buttonCheck(bridgeLovrMobileData.updateData.goButtonTouch, device, button, touched); } -static int vrapi_getAxis(Device device, DeviceAxis axis, float* value) { +static bool vrapi_getAxis(Device device, DeviceAxis axis, float* value) { if (device != DEVICE_HAND) { return false; } switch (axis) { case AXIS_TOUCHPAD: - value[0] = (bridgeLovrMobileData.updateData.goTrackpad.x - 160.f) / 160.f, true; - value[1] = (bridgeLovrMobileData.updateData.goTrackpad.y - 160.f) / 160.f, true; + value[0] = (bridgeLovrMobileData.updateData.goTrackpad.x - 160.f) / 160.f; + value[1] = (bridgeLovrMobileData.updateData.goTrackpad.y - 160.f) / 160.f; return true; case AXIS_TRIGGER: value[0] = bridgeLovrMobileData.updateData.goButtonDown ? 1.f : 0.f;
Removed wrong NID
@@ -1808,7 +1808,6 @@ modules: snprintf: 0xAE7A8981 strchr: 0x38463759 strcmp: 0xB33BC43 - strcpy: 0x7FB4EBEC strlen: 0xCFC6A9AC strncat: 0xA1D1C32C strncmp: 0x12CEE649