message
stringlengths
6
474
diff
stringlengths
8
5.22k
external/esp_idf_port: Add retry times when esp32 wifi disconnected. Sometimes esp32 WiFi will connect AP(phone hotspot) failed for the first time, Giving chance to reconnect will improve this case.
#include "esp_attr.h" #include "esp_phy_init.h" #include "esp_wifi_os_adapter.h" -#include "nvs.h" #include "esp_system.h" #include "rom/ets_sys.h" #include <sched/sched.h> #include "esp_wifi.h" #include "esp_log.h" #include "esp_event_loop.h" -#include "nvs_flash.h" #include "esp_wifi_internal.h" -#define WIFI_DEFAULT_BEACON_INTERVAL 100 +#define WIFI_CONN_RETRY 5 #define WIFI_MAX_STA_CONN 4 +#define WIFI_DEFAULT_BEACON_INTERVAL 100 #ifndef CONFIG_MAX_STA_CONN #define CONFIG_MAX_STA_CONN WIFI_MAX_STA_CONN @@ -250,11 +249,20 @@ static esp_err_t event_handler(void *ctx, system_event_t *event) sleep(1); if (s_retry_num > 0) { ESP_LOGI(TAG, "g_cbk.sta_connected fail\n"); + if (s_retry_num < WIFI_CONN_RETRY) { + esp_wifi_connect(); + } + + else { g_cbk.sta_connected(WIFI_UTILS_FAIL, NULL); s_retry_num = 0; + } + } else { ESP_LOGI(TAG, "g_cbk.sta_disconnected\n"); g_cbk.sta_disconnected(NULL); + /*in case receive multiple times SYSTEM_EVENT_STA_DISCONNECTED*/ + s_retry_num = -1; } isStaConnected = 0; break;
btshell: Fix some help messages
@@ -456,7 +456,7 @@ static const struct shell_param advertise_configure_params[] = { {"interval_min", "usage: =[0-UINT32_MAX], default: 0"}, {"interval_max", "usage: =[0-UINT32_MAX], default: 0"}, {"tx_power", "usage: =[-127-127], default: 127"}, - {"primary_phy", "usage: =[1M|2M|coded], default: 1M"}, + {"primary_phy", "usage: =[1M|coded], default: 1M"}, {"secondary_phy", "usage: =[1M|2M|coded], default: primary_phy"}, {"sid", "usage: =[0-UINT8_MAX], default: 0"}, {"high_duty", "usage: =[0-1], default: 0"}, @@ -1218,7 +1218,7 @@ static const struct shell_param scan_params[] = { {"interval", "usage: =[0-UINT16_MAX], default: 0"}, {"window", "usage: =[0-UINT16_MAX], default: 0"}, {"filter", "usage: =[no_wl|use_wl|no_wl_inita|use_wl_inita], default: no_wl"}, - {"nodups", "usage: =[0-UINT16_MAX], default: 0"}, + {"nodups", "usage: =[0-1], default: 0"}, {"own_addr_type", "usage: =[public|random|rpa_pub|rpa_rnd], default: public"}, {"extended_duration", "usage: =[0-UINT16_MAX], default: 0"}, {"extended_period", "usage: =[0-UINT16_MAX], default: 0"}, @@ -3045,7 +3045,7 @@ static const struct shell_param gatt_read_params[] = { {"conn", "connection handle, usage: =<UINT16>"}, {"long", "is read long, usage: =[0-1], default=0"}, {"attr", "attribute handle, usage: =<UINT16>"}, - {"offset", "attribute handle, usage: =<UINT16>"}, + {"offset", "offset value, usage: =<UINT16>"}, {"uuid", "read by uuid, usage: =[UUID]"}, {"start", "start handle, usage: =<UINT16>"}, {"end", "end handle, usage: =<UINT16>"},
use std::abs in chromaticity sanity tests (fixes
@@ -70,7 +70,7 @@ RGBtoXYZ (const Chromaticities &chroma, float Y) // // prevent a division that rounds to zero - if (abs(chroma.white.y) <= 1.f && abs(chroma.white.x * Y) >= abs(chroma.white.y) * FLT_MAX) + if (std::abs(chroma.white.y) <= 1.f && std::abs(chroma.white.x * Y) >= std::abs(chroma.white.y) * FLT_MAX) { throw std::invalid_argument("Bad chromaticities: white.y cannot be zero"); } @@ -108,7 +108,7 @@ RGBtoXYZ (const Chromaticities &chroma, float Y) chroma.red.y * (X + Z))); - if ( abs(d)<1.f && (abs(SrN) >= abs(d)* FLT_MAX || abs(SgN) >= abs(d)* FLT_MAX || abs(SbN) >= abs(d)* FLT_MAX) ) + if ( std::abs(d)<1.f && (std::abs(SrN) >= std::abs(d)* FLT_MAX || std::abs(SgN) >= std::abs(d)* FLT_MAX || std::abs(SbN) >= std::abs(d)* FLT_MAX) ) { // cannot generate matrix if all RGB primaries have the same y value // or if they all have the an x value of zero
add screenshot bindings
@@ -99,6 +99,8 @@ static const char *rangercmd[] = { "urxvt", "-e", "ranger", NULL }; static const char *panther[] = { "appmenu", NULL}; static const char *pavucontrol[] = { "pavucontrol", NULL}; static const char *clickcmd[] = { "autoclicker", NULL }; +static const char *scrotcmd[] = { "/opt/instantos/menus/dm/ss.sh", NULL }; +static const char *fscrotcmd[] = { "/opt/instantos/menus/dm/sm.sh", NULL }; static const char *spoticli[] = { "spoticli", "m", NULL}; static const char *spotiprev[] = { "spoticli", "p", NULL}; @@ -199,6 +201,10 @@ static Key keys[] = { {0, XF86XK_AudioPlay, spawn, {.v = spoticli}}, {0, XF86XK_AudioNext, spawn, {.v = spotinext}}, {0, XF86XK_AudioPrev, spawn, {.v = spotiprev}}, + + {0, XK_Print, spawn, {.v = fscrotcmd}}, + {MODKEY, XK_Print, spawn, {.v = scrotcmd}}, + { MODKEY, XK_o, winview, {0} }, };
CBLK: Put debug print in locked section to make trace more realistic
@@ -406,11 +406,12 @@ static inline void start_memcpy(struct cblk_dev *c, uint8_t action_code = action & 0x00ff; int slot = (action & 0x0f00) >> 8; + pthread_mutex_lock(&c->dev_lock); + block_trace(" [%s] HW %s memcpy_%x(slot=%u dest=0x%llx, src=0x%llx n=%lld bytes)\n", __func__, action_name[action_code % ACTION_CONFIG_MAX], action, slot, (long long)dest, (long long)src, (long long)n); - pthread_mutex_lock(&c->dev_lock); __cblk_write(c, ACTION_CONFIG, action); __cblk_write(c, ACTION_DEST_LOW, (uint32_t)(dest & 0xffffffff)); __cblk_write(c, ACTION_DEST_HIGH, (uint32_t)(dest >> 32));
docs:add install guide for wsl users
- [Amazon Linux 1](#amazon-linux-1---binary) - [Amazon Linux 2](#amazon-linux-2---binary) - [Alpine](#alpine---binary) + - [WSL](#wsl---binary) * [Source](#source) - [libbpf Submodule](#libbpf-submodule) - [Debian](#debian---source) @@ -270,6 +271,33 @@ sudo docker run --rm -it --privileged \ alpine:3.12 ``` +## WSL - Binary + +### Install dependencies +The compiling depends on the headers and lib of linux kernel module which was not found in wsl distribution packages repo. We have to compile the kernel moudle manually. +```bash +apt-get install flex bison libssl-dev libelf-dev +``` +For wsl kernel 5.10.y +``` +apt-get install dwarves +``` +### Install packages +``` +cp Microsoft/config-wsl .config +make oldconfig && make prepare +make scripts +make modules && make modules_install +# if your kernel version is 4.19.y +mv /lib/modules/x.y.z-microsoft-standard+ /lib/modules/x.y.z-microsoft-standard +```` +Then you can install bcc tools package according your distribution. + +If you met some problems, try to +``` +sudo mount -t debugfs debugfs /sys/kernel/debug +``` + # Source ## libbpf Submodule
codegen: fix cmake tools list
@@ -78,7 +78,7 @@ if (TOOLS MATCHES "NODEP") endif () if (TOOLS MATCHES "ALL") - set (TOOLS_LIST gen race qt-gui gen-gpg-testkey) + set (TOOLS_LIST pythongen race qt-gui gen-gpg-testkey) set (TOOLS_FORCE FORCE) list (REMOVE_ITEM TOOLS ALL)
FSP/CONSOLE: Do not free fsp_msg in error path .. as we reuse same msg to send next output message.
@@ -145,7 +145,6 @@ static void fsp_pokemsg_reclaim(struct fsp_msg *msg) if (fs->out_poke) { if (fsp_queue_msg(fs->poke_msg, fsp_pokemsg_reclaim)) { prerror("FSPCON: failed to queue poke msg\n"); - fsp_freemsg(msg); } else { fs->out_poke = false; }
fixed NVME_USED handling in donut_settings
@@ -165,7 +165,7 @@ while [ -z "$SETUP_DONE" ]; do echo "SDRAM_USED is set to \"$SDRAM_USED\"" fi - if [ -z "NVME_USED" ]; then + if [ -z "$NVME_USED" ]; then export NVME_USED="FALSE" echo "Variable NVME_USED is not set. Will default to \"FALSE\"" else
hfuzz-cc: reverse inclusion ordder of libhfuzz and libhfnetdriver
@@ -365,6 +365,7 @@ static int ldMode(int argc, char** argv) { /* Reference standard honggfuzz libraries (libhfuzz and libhfnetdriver) */ args[j++] = getLibHFNetDriverPath(); args[j++] = getLibHfuzzPath(); + args[j++] = getLibHFNetDriverPath(); /* Pull modules defining the following symbols (if they exist) */ args[j++] = "-Wl,-u,LIBHFNETDRIVER_module_main",
Add test simulating same secret repeat on New Connection ID
@@ -3586,7 +3586,7 @@ int spin_bit_test() * responsive. */ -int client_error_test() +int client_error_test_modal(int mode) { uint64_t simulated_time = 0; uint64_t next_time = 0; @@ -3611,10 +3611,32 @@ int client_error_test() /* Inject an erroneous frame */ if (ret == 0) { + if (mode == 0) { /* Queue a data frame on stream 4, which was already closed */ uint8_t stream_error_frame[] = { 0x17, 0x04, 0x41, 0x01, 0x08, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 }; picoquic_queue_misc_frame(test_ctx->cnx_client, stream_error_frame, sizeof(stream_error_frame)); } + else if (mode == 1 && test_ctx->cnx_server != NULL) { + /* Test injection of a wrong NEW CONNECTION ID */ + uint8_t new_cnxid_error[1024]; + uint8_t* x = new_cnxid_error; + + *x++ = picoquic_frame_type_new_connection_id; + *x++ = test_ctx->cnx_client->nb_paths + 3; + *x++ = 0; + *x++ = 8; + for (int i = 0; i < 8; i++) { + *x++ = 0x99; /* Hommage to Dilbert's random generator */ + } + /* deliberate error: repeat the reset secret defined for path[0] */ + memcpy(x, test_ctx->cnx_server->path[0]->reset_secret, PICOQUIC_RESET_SECRET_SIZE); + x += PICOQUIC_RESET_SECRET_SIZE; + picoquic_queue_misc_frame(test_ctx->cnx_client, new_cnxid_error, x - new_cnxid_error); + } + else { + DBG_PRINTF("Error mode %d is not defined yet", mode); + } + } /* Add a time loop of 3 seconds to give some time for the error to be repeated */ next_time = simulated_time + 3000000; @@ -3676,6 +3698,22 @@ int client_error_test() return ret; } +int client_error_test() +{ + int ret = 0; + char const* modes[] = { "stream", "new_connection_id" }; + size_t nb_modes = sizeof(modes) / sizeof(char const*); + + for (int mode = 0; mode < nb_modes; mode++) { + if (client_error_test_modal(mode) != 0) { + DBG_PRINTF("Client error test mode(%s) failed.\n"); + ret = -1; + } + } + + return ret; +} + /* * Set a connection, then verify that the "new connection id" frames have been exchanged properly. * Use the "check stash" function to verify that new connection ID were properly
OpenCore: Fix load path reporting regression closes acidanthera/bugtracker#1264
@@ -234,9 +234,10 @@ OcBootstrapRerun ( mStoragePath = NULL; } + RemainingPath = LoadPath; gBS->LocateDevicePath ( &gEfiSimpleFileSystemProtocolGuid, - &LoadPath, + &RemainingPath, &mStorageHandle );
[core] http_header_hkey_get() over const array fixed-size power-2 struct keylenvalue http_headers_off[] of offsets into http_headers[] by string length
typedef struct keyvlenvalue { const int key; const unsigned int vlen; - const char * const value; + const char value[24]; } keyvlenvalue; /* Note: must be sorted by length */ /* Note: must be kept in sync with http_header.h enum http_header_e */ -#define CONST_LEN_STR(x) (unsigned int)(sizeof(x)-1), (x) +/* Note: must be kept in sync http_headers[] and http_headers_off[] */ +/* http_headers_off lists first offset at which string of specific len occur */ +int8_t http_headers_off[] = { + -1, -1, -1, -1, 0, 4, 5, 9, 10, 11, 12, -1, 15, 16, 20, 21, 23, 25 +}; +#define CONST_LEN_STR(x) (unsigned int)(sizeof(x)-1), x static const keyvlenvalue http_headers[] = { { HTTP_HEADER_HOST, CONST_LEN_STR("Host") } ,{ HTTP_HEADER_DATE, CONST_LEN_STR("Date") } @@ -44,12 +49,14 @@ static const keyvlenvalue http_headers[] = { ,{ HTTP_HEADER_IF_MODIFIED_SINCE, CONST_LEN_STR("If-Modified-Since") } ,{ HTTP_HEADER_TRANSFER_ENCODING, CONST_LEN_STR("Transfer-Encoding") } ,{ HTTP_HEADER_X_FORWARDED_PROTO, CONST_LEN_STR("X-Forwarded-Proto") } - ,{ HTTP_HEADER_OTHER, 0, NULL } + ,{ HTTP_HEADER_OTHER, 0, "" } }; enum http_header_e http_header_hkey_get(const char *s, size_t slen) { const struct keyvlenvalue * const kv = http_headers; - for (int i = 0; kv[i].vlen && slen >= kv[i].vlen; ++i) { + int i = slen < sizeof(http_headers_off) ? http_headers_off[slen] : -1; + if (i < 0) return HTTP_HEADER_OTHER; + for (; slen == kv[i].vlen; ++i) { if (slen == kv[i].vlen && buffer_eq_icase_ssn(s, kv[i].value, slen)) return (enum http_header_e)kv[i].key;
Ordering of functions
@@ -92,7 +92,7 @@ functions: 0x1404AB2E0: Component::GUI::AtkValue_dtor 0x1404AB920: Component::GUI::AtkValue_ChangeType 0x1404B1160: Component::GUI::AtkEvent_SetEventIsHandled - 0x1404B2490: Component::GUI::AtkCursor_SetCursorType # the cursor's icon i believe + 0x1404B2490: Component::GUI::AtkCursor_SetCursorType # the cursor's icon I believe 0x1404D6590: CreateAtkNode 0x1404D79A0: CreateAtkComponent 0x1404DB190: GetScaleListEntryFromScale
BugID:18710905: Fix memory leak & alcs failure in ALCS caused by management of subdev & sendlist.
@@ -218,7 +218,7 @@ static void _iotx_alcs_adapter_subdev_list_destroy(iotx_alcs_adapter_t *adapter) iotx_alcs_send_msg_t *node = NULL; iotx_alcs_send_msg_t *next = NULL; - list_for_each_entry_safe(node, next, &adapter->alcs_send_list, linked_list, iotx_alcs_send_msg_t) { + list_for_each_entry_safe(node, next, &adapter->alcs_subdev_list, linked_list, iotx_alcs_send_msg_t) { list_del(&node->linked_list); LITE_free(node); } @@ -652,7 +652,7 @@ int iotx_alcs_send(void *handle, iotx_alcs_msg_t *msg) INIT_LIST_HEAD(&alcs_send_msg->linked_list); HAL_MutexLock(adapter->mutex); - list_add_tail(&adapter->alcs_send_list, &alcs_send_msg->linked_list); + list_add_tail(&alcs_send_msg->linked_list, &adapter->alcs_send_list); HAL_MutexUnlock(adapter->mutex); return SUCCESS_RETURN;
transport.c : fixes bounds check if partial packet is read Files : transport.c Issue Notes : 'p->total_num' instead of local value total_num when doing bounds check. Credit : Doublex
@@ -565,7 +565,7 @@ int _libssh2_transport_read(LIBSSH2_SESSION * session) copy them as-is to the target buffer */ if(numbytes > 0) { - if(numbytes <= (int)(total_num - (p->wptr - p->payload))) { + if(numbytes <= (int)(p->total_num - (p->wptr - p->payload))) { memcpy(p->wptr, &p->buf[p->readidx], numbytes); } else {
check EXRAllocAligned succeeded to allocate ScanlineInputFile lineBuffers
@@ -1176,6 +1176,10 @@ void ScanLineInputFile::initialize(const Header& header) for (size_t i = 0; i < _data->lineBuffers.size(); i++) { _data->lineBuffers[i]->buffer = (char *) EXRAllocAligned(_data->lineBufferSize*sizeof(char),16); + if (!_data->lineBuffers[i]->buffer) + { + throw IEX_NAMESPACE::LogicExc("Failed to allocate memory for scanline buffers"); + } } } _data->nextLineBufferMinY = _data->minY - 1;
Show help when no arguments
@@ -2250,6 +2250,12 @@ char *pmkoutname = NULL; eigenpfadname = strdupa(argv[0]); eigenname = basename(eigenpfadname); +if (argc == 1) + { + usage(eigenname); + exit(EXIT_FAILURE); + } + setbuf(stdout, NULL); while ((auswahl = getopt(argc, argv, "o:m:n:p:P:l:L:e:E:f:w:W:u:S:xrishv")) != -1) {
Make TilesetObserver's movable/copyable.
@@ -30,14 +30,26 @@ class TilesetObserver { observe(subject); } - TilesetObserver(TilesetObserver& subject) - : TilesetObserver(subject.tileset_) + TilesetObserver(TilesetObserver&& rhs) + : TilesetObserver(rhs.tileset_) {} - - TilesetObserver(TilesetObserver&&) = delete; - TilesetObserver& operator=(TilesetObserver&&) = delete; - TilesetObserver(const TilesetObserver&) = delete; - TilesetObserver& operator=(const TilesetObserver&) = delete; + TilesetObserver& operator=(TilesetObserver&& rhs) + { + if (this != &rhs) { + observe(rhs.tileset_); + } + return *this; + } + TilesetObserver(const TilesetObserver& rhs) + : TilesetObserver(rhs.tileset_) + {} + TilesetObserver& operator=(const TilesetObserver& rhs) + { + if (this != &rhs) { + observe(rhs.tileset_); + } + return *this; + } virtual ~TilesetObserver() { unobserve(); }
Fixed flickering/z-fighting issue with basemap 3D buildings
@@ -377,7 +377,7 @@ namespace { } vTilePos = (uTileMatrix * vec3(vec2(pos), 1.0)).xy; vColor = color; - vHeight = aVertexAttribs[2]; + vHeight = max(0.0, (aVertexAttribs[1] != 0.0 ? aVertexHeight * uHeightScale * uVertexScale * 20037508.34 : 10.0) * 0.2); gl_Position = uMVPMatrix * vec4(pos, 1.0); } )GLSL"; @@ -396,7 +396,7 @@ namespace { if (min(vTilePos.x, vTilePos.y) < -0.01 || max(vTilePos.x, vTilePos.y) > 1.01) { discard; } - gl_FragColor = vec4(vColor.rgb * (sqrt(vHeight) * 0.75 + 0.25), vColor.a); + gl_FragColor = vec4(vColor.rgb * ((1.0 - exp(-vHeight)) * 0.75 + 0.25), vColor.a); } )GLSL"; } @@ -826,7 +826,8 @@ namespace carto { namespace vt { glDepthMask(GL_TRUE); glDisable(GL_STENCIL_TEST); glStencilMask(0); - glDisable(GL_CULL_FACE); + glEnable(GL_CULL_FACE); + glCullFace(GL_BACK); // 3D polygon pass bool update = renderBlendNodes3D(*_renderBlendNodes); @@ -834,7 +835,6 @@ namespace carto { namespace vt { // Restore GL state glEnable(GL_BLEND); glStencilMask(255); - glEnable(GL_CULL_FACE); return update; }
Remove debug printf statements
@@ -1152,8 +1152,6 @@ TEST_IMPL(GLM_PREFIX, vec3_ortho) { ASSERT(test_eq(a, GLM_PI_2f)) a = glm_vec3_angle(v4, v8); - printf("(%f, %f, %f)\n", v4[0], v4[1], v4[2]); - printf("(%f, %f, %f)\n", v8[0], v8[1], v8[2]); ASSERT(!isinf(a)) ASSERT(!isnan(a)) ASSERT(test_eq(a, GLM_PI_2f))
set FEATURE add data/schema node pointer
@@ -47,8 +47,12 @@ struct ly_set { uint32_t size; /**< allocated size of the set array */ uint32_t count; /**< number of elements in (used size of) the set array */ + union { + struct lyd_node **dnodes; /**< set array of data nodes */ + struct lysc_node **snodes; /**< set array of schema nodes */ void **objs; /**< set array of generic object pointers */ }; +}; /** * @brief Option for ly_set_add() to allow duplicities in the ly_set structure so the
Changelist for 4.4.3RC1
+CARTO Mobile SDK 4.4.3RC1 +------------------- + +### Changes, fixes: + +* Fixed critical coordinate scaling issue in iOS Metal build (occurs only with iPhone 6 Plus, iPhone 7 Plus and iPhone 8 Plus devices) +* Fixed regression in 'GeoJSONVectorTileDataSource' which caused parsing failure with features with non-object properties +* Optimized parsing of complex CartoCSS styles, improving performance by 20-40% for complex styles +* Optimized loading of compiled 'Mapnik' styles by using symbolizer cache, improving performance by up to 50% for complex styles +* Updated internal Valhalla, sqlite, harfbuzz, botan and protobuf libraries to latest stable versions + + CARTO Mobile SDK 4.4.2 -------------------
sds: new flb_sds_len_set() helper
@@ -48,6 +48,11 @@ static inline size_t flb_sds_len(flb_sds_t s) return FLB_SDS_HEADER(s)->len; } +static inline void flb_sds_len_set(flb_sds_t s, size_t len) +{ + FLB_SDS_HEADER(s)->len = len; +} + static inline size_t flb_sds_alloc(flb_sds_t s) { return FLB_SDS_HEADER(s)->alloc;
libbpf-tools: fix an error message A wrong argument (-errno) was passed to strerror, fix it.
@@ -434,7 +434,7 @@ int main(int argc, char **argv) } if (signal(SIGINT, sig_int) == SIG_ERR) { - warn("can't set signal handler: %s\n", strerror(-errno)); + warn("can't set signal handler: %s\n", strerror(errno)); goto cleanup_obj; }
Fix ssl_hmac_new() so that it uses the propq
@@ -3385,7 +3385,7 @@ SSL_HMAC *ssl_hmac_new(const SSL_CTX *ctx) return ret; } #endif - mac = EVP_MAC_fetch(ctx->libctx, "HMAC", NULL); + mac = EVP_MAC_fetch(ctx->libctx, "HMAC", ctx->propq); if (mac == NULL || (ret->ctx = EVP_MAC_CTX_new(mac)) == NULL) goto err; EVP_MAC_free(mac);
fix(discord.h): syntax typo
@@ -1810,7 +1810,7 @@ ORCAcode discord_add_guild_member(struct discord *client, const u64_snowflake_t * @param p_member location where the updated member object is stored if successful */ ORCAcode discord_modify_current_member(struct discord *client, const u64_snowflake_t guild_id, struct discord_modify_current_member_params *params, struct discord_guild_member *p_member); -/** @struct discord_modify_current_member_params +/** @struct discord_modify_current_member_params */ /**@} */ /** @defgroup DiscordModifyCurrentUserNick
output: allow initialization with zero outputs
@@ -537,11 +537,6 @@ int flb_output_init(struct flb_config *config) struct flb_output_instance *ins; struct flb_output_plugin *p; - /* We need at least one output */ - if (mk_list_is_empty(&config->outputs) == 0) { - return -1; - } - /* Retrieve the plugin reference */ mk_list_foreach_safe(head, tmp, &config->outputs) { ins = mk_list_entry(head, struct flb_output_instance, _head);
OcAppleEventLib: Scale click area by UIScale
@@ -596,9 +596,11 @@ InternalHandleButtonInteraction ( if (Pointer->ButtonTicksHold <= mMaximumClickDuration) { HorizontalMovement = ABS(Pointer->MouseDownPosition.Horizontal - mCursorPosition.Horizontal); VerticalMovement = ABS(Pointer->MouseDownPosition.Vertical - mCursorPosition.Vertical); - - if ((HorizontalMovement <= MINIMAL_MOVEMENT) - && (VerticalMovement <= MINIMAL_MOVEMENT)) { + // + // CHANGE: Apple did not scale by UIScale. + // + if ((HorizontalMovement <= mUiScale * MINIMAL_MOVEMENT) + && (VerticalMovement <= mUiScale * MINIMAL_MOVEMENT)) { EventType = APPLE_EVENT_TYPE_MOUSE_CLICK; if ((Pointer->PreviousClickEventType == APPLE_EVENT_TYPE_MOUSE_CLICK) @@ -606,8 +608,8 @@ InternalHandleButtonInteraction ( HorizontalMovement = ABS(Pointer->ClickPosition.Horizontal - mCursorPosition.Horizontal); VerticalMovement = ABS(Pointer->ClickPosition.Vertical - mCursorPosition.Vertical); - if ((HorizontalMovement <= MINIMAL_MOVEMENT) - && (VerticalMovement <= MINIMAL_MOVEMENT)) { + if ((HorizontalMovement <= mUiScale * MINIMAL_MOVEMENT) + && (VerticalMovement <= mUiScale * MINIMAL_MOVEMENT)) { EventType = APPLE_EVENT_TYPE_MOUSE_DOUBLE_CLICK; } }
pico: fix controller position
@@ -310,6 +310,7 @@ static bool pico_getPose(Device device, float* position, float* orientation) { uint32_t index = device - DEVICE_HAND_LEFT; vec3_init(position, state.controllers[index].position); quat_init(orientation, state.controllers[index].orientation); + position[1] += state.offset; return state.controllers[index].active; }
nimble/controller/test; adjust priorities of tasks spawned for native MCU. None should conflict with each other.
@@ -20,4 +20,6 @@ syscfg.vals: BLE_LL_CFG_FEAT_LE_CSA2: 1 # Prevent priority conflict with controller task. - MCU_UART_POLLER_PRIO: 16 + MCU_TIMER_POLLER_PRIO: 1 + MCU_UART_POLLER_PRIO: 2 + NATIVE_SOCKETS_PRIO: 3
gimble: enable PSYS monitoring Enable PSYS function for monitor the total platform power from the adapter and battery BRANCH=none TEST=make -j BOARD=gimble
#define CONFIG_CHARGE_RAMP_SW #define CONFIG_CHARGER_BQ25710_SENSE_RESISTOR 10 #define CONFIG_CHARGER_BQ25710_SENSE_RESISTOR_AC 10 +#define CONFIG_CHARGER_BQ25710_PSYS_SENSING /* PROCHOT defines */ #define BATT_MAX_CONTINUE_DISCHARGE_WATT 45
drivers/telnet: Let psock_poll check the valid of td_psock instead
@@ -1228,20 +1228,9 @@ static int telnet_poll(FAR struct file *filep, FAR struct pollfd *fds, { FAR struct inode *inode = filep->f_inode; FAR struct telnet_dev_s *priv = inode->i_private; - FAR struct socket *psock; DEBUGASSERT(fds != NULL); - /* Get the underlying socket structure and verify that the sockfd - * corresponds to valid, allocated socket - */ - - psock = &priv->td_psock; - if (psock == NULL || psock->s_conn == NULL) - { - return -EBADF; - } - /* Test if we have cached data waiting to be read */ if (priv->td_pending > 0) @@ -1253,7 +1242,7 @@ static int telnet_poll(FAR struct file *filep, FAR struct pollfd *fds, /* Then let psock_poll() do the heavy lifting */ - return psock_poll(psock, fds, setup); + return psock_poll(&priv->td_psock, fds, setup); } /****************************************************************************
Use POWER8 kernels on big-endian POWER9 for now
+ifeq ($(__BYTE_ORDER__),__ORDER_BIG_ENDIAN__) +include $(KERNELDIR)/KERNEL.POWER8 +else + #SGEMM_BETA = ../generic/gemm_beta.c #DGEMM_BETA = ../generic/gemm_beta.c #CGEMM_BETA = ../generic/zgemm_beta.c @@ -206,3 +210,5 @@ QCABS_KERNEL = ../generic/cabs.c #Dump kernel CGEMM3MKERNEL = ../generic/zgemm3mkernel_dump.c ZGEMM3MKERNEL = ../generic/zgemm3mkernel_dump.c + +endif
fix section not found fallback to default
@@ -60,11 +60,10 @@ def iint(text): return int(new_string) -def getsection(line): - for s in ['[General]', '[Colours]', '[Fonts]', '[CatchTheBeat]', '[Mania]']: - if s in line: - return s[1:-1] - return None +def getsection(config: ConfigParser, section): + if config.has_section(section): + return dict(config[section]) + return {} # settings = {} # why not put all sections into it at the end ? @@ -128,9 +127,9 @@ class Skin: lines = self.filter(lines) config.read_string(lines) - self.general = dict(config["General"]) - self.colours = dict(config["Colours"]) - self.fonts = dict(config["Fonts"]) + self.general = getsection(config, "General") + self.colours = getsection(config, "Colours") + self.fonts = getsection(config, "Fonts") logging.log(1, self.general) logging.log(1, self.colours)
ames: check life before decrypt
:: ?. ?=([~ %known *] sndr-state) (enqueue-alien-todo sndr.packet |=(alien-agenda +<)) - :: decrypt packet contents using symmetric-key.channel + :: channel: immutable data about relationship with .sndr.packet :: :: If we know them, we have a $channel with them, which we've :: populated with a .symmetric-key derived from our private key :: =/ =peer-state +.u.sndr-state =/ =channel [[our sndr.packet] now |2.ames-state -.peer-state] - =/ =shut-packet (decrypt symmetric-key.channel content.packet) :: ward against replay attacks :: :: We only accept packets from a ship at their known life, and to :: us at our current life. :: + ~| [[her our-life her-life]:channel [sndr-life rcvr-life]:shut-packet]] ?> =(sndr-life.shut-packet her-life.channel) ?> =(rcvr-life.shut-packet our-life.channel) + :: decrypt packet contents using symmetric-key.channel + :: + =/ =shut-packet (decrypt symmetric-key.channel content.packet) :: non-galaxy: update route with heard lane or forwarded lane :: =? route.peer-state !=(%czar (clan:title her.channel))
pkg/npm: amend ts-error rule
@@ -14,7 +14,14 @@ const rules = { } ], "arrow-spacing": "error", - "ban-ts-comment": "allow-with-description", + "@typescript-eslint/ban-ts-comment": [2, + { + 'ts-expect-error': 'allow-with-description', + 'ts-ignore': 'allow-with-description', + 'ts-nocheck': 'allow-with-description', + 'ts-check': 'allow-with-description', + minimumDescriptionLength: 3, + }], "block-spacing": ["error", "always"], "brace-style": ["error", "1tbs"], "camelcase": [
Change toolchain instruction properly
@@ -5,10 +5,12 @@ CXX=/opt/gcw0-toolchain/usr/bin/mipsel-linux-g++ DEBUG=0 SUPPORT_NET?=1 GIT_VERSION := " $(shell git rev-parse --short HEAD)" -SDL_CONFIG ?= sdl2-config + +#Change to your toolchain location here +SDL_CONFIG ?= /opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl2-config SDL_CFLAGS := $(shell $(SDL_CONFIG) --cflags) -DUSE_SDL_CONFIG -#SDL_LIBS := $(shell $(SDL_CONFIG) --libs) -SDL_LIBS := -lSDL2 +SDL_LIBS := $(shell $(SDL_CONFIG) --libs) +#SDL_LIBS := -lSDL2 TARGET_NAME := np2kai
Don't set CPACK_DEBIAN_PACKAGE_ARCHITECTURE to "any"
@@ -39,7 +39,6 @@ if (PACKAGE_DEB) if (PROJECT_PPA) set(DPUT_HOST ${PROJECT_PPA}) endif() - set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "any") set(CPACK_DEBIAN_RESOURCE_FILE_CHANGELOG ${CMAKE_SOURCE_DIR}/Changelog) set(CPACK_DEBIAN_UPDATE_CHANGELOG ON) endif(PACKAGE_DEB)
hoon: spec doccord parsing, refactor +till +tall
++ wrap |* fel=rule %+ cook - |= [a=whit b=hoon c=whit] - ^- hoon - ~(apply-whit ~(docs-engine ap b) (glom a c)) - :: + |* [a=whit b=* c=whit] + [(glom a c) b] ;~ plug apex:docs fel :: ++ tall :: full tall form %+ knee *hoon - |.(~+((wart (wrap ;~(pose expression:(norm &) long lute apex:(sail &)))))) + |. ~+ + %- wart + %+ cook + |= [a=whit b=hoon] + ?~ boy.a b + [%note help+`u.boy.a b] + (wrap ;~(pose expression:(norm &) long lute apex:(sail &))) ++ till :: mold tall form %+ knee *spec - |.(~+((wert ;~(pose structure:(norm &) scad)))) + |. ~+ + %- wert + %+ cook + |= [a=whit b=spec] + ?~ boy.a b + [%dict `u.boy.a b] + (wrap ;~(pose structure:(norm &) scad)) ++ wede :: wide bulb :: XX: lus deprecated ::
sx12xx: no pull on dio0
@@ -18,9 +18,9 @@ void sx12xx_init() { LL_GPIO_InitTypeDef gpio_init; gpio_init.Mode = LL_GPIO_MODE_INPUT; - gpio_init.Speed = LL_GPIO_SPEED_FREQ_HIGH; + gpio_init.Speed = LL_GPIO_SPEED_FREQ_VERY_HIGH; gpio_init.OutputType = LL_GPIO_OUTPUT_OPENDRAIN; - gpio_init.Pull = LL_GPIO_PULL_DOWN; + gpio_init.Pull = LL_GPIO_PULL_NO; gpio_pin_init(&gpio_init, SX12XX_DIO0_PIN); LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_SYSCFG); @@ -48,7 +48,7 @@ void sx12xx_init() { SPI_InitStructure.ClockPolarity = LL_SPI_POLARITY_LOW; SPI_InitStructure.ClockPhase = LL_SPI_PHASE_1EDGE; SPI_InitStructure.NSS = LL_SPI_NSS_SOFT; - SPI_InitStructure.BaudRate = LL_SPI_BAUDRATEPRESCALER_DIV32; + SPI_InitStructure.BaudRate = LL_SPI_BAUDRATEPRESCALER_DIV8; SPI_InitStructure.BitOrder = LL_SPI_MSB_FIRST; SPI_InitStructure.CRCCalculation = LL_SPI_CRCCALCULATION_DISABLE; SPI_InitStructure.CRCPoly = 7;
CPP Template: Add tag `experimental` to `status`
- infos/provides = storage/info - infos/recommends = - infos/placements = getstorage -- infos/status = maintained unittest nodep nodoc concept +- infos/status = experimental maintained unittest nodep nodoc concept - infos/metadata = - infos/description = A template for C++ based plugins
SOVERSION bump to version 3.1.5
@@ -67,7 +67,7 @@ set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION # with backward compatible change and micro version is connected with any internal change of the library. set(LIBNETCONF2_MAJOR_SOVERSION 3) set(LIBNETCONF2_MINOR_SOVERSION 1) -set(LIBNETCONF2_MICRO_SOVERSION 4) +set(LIBNETCONF2_MICRO_SOVERSION 5) set(LIBNETCONF2_SOVERSION_FULL ${LIBNETCONF2_MAJOR_SOVERSION}.${LIBNETCONF2_MINOR_SOVERSION}.${LIBNETCONF2_MICRO_SOVERSION}) set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_SOVERSION})
extmod/Matrix: add Transpose
@@ -280,7 +280,7 @@ typedef struct _robotics_Matrix_obj_t { float_t *data; size_t m; size_t n; - bool is_transposed; + bool transposed; } robotics_Matrix_obj_t; @@ -327,10 +327,13 @@ STATIC mp_obj_t robotics_Matrix_make_new(const mp_obj_type_t *type, size_t n_arg self->data[r * self->n + c] = mp_obj_get_float_to_f(scalar_objs[c]); } } + self->transposed = false; return MP_OBJ_FROM_PTR(self); } +const mp_obj_type_t robotics_Matrix_type; + // pybricks.robotics.Matrix.__repr__ void robotics_Matrix_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { @@ -340,7 +343,7 @@ void robotics_Matrix_print(const mp_print_t *print, mp_obj_t self_in, mp_print_k for (size_t r = 0; r < self->m; r++) { mp_printf(print, r == 0 ? "[[" : " ["); for (size_t c = 0; c < self->n; c++) { - size_t idx = self->is_transposed ? c * self->m + r : r * self->n + c; + size_t idx = self->transposed ? c * self->m + r : r * self->n + c; mp_printf(print, "%f", (double_t)self->data[idx]); if (c < self->n - 1) { mp_printf(print, ", "); @@ -356,9 +359,16 @@ void robotics_Matrix_print(const mp_print_t *print, mp_obj_t self_in, mp_print_k STATIC mp_obj_t robotics_Matrix_T(mp_obj_t self_in) { robotics_Matrix_obj_t *self = MP_OBJ_TO_PTR(self_in); - (void)self; + robotics_Matrix_obj_t *copy = m_new_obj(robotics_Matrix_obj_t); + copy->base.type = &robotics_Matrix_type; - return mp_const_none; + // Point to the same data instead of copying + copy->data = self->data; + copy->n = self->m; + copy->m = self->n; + copy->transposed = !self->transposed; + + return MP_OBJ_FROM_PTR(copy); } STATIC MP_DEFINE_CONST_FUN_OBJ_1(robotics_Matrix_T_obj, robotics_Matrix_T); @@ -370,7 +380,7 @@ STATIC const mp_rom_map_elem_t robotics_Matrix_locals_dict_table[] = { STATIC MP_DEFINE_CONST_DICT(robotics_Matrix_locals_dict, robotics_Matrix_locals_dict_table); // type(pybricks.robotics.Matrix) -STATIC const mp_obj_type_t robotics_Matrix_type = { +const mp_obj_type_t robotics_Matrix_type = { { &mp_type_type }, .name = MP_QSTR_Matrix, .print = robotics_Matrix_print,
User Specified ALPN for QuicReach
@@ -24,6 +24,7 @@ std::vector<const char*> ALPNs( { "h3-27", "h3-28", "h3-29", "hq-27", "hq-28", "hq-29", "smb" }); +const char* InputAlpn = nullptr; const QUIC_API_TABLE* MsQuic; HQUIC Registration; @@ -121,13 +122,14 @@ main(int argc, char **argv) !strcmp(argv[1], "/?") || !strcmp(argv[1], "help") )) { - printf("Usage: quicreach.exe [-server:<name>] [-ip:<ip>] [-port:<number>]\n"); + printf("Usage: quicreach.exe [-server:<name>] [-ip:<ip>] [-port:<number>] [-alpn:<alpn>]\n"); exit(1); } TryGetValue(argc, argv, "server", &ServerName); TryGetValue(argc, argv, "ip", &ServerIp); TryGetValue(argc, argv, "port", &Port); + TryGetValue(argc, argv, "alpn", &InputAlpn); QuicPlatformSystemLoad(); QuicPlatformInitialize(); @@ -175,6 +177,15 @@ main(int argc, char **argv) std::vector<QUIC_THREAD> Threads; QUIC_THREAD_CONFIG Config = { 0, 0, "reach_worker", TestReachability, nullptr }; + if (InputAlpn != nullptr) { + Config.Context = (void*)InputAlpn; + QUIC_THREAD Thread; + if (QUIC_FAILED(QuicThreadCreate(&Config, &Thread))) { + printf("QuicThreadCreate failed.\n"); + exit(1); + } + Threads.push_back(Thread); + } else { for (auto ALPN : ALPNs) { Config.Context = (void*)ALPN; QUIC_THREAD Thread; @@ -184,6 +195,7 @@ main(int argc, char **argv) } Threads.push_back(Thread); } + } for (auto Thread : Threads) { QuicThreadWait(&Thread);
schema compile BUGFIX invalid memory access Fixes
@@ -2330,7 +2330,7 @@ lys_precompile_augments_deviations_revert(struct ly_ctx *ctx, const struct lys_m if (m->augmented_by[u] == mod) { /* keep the order */ if (u < count - 1) { - memmove(m->augmented_by + u, m->augmented_by + u + 1, (count - u) * sizeof *m->augmented_by); + memmove(m->augmented_by + u, m->augmented_by + u + 1, (count - u - 1) * sizeof *m->augmented_by); } LY_ARRAY_DECREMENT(m->augmented_by); break; @@ -2348,7 +2348,7 @@ lys_precompile_augments_deviations_revert(struct ly_ctx *ctx, const struct lys_m if (m->deviated_by[u] == mod) { /* keep the order */ if (u < count - 1) { - memmove(m->deviated_by + u, m->deviated_by + u + 1, (count - u) * sizeof *m->deviated_by); + memmove(m->deviated_by + u, m->deviated_by + u + 1, (count - u - 1) * sizeof *m->deviated_by); } LY_ARRAY_DECREMENT(m->deviated_by); break;
Fix enable-weak-ssl-ciphers Commit broke the enable-weak-ssl-ciphers option. The stitched rc4-hmac-md5 cipher implementation did not recognise the tls_version parameter, and therefore was being incorrectly handled. Fixes
@@ -169,6 +169,14 @@ static int rc4_hmac_md5_set_ctx_params(void *vctx, const OSSL_PARAM params[]) } GET_HW(ctx)->init_mackey(&ctx->base, p->data, p->data_size); } + p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_TLS_VERSION); + if (p != NULL) { + if (!OSSL_PARAM_get_uint(p, &ctx->base.tlsversion)) { + ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_GET_PARAMETER); + return 0; + } + } + return 1; }
Cirrus: Wrap overlong command
@@ -196,7 +196,8 @@ linux_task: clone_script: | if [ -z "$CIRRUS_PR" ]; then - git clone --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR + git clone --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git \ + $CIRRUS_WORKING_DIR git reset --hard $CIRRUS_CHANGE_IN_REPO else git clone https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
Adding pointer validation assertions to PWM API level.
int pwm_configure_device(struct pwm_dev *dev, struct pwm_dev_cfg *cfg) { + assert(dev); assert(dev->pwm_funcs.pwm_configure_device != NULL); return (dev->pwm_funcs.pwm_configure_device(dev, cfg)); @@ -54,6 +55,7 @@ pwm_configure_channel(struct pwm_dev *dev, uint8_t cnum, struct pwm_chan_cfg *cfg) { + assert(dev); assert(dev->pwm_funcs.pwm_configure_channel != NULL); if (cnum >= dev->pwm_chan_count) { return (EINVAL); @@ -78,6 +80,7 @@ pwm_configure_channel(struct pwm_dev *dev, int pwm_set_duty_cycle(struct pwm_dev *dev, uint8_t cnum, uint16_t fraction) { + assert(dev); assert(dev->pwm_funcs.pwm_set_duty_cycle != NULL); if (cnum >= dev->pwm_chan_count) { return (EINVAL); @@ -97,6 +100,7 @@ pwm_set_duty_cycle(struct pwm_dev *dev, uint8_t cnum, uint16_t fraction) int pwm_enable(struct pwm_dev *dev) { + assert(dev); assert(dev->pwm_funcs.pwm_enable != NULL); return (dev->pwm_funcs.pwm_enable(dev)); @@ -112,6 +116,7 @@ pwm_enable(struct pwm_dev *dev) bool pwm_is_enabled(struct pwm_dev *dev) { + assert(dev); assert(dev->pwm_funcs.pwm_is_enabled != NULL); return (dev->pwm_funcs.pwm_is_enabled(dev)); @@ -130,6 +135,7 @@ pwm_is_enabled(struct pwm_dev *dev) int pwm_set_frequency(struct pwm_dev *dev, uint32_t freq_hz) { + assert(dev); assert(dev->pwm_funcs.pwm_set_frequency != NULL); return (dev->pwm_funcs.pwm_set_frequency(dev, freq_hz)); @@ -145,6 +151,7 @@ pwm_set_frequency(struct pwm_dev *dev, uint32_t freq_hz) int pwm_get_clock_freq(struct pwm_dev *dev) { + assert(dev); assert(dev->pwm_funcs.pwm_get_clock_freq != NULL); return (dev->pwm_funcs.pwm_get_clock_freq(dev)); @@ -161,6 +168,7 @@ pwm_get_clock_freq(struct pwm_dev *dev) int pwm_get_top_value(struct pwm_dev *dev) { + assert(dev); assert(dev->pwm_funcs.pwm_get_top_value != NULL); return (dev->pwm_funcs.pwm_get_top_value(dev)); @@ -176,6 +184,7 @@ pwm_get_top_value(struct pwm_dev *dev) int pwm_get_resolution_bits(struct pwm_dev *dev) { + assert(dev); assert(dev->pwm_funcs.pwm_get_resolution_bits != NULL); return (dev->pwm_funcs.pwm_get_resolution_bits(dev)); @@ -191,6 +200,7 @@ pwm_get_resolution_bits(struct pwm_dev *dev) int pwm_disable(struct pwm_dev *dev) { + assert(dev); assert(dev->pwm_funcs.pwm_disable != NULL); return (dev->pwm_funcs.pwm_disable(dev));
a bit more explanation of site, here, up
@@ -65,6 +65,11 @@ Thus, the order of the parameters being set will first start with the ``DefaultE new DefaultExampleConfig ) +The ``site``, ``here``, and ``up`` objects in ``WithMyMoreComplexAcceleratorConfig`` are maps from configuration keys to their definitions. +The ``site`` map gives you the definitions as seen from the root of the configuration hierarchy (in this example, ``SomeAdditiveConfig``). +The ``here`` map gives the definitions as seen at the current level of the hierarchy (i.e. in ``WithMyMoreComplexAcceleratorConfig`` itself). +The ``up`` map gives the definitions as seen from the next level up from the current (i.e. from ``WithMyAcceleratorParams``). + Cake Pattern -------------------------
Update janet.h for janet_thread_current
@@ -1875,6 +1875,7 @@ extern JANET_API const JanetAbstractType janet_thread_type; JANET_API int janet_thread_receive(Janet *msg_out, double timeout); JANET_API int janet_thread_send(JanetThread *thread, Janet msg, double timeout); +JANET_API JanetThread *janet_thread_current(void); #endif
overlay: annotate render_benchmark() as static Function is used solely within the compilation unit.
@@ -426,7 +426,7 @@ void render_mpris_metadata(struct overlay_params& params, mutexed_metadata& meta } #endif -void render_benchmark(swapchain_stats& data, struct overlay_params& params, ImVec2& window_size, unsigned height, Clock::time_point now){ +static void render_benchmark(swapchain_stats& data, struct overlay_params& params, const ImVec2& window_size, unsigned height, Clock::time_point now){ // TODO, FIX LOG_DURATION FOR BENCHMARK int benchHeight = (2 + benchmark.percentile_data.size()) * real_font_size.x + 10.0f + 58; ImGui::SetNextWindowSize(ImVec2(window_size.x, benchHeight), ImGuiCond_Always);
Explicitly cache the X509v3_extensions in one more place in libssl Make sure we cache the extensions for a cert using the right libctx.
@@ -1055,9 +1055,15 @@ static int ssl_set_cert_and_key(SSL *ssl, SSL_CTX *ctx, X509 *x509, EVP_PKEY *pr int j; int rv; CERT *c = ssl != NULL ? ssl->cert : ctx->cert; + SSL_CTX *actualctx = ssl == NULL ? ctx : ssl->ctx; STACK_OF(X509) *dup_chain = NULL; EVP_PKEY *pubkey = NULL; + if (!X509v3_cache_extensions(x509, actualctx->libctx, actualctx->propq)) { + SSLerr(0, ERR_R_X509_LIB); + goto out; + } + /* Do all security checks before anything else */ rv = ssl_security_cert(ssl, ctx, x509, 0, 1); if (rv != 1) {
hake: x86_64: remove verbose flag for linker
@@ -51,7 +51,6 @@ cDefines = ArchDefaults.cDefines options ourLdFlags = [ Str "-Wl,-z,max-page-size=0x1000", Str "-Wl,--build-id=none", - Str "-Wl,--verbose", Str "-static", Str "-m64" ]
refactor(sticky keys): use pointer to avoid repetition in store_sticky_key
@@ -53,21 +53,21 @@ static struct active_sticky_key *store_sticky_key(uint32_t position, uint32_t pa uint32_t param2, const struct behavior_sticky_key_config *config) { for (int i = 0; i < ZMK_BHV_STICKY_KEY_MAX_HELD; i++) { - if (active_sticky_keys[i].position != ZMK_BHV_STICKY_KEY_POSITION_NOT_USED || - if (active_sticky_keys[i].position != ZMK_BHV_STICKY_KEY_POSITION_FREE || - active_sticky_keys[i].timer_cancelled) { + struct active_sticky_key *const sticky_key = &active_sticky_keys[i]; + if (sticky_key->position != ZMK_BHV_STICKY_KEY_POSITION_FREE || + sticky_key->timer_cancelled) { continue; } - active_sticky_keys[i].position = position; - active_sticky_keys[i].param1 = param1; - active_sticky_keys[i].param2 = param2; - active_sticky_keys[i].config = config; - active_sticky_keys[i].release_at = 0; - active_sticky_keys[i].timer_cancelled = false; - active_sticky_keys[i].timer_started = false; - active_sticky_keys[i].modified_key_usage_page = 0; - active_sticky_keys[i].modified_key_keycode = 0; - return &active_sticky_keys[i]; + sticky_key->position = position; + sticky_key->param1 = param1; + sticky_key->param2 = param2; + sticky_key->config = config; + sticky_key->release_at = 0; + sticky_key->timer_cancelled = false; + sticky_key->timer_started = false; + sticky_key->modified_key_usage_page = 0; + sticky_key->modified_key_keycode = 0; + return sticky_key; } return NULL; }
Update: concept_net_narsese.py: typo fix
@@ -163,9 +163,9 @@ while True: elif line.startswith("*queryOnQuestions=false"): queryOnQuestions = False elif line.startswith("*querySpecificQuestion=true"): - queryOnlyQuestion = True + querySpecificQuestion = True elif line.startswith("*querySpecificQuestion=false"): - queryOnlyQuestion = False + querySpecificQuestion = False elif line.startswith("*maxConceptNetQueries="): maxAmount = int(line.strip().split("*maxConceptNetQueries=")[1]) continue
implemented upsert in linear_hash_update
@@ -529,8 +529,9 @@ linear_hash_update( } if (status.count == 0) { - printf("Record not found\n"); + printf("Record not found, performing upsert\n"); status.error = err_item_not_found; + return linear_hash_insert(key, value, insert_hash_to_bucket(key, linear_hash), linear_hash); } else { status.error = err_ok;
CHANGES: mention blinding reverting in ECDSA. [skip ci]
Changes between 1.1.0h and 1.1.1 [xx XXX xxxx] + *) Revert blinding in ECDSA sign and instead make problematic addition + length-invariant. Switch even to fixed-length Montgomery multiplication. + [Andy Polyakov] + *) Use the new ec_scalar_mul_ladder scaffold to implement a specialized ladder step for binary curves. The new implementation is based on formulas from differential addition-and-doubling in mixed Lopez-Dahab projective
Reduce scriptracker.js buffer to 2048 (left over buffer from last play?) 1024 is less noticable, but may stutter on low end computers, no idea where it's coming from, better than 4096
@@ -51,7 +51,7 @@ var ScripTracker = function() { this.audioContext = null; // AudioContext for output. this.audioSource = null; // Source object for audio. this.audioScriptNode = null; // Audio processing object. - this.bufferSize = 4096; // Size of the audio buffer. + this.bufferSize = 2048; // Size of the audio buffer. this.eventHandlers = { SONG_LOADED: [],
generalized buffer for PSBT
?: =("ypub" prefix) %bip49 ?: =("zpub" prefix) %bip84 ~|("invalid xpub: {<xpub>}" !!) +:: +flip-byts: flip endianness while preserving lead/trail zeroes +:: +++ flip-byts + |= b=btc-byts + %- to-byts:buffer + %- flop + %- from-byts:buffer b :: big endian sha256: input and output are both MSB first (big endian) :: ++ sha256 :: ++ psbt |% +:: ++ parse +:: |= psbt=cord + :: +txid: extract txid from a valid PSBT ++ get-txid |= psbt=cord ^- txid - ~| "Invalid PSBT" - =+ p=(de:base64 psbt) - ?~ p !! - =/ bigend=@ux (swp 3 q.u.p) =/ tx=btc-byts %- raw-tx %+ slag 5 - (from-byts:buffer [(met 3 bigend) bigend]) - :: use buffer for leading/trailing 0s safety - :: + (to-buffer psbt) =/ hash=btc-byts - %- to-byts:buffer - %- flop - %- from-byts:buffer + %- flip-byts %- sha256 %- sha256 tx (to-byts:buffer v) (slag len b) == + ++ to-buffer + |= psbt=cord + ^- ^buffer + ~| "Invalid PSBT" + =+ p=(de:base64 psbt) + ?~ p !! + =/ bigend=@ux (swp 3 q.u.p) + (from-byts:buffer [(met 3 bigend) bigend]) -- :: list of @ux that is big endian for hashing purposes :: used to preserve 0s when concatenating byte sequences
Adjust compiler options for nvidia hpc 21.9 (and fix a long-standing typo in dynamic_arch settings)
@@ -104,7 +104,7 @@ GETARCH_FLAGS += -DUSER_TARGET ifeq ($(TARGET), GENERIC) ifeq ($(DYNAMIC_ARCH), 1) override NO_EXPRECISION=1 -export NO_EXPRECiSION +export NO_EXPRECISION endif endif endif @@ -905,10 +905,21 @@ PGCMINORVERSIONGE11 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0- PGCVERSIONCHECK := $(PGCVERSIONGT20)$(PGCVERSIONEQ20)$(PGCMINORVERSIONGE11) ifeq ($(PGCVERSIONCHECK), $(filter $(PGCVERSIONCHECK), 110 111 011)) NEWPGI := 1 +PGCVERSIONGT21 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0-9.]//g" |cut -d "." -f 1` \> 21) +PGCVERSIONGTEQ21 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0-9.]//g" |cut -d "." -f 1` \>= 21) +PGCMINORVERSIONGE9 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0-9.]//g" |cut -c 4-5` ==9) +PGCVERSIONCHECK2 := $(PGCVERSIONGT21)$(PGCVERSIONEQ21)$(PGCMINORVERSIONGE9) +ifeq ($(PGCVERSIONCHECK2), $(filter $(PGCVERSIONCHECK2), 110 111 011)) +NEWPGI2 := 1 +endif endif ifdef BINARY64 ifeq ($(ARCH), x86_64) +ifneq ($(NEWPGI2),1) CCOMMON_OPT += -tp p7-64 +else +CCOMMON_OPT += -tp px +endif ifneq ($(NEWPGI),1) CCOMMON_OPT += -D__MMX__ -Mnollvm endif @@ -923,7 +934,11 @@ endif endif endif else +ifneq ($(NEWPGI2),1) CCOMMON_OPT += -tp p7 +else +CCOMMON_OPT += -tp px +endif endif endif
HV: misra cleanup for platform acpi info fix misra integral type violations; change struct initilization style to make code more readable; Acked-by: Eddie Dong
#include <hypervisor.h> const struct acpi_info host_acpi_info = { - 6, /* x86 family: 6 */ - 0x5C, /* x86 model: 0x5C, ApolloLake */ - { - {SPACE_SYSTEM_IO, 32, 0, 3, 0x400}, /* PM1a EVT */ - {SPACE_SYSTEM_IO, 0, 0, 0, 0}, /* PM1b EVT */ - {SPACE_SYSTEM_IO, 16, 0, 2, 0x404}, /* PM1a CNT */ - {SPACE_SYSTEM_IO, 0, 0, 0, 0}, /* PM1b CNT */ - {0x05, 0, 0}, /* _S3 Package */ - {0x07, 0, 0}, /* _S5 Package */ - (uint32_t *)0x7A86BC9C, /* Wake Vector 32 */ - (uint64_t *)0x7A86BCA8 /* Wake Vector 64 */ + .x86_family = 6U, + .x86_model = 0x5CU, /* ApolloLake */ + .pm_s_state = { + .pm1a_evt = { + .space_id = SPACE_SYSTEM_IO, + .bit_width = 0x20U, + .bit_offset = 0U, + .access_size = 3U, + .address = 0x400UL + }, + .pm1b_evt = { + .space_id = SPACE_SYSTEM_IO, + .bit_width = 0U, + .bit_offset = 0U, + .access_size = 0U, + .address = 0UL + }, + .pm1a_cnt = { + .space_id = SPACE_SYSTEM_IO, + .bit_width = 0x10U, + .bit_offset = 0U, + .access_size = 2U, + .address = 0x404UL + }, + .pm1b_cnt = { + .space_id = SPACE_SYSTEM_IO, + .bit_width = 0U, + .bit_offset = 0U, + .access_size = 0U, + .address = 0UL + }, + .s3_pkg = { + .val_pm1a = 0x05U, + .val_pm1b = 0U, + .reserved = 0U + }, + .s5_pkg = { + .val_pm1a = 0x07U, + .val_pm1b = 0U, + .reserved = 0U + }, + .wake_vector_32 = (uint32_t *)0x7A86BC9CUL, + .wake_vector_64 = (uint64_t *)0x7A86BCA8UL } };
Add Community Update
@@ -9,7 +9,7 @@ author_title: Premake Admin & Developer I can't believe we're already eight months into 2021, how did this happen. -### **Branch, don't backport** +### Branch, don't backport In the last update, I asked for input on where the work going into [premake-next](https://github.com/starkos/premake-next) should end up: branch a new 6.x major version, or backport the changes to 5.x? There was [solid consensus](https://github.com/premake/premake-core/discussions/1616) that premake-next should be treated as a new major version, with v5 upgraded to a stable release for on-going support. Thanks to everyone who participated and offered feedback!
Fix misplaced parentheses from PR#156
@@ -758,8 +758,8 @@ go_cmd(SSL* ssl, int fd, int quiet, int argc, char* argv[]) strcmp(argv[0], "local_zones_remove") == 0 || strcmp(argv[0], "local_datas") == 0 || strcmp(argv[0], "view_local_datas") == 0 || - strcmp(argv[0], "local_datas_remove") == 0) || - strcmp(argv[0], "view_local_datas_remove") == 0) { + strcmp(argv[0], "local_datas_remove") == 0 || + strcmp(argv[0], "view_local_datas_remove") == 0)) { send_file(ssl, fd, stdin, buf, sizeof(buf)); send_eof(ssl, fd); }
add direction logging
@@ -314,6 +314,11 @@ void DeRestPluginPrivate::handleTuyaClusterIndication(const deCONZ::ApsDataIndic lightNode->setValue(RStateOn, on); } break; + case 0x0405: // rotation direction + { + DBG_Printf(DBG_INFO, "Tuya debug 3 : Covering motor direction %ld\n", data); + } + break; //other default:
don't send luos messages if network is down
@@ -163,6 +163,14 @@ error_return_t Robus_SendMsg(ll_service_t *ll_service, msg_t *msg) uint8_t ack = 0; uint16_t data_size = 0; uint16_t crc_val = 0xFFFF; + + // *************************************************** + // don't send luos messages if network is down + if ((msg->header.cmd >= LUOS_LAST_RESERVED_CMD) && (Robus_IsNodeDetected() != NETWORK_LINK_UP)) + { + return FAILED; + } + // ********** Prepare the message ******************** // Set protocol revision and source ID on the message msg->header.protocol = PROTOCOL_REVISION;
update tooltip change tooltip for sensor
@@ -294,6 +294,7 @@ Blockly.Blocks.RTC_get_time = { // this.appendDummyInput("").setAlign(Blockly.ALIGN_RIGHT).appendField(new Blockly.FieldDropdown(RTC_TIME_TYPE), "TIME_TYPE"); this.setInputsInline(true); this.setOutput(true, Number); + this.setTooltip(Blockly.MIXLY_ESP32_RTC_GET_TIME_TOOLTIP); // var thisBlock = this; // this.setTooltip(function() { // var mode = thisBlock.getFieldValue('TIME_TYPE'); @@ -592,16 +593,14 @@ Blockly.Blocks['sensor_sht'] = { ]), "key"); this.setOutput(true, Number); this.setInputsInline(true); - this.setInputsInline(true); var thisBlock = this; this.setTooltip(function() { var mode = thisBlock.getFieldValue('key'); - var mode0 = Blockly.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP; var TOOLTIPS = { - "get_SHT_temperature()":Blockly.MIXLY_GETTEMPERATUE, - "get_SHT_pressure()":Blockly.MIXLY_GETHUMIDITY, + "get_SHT_temperature()":Blockly.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP, + "get_SHT_relative_humidity()":Blockly.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP, }; - return mode0 +TOOLTIPS[mode] + return TOOLTIPS[mode] }); } };
Partial %143-ization of deco.
:- %say |= * =< [%noun (say-hello %world)] -=> :> # - :> # %arch - :> # +=> :> # %arch + :> :> structures for our imaginary hello, world generator. :> :> nothing forces us to put structures in a separate core. :> in a separate chapter (separated by {+|}). |% :> # %model + :> :> models (molds) are functions that normalize nouns. :> :> arms producing molds are introduced with {+=}. for molds, :> we decorate the mold rather than the arm. the compiler :> will copy the mold decoration onto the arm. +| - += spot {p/@ q/@} :< a coordinate + += spot [p=@ q=@] :< a coordinate += tops :> also a coordinate - {p/@ q/@} + [p=@ q=@] += goof :> a simple tuple - $: foo/@ :< something mysterious - bar/@ :< go here for drink - moo/(binary-tree juice) :< cows do this + $: foo=@ :< something mysterious + bar=@ :< go here for drink + moo=(binary-tree juice) :< cows do this == += juice :> fruity beverage - $% {$plum p/@} :< fresh prune - {$pear p/@ q/@} :< good for cider - {$acai p/@} :< aztec superfood + $% [%plum p=@] :< fresh prune + [%pear p=@ q=@] :< good for cider + [%acai p=@] :< aztec superfood == :> # :> # %pattern :> or "higher-kinded types". +| ++ binary-tree :< tree pattern - |* a/$-(* *) - $@($~ {n/a l/(binary-tree a) r/(binary-tree a)}) + |* a=$-(* *) + $@($~ [n=a l=(binary-tree a) r=(binary-tree a)]) :> # :> # %constant :> # ++ answer :< answer to everything 42 -- +:> # :> # %work -:> +:> # :> engines for our imaginary hello, world app. :> :> note that ++say-goodbye is the correct notation, even though :> |= :> txt: friend to say hi to :> - txt/term + txt=term ^- tape "hello, {(rip 3 txt)}" :> ++say-goodbye: say a really proper goodbye :> |= :> txt: departing friend :> num: number of friends - $: txt/term - num/@ + $: txt=term + num=@ == ^- tape :> foo: four "goodbye and {(scot %ud moo)}, {(rip 3 txt)}" :> :> ++say-minimum ++ say-minimum :> minimal decoration - |= txt/term + |= txt=term "nothing to say to {(rip 3 txt)}" --
Docs - clarify that gptransfer source_user needs superuser privileges
source database system. The <codeph>gpfdists</codeph> protocol is not supported.</li> <li id="pk138472">Writable external tables on the source database system and - readable external tables on the destination database system.</li> + readable external tables on the destination database system. Note that + <codeph>gptransfer</codeph> creates external tables with the + <codeph>execute</codeph> protocol, so the <codeph>--source_user</codeph> + account must have superuser privileges (the default is + <codeph>gpadmin</codeph>). </li> <li id="pk138473">Named pipes that transfer the data between a writable external table and a readable external table.</li> </ul> @@ -655,7 +659,11 @@ sdw4,192.0.2.4</codeblock> <plentry> <pt>--source-user=<varname>source_user</varname></pt> <pd>User ID that is used to connect to the source Greenplum Database system. If - not specified, the default is the user gpadmin.</pd> + not specified, the default is the user + gpadmin.<note><codeph>gptransfer</codeph> creates external tables + with the <codeph>execute</codeph> protocol, so the + <codeph>--source_user</codeph> that you specify must have superuser + privileges.</note></pd> </plentry> <plentry> <pt>--sub-batch-size=<varname>sub_batch_size</varname></pt>
restriction: added metadata to METADATA.ini
@@ -932,6 +932,12 @@ usedby/plugin= reference type= string description= Globbing pattern used to restrict valid references +[check/reference/restrict/#] +status= implemented +usedby/plugin= reference +type= string +description= Same as `check/reference/restrict` but in array notation for multiple restrictions + [trigger/warnings] usedby/plugin= error type= long
Use more standard label name
@@ -2397,13 +2397,13 @@ psa_status_t psa_mac_sign_finish( psa_mac_operation_t *operation, if( operation->id == 0 ) { status = PSA_ERROR_BAD_STATE; - goto cleanup; + goto exit; } if( ! operation->is_sign ) { status = PSA_ERROR_BAD_STATE; - goto cleanup; + goto exit; } /* Sanity check. This will guarantee that mac_size != 0 (and so mac != NULL) @@ -2411,20 +2411,20 @@ psa_status_t psa_mac_sign_finish( psa_mac_operation_t *operation, if( operation->mac_size == 0 ) { status = PSA_ERROR_BAD_STATE; - goto cleanup; + goto exit; } if( mac_size < operation->mac_size ) { status = PSA_ERROR_BUFFER_TOO_SMALL; - goto cleanup; + goto exit; } status = psa_driver_wrapper_mac_sign_finish( operation, mac, operation->mac_size, mac_length ); -cleanup: +exit: /* In case of success, set the potential excess room in the output buffer * to an invalid value, to avoid potentially leaking a longer MAC. * In case of error, set the output length and content to a safe default, @@ -2456,25 +2456,25 @@ psa_status_t psa_mac_verify_finish( psa_mac_operation_t *operation, if( operation->id == 0 ) { status = PSA_ERROR_BAD_STATE; - goto cleanup; + goto exit; } if( operation->is_sign ) { status = PSA_ERROR_BAD_STATE; - goto cleanup; + goto exit; } if( operation->mac_size != mac_length ) { status = PSA_ERROR_INVALID_SIGNATURE; - goto cleanup; + goto exit; } status = psa_driver_wrapper_mac_verify_finish( operation, mac, mac_length ); -cleanup: +exit: abort_status = psa_mac_abort( operation ); return( status == PSA_SUCCESS ? abort_status : status );
IPv6 local-address for P2P ethernet interfaces
@@ -3413,7 +3413,8 @@ enable_ip6_interface (vlib_main_t * vm, u32 sw_if_index) (&link_local_address, eth_if0->address); sw_if0 = vnet_get_sw_interface (vnm, sw_if_index); - if (sw_if0->type == VNET_SW_INTERFACE_TYPE_SUB) + if (sw_if0->type == VNET_SW_INTERFACE_TYPE_SUB || + sw_if0->type == VNET_SW_INTERFACE_TYPE_P2P) { /* make up an interface id */ md5_context_t m;
Update z80_ctrl.c better to actually use a real wait method ;)
@@ -380,7 +380,7 @@ void Z80_loadDriver(const u16 driver, const u16 waitReady) // just wait for it while(!Z80_isDriverReady()) - while(Z80_isBusTaken()); + waitMs(1); break; // others drivers
stats: Remove unsolicited clib_warning It is annoying to see unsolicited message like this spew out to the console which an end-user cares less about. vlib_stats_rename_symlink:301: RENAME new name: /nodes/unix-cli-local:52/clocks Type: fix Fixes:
@@ -298,7 +298,7 @@ vlib_stats_rename_symlink (void *oldheap, u64 index, u8 *new_name) { stat_segment_main_t *sm = &stat_segment_main; stat_segment_directory_entry_t *e; - clib_warning ("RENAME new name: %s", new_name); + ASSERT (clib_mem_get_heap () == sm->heap); ASSERT (index < vec_len (sm->directory_vector)); if (index > vec_len (sm->directory_vector))
Improve sending of ABORT in response to INIT-ACK
@@ -430,7 +430,12 @@ sctp_process_init_ack(struct mbuf *m, int iphlen, int offset, &nat_friendly, &cookie_found); if (abort_flag) { /* Send an abort and notify peer */ - sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, false, SCTP_SO_NOT_LOCKED); + sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, + src, dst, sh, op_err, +#if defined(__FreeBSD__) && !defined(__Userspace__) + mflowtype, mflowid, +#endif + vrf_id, net->port); *abort_no_unlock = 1; return (-1); }
VERSION bump to version 2.2.18
@@ -65,7 +65,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 2) -set(SYSREPO_MICRO_VERSION 17) +set(SYSREPO_MICRO_VERSION 18) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
Fixed unused variable warning for newer compilers.
@@ -49,7 +49,7 @@ static int validate_argp(mock_object* mock, int request, va_list argp) { #define DEFAULT_IOCTL_HANDLER(_REQ, _S) \ namespace { \ - static bool r##_S = \ + static bool r##_S __attribute__((unused)) = \ test_system::instance()->default_ioctl_handler(_REQ, validate_argp<_S>); \ }
mimxrt/machine_timer: Leave the Timer clock source at IPG clock. Setting it to OSC_CLK interferes the utime module's functionality. This is still an area demanding an understanding.
#define TIMER_MIN_PERIOD 1 #define alarm_callback PIT_IRQHandler -#define PIT_SOURCE_CLOCK CLOCK_GetFreq(kCLOCK_OscClk) +#define PIT_SOURCE_CLOCK CLOCK_GetIpgFreq() #define PIT_IRQ_ID PIT_IRQn typedef struct _machine_timer_obj_t { @@ -194,8 +194,6 @@ void machine_timer_init_PIT(void) { // PIT timer // Enable clock gate for GPIO1 CLOCK_EnableClock(kCLOCK_Gpio1); // ? - // Set PERCLK_CLK source to OSC_CLK - CLOCK_SetMux(kCLOCK_PerclkMux, 1U); // Set PERCLK_CLK divider to 1 CLOCK_SetDiv(kCLOCK_PerclkDiv, 0U);
[Timestamp] Fix bug crc calculation
@@ -204,7 +204,7 @@ error_return_t Robus_SendMsg(ll_service_t *ll_service, msg_t *msg) if (Timestamp_IsTimestampMsg(msg)) { - crc_max_index = full_size - (sizeof(uint64_t) + sizeof(uint8_t)); + crc_max_index = full_size - sizeof(int64_t); } else {
Add java loader to the loaders include list.
#cmakedefine OPTION_BUILD_LOADERS_CS 1 #cmakedefine OPTION_BUILD_LOADERS_DART 1 #cmakedefine OPTION_BUILD_LOADERS_FILE 1 +#cmakedefine OPTION_BUILD_LOADERS_JAVA 1 #cmakedefine OPTION_BUILD_LOADERS_JSM 1 #cmakedefine OPTION_BUILD_LOADERS_JS 1 #cmakedefine OPTION_BUILD_LOADERS_LUA 1
Add to signature algorithm table
@@ -717,6 +717,9 @@ static const SIGALG_LOOKUP sigalg_lookup_tbl[] = { {"ecdsa_secp521r1_sha512", TLSEXT_SIGALG_ecdsa_secp521r1_sha512, NID_sha512, SSL_MD_SHA512_IDX, EVP_PKEY_EC, SSL_PKEY_ECC, NID_ecdsa_with_SHA512, NID_secp521r1}, + {"ed25519", TLSEXT_SIGALG_ed25519, + NID_undef, -1, NID_ED25519, SSL_PKEY_ED25519, + NID_undef, NID_undef}, {NULL, TLSEXT_SIGALG_ecdsa_sha224, NID_sha224, SSL_MD_SHA224_IDX, EVP_PKEY_EC, SSL_PKEY_ECC, NID_ecdsa_with_SHA224, NID_undef},
Omit print_stack_from_here() from stack trace.
@@ -171,18 +171,13 @@ void __print_stack_with_rbp(u64 *rbp) } } -void __print_stack_from_here() +void print_stack_from_here(void) { u64 rbp; asm("movq %%rbp, %0" : "=r" (rbp)); __print_stack_with_rbp((u64 *)rbp); } -void print_stack_from_here(void) -{ - __print_stack_from_here(); -} - void print_stack(context c) { console("stack trace: \n");
Force CMake version
@@ -51,12 +51,14 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Install musl + - name: Setup musl run: | sudo apt update sudo apt install musl-tools - musl-gcc --version - cmake --version + - name: Setup cmake + uses: jwlawson/[email protected] + with: + cmake-version: '3.16.x' - name: Configure env: CC: musl-gcc @@ -64,6 +66,7 @@ jobs: run: | mkdir build cd build + cmake --version cmake .. - name: Build run: |
doc: add link to sitemap for USB power policy BRANCH=none TEST=view markdown
* [USB Updater](./usb_updater.md) -## USB-C +## USB * [USB-C Power Delivery and Alternate Modes](./usb-c.md) +* [USB-A and USB-C Policies for Sourcing Power](./usb_power.md) ## Miscellaneous
Misc. jael notes and improvements
|= [new=? evs=logs] ^+ +> =? +> new + ::TODO should we be mutating state here, + :: or better to move this into ++vent:feel? +>(dns.eth *dnses, hul.eth ~, kyz.puk ~) =? +> |(new !=(0 ~(wyt by evs))) %- vent:feel :: :: sanity checks, should never fail if we operate correctly :: + ~| %diff-order-insanity ?> ?+ -.dif & %spawned ?> ?=(^ kid.hul) !(~(has in spawned.u.kid.hul) who.dif) :: :: +| filter-results :: - :: +wake: kick polling + :: +wake: kick polling, unless we changed source :: - ++ wake poll-filter + ++ wake + ?. ?=(%| -.source) . + poll-filter :: :: +sigh: parse rpc response and process it ::
assert: add stackbase dump
@@ -329,6 +329,7 @@ static void dump_task(FAR struct tcb_s *tcb, FAR void *arg) #ifdef CONFIG_SMP " %4d" #endif + " %p" " %7zu" #ifdef CONFIG_STACK_COLORATION " %7zu %3zu.%1zu%%%c" @@ -341,6 +342,7 @@ static void dump_task(FAR struct tcb_s *tcb, FAR void *arg) #ifdef CONFIG_SMP , tcb->cpu #endif + , tcb->stack_base_ptr , tcb->adj_stack_size #ifdef CONFIG_STACK_COLORATION , up_check_tcbstack(tcb) @@ -395,7 +397,8 @@ static void show_tasks(void) #ifdef CONFIG_SMP " CPU" #endif - " STACK" + " STACKBASE" + " STACKSIZE" #ifdef CONFIG_STACK_COLORATION " USED FILLED " #endif @@ -405,10 +408,11 @@ static void show_tasks(void) " COMMAND\n"); #if CONFIG_ARCH_INTERRUPTSTACK > 0 - _alert(" ---- ----" + _alert(" ---- ---" # ifdef CONFIG_SMP " ----" # endif + " %p" " %7u" # ifdef CONFIG_STACK_COLORATION " %7zu %3zu.%1zu%%%c" @@ -417,6 +421,7 @@ static void show_tasks(void) " ----" # endif " irq\n" + , up_get_intstackbase() , CONFIG_ARCH_INTERRUPTSTACK # ifdef CONFIG_STACK_COLORATION , stack_used
[io] vview.py, detail
@@ -407,6 +407,7 @@ class CFprov(): mus, imus = numpy.unique(self._data[:, 1], return_inverse=True) + #print('xmethod', self._data[i, 2:5])) for i, imu in enumerate(imus): mu = mus[imu] fdata = self._output[mu].GetFieldData()
Change to a listing approach
@@ -35,6 +35,10 @@ extern "C" { /// Note for the host /// - try to use the filesytem's copy-on-write feature when possible for reducing exclusive folder /// space usage on duplication +/// - host can "garbage collect" the files in the shared folder using: +/// clap_plugin_resource_directory.get_files_count() +/// clap_plugin_resource_directory.get_file_path() +/// but be **very** careful before deleting any resources typedef struct clap_plugin_resource_directory { // Returns true if the plugin wants a resource directory with the specified sharing. @@ -54,13 +58,16 @@ typedef struct clap_plugin_resource_directory { // [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. + // Returns the number of files used by the plugin in the shared resource folder. // // [main-thread] - bool(CLAP_ABI *is_using_file)(const clap_plugin *plugin, const char *path); + uint32_t(CLAP_ABI *get_files_count)(const clap_plugin_t *plugin); + + // Retrieves file path. + // @param path writable memory to store the path + // @param path_size number of available bytes in path + // Returns the number of bytes in the path, or -1 on error + int32_t(CLAP_ABI* get_file_path)(const clap_plugin_t *plugin, uint32_t index, char *path, uint32_t path_size); } clap_plugin_resource_directory_t; typedef struct clap_host_resource_directory {
feat(png): reallocate memory to reduce memory usage
static lv_res_t decoder_info(struct _lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header); static lv_res_t decoder_open(lv_img_decoder_t * dec, lv_img_decoder_dsc_t * dsc); static void decoder_close(lv_img_decoder_t * dec, lv_img_decoder_dsc_t * dsc); -static void convert_color_depth(uint8_t * img, uint32_t px_cnt); +static void convert_color_depth(uint8_t ** img_p, uint32_t px_cnt); /********************** * STATIC VARIABLES @@ -185,7 +185,7 @@ static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * } /*Convert the image to the system's color depth*/ - convert_color_depth(img_data, png_width * png_height); + convert_color_depth(&img_data, png_width * png_height); dsc->img_data = img_data; return LV_RES_OK; /*The image is fully decoded. Return with its pointer*/ } @@ -207,7 +207,7 @@ static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * } /*Convert the image to the system's color depth*/ - convert_color_depth(img_data, png_width * png_height); + convert_color_depth(&img_data, png_width * png_height); dsc->img_data = img_data; return LV_RES_OK; /*Return with its pointer*/ @@ -233,8 +233,10 @@ static void decoder_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc * @param img the ARGB888 image * @param px_cnt number of pixels in `img` */ -static void convert_color_depth(uint8_t * img, uint32_t px_cnt) +static void convert_color_depth(uint8_t ** img_p, uint32_t px_cnt) { + uint8_t * img = *img_p; + #if LV_COLOR_DEPTH == 32 lv_color32_t * img_argb = (lv_color32_t *)img; lv_color_t c; @@ -274,6 +276,11 @@ static void convert_color_depth(uint8_t * img, uint32_t px_cnt) img[i * 2 + 0] = b > 128 ? 1 : 0; } #endif + +#if LV_COLOR_DEPTH != 32 + /*Reallocate memory to reduce memory usage*/ + *img_p = lv_realloc(img, LV_IMG_PX_SIZE_ALPHA_BYTE * px_cnt); +#endif } #endif /*LV_USE_PNG*/
interface: group feed no longer shows in omnibox
@@ -101,7 +101,9 @@ export default function index(contacts, associations, apps, currentGroup, groups return Object.keys(associations[e]).length > 0; }).map((e) => { // iterate through each app's metadata object - Object.keys(associations[e]).map((association) => { + Object.keys(associations[e]) + .filter((association) => !associations[e][association].metadata.hidden) + .map((association) => { const each = associations[e][association]; let title = each.resource; if (each.metadata.title !== '') {
build/wdelay: extending line width for more compact header with comment apis
@@ -486,33 +486,39 @@ LIQUID_WINDOW_DEFINE_API(LIQUID_WINDOW_MANGLE_CFLOAT, liquid_float_complex) // WDELAY : name-mangling macro // T : data type #define LIQUID_WDELAY_DEFINE_API(WDELAY,T) \ + \ +/* Efficient digital delay line using a minimal amount of memory */ \ typedef struct WDELAY(_s) * WDELAY(); \ \ -/* create delay buffer object with '_delay' samples */ \ +/* Create delay buffer object with a particular number of samples of */ \ +/* delay */ \ +/* _delay : number of samples of delay in the wdelay object */ \ WDELAY() WDELAY(_create)(unsigned int _delay); \ \ -/* re-create delay buffer object with '_delay' samples */ \ +/* Re-create delay buffer object, adjusting the delay size, preserving */ \ +/* the internal state of the object */ \ /* _q : old delay buffer object */ \ /* _delay : delay for new object */ \ WDELAY() WDELAY(_recreate)(WDELAY() _q, \ unsigned int _delay); \ \ -/* destroy delay buffer object, freeing internal memory */ \ +/* Destroy delay buffer object, freeing internal memory */ \ void WDELAY(_destroy)(WDELAY() _q); \ \ -/* print delay buffer object's state to stdout */ \ +/* Print delay buffer object's state to stdout */ \ void WDELAY(_print)(WDELAY() _q); \ \ -/* clear/reset state of object */ \ +/* Clear/reset state of object */ \ void WDELAY(_reset)(WDELAY() _q); \ \ -/* read delayed sample from delay buffer object */ \ +/* Read delayed sample at the head of the buffer and store it to the */ \ +/* output pointer */ \ /* _q : delay buffer object */ \ /* _v : value of delayed element */ \ void WDELAY(_read)(WDELAY() _q, \ T * _v); \ \ -/* push new sample into delay buffer object */ \ +/* Push new sample into delay buffer object */ \ /* _q : delay buffer object */ \ /* _v : new value to be added to buffer */ \ void WDELAY(_push)(WDELAY() _q, \
handler: do not perform implicit transition if command not supported If unsupported command was handled by tcmur_cmd_handler, alua implicit transition have a chance to cause image exclusive-lock threshing between runners, so do not perform implicit transition if command not supported
@@ -2299,9 +2299,33 @@ static int tcmur_cmd_handler(struct tcmu_device *dev, struct tcmulib_cmd *cmd) goto untrack; } + /* Don't perform alua implicit transition if command is not supported */ + switch(cdb[0]) { + case READ_6: + case READ_10: + case READ_12: + case READ_16: + case WRITE_6: + case WRITE_10: + case WRITE_12: + case WRITE_16: + case UNMAP: + case SYNCHRONIZE_CACHE: + case SYNCHRONIZE_CACHE_16: + case EXTENDED_COPY: + case COMPARE_AND_WRITE: + case WRITE_VERIFY: + case WRITE_VERIFY_16: + case WRITE_SAME: + case WRITE_SAME_16: + case FORMAT_UNIT: ret = tcmur_alua_implicit_transition(dev, cmd); if (ret) goto untrack; + break; + default: + break; + } switch(cdb[0]) { case READ_6:
fixing linux aliases for Biquad~/Hilbert~
@@ -320,8 +320,9 @@ ifeq ($(uname), Linux) ln -s -f append-help.pd Append-help.pd; \ ln -s -f append.$(extension) Append.$(extension); \ ln -s -f append-help.pd Append-help.pd; \ - ln -s -f biquad.$(extension) Biquad.$(extension); \ - ln -s -f biquad-help.pd Biquad-help.pd; \ + ln -s -f biquad~.$(extension) Biquad~.$(extension); \ + ln -s -f biquad~-help.pd Biquad~-help.pd; \ + ln -s -f hilbert~-help.pd Hilbert~-help.pd; \ ln -s -f bucket.$(extension) Bucket.$(extension); \ ln -s -f bucket-help.pd Bucket-help.pd; \ ln -s -f clip.$(extension) Clip.$(extension); \
Corrected a null exception in the spellchecker
@@ -47,7 +47,10 @@ AjaxFranceLabs.SpellcheckerWidget = AjaxFranceLabs.AbstractWidget.extend({ * We entered an incorrect value in search box, this is why spellcheck.suggestions is not empty => show the spellchecker widget and * perform a new query with the corrected value */ - if (data.response.numFound == 0 && data.spellcheck !== undefined && data.spellcheck.collations.length > 0) { + if (data.response.numFound == 0 + && data.spellcheck !== undefined + && data.spellcheck !== null + && data.spellcheck.collations.length > 0) { $(self.elm).empty(); $(self.elm).show();
Fix network hashrate for AEON
@@ -285,7 +285,7 @@ namespace MiningCore.Blockchain.Monero BlockchainStats.BlockHeight = (int) info.Height; BlockchainStats.NetworkDifficulty = info.Difficulty; - BlockchainStats.NetworkHashRate = (double) info.Difficulty / info.Target; + BlockchainStats.NetworkHashRate = info.Target > 0 ? (double) info.Difficulty / info.Target : 0; BlockchainStats.ConnectedPeers = info.OutgoingConnectionsCount + info.IncomingConnectionsCount; }
Use s2n_highest_protocol_version for highest version supported This should be identical in behavior today, as TLS1.2 is the highest version supported so far. I want to use the idiomatically more accurate, s2n_highest_protocol_version as we might forget to change this if/when we support TLS 1.3
#include "tls/s2n_cipher_suites.h" #include "tls/s2n_connection.h" +#include "tls/s2n_tls.h" #include "utils/s2n_safety.h" const struct s2n_key_exchange_algorithm s2n_rsa = { @@ -504,7 +505,7 @@ static int s2n_set_cipher_as_server(struct s2n_connection *conn, uint8_t * wire, * version, and the client cipher list contains TLS_FALLBACK_SCSV, then the server must abort the connection since * TLS_FALLBACK_SCSV should only be present when the client previously failed to negotiate a higher TLS version. */ - if (conn->client_protocol_version < S2N_TLS12) { + if (conn->client_protocol_version < s2n_highest_protocol_version) { uint8_t fallback_scsv[S2N_TLS_CIPHER_SUITE_LEN] = { TLS_FALLBACK_SCSV }; if (s2n_wire_ciphers_contain(fallback_scsv, wire, count, cipher_suite_len)) { conn->closed = 1;
Yan LR: Improve ANTLR version detection
@@ -47,7 +47,7 @@ function (check_dependencies) endif (ANTLR4_NOT_AVAILABLE) endif (ANTLR4_NOT_AVAILABLE AND ANTLR_NOT_AVAILABLE) - string (REGEX REPLACE ".*Version ([0-9]+\\.[0-9]+\\.[0-9]+).*" "\\1" ANTLR_VERSION ${ANTLR_VERSION}) + string (REGEX REPLACE ".*Version ([0-9]+\\.[0-9]+(\\.[0-9]+)?).*" "\\1" ANTLR_VERSION ${ANTLR_VERSION}) if ("${ANTLR_VERSION}" VERSION_LESS 4.6) set ( FAILURE_MESSAGE
move reuseport detection in dup_listener
@@ -3088,8 +3088,19 @@ static void setup_configurators(void) h2o_config_register_status_handler(&conf.globalconf, &extra_status_handler); } -static int dup_listener(int listener, int reuseport) +static int dup_listener(int listener) { + int reuseport = 0; + +#if H2O_USE_REUSEPORT + socklen_t reuseportlen = sizeof(reuseport); + if (getsockopt(listener, SOL_SOCKET, H2O_SO_REUSEPORT, &reuseport, &reuseportlen) != 0) { + perror("gestockopt(SO_REUSEPORT) failed"); + abort(); + } + assert(reuseportlen == sizeof(reuseport)); +#endif + int fd = -1; #if H2O_USE_REUSEPORT if (reuseport) { @@ -3128,19 +3139,9 @@ static void create_per_thread_listeners(void) { for (size_t i = 0; i != conf.num_listeners; ++i) { struct listener_config_t *listener_config = conf.listeners[i]; - int reuseport = 0; - -#if H2O_USE_REUSEPORT - socklen_t reuseportlen = sizeof(reuseport); - if (getsockopt(listener_config->fds.entries[0], SOL_SOCKET, H2O_SO_REUSEPORT, &reuseport, &reuseportlen) != 0) { - perror("gestockopt(SO_REUSEPORT) failed"); - abort(); - } - assert(reuseportlen == sizeof(reuseport)); -#endif for (size_t j = 1; j < conf.thread_map.size; j++) { - int fd = dup_listener(listener_config->fds.entries[0], reuseport); + int fd = dup_listener(listener_config->fds.entries[0]); h2o_vector_reserve(NULL, &listener_config->fds, listener_config->fds.size + 1); assert(j == listener_config->fds.size); listener_config->fds.entries[listener_config->fds.size++] = fd;
Force camera move events to position camera within scene bounds
@@ -591,8 +591,11 @@ const precompileEntityScript = (input = [], options = {}) => { output.push(speed); } else if (command === EVENT_CAMERA_MOVE_TO) { output.push(CMD_LOOKUP.CAMERA_MOVE_TO); - output.push(input[i].args.x); - output.push(input[i].args.y); + // Limit camera move to be within scene bounds + let camX = Math.min(input[i].args.x, scene.width - 20); + let camY = Math.min(input[i].args.y, scene.height - 18); + output.push(camX); + output.push(camY); let speed = input[i].args.speed || 0; let speedFlag = ((1 << speed) - 1) | (speed > 0 ? 32 : 0); output.push(speedFlag);
support native format string
* */ +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + extern int json_inject_alloc ( char ** buf_p, @@ -64,4 +68,8 @@ json_inject_va_list( char * injector, va_list ap); +#ifdef __cplusplus +} +#endif // __cplusplus + #endif //JSON_ACTOR_H