message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
DEV improve enable/disable DDF handling | @@ -163,11 +163,6 @@ void DEV_InitStateHandler(Device *device, const Event &event)
{
DevicePrivate *d = device->d;
- if (event.what() != RAttrLastSeen)
- {
- DBG_Printf(DBG_INFO, "DEV Init event %s/0x%016llX/%s\n", event.resource(), event.deviceKey(), event.what());
- }
-
if (event.what() == REventStateEnter)
{
d->zdpResult = { };
@@ -175,13 +170,22 @@ void DEV_InitStateHandler(Device *device, const Event &event)
if ((event.deviceKey() & 0x00212E0000000000LLU) == 0x00212E0000000000LLU)
{
d->node = DEV_GetCoreNode(device->key());
- if (d->node && d->node->address().nwk() == 0x0000)
+ if (d->node && d->node->address().hasNwk() && d->node->address().nwk() == 0x0000)
{
d->setState(DEV_DeadStateHandler);
return; // ignore coordinaor for now
}
}
}
+ else if (event.what() == REventStateLeave)
+ {
+ return;
+ }
+
+ if (!DEV_TestManaged())
+ {
+ return;
+ }
if (event.what() == REventPoll ||
event.what() == REventAwake ||
@@ -741,6 +745,12 @@ void DEV_IdleStateHandler(Device *device, const Event &event)
// DBG_Printf(DBG_INFO, "DEV Idle event %s/0x%016llX/%s\n", event.resource(), event.deviceKey(), event.what());
}
+ if (!DEV_TestManaged())
+ {
+ d->setState(DEV_InitStateHandler);
+ return;
+ }
+
DEV_CheckItemChanges(device, event);
// process parallel states
@@ -1348,12 +1358,23 @@ void DEV_PollBusyStateHandler(Device *device, const Event &event)
*/
void DEV_DeadStateHandler(Device *device, const Event &event)
{
- Q_UNUSED(device)
-
if (event.what() == REventStateEnter)
{
DBG_Printf(DBG_INFO, "DEV enter dead state 0x%016llX\n", event.deviceKey());
}
+ else if (event.what() == REventStateLeave)
+ {
+
+ }
+ else
+ {
+ DevicePrivate *d = device->d;
+ if (device->managed()) // when DDF handling is enabled again
+ {
+ d->setState(DEV_InitStateHandler);
+ }
+ return;
+ }
}
Device::Device(DeviceKey key, deCONZ::ApsController *apsCtrl, QObject *parent) :
|
link-server-hook: serve static app files from clay
Any requests that aren't explicitly defined endpoints try to load
content from clay instead, but only for html, css and js files.
Depends on | %- parse-request-line
url.request.inbound-request
=* req-head header-list.request.inbound-request
- =- ::TODO =; [cards=(list card) =simple-payload:http]
+ =- ::TODO =;
%+ weld cards
(give-simple-payload:app eyre-id simple-payload)
^- [cards=(list card) =simple-payload:http]
++ handle-post
|= [request-headers=header-list:http =request-line body=(unit octs)]
^- [(list card) simple-payload:http]
- =- ::TODO =; [success=? cards=(list card)]
+ =- ::TODO =;
:- cards
%+ include-cors-headers
request-headers
=/ p=(unit @ud)
%+ biff (~(get by args) 'p')
(curr rush dim:ag)
- ?+ request-line not-found:gen
- ::TODO expose submissions, other data
+ ?+ request-line
+ :: for the default case, try to load file from clay
+ ::
+ ?~ ext.request-line not-found:gen
+ =/ file=(unit octs)
+ ?. ?=([%'~link' *] site.request-line) ~
+ (get-file-at /app/link [t.site u.ext]:request-line)
+ ?~ file not-found:gen
+ ?+ u.ext.request-line not-found:gen
+ %html (html-response:gen u.file)
+ %js (js-response:gen u.file)
+ %css (css-response:gen u.file)
+ ==
:: submissions by recency as json
::
[[[~ %json] [%'~link' %submissions ^]] *]
%local-pages
(snoc path %noun)
==
+::
+++ get-file-at
+ |= [base=path file=path ext=@ta]
+ ^- (unit octs)
+ :: only expose html, css and js files for now
+ ::
+ ?. ?=(?(%html %css %js) ext)
+ ~
+ =/ =path
+ :* (scot %p our.bowl)
+ q.byk.bowl
+ (scot %da now.bowl)
+ (snoc (weld base file) ext)
+ ==
+ ?. .^(? %cu path)
+ ~
+ %- some
+ %- as-octs:mimes:html
+ .^(@ %cx path)
--
\ No newline at end of file
|
Ignore %present commands that wouldn't actually change anything. | ::
|= {who/ship nos/(set naem) dif/diff-status}
^+ +>
- %- ta-deltas
- %+ murn ~(tap in nos)
- |= n/naem
- ^- (unit delta)
- ?. (~(has by stories) n) ~
- :: only have presence if you have write permission.
- ?. (~(so-admire so n ~ (~(got by stories) n)) who)
- ~
- `[%story n %status [our.bol n] who dif]
+ =+ nol=~(tap in nos)
+ |-
+ ?~ nol +>.^$
+ =. +>.^$
+ ?. (~(has by stories) i.nol) +>.^$
+ =+ soy=(~(got by stories) i.nol)
+ so-done:(~(so-present so i.nol ~ soy) who dif)
+ $(nol t.nol)
::
++ ta-action ::< apply client action
::> performs action sent by a client.
::> arms that make miscellaneous changes to this story.
::+|
::
+ ++ so-present ::< accept status diff
+ |= {who/ship dif/diff-status}
+ ^+ +>
+ :: only have presence if you have write permission.
+ ?. |((so-admire who) ?=($remove -.dif)) +>
+ :: ignore if it won't result in change.
+ ?. ?: ?=($remove -.dif) (~(has by locals) who)
+ ?| !(~(has by locals) who)
+ ::
+ =+ (~(got by locals) who)
+ !=(- (change-status - dif))
+ ==
+ +>
+ (so-delta-our %status so-cir who dif)
+ ::
++ so-config-full ::< split full config
::> split a %full config delta up into multiple
::> smaller ones, for easier application.
|
HW: Adding check for git repository to hardware/Makefile | @@ -81,6 +81,11 @@ check_donut_settings:
echo "Please source donut_settings before calling make!"; \
exit 1; \
fi
+ @cd $(DONUT_HARDWARE_ROOT); if [ -z `git describe HEAD` ]; then \
+ echo "DONUT_HARDWARE_ROOT ($(DONUT_HARDWARE_ROOT)) does not belong to a git repository."; \
+ echo "Please check out the SNAP framework from git repository [email protected]:open-power/donut.git"; \
+ exit 1; \
+ fi
create_environment:
@cd $(DONUT_HARDWARE_ROOT)/setup && ./create_environment $(CE_PARMS)
|
Log block height for balance changes | @@ -99,7 +99,7 @@ namespace MiningCore.Payments.PayoutSchemes
if (amount > 0)
{
- logger.Info(() => $"Adding {payoutHandler.FormatAmount(amount)} to balance of {address} for {FormatUtil.FormatQuantity(shares[address])} ({shares[address]}) shares");
+ logger.Info(() => $"Adding {payoutHandler.FormatAmount(amount)} to balance of {address} for {FormatUtil.FormatQuantity(shares[address])} ({shares[address]}) shares for block {block.BlockHeight}");
balanceRepo.AddAmount(con, tx, poolConfig.Id, poolConfig.Coin.Type, address, amount);
}
}
|
Looking for a ruby 2.6 that travis supports | @@ -12,7 +12,8 @@ rvm:
- 2.3.8
- 2.4.9
- 2.5.7
- - 2.6.4
+ - 2.6.3
+ - 2.6.5
- 2.7.0
gemfile:
@@ -23,7 +24,7 @@ gemfile:
matrix:
fast_finish: true
allow_failures:
- - rvm: ruby-head
+ - rvm: 2.6.5 # travis doesn't have this version on some macOSs
exclude:
- gemfile: gemfiles/no_rails.gemfile
|
vnet: set frame overhead at interface registration
Type: fix
Fixes:
In vnet_eth_register_interface(), max frame size was being used where
frame overhead was intended. | @@ -384,7 +384,7 @@ vnet_eth_register_interface (vnet_main_t *vnm,
hi->min_frame_size = ETHERNET_MIN_PACKET_BYTES;
hi->frame_overhead =
r->frame_overhead ?
- r->max_frame_size :
+ r->frame_overhead :
sizeof (ethernet_header_t) + 2 * sizeof (ethernet_vlan_header_t);
hi->max_frame_size = r->max_frame_size ?
r->max_frame_size :
|
error: add background style
If you've set an image background, it can make it hard to read 404s or
error messages. This adds the default bg color. | @@ -12,7 +12,7 @@ class ErrorComponent extends Component<ErrorProps> {
render () {
const { code, error, history, description } = this.props;
return (
- <Col alignItems="center" justifyContent="center" height="100%" p={4}>
+ <Col alignItems="center" justifyContent="center" height="100%" p="4" backgroundColor="white">
<Box mb={4}>
<Text fontSize={3}>
{code ? code : 'Error'}
|
ansi: Implement strncat() | @@ -38,8 +38,16 @@ char *strcat(char *__restrict dest, const char *__restrict src) {
return dest;
}
char *strncat(char *__restrict dest, const char *__restrict src, size_t max_size) {
- __ensure(!"Not implemented");
- __builtin_unreachable();
+ auto dest_bytes = static_cast<char *>(dest);
+ auto src_bytes = static_cast<const char *>(src);
+ dest_bytes += strlen(dest);
+ size_t i = 0;
+ while(*src_bytes && i < max_size) {
+ *(dest_bytes++) = *(src_bytes++);
+ i++;
+ }
+ *dest_bytes = 0;
+ return dest;
}
int memcmp(const void *a, const void *b, size_t size) {
|
pi-blaster: Uprev the recipe
This updates the recipe to the head of the master branch. Upstream
shifted the license section in the README file so this patch changes
LIC_FILES_CHKSUM accordingly. | @@ -2,7 +2,7 @@ DESCRIPTION = "This project enables PWM on the GPIO pins you request of a Raspbe
HOMEPAGE = "https://github.com/sarfata/pi-blaster/"
SECTION = "devel/libs"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://README.md;beginline=268;endline=292;md5=86d10e4bcf4b4014d306dde7c1d2a80d"
+LIC_FILES_CHKSUM = "file://README.md;beginline=295;endline=319;md5=86d10e4bcf4b4014d306dde7c1d2a80d"
SRC_URI = "git://github.com/sarfata/pi-blaster;branch=master;protocol=https \
file://remove-initscript-lsb-dependency.patch \
@@ -10,7 +10,7 @@ SRC_URI = "git://github.com/sarfata/pi-blaster;branch=master;protocol=https \
S = "${WORKDIR}/git"
-SRCREV = "befd8ef36e5066e4d444ef47fe4020787e541248"
+SRCREV = "fbba9a7dcef0f352a11f8a2a5f6cbc15b62c0829"
inherit update-rc.d autotools
|
build sionlib with fPIC | @@ -71,7 +71,7 @@ Name: %{pname}-%{compiler_family}-%{mpi_family}%{PROJ_DELIM}
Version: 1.7.1
Release: 1
License: BSD
-Group: %{PROJ_NAME}/perf-tools
+Group: %{PROJ_NAME}/io-tools
URL: http://www.fz-juelich.de/ias/jsc/EN/Expertise/Support/Software/SIONlib/_node.html
Source0: http://apps.fz-juelich.de/jsc/sionlib/download.php?version=%{version}#/%{pname}-%{version}.tar.gz
Source1: OHPC_macros
@@ -126,6 +126,9 @@ CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --mpi=mpich3 "
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --mpi=openmpi "
%endif
+export CFLAGS='-fPIC ${CFLAGS}'
+export CXXFLAGS='-fPIC ${CXXFLAGS}'
+export FCFLAGS='-fPIC ${FCFLAGS}'
./configure --prefix=%{buildroot}%{install_path} $CONFIGURE_OPTIONS
# remove ARM incompatible cflag
@@ -167,7 +170,7 @@ puts stderr "\nVersion %{version}\n"
}
module-whatis "Name: %{pname} built with %{compiler_family} compiler and %{mpi_family} MPI"
module-whatis "Version: %{version}"
-module-whatis "Category: performance tool"
+module-whatis "Category: IO Library"
module-whatis "Description: %{summary}"
module-whatis "URL %{url}"
|
xr871:add print float for libc nano | @@ -95,8 +95,7 @@ GLOBAL_CFLAGS += -D__PRJ_CONFIG_IMG_COMPRESS
endif
GLOBAL_LDFLAGS += -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp
-GLOBAL_LDFLAGS += -Wl,--gc-sections
-#--specs=nano.specs
+GLOBAL_LDFLAGS += -Wl,--gc-sections --specs=nano.specs -u _printf_float
GLOBAL_LDFLAGS += -Wl,--wrap,main
GLOBAL_LDFLAGS += -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
|
ci update action | @@ -5,9 +5,20 @@ on:
jobs:
update-formatting:
+ continue-on-error: true
if: github.event.issue.pull_request && github.event.issue.user.login == github.event.pull_request.user.login
runs-on: ubuntu-latest
steps:
+ - uses: khan/pull-request-comment-trigger@bb03972cc9f423111f3b5a23fcc9fd32741acabb
+ id: check-comment
+ with:
+ trigger: '@lvgl-bot format'
+ prefix_only: true
+ reaction: rocket
+ env:
+ GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
+ - run: exit 1
+ if: steps.check.outputs.triggered != 'true'
- name: Install astyle
run: |
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
|
hpet: dependencies to domain | build library {
target = "hpet_module",
cFiles = ["hpet.c" ],
- addLibraries = libDeps["int_route_client"],
flounderDefs = [ "hpet" ],
mackerelDevices = ["hpet"],
architectures = [ "x86_64" ]
target = "hpet",
cFiles = [ "main.c"],
addLinkFlags = ["-T" ++ Config.source_dir ++ "/lib/driverkit/bfdrivers.ld" ],
- addLibraries = libDeps["driverkit"],
+ addLibraries = libDeps["driverkit", "int_route_client"],
addModules = ["hpet_module", "hpet_comp_module"],
mackerelDevices = [ "hpet"],
architectures = ["x86_64"]
|
Added guarding #ifndef/#define to avoid duplicate include of crypto/types.h
Fixes
CLA: The author has the permission to grant the OpenSSL Team the right to use this change. | /* When removal is simulated, we still need the type internally */
+#ifndef OSSL_CRYPTO_TYPES_H
+# define OSSL_CRYPTO_TYPES_H
+# pragma once
+
# ifdef OPENSSL_NO_DEPRECATED_3_0
typedef struct rsa_st RSA;
typedef struct rsa_meth_st RSA_METHOD;
@@ -21,3 +25,5 @@ typedef struct ec_key_method_st EC_KEY_METHOD;
# ifndef OPENSSL_NO_EC
typedef struct ecx_key_st ECX_KEY;
# endif
+
+#endif
|
Work CI-CD
Remove invalid option forf KALUGA preset.
***NO_CI*** | "NF_BUILD_RTM": "OFF",
"NF_FEATURE_DEBUGGER": "ON",
"NF_FEATURE_RTC": "ON",
- "API_System.IO.FileSystem": "ON",
"API_nanoFramework.Graphics": "ON",
"GRAPHICS_DISPLAY": "ILI9341_240x320_SPI.cpp",
"TOUCHPANEL_DEVICE": "XPT2046.cpp",
|
Add missing linefeed. | @@ -82,6 +82,7 @@ storageReadPosixOpen(THIS_VOID)
else
THROW_SYS_ERROR_FMT(FileOpenError, STORAGE_ERROR_READ_OPEN, strZ(this->interface.name)); // {vm_covered}
}
+
// On success set free callback to ensure the file descriptor is freed
if (this->fd != -1)
{
|
minor change on debug log | #include "tools.h"
+//#define MAP_DEBUG
+
+
// we don't want to share them
extern vu16 VBlankProcess;
@@ -92,7 +95,9 @@ static void updateMap(Map* map, s16 xt, s16 yt)
// no update --> exit
if ((deltaX == 0) && (deltaY == 0)) return;
-// KLog_S3("updateMap map=", map->plane, " deltaX=", deltaX, " deltaY=", deltaY);
+#ifdef DMA_DEBUG
+ KLog_S4("updateMap xt=", xt, " yt=", yt, " deltaX=", deltaX, " deltaY=", deltaY);
+#endif
if (deltaX > 0)
{
@@ -169,7 +174,9 @@ static void setMapColumn(Map *map, u16 column, u16 x, u16 y)
// 16 metatile = 32 tiles = 256 pixels (full screen height + 16 pixels)
u16 h = 16;
-// KLog_U3("setMapColumn column=", column, " x=", x, " y=", y);
+#ifdef DMA_DEBUG
+ KLog_U3("setMapColumn column=", column, " x=", x, " y=", y);
+#endif
// clip Y against plane size
const u16 yAdj = y & map->planeHeightMask;
@@ -217,7 +224,9 @@ static void setMapRow(Map *map, u16 row, u16 x, u16 y)
// 21 metatile = 42 tiles = 336 pixels (full screen width + 16 pixels)
u16 w = 21;
-// KLog_U3("setMapRow row=", row, " x=", x, " y=", y);
+#ifdef DMA_DEBUG
+ KLog_U3("setMapRow row=", row, " x=", x, " y=", y);
+#endif
// clip X against plane size
const u16 xAdj = x & map->planeWidthMask;
|
iommu: fix possible null-pointer deref | @@ -249,10 +249,20 @@ struct vtd_domain *vtd_domains_get_by_cap(struct capref rootpt)
struct vnode_identity id;
err = invoke_vnode_identify(rootpt, &id);
if (err_is_fail(err)) {
+ INTEL_VTD_DEBUG_DOMAINS("lookup by cap failed. %s\n",
+ err_getstring(err));
+
return NULL;
}
+ INTEL_VTD_DEBUG_DOMAINS("lookup by cap: 0x%" PRIxGENPADDR "\n",
+ id.base);
+
for (vtd_domid_t i = 1; i < domains_count; i++) {
+ if (domains_all[i] == NULL) {
+ continue;
+ }
+
if (domains_all[i]->ptroot_base == id.base) {
return domains_all[i];
}
|
Increase the size of the attribute value buffer to 1MB for large media-col-database values. | @@ -1183,7 +1183,7 @@ do_test(_ipp_file_t *f, /* I - IPP data file */
char temp[1024]; /* Temporary string */
cups_file_t *reqfile; /* File to send */
ssize_t bytes; /* Bytes read/written */
- char buffer[131072]; /* Copy buffer */
+ char buffer[1024 * 1024]; /* Copy buffer */
size_t widths[200]; /* Width of columns */
const char *error; /* Current error */
|
Fix for error check | @@ -2743,6 +2743,8 @@ static ACVP_RESULT acvp_get_result_test_session(ACVP_CTX *ctx, char *session_url
goto end;
}
strcmp_s("fail", 4, status, &diff);
+ if (diff)
+ strcmp_s("error", 5, status, &diff);
if (!diff) {
const char *vs_url = json_object_get_string(current, "vectorSetUrl");
if (ctx->debug == ACVP_LOG_LVL_VERBOSE) {
|
py/reader: Allow MICROPY_VFS_POSIX to work with MICROPY_READER_POSIX. | @@ -124,6 +124,8 @@ void mp_reader_new_file_from_fd(mp_reader_t *reader, int fd, bool close_fd) {
reader->close = mp_reader_posix_close;
}
+#if !MICROPY_VFS_POSIX
+// If MICROPY_VFS_POSIX is defined then this function is provided by the VFS layer
void mp_reader_new_file(mp_reader_t *reader, const char *filename) {
int fd = open(filename, O_RDONLY, 0644);
if (fd < 0) {
@@ -131,5 +133,6 @@ void mp_reader_new_file(mp_reader_t *reader, const char *filename) {
}
mp_reader_new_file_from_fd(reader, fd, true);
}
+#endif
#endif
|
Copy dlls into fuzz directory
This should fix the recent AppVeyor failures.
[extended tests] | @@ -238,6 +238,7 @@ libclean:
"$(PERL)" -e "map { m/(.*)\.dll$$/; unlink glob """$$1.*"""; } @ARGV" $(SHLIBS)
"$(PERL)" -e "map { m/(.*)\.dll$$/; unlink glob """apps/$$1.*"""; } @ARGV" $(SHLIBS)
"$(PERL)" -e "map { m/(.*)\.dll$$/; unlink glob """test/$$1.*"""; } @ARGV" $(SHLIBS)
+ "$(PERL)" -e "map { m/(.*)\.dll$$/; unlink glob """fuzz/$$1.*"""; } @ARGV" $(SHLIBS)
-del /Q /F $(LIBS)
-del /Q ossl_static.pdb
@@ -520,8 +521,10 @@ $objs $shlib.res$linklibs \$(EX_LIBS)
\$(MT) \$(MTFLAGS) \$(MTINFLAG)$shlib$shlibext.manifest \$(MTOUTFLAG)$shlib$shlibext
IF EXIST apps\\$shlib$shlibext DEL /Q /F apps\\$shlib$shlibext
IF EXIST test\\$shlib$shlibext DEL /Q /F test\\$shlib$shlibext
+ IF EXIST fuzz\\$shlib$shlibext DEL /Q /F fuzz\\$shlib$shlibext
COPY $shlib$shlibext apps
COPY $shlib$shlibext test
+ COPY $shlib$shlibext fuzz
EOF
}
sub obj2dso {
|
[misc] fix db parameter | hash: 789e8daf7a7290d7b3b70ee50a594ee9681654f523e8dd152f7d33869b187472
-updated: 2018-10-22T21:42:44.6924753+09:00
+updated: 2018-10-23T15:17:28.9171821+09:00
imports:
- name: github.com/aergoio/aergo-actor
version: b33acec1163b419b28c6a18e5e3f55f336fa7327
@@ -11,7 +11,7 @@ imports:
- mailbox
- router
- name: github.com/aergoio/aergo-lib
- version: 8740469875ad7e73e2f5abc24738b7c49442076a
+ version: c664d5a2566abc7cd2eaa36c56c70e7768ba172e
subpackages:
- config
- db
@@ -330,7 +330,7 @@ imports:
- name: github.com/whyrusleeping/multiaddr-filter
version: e903e4adabd70b78bc9293b6ee4f359afb3f9f59
- name: github.com/whyrusleeping/yamux
- version: 3ff91e06c049d69eb6d48f7b92b04e53465d51ad
+ version: cd464a9e02b9a1710f2c6bfd6e12c9a31fe17c8a
- name: github.com/Workiva/go-datastructures
version: f07cbe3f82ca2fd6e5ab94afce65fe43319f675f
subpackages:
@@ -356,7 +356,7 @@ imports:
- internal/timeseries
- trace
- name: golang.org/x/sys
- version: 8b8824e799c8fc8e6d900615cc6c761ce6c26c67
+ version: 8a28ead16f52c8aaeffbf79239b251dfdf6c4f96
subpackages:
- cpu
- unix
|
Do not send ACK with ack_delay == 0 when credit is expanded | @@ -2884,7 +2884,6 @@ static ngtcp2_ssize conn_write_pkt(ngtcp2_conn *conn, ngtcp2_pkt_info *pi,
int ppe_pending = (conn->flags & NGTCP2_CONN_FLAG_PPE_PENDING) != 0;
size_t min_pktlen = conn_min_short_pktlen(conn);
int padded = 0;
- int credit_expanded = 0;
ngtcp2_cc_pkt cc_pkt;
uint64_t crypto_offset;
uint64_t stream_offset;
@@ -2999,7 +2998,6 @@ static ngtcp2_ssize conn_write_pkt(ngtcp2_conn *conn, ngtcp2_pkt_info *pi,
conn->rx.max_offset = conn->rx.unsent_max_offset =
nfrc->fr.max_data.max_data;
- credit_expanded = 1;
}
ngtcp2_pkt_hd_init(hd, hd_flags, type, &conn->dcid.current.cid,
@@ -3298,7 +3296,6 @@ static ngtcp2_ssize conn_write_pkt(ngtcp2_conn *conn, ngtcp2_pkt_info *pi,
}
pkt_empty = 0;
- credit_expanded = 1;
rtb_entry_flags |= NGTCP2_RTB_ENTRY_FLAG_ACK_ELICITING |
NGTCP2_RTB_ENTRY_FLAG_RETRANSMITTABLE;
pfrc = &(*pfrc)->next;
@@ -3365,29 +3362,6 @@ static ngtcp2_ssize conn_write_pkt(ngtcp2_conn *conn, ngtcp2_pkt_info *pi,
}
}
- /* Add ACK if MAX_DATA or MAX_STREAM_DATA frame is encoded to
- decrease packet count. */
- if (ackfr == NULL && credit_expanded) {
- rv = conn_create_ack_frame(
- conn, &ackfr, pktns, type, ts, /* ack_delay = */ 0,
- conn->local.transport_params.ack_delay_exponent);
- if (rv != 0) {
- assert(ngtcp2_err_is_fatal(rv));
- return rv;
- }
-
- if (ackfr) {
- rv = conn_ppe_write_frame_hd_log(conn, ppe, &hd_logged, hd, ackfr);
- if (rv != 0) {
- assert(NGTCP2_ERR_NOBUF == rv);
- } else {
- ngtcp2_acktr_commit_ack(&pktns->acktr);
- ngtcp2_acktr_add_ack(&pktns->acktr, hd->pkt_num,
- ackfr->ack.largest_ack);
- }
- }
- }
-
if (rv != NGTCP2_ERR_NOBUF && !send_stream && !send_datagram &&
!(rtb_entry_flags & NGTCP2_RTB_ENTRY_FLAG_ACK_ELICITING) &&
pktns->rtb.num_retransmittable && pktns->tx.frq == NULL &&
|
Add parameter to register function in node loader trampoline implementation. | @@ -21,15 +21,51 @@ napi_value node_loader_trampoline_register(napi_env env, napi_callback_info info
{
napi_status status;
- napi_value world;
+ const size_t args_size = 1;
+ size_t argc = args_size;
- status = napi_create_string_utf8(env, "world", 5, &world);
+ napi_value args[args_size];
+ napi_valuetype valuetype[args_size];
- printf("FUNCTION REGISTERED!!!! -----------\n");
+ status = napi_get_cb_info(env, info, &argc, args, nullptr, nullptr);
assert(status == napi_ok);
- return world;
+ if (argc < args_size)
+ {
+ napi_throw_type_error(env, nullptr, "Wrong number of arguments");
+
+ return nullptr;
+ }
+
+ status = napi_typeof(env, args[0], &valuetype[0]);
+
+ assert(status == napi_ok);
+
+ if (valuetype[0] != napi_string)
+ {
+ napi_throw_type_error(env, nullptr, "Wrong arguments type");
+
+ return nullptr;
+ }
+
+ const size_t ptr_str_size = 16 + 1;
+ size_t ptr_str_size_copied = 0;
+ char ptr_str[ptr_str_size];
+
+ status = napi_get_value_string_utf8(env, args[0], ptr_str, ptr_str_size, &ptr_str_size_copied);
+
+ assert(status == napi_ok);
+
+ napi_value ptr_value;
+
+ /* TODO */
+
+ status = napi_create_string_utf8(env, ptr_str, ptr_str_size_copied, &ptr_value);
+
+ assert(status == napi_ok);
+
+ return ptr_value;
}
napi_value node_loader_trampoline_register_initialize(napi_env env, napi_value exports)
|
flag to create oversampled trajectory | -# compare customAngle to default angle
+tests/test-traj-over: traj scale nrmse
+ set -e; mkdir $(TESTS_TMP) ; cd $(TESTS_TMP) ;\
+ $(TOOLDIR)/traj -x128 -y71 -r traja.ra ;\
+ $(TOOLDIR)/traj -x64 -y71 -o2. -r trajb.ra ;\
+ $(TOOLDIR)/scale 0.5 traja.ra traja2.ra ;\
+ $(TOOLDIR)/nrmse -t 0.0000001 traja2.ra trajb.ra ;\
+ rm *.ra ; cd .. ; rmdir $(TESTS_TMP)
+ touch $@
+
+TESTS += tests/test-traj-over
+
+
+# compare customAngle to default angle
tests/test-traj-custom: traj poly nrmse
set -e; mkdir $(TESTS_TMP) ; cd $(TESTS_TMP) ;\
|
Make range variadic. | (defn range
"Create an array of values [0, n)."
- [n]
+ [& args]
+ (case (length args)
+ 1 (do
+ (def [n] args)
(def arr (array.new n))
(loop [i :range [0 n]] (put arr i i))
arr)
+ 2 (do
+ (def [n m] args)
+ (def arr (array.new n))
+ (loop [i :range [n m]] (put arr (- i n) i))
+ arr)
+ (error "expected 1 to 2 arguments to range")))
(defn find-index
"Find the index of indexed type for which pred is true. Returns nil if not found."
|
Update yfm for ya make to 2.12.4 | @@ -8,9 +8,9 @@ ENDIF()
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
YFM_TOOL
- sbr:1388699902 FOR WIN32
- sbr:1388699770 FOR DARWIN
- sbr:1388699577 FOR LINUX
+ sbr:1392976057 FOR WIN32
+ sbr:1392975769 FOR DARWIN
+ sbr:1392975506 FOR LINUX
)
END()
|
jenkinsfile.release: do not abort if cp command for release-logs fails | @@ -745,7 +745,7 @@ def buildRelease(stageName, image, packageRevision='1',
url: 'https://github.com/ElektraInitiative/ftp.git'
}
dir('prev-release-logs') {
- sh "cp -R ../ftp/release-logs/${PREVIOUS_RELEASE_VERSION}/${stageName}/* ./"
+ sh "cp -R ../ftp/release-logs/${PREVIOUS_RELEASE_VERSION}/${stageName}/* ./ || /bin/true"
}
sh "sh libelektra/scripts/release/release.sh ${packageRevision} ${PREVIOUS_RELEASE_VERSION}"
sh "mv release.tar.gz ${stageName}-release.tar.gz"
|
bfd: always start timers with non-zero tick counts
Otherwise the tw_timer_template code ASSERTs...
Type: fix | @@ -332,6 +332,7 @@ bfd_set_timer (bfd_main_t * bm, bfd_session_t * bs, u64 now,
"wheel_time_ticks %u", bs->event_time_nsec,
bs->event_time_nsec - now,
(bs->event_time_nsec - now) * SEC_PER_NSEC, wheel_time_ticks);
+ wheel_time_ticks = wheel_time_ticks ? wheel_time_ticks : 1;
bfd_lock (bm);
if (bs->tw_id)
{
|
mmapstorage: align mmap footer properly | @@ -307,7 +307,8 @@ static void calculateDataSize (DestType destType, MmapHeader * mmapHeader, KeySe
if (destType == TYPE_MMAP)
{
- allocSize += SIZEOF_MMAPHEADER + SIZEOF_MMAPFOOTER;
+ size_t padding = sizeof (uint64_t) - (allocSize % sizeof (uint64_t)); // alignment for MMAP Footer at end of mapping
+ allocSize += SIZEOF_MMAPHEADER + SIZEOF_MMAPFOOTER + padding;
}
mmapHeader->allocSize = allocSize;
mmapHeader->numKeySets = 1 + metaKeySets;
|
Add multicast_listener to config template | @@ -691,6 +691,9 @@ static int core_config_template(struct re_printf *pf, const struct config *cfg)
"#dns_fallback\t\t8.8.8.8:53\n"
"#net_interface\t\t%H\n"
"\n"
+ "# multicasting - last octet should be even"
+ "#multicast_listener\t\t224.0.2.22"
+ "\n"
"# Play tones\n"
"#file_ausrc\t\taufile\n"
"#file_srate\t\t16000\n"
|
archives active order in +add-order | :: XX or re-use order-id?
=? fal.hit ?=(^ rod) [u.rod fal.hit]
:: XX check registration, defer
- new-order:effect(pen `(sy dom))
+ new-order:effect(rod ~, pen `(sy dom))
::
++ test
=, tester:tester
|
default to mandatory offload in check_smoke | @@ -27,6 +27,9 @@ path=$(pwd)
make clean
cleanup
+export OMP_TARGET_OFFLOAD=${OMP_TARGET_OFFLOAD:-MANDATORY}
+echo OMP_TARGET_OFFLOAD=$OMP_TARGET_OFFLOAD
+
echo ""
echo -e "$ORG"RUNNING ALL TESTS IN: $path"$BLK"
echo ""
|
vere: create $pier/.bin/pace automatically | @@ -1031,6 +1031,52 @@ _king_make_pace(c3_c* pac_c)
return 0;
}
+static c3_i
+_king_write_raw(c3_i fid_i, c3_y* buf_y, size_t len_i);
+
+/* _king_init_pace(): save pace file if not present
+*/
+static c3_i
+_king_init_pace(c3_c* pac_c)
+{
+ c3_c* bin_c;
+ c3_i fid_i, ret_i = asprintf(&bin_c, "%s/.bin/pace", u3_Host.dir_c);
+ c3_assert( ret_i > 0 );
+
+ if ( (-1 == (fid_i = open(bin_c, O_WRONLY | O_CREAT | O_EXCL, 0644))) ) {
+ if ( EEXIST == errno ) {
+ c3_free(bin_c);
+ // XX print something here?
+ //
+ return 0;
+ }
+ else {
+ u3l_log("dock: init pace (%s): open %s\n", pac_c, strerror(errno));
+ c3_free(bin_c);
+ return -1;
+ }
+ }
+
+ if ( _king_write_raw(fid_i, (c3_y*)pac_c, strlen(pac_c)) ) {
+ u3l_log("dock: init pace (%s): write %s\n", pac_c, strerror(errno));
+ close(fid_i);
+ c3_free(bin_c);
+ return -1;
+ }
+ // XX sync first?
+ //
+ else if ( close(fid_i) ) {
+ u3l_log("dock: init pace (%s): close %s\n", pac_c, strerror(errno));
+ c3_free(bin_c);
+ return 1;
+ }
+
+ u3l_log("dock: pace (%s): configured at %s/.bin/pace\r\n",
+ pac_c, u3_Host.dir_c);
+
+ return 0;
+}
+
/* _king_link_run(): ln [bin_c] $pier/.run
*/
static c3_i
@@ -1423,6 +1469,9 @@ u3_king_dock(c3_c* pac_c)
exit(1);
}
else {
+ // NB: failure ignored
+ //
+ _king_init_pace(pac_c);
u3l_log("vere: binary copy succeeded\r\n");
// XX print restart instructions
}
|
filter_modify: use new regex_find() API and fix group matching | @@ -403,7 +403,7 @@ static inline bool helper_msgpack_object_matches_regex(msgpack_object * obj,
return false;
}
- return (flb_regex_do(regex, key, len, &result) == 0);
+ return flb_regex_match(regex, (unsigned char *) key, len) > 0;
}
static inline bool kv_key_matches_regex(msgpack_object_kv * kv,
|
rand: declare get_hardware_random_value() before use.
Introduced by
Fixes | # if defined(OPENSSL_SYS_TANDEM) && defined(_TNS_X_TARGET)
# include <builtin.h> /* _rdrand64 */
# include <string.h> /* memcpy */
-static size_t get_hardware_random_value(unsigned char *buf, size_t len);
# else
size_t OPENSSL_ia32_rdseed_bytes(unsigned char *buf, size_t len);
size_t OPENSSL_ia32_rdrand_bytes(unsigned char *buf, size_t len);
# endif
+static size_t get_hardware_random_value(unsigned char *buf, size_t len);
+
/*
* Acquire entropy using Intel-specific cpu instructions
*
|
Fix location of visit_dist_data.tar.gz | @@ -419,16 +419,16 @@ endif()
# Add install command for contents of "data"
#-----------------------------------------------------------------------------
-IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/visit_dist_data.tar.gz)
+IF(EXISTS ${VISIT_SOURCE_DIR}/../data/visit_dist_data.tar.gz)
IF(VISIT_USE_7ZIP AND NOT "${SEVEN_ZIP_EXE}" STREQUAL "SEVEN_ZIP_EXE-NOTFOUND")
- SET (DIST_UNTAR_CMD1 "\"${SEVEN_ZIP_EXE}\" x -y \"${CMAKE_CURRENT_SOURCE_DIR}/visit_dist_data.tar.gz\"")
+ SET (DIST_UNTAR_CMD1 "\"${SEVEN_ZIP_EXE}\" x -y \"${VISIT_SOURCE_DIR}/../data/visit_dist_data.tar.gz\"")
SET (DIST_UNTAR_CMD2 "\"${SEVEN_ZIP_EXE}\" x -y visit_dist_data.tar")
SET (DIST_UNTAR_CMD3 "del /F visit_dist_data.tar")
INSTALL(CODE "execute_process(COMMAND ${DIST_UNTAR_CMD1} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )")
INSTALL(CODE "execute_process(COMMAND ${DIST_UNTAR_CMD2} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )")
INSTALL(CODE "execute_process(COMMAND ${DIST_UNTAR_CMD3} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )")
ELSE()
- SET(DIST_UNTAR_CMD "${TAR_CMD} ${UNTAR_ARGS} ${CMAKE_CURRENT_SOURCE_DIR}/visit_dist_data.tar.gz")
+ SET(DIST_UNTAR_CMD "${TAR_CMD} ${UNTAR_ARGS} ${VISIT_SOURCE_DIR}/../data/visit_dist_data.tar.gz")
INSTALL(CODE "execute_process(COMMAND ${DIST_UNTAR_CMD} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )")
ENDIF()
INSTALL(
|
BugID:23823178:optimize some code and annotation | @@ -46,7 +46,6 @@ void mb_main(void)
* Initiate write single registers request.
* data_resp: respond from the remote device. If the write operation succeeds,
* it's equal to data_write.
- * written.
*/
status = mbmaster_write_single_register(mb_handler, DEVICE1_SLAVE_ADDR, DEVICE1_REG1_ADDR,
data_write, NULL, &data_resp, NULL, AOS_WAIT_FOREVER);
@@ -73,8 +72,8 @@ void mb_main(void)
status = mbmaster_read_holding_registers(mb_handler, DEVICE1_SLAVE_ADDR, DEVICE1_REG1_ADDR,
REQ_REGISTER_NUMBER, buf, &len, AOS_WAIT_FOREVER);
if (status == MB_SUCCESS) {
- /* The register length on modbus is 16 bits, big end mode */
- register_buf = buf;
+ /* The register length on modbus is 16 bits */
+ register_buf = (uint16_t *)buf;
simulator1 = register_buf[0];
simulator2 = register_buf[1];
LOGI(MODBUSM_APP, "read holding register simulator1: %d,simulator2: %d", simulator1, simulator2);
|
[config_tool] Duplicate error for vUART connection
improve the translateError function by adding a condition: if there are errors describing the same error and same paths, remove the repeat one. | @@ -415,6 +415,7 @@ export default {
if (errorType === 'semantic') {
formErrors[vmid].push(error)
}
+ formErrors[vmid] = _.uniq(formErrors[vmid])
})
}
|
Allow to set an initial CXXFLAGS value from the command line of application's Makefile | @@ -257,7 +257,7 @@ ifneq ($(MODULES_IMACROS),)
CFLAGS += ${foreach d, $(MODULES_IMACROS), -imacros $(d)}
endif
-CXXFLAGS = $(subst -std=c99,-std=gnu++11,$(CFLAGS))
+CXXFLAGS += $(subst -std=c99,-std=gnu++11,$(CFLAGS))
CXXFLAGS += -fpermissive -fno-exceptions -fno-unwind-tables
CXXFLAGS += -fno-threadsafe-statics -fno-rtti -fno-use-cxa-atexit
|
Completions: Add suggestions for `with-recommends` | @@ -387,3 +387,7 @@ __fish_kdb_add_option "not __fish_kdb_subcommand; or __fish_kdb_subcommand_suppo
# --without-elektra -E
__fish_kdb_add_option '__fish_kdb_subcommand_includes export' 'without-elektra' 'E' 'Omit the `/elektra` directory'
+
+# --with-recommends -W
+set -l completion_function '__fish_kdb_subcommand_includes global-mount gmount mount smount spec-mount'
+__fish_kdb_add_option "$completion_function" 'with-recommends' 'W' 'Add recommended plugins'
|
sysdeps/managarm: fix return value of fcntl(F_SETFL) | @@ -552,6 +552,7 @@ int sys_fcntl(int fd, int request, va_list args, int *result) {
return EINVAL;
}
__ensure(resp.error() == managarm::fs::Errors::SUCCESS);
+ *result = 0;
return 0;
}else if(request == F_SETLK) {
mlibc::infoLogger() << "\e[31mmlibc: F_SETLK\e[39m" << frg::endlog;
|
Count free servers in pgbouncer style | @@ -806,8 +806,9 @@ od_console_show_lists_cb(od_route_t *route, void **argv)
od_route_lock(route);
int *used_servers = argv[0];
+ int *free_servers = argv[1];
(*used_servers) += route->server_pool.count_active;
- (*used_servers) += route->server_pool.count_idle;
+ (*free_servers) += route->server_pool.count_idle;
od_route_unlock(route);
return 0;
@@ -826,10 +827,11 @@ od_console_show_lists(od_client_t *client, machine_msg_t *stream)
od_router_lock(router);
int router_used_servers = 0;
+ int router_free_servers = 0;
int router_pools = router->route_pool.count;
int router_clients = od_atomic_u32_of(&router->clients);
- void *argv[] = { &router_used_servers };
+ void *argv[] = { &router_used_servers, &router_free_servers };
od_route_pool_foreach(&router->route_pool, od_console_show_lists_cb, argv);
od_router_unlock(router);
@@ -864,7 +866,7 @@ od_console_show_lists(od_client_t *client, machine_msg_t *stream)
if (rc == -1)
return -1;
/* free_servers */
- rc = od_console_show_lists_add(stream, "free_servers", 0);
+ rc = od_console_show_lists_add(stream, "free_servers", router_free_servers);
if (rc == -1)
return -1;
/* used_servers */
|
acrn-config: keep HV_RAM_START 2M memory align
Refine HV_RAM_START to keep 2M memory align for new board config.
Acked-by: Victor Sun | @@ -28,6 +28,8 @@ VM_NUM_MAP_TOTAL_HV_RAM_SIZE = {
7:0x10E00000,
}
+MEM_ALIGN = 2 * board_cfg_lib.SIZE_M
+
def find_avl_memory(ram_range, hpa_size, hv_start_offset):
"""
@@ -141,6 +143,7 @@ def generate_file(config):
total_size = reserved_ram + hv_ram_size
avl_start_addr = find_avl_memory(ram_range, str(total_size), hv_start_offset)
hv_start_addr = int(avl_start_addr, 16) + int(hex(reserved_ram), 16)
+ hv_start_addr = board_cfg_lib.round_up(hv_start_addr, MEM_ALIGN)
print("{}".format(DESC), file=config)
print('CONFIG_BOARD="{}"'.format(board_cfg_lib.BOARD_NAME), file=config)
|
Update documentation of _dictReset | @@ -93,8 +93,7 @@ uint64_t dictGenCaseHashFunction(const unsigned char *buf, int len) {
/* ----------------------------- API implementation ------------------------- */
-/* Reset a hash table already initialized with ht_init().
- * NOTE: This function should only be called by ht_destroy(). */
+/* Reset hash table parameters already initialized with _dictInit()*/
static void _dictReset(dict *d, int htidx)
{
d->ht_table[htidx] = NULL;
|
Another try to fix scan_build warning | @@ -3355,11 +3355,12 @@ send_properties_to_pm(neat_ctx *ctx, neat_flow *flow)
json_object_set(properties, "port", port);
json_decref(port);
+ if ((domains = json_array()) == NULL)
+ goto end;
+
char *tmp = strdup(flow->name);
char *ptr = NULL;
- if ((domains = json_array()) == NULL)
- goto end;
char *address_name = strtok_r((char *)tmp, ",", &ptr);
if (address_name == NULL) {
address = json_pack("{sssi}", "value", flow->name, "precedence", 2);
|
MARS: Ocean layer correct mapping for mars 'levelist' | @@ -82,9 +82,10 @@ if (extraDim) {
}
}
-# See ECC-854, ECC-1435, ECC-1451
+# See ECC-854, ECC-1435, ECC-1451, ECC-1462
if( (typeOfFirstFixedSurface == 151 && typeOfSecondFixedSurface == 151) ||
(typeOfFirstFixedSurface == 152 && typeOfSecondFixedSurface == 152) ||
+ (typeOfFirstFixedSurface == 168 && typeOfSecondFixedSurface == 168) ||
(typeOfFirstFixedSurface == 114 && typeOfSecondFixedSurface == 114) ) {
alias mars.levelist = bottomLevel;
alias ls.level = bottomLevel;
|
current draw: display as amps. | @@ -728,7 +728,7 @@ static void osd_display_regular() {
case OSD_CURRENT_DRAW:
if (osd_decode(*osd_current, ACTIVE)) {
- fast_fprint(print_buffer, 5, state.ibat_filtered, 0);
+ fast_fprint(print_buffer, 5, state.ibat_filtered / 1000.0f, 2);
print_buffer[4] = 154; // AMP icon
osd_print_data(print_buffer, 5, osd_decode(*osd_current, ATTRIBUTE), osd_decode(*osd_current, POSITIONX), osd_decode(*osd_current, POSITIONY));
}
|
Disable line search by default for YetiRank and YetiRankPairwise loss functions | @@ -499,11 +499,17 @@ void NCatboostOptions::TCatBoostOptions::Validate() const {
ObliviousTreeOptions->LeavesEstimationBacktrackingType != ELeavesEstimationStepBacktracking::Armijo,
"Backtracking type Armijo is supported only on GPU");
CB_ENSURE(
- LossFunctionDescription->GetLossFunction() != ELossFunction::PythonUserDefinedPerObject
+ lossFunction != ELossFunction::PythonUserDefinedPerObject
|| ObliviousTreeOptions->LeavesEstimationBacktrackingType == ELeavesEstimationStepBacktracking::No,
"Backtracking is not supported for custom loss functions on CPU");
}
+ if (ObliviousTreeOptions->LeavesEstimationBacktrackingType != ELeavesEstimationStepBacktracking::No) {
+ CB_ENSURE(
+ lossFunction != ELossFunction::YetiRank && lossFunction != ELossFunction::YetiRankPairwise,
+ "Backtracking is not supported for yetiRank and YetiRankPairwise loss functions");
+ }
+
ValidateCtrs(CatFeatureParams->SimpleCtrs, lossFunction, false);
for (const auto& perFeatureCtr : CatFeatureParams->PerFeatureCtrs.Get()) {
ValidateCtrs(perFeatureCtr.second, lossFunction, false);
@@ -606,6 +612,7 @@ void NCatboostOptions::TCatBoostOptions::SetNotSpecifiedOptionsToDefaults() {
NCatboostOptions::TLossDescription lossDescription;
lossDescription.Load(LossDescriptionToJson("PFound"));
MetricOptions->ObjectiveMetric.Set(lossDescription);
+ ObliviousTreeOptions->LeavesEstimationBacktrackingType.SetDefault(ELeavesEstimationStepBacktracking::No);
break;
}
case ELossFunction::PairLogit:
|
Version bumped to 0.4.3 | @@ -3,7 +3,7 @@ project (vcf-validator CXX C)
set (vcf-validator_VERSION_MAJOR 0)
set (vcf-validator_VERSION_MINOR 4)
-set (vcf-validator_VERSION_PATCH 2)
+set (vcf-validator_VERSION_PATCH 3)
# no unknown pragmas: ODB compiler uses some pragmas that the regular compiler doesn't need
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wno-unknown-pragmas")
|
Default config comments updated | #define ESP_IPD_MAX_BUFF_SIZE 1460
#endif
-/**
- * \brief Buffer size for received data waiting to be processed
- * \note When server mode is active and a lot of connections are in queue
- * this should be set high otherwise your buffer may overflow
- *
- * \note Buffer size also depends on TX user driver if it uses DMA or blocking mode
- * In case of DMA (CPU can work other tasks), buffer may be smaller as CPU
- * will have more time to process all the incoming bytes
- */
-#ifndef ESP_RCV_BUFF_SIZE
-#define ESP_RCV_BUFF_SIZE 0x400
-#endif
-
/**
* \brief Default baudrate used for AT port
*
#endif
/**
- * \brief Enables (1) or disables (0) direct support for processing input data
- * When this mode is enabled, no overhead is included for copying data
- * to receive data buffer because bytes are processed directly
+ * \brief Buffer size for received data waiting to be processed
+ * \note When server mode is active and a lot of connections are in queue
+ * this should be set high otherwise your buffer may overflow
*
- * \note This mode can only be used when \ref ESP_OS is enabled
+ * \note Buffer size also depends on TX user driver if it uses DMA or blocking mode
+ * In case of DMA (CPU can work other tasks), buffer may be smaller as CPU
+ * will have more time to process all the incoming bytes
+ *
+ * \note This parameter has no meaning when \ref ESP_INPUT_USE_PROCESS is enabled
*/
-#ifndef ESP_INPUT_USE_PROCESS
-#define ESP_INPUT_USE_PROCESS 0
+#ifndef ESP_RCV_BUFF_SIZE
+#define ESP_RCV_BUFF_SIZE 0x400
#endif
/**
/**
* \brief Set number of message queue entries for processing thread
* Message queue is used to notify processing thread about new received data on AT port
+ *
+ * \note This parameter has no meaning when \ref ESP_INPUT_USE_PROCESS is enabled
*/
#ifndef ESP_THREAD_PROCESS_MBOX_SIZE
#define ESP_THREAD_PROCESS_MBOX_SIZE 10
#endif
+/**
+ * \brief Enables (1) or disables (0) direct support for processing input data
+ * When this mode is enabled, no overhead is included for copying data
+ * to receive buffer because bytes are processed directly.
+ *
+ * \note This mode can only be used when \ref ESP_OS is enabled
+ *
+ * \note When using this mode, separate thread must be dedicated only
+ * for reading data on AT port
+ *
+ * \note Best case for using this mode is if DMA receive is supported by host device
+ */
+#ifndef ESP_INPUT_USE_PROCESS
+#define ESP_INPUT_USE_PROCESS 0
+#endif
+
/**
* \}
*/
|
Fix `pyto_ui.View.gesture_recognizers` | @@ -2561,7 +2561,7 @@ class View:
else:
_recognizers = []
for recognizer in recognizers:
- _recognizer = self.__class__()
+ _recognizer = GestureRecognizer(GESTURE_TYPE_TAP)
_recognizer.__py_gesture__ = recognizer
_recognizers.append(_recognizer)
return _recognizers
|
[Fix] get minimal AT ESP32 version
Wrong Major element setting at ESP32 min version | @@ -539,7 +539,7 @@ lwesp_get_min_at_fw_version(lwesp_sw_version_t* const version) {
#endif /* LWESP_CFG_ESP8266 */
#if LWESP_CFG_ESP32
} else if (esp.m.device == LWESP_DEVICE_ESP32) {
- lwesp_set_fw_version(version, LWESP_MIN_AT_VERSION_MAJOR_ESP8266, LWESP_MIN_AT_VERSION_MINOR_ESP32, LWESP_MIN_AT_VERSION_PATCH_ESP32);
+ lwesp_set_fw_version(version, LWESP_MIN_AT_VERSION_MAJOR_ESP32, LWESP_MIN_AT_VERSION_MINOR_ESP32, LWESP_MIN_AT_VERSION_PATCH_ESP32);
#endif /* LWESP_CFG_ESP32 */
#if LWESP_CFG_ESP32_C3
} else if (esp.m.device == LWESP_DEVICE_ESP32_C3) {
|
added information if non-PBKDF2 EAPOL messages/PMKIDs detected | @@ -248,6 +248,7 @@ static long int eapolm32e2count;
static long int eapolm32e3count;
static long int eapolm34e3count;
static long int eapolm34e4count;
+static long int akmpmkideapolignoredcount;
static long int eapmd5writtencount;
static long int eapmd5johnwrittencount;
static long int eapleapwrittencount;
@@ -516,6 +517,7 @@ eapolm32e2count = 0;
eapolm32e3count = 0;
eapolm34e3count = 0;
eapolm34e4count = 0;
+akmpmkideapolignoredcount = 0;
eapmd5writtencount = 0;
eapmd5johnwrittencount = 0;
eapleapwrittencount = 0;
@@ -681,6 +683,13 @@ if((eapolwrittencount +eapolncwrittencount +eapolwrittenhcpxcountdeprecated +eap
{
printf( "\nInformation: no hashes written to hash files\n");
}
+if(akmpmkideapolignoredcount > 0)
+ {
+ printf("\nInformation: the dump file contain some EAPOL messages / PMKIDs\n"
+ "which are not based on PBKDF2.\n"
+ "Using default options, they will not be converted to hash file.\n");
+ }
+
if(sequenceerrorcount > 0)
{
printf("\nWarning: out of sequence timestamps!\n"
@@ -1920,11 +1929,15 @@ if(zeigermacold->type == AP)
zeigerpmkidakt = getpmkid(zeigermacold, zeigerpmkidakt);
zeigerhsakt = gethandshake(zeigermacold, zeigerhsakt);
}
- else if(((zeigermacold->akm &TAK_PSK) == TAK_PSK) || ((zeigermacold->akm &TAK_PSKSHA256) == TAK_PSKSHA256))
+ else
+ {
+ if(((zeigermacold->akm &TAK_PSK) == TAK_PSK) || ((zeigermacold->akm &TAK_PSKSHA256) == TAK_PSKSHA256))
{
zeigerpmkidakt = getpmkid(zeigermacold, zeigerpmkidakt);
zeigerhsakt = gethandshake(zeigermacold, zeigerhsakt);
}
+ else akmpmkideapolignoredcount++;
+ }
}
}
essiddupecount = 0;
@@ -1951,11 +1964,15 @@ for(zeigermac = aplist +1; zeigermac < aplistptr; zeigermac++)
zeigerpmkidakt = getpmkid(zeigermac, zeigerpmkidakt);
zeigerhsakt = gethandshake(zeigermac, zeigerhsakt);
}
- else if(((zeigermac->akm &TAK_PSK) == TAK_PSK) || ((zeigermac->akm &TAK_PSKSHA256) == TAK_PSKSHA256))
+ else
+ {
+ if(((zeigermac->akm &TAK_PSK) == TAK_PSK) || ((zeigermac->akm &TAK_PSKSHA256) == TAK_PSKSHA256))
{
zeigerpmkidakt = getpmkid(zeigermac, zeigerpmkidakt);
zeigerhsakt = gethandshake(zeigermac, zeigerhsakt);
}
+ else akmpmkideapolignoredcount++;
+ }
zeigermacold = zeigermac;
}
return;
|
Support the partial write case in payload file output. Change payload names back to rip:rport_lip:lport so no change to the CLI is required. | @@ -2599,13 +2599,13 @@ doPayload()
case NETTX:
case TLSTX:
snprintf(path, PATH_MAX, "%s/%d_%s:%s_%s:%s.out",
- ctlPayDir(g_ctl), g_proc.pid, lip, lport, rip, rport);
+ ctlPayDir(g_ctl), g_proc.pid, rip, rport, lip, lport);
break;
case NETRX:
case TLSRX:
snprintf(path, PATH_MAX, "%s/%d_%s:%s_%s:%s.in",
- ctlPayDir(g_ctl), g_proc.pid, lip, lport, rip, rport);
+ ctlPayDir(g_ctl), g_proc.pid, rip, rport, lip, lport);
break;
default:
@@ -2618,7 +2618,22 @@ doPayload()
if (checkEnv("SCOPE_PAYLOAD_HEADER", "true")) {
g_fn.write(fd, pay, rc);
}
- g_fn.write(fd, pinfo->data, pinfo->len);
+
+ size_t to_write = pinfo->len;
+ size_t written = 0;
+ int rc;
+
+ while (to_write > 0) {
+ rc = g_fn.write(fd, pinfo->data, to_write);
+ if (rc <= 0) {
+ DBG(NULL);
+ break;
+ }
+
+ written += rc;
+ to_write -= rc;
+ }
+
g_fn.close(fd);
}
}
|
INI parser: fix space handling | @@ -144,6 +144,11 @@ int ini_parse_file (FILE * file, const struct IniConfig * config, void * user)
continue;
}
start = lskip (line);
+ if (*start == '\0')
+ {
+ if (!config->commentHandler (user, "") && !error) error = lineno;
+ continue;
+ }
if (isContinuation (line, config) && config->supportMultiline && *prev_name)
{
start = line + strlen (config->continuationString);
|
PROV: Ensure the AlgorithmIdentifier registers in DSA signature impl
When setting up the hash function for DSA signature, the encoded
AlgorithmIdentifier for the DSA+hash combination is queried, but not
stored, which leads to problems when signing ASN.1 items in libcrypto. | @@ -157,6 +157,8 @@ static int dsa_setup_md(PROV_DSA_CTX *ctx,
ctx->md = md;
OPENSSL_strlcpy(ctx->mdname, mdname, sizeof(ctx->mdname));
+ memcpy(ctx->aid, algorithmidentifier, algorithmidentifier_len);
+ ctx->aid_len = algorithmidentifier_len;
}
return 1;
}
|
[ARB] Fixed a bug introduced by last commit (forgot to alias) | @@ -2403,6 +2403,14 @@ void parseToken(sCurStatus* curStatusPtr, int vertex, char **error_msg, struct s
if (!strcmp(tok, "half")) {
// Special case for the 'half' keyword
pushArray((sArray*)curStatusPtr->curValue.newVar.var, strdup("gl4es_half"));
+
+ // Hopefully this doesn't make a free-after-free in case of error (though it shouldn't)
+ int ret;
+ khint_t varIdx = kh_put(variables, curStatusPtr->varsMap, tok, &ret);
+ if (ret < 0) {
+ FAIL("Unknown error");
+ }
+ kh_val(curStatusPtr->varsMap, varIdx) = curStatusPtr->curValue.newVar.var;
}
pushArray((sArray*)curStatusPtr->curValue.newVar.var, tok);
|
libcupsfilters: Removed debug helper lines in pwgtoraster() filter function | @@ -1184,9 +1184,6 @@ static bool outPage(pwgtoraster_doc_t *doc,
doc->outheader.PageSize[0] = doc->inheader.PageSize[0];
doc->outheader.PageSize[1] = doc->inheader.PageSize[1];
- doc->outheader.HWResolution[0] = doc->inheader.HWResolution[0] * 2;
- doc->outheader.HWResolution[1] = doc->inheader.HWResolution[1] * 2;
-
memset(paperdimensions, 0, sizeof(paperdimensions));
memset(margins, 0, sizeof(margins));
if (doc->ppd)
|
Added more changes. | sourceannounce
==
::
- =/ actions=(list move)
- :~ [ost.bol %connect / [~ /'~chat'] %chat]
+ :_ this
+ :* [ost.bol %connect / [~ /'~chat'] %chat]
launcha
peer-inbox
(hall-peer circlespat circlespat)
(hall-source [our.bol %i])
+ hall-actions
==
- :_ this
- (weld actions hall-actions)
::
:_ this(+<+ u.old)
[launcha]~
|= wir=wire
^- (quip move _this)
=* messages messages.str
- =/ lismov=(list move)
+ :_ this
+ :- [ost.bol %diff %chat-config str]
%+ murn ~(tap by messages)
|= [cir=circle:hall lis=(list envelope:hall)]
^- (unit move)
%chat-update
[%messages cir start end (swag [start offset] u.envs)]
==
- :_ this
- [[ost.bol %diff %chat-config str] lismov]
+
::
:: +poke-chat: send us an action
::
::
%circles
?> ?=(%circles -.piz)
- :_ this(circles.str cis.piz)
+ =/ sta
+ %= str
+ circles cis.piz
+ ==
+ :_ this(str sta)
(send-chat-update [[%circles cis.piz] sta])
::
:: %circle wire
::
%circle
?> ?=(%circle -.piz)
- =/ circle/circle:hall [our.bol &3:wir]
+ =/ circle=circle:hall [our.bol &3:wir]
::
:: fill inbox config and remote configs with prize data
::
^- [circle:hall (list envelope:hall)]
[cir ~]
::
- =/ localpeers=(set @p)
- (silt (turn ~(tap by loc.pes.piz) head))
+ =/ localpeers=(set @p) (silt (turn ~(tap by loc.pes.piz) head))
::
=/ peers=(map circle:hall (set @p))
%- ~(rep by rem.pes.piz)
peers (~(uni by peers.str) (~(put by peers) circle localpeers))
==
=/ messageupdate=update [%messages circle 0 (lent messages) nes.piz]
- :- (send-chat-update [messageupdate sta])
- this(str sta)
+ :_ this(str sta)
+ (send-chat-update [messageupdate sta])
==
::
:: +diff-hall-rumor: handle updates to hall state
messages (~(del by messages.str) circ)
peers (~(del by peers.str) circ)
==
- :- (send-chat-update [[%delete circ] sta])
- this(str sta)
+ :_ this(str sta)
+ (send-chat-update [[%delete circ] sta])
::
==
:: end of branching on dif.sto type
|
apps/btshell: Add more printouts to extended advertising event | @@ -907,9 +907,15 @@ btshell_decode_adv_data(uint8_t *adv_data, uint8_t adv_data_len)
static void
btshell_decode_event_type(struct ble_gap_ext_disc_desc *desc)
{
+ uint8_t directed = 0;
+
if (desc->props & BLE_HCI_ADV_LEGACY_MASK) {
console_printf("Legacy PDU type %d", desc->legacy_event_type);
- goto adv_data;
+ if (desc->legacy_event_type == BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_HD ||
+ desc->legacy_event_type == BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_LD) {
+ directed = 1;
+ }
+ goto common_data;
}
console_printf("Extended adv: ");
@@ -921,6 +927,7 @@ btshell_decode_event_type(struct ble_gap_ext_disc_desc *desc)
}
if (desc->props & BLE_HCI_ADV_DIRECT_MASK) {
console_printf("'dir' ");
+ directed = 1;
}
if (desc->props & BLE_HCI_ADV_SCAN_RSP_MASK) {
@@ -941,9 +948,20 @@ btshell_decode_event_type(struct ble_gap_ext_disc_desc *desc)
console_printf("reserved %d", desc->data_status);
break;
}
+
+common_data:
+ console_printf(" rssi=%d txpower=%d, pphy=%d, sphy=%d, sid=%d,"
+ " addr_type=%d addr=",
+ desc->rssi, desc->tx_power, desc->prim_phy, desc->sec_phy,
+ desc->sid, desc->addr.type);
+ print_addr(desc->addr.val);
+ if (directed) {
+ console_printf(" init_addr_type=%d inita=", desc->direct_addr.type);
+ print_addr(desc->direct_addr.val);
+ }
+
console_printf("\n");
-adv_data:
if(!desc->length_data) {
return;
}
|
Remove testing for cxx11 and cxx14 from conan package id | @@ -91,7 +91,7 @@ class CelixConan(ConanFile):
"enable_undefined_sanitizer": False,
"enable_thread_sanitizer": False,
"enable_testing_dependency_manager_for_cxx11": False,
- "eenable_testing_for_cxx14": False,
+ "enable_testing_for_cxx14": False,
"celix_add_openssl_dep": False,
"build_all": False,
"build_deployment_admin": False,
@@ -147,6 +147,8 @@ class CelixConan(ConanFile):
del self.info.options.build_cxx_rsa_integration
del self.info.options.build_examples
del self.info.options.build_shell_bonjour
+ del self.info.options.enable_testing_dependency_manager_for_cxx11
+ del self.info.options.enable_testing_for_cxx14
def build_requirements(self):
if self.options.enable_testing:
|
gpio: update gpio sleep workaround config name | @@ -562,7 +562,7 @@ esp_err_t gpio_wakeup_enable(gpio_num_t gpio_num, gpio_int_type_t intr_type)
#endif
portENTER_CRITICAL(&gpio_context.gpio_spinlock);
gpio_hal_wakeup_enable(gpio_context.gpio_hal, gpio_num, intr_type);
-#if SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND
+#if SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND
gpio_hal_sleep_sel_dis(gpio_context.gpio_hal, gpio_num);
#endif
portEXIT_CRITICAL(&gpio_context.gpio_spinlock);
@@ -585,7 +585,7 @@ esp_err_t gpio_wakeup_disable(gpio_num_t gpio_num)
#endif
portENTER_CRITICAL(&gpio_context.gpio_spinlock);
gpio_hal_wakeup_disable(gpio_context.gpio_hal, gpio_num);
-#if SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND
+#if SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND
gpio_hal_sleep_sel_en(gpio_context.gpio_hal, gpio_num);
#endif
portEXIT_CRITICAL(&gpio_context.gpio_spinlock);
@@ -910,7 +910,7 @@ esp_err_t gpio_deep_sleep_wakeup_enable(gpio_num_t gpio_num, gpio_int_type_t int
}
portENTER_CRITICAL(&gpio_context.gpio_spinlock);
gpio_hal_deepsleep_wakeup_enable(gpio_context.gpio_hal, gpio_num, intr_type);
-#if SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND
+#if SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND
gpio_hal_sleep_sel_dis(gpio_context.gpio_hal, gpio_num);
#endif
portEXIT_CRITICAL(&gpio_context.gpio_spinlock);
@@ -925,7 +925,7 @@ esp_err_t gpio_deep_sleep_wakeup_disable(gpio_num_t gpio_num)
}
portENTER_CRITICAL(&gpio_context.gpio_spinlock);
gpio_hal_deepsleep_wakeup_disable(gpio_context.gpio_hal, gpio_num);
-#if SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND
+#if SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND
gpio_hal_sleep_sel_en(gpio_context.gpio_hal, gpio_num);
#endif
portEXIT_CRITICAL(&gpio_context.gpio_spinlock);
|
rsa: update command line app to use EVP calls | * https://www.openssl.org/source/license.html
*/
-/* We need to use the deprecated RSA low level calls */
-#define OPENSSL_SUPPRESS_DEPRECATED
-
#include <openssl/opensslconf.h>
#include <stdio.h>
@@ -79,6 +76,8 @@ int rsa_main(int argc, char **argv)
ENGINE *e = NULL;
BIO *out = NULL;
RSA *rsa = NULL;
+ EVP_PKEY *pkey = NULL;
+ EVP_PKEY_CTX *pctx;
const EVP_CIPHER *enc = NULL;
char *infile = NULL, *outfile = NULL, *prog;
char *passin = NULL, *passout = NULL, *passinarg = NULL, *passoutarg = NULL;
@@ -181,11 +180,9 @@ int rsa_main(int argc, char **argv)
goto end;
}
- {
- EVP_PKEY *pkey;
-
if (pubin) {
int tmpformat = -1;
+
if (pubin == 2) {
if (informat == FORMAT_PEM)
tmpformat = FORMAT_PEMRSA;
@@ -202,8 +199,6 @@ int rsa_main(int argc, char **argv)
if (pkey != NULL)
rsa = EVP_PKEY_get1_RSA(pkey);
- EVP_PKEY_free(pkey);
- }
if (rsa == NULL) {
ERR_print_errors(bio_err);
@@ -216,7 +211,8 @@ int rsa_main(int argc, char **argv)
if (text) {
assert(pubin || private);
- if (!RSA_print(out, rsa, 0)) {
+ if ((pubin && EVP_PKEY_print_public(out, pkey, 0, NULL) <= 0)
+ || (!pubin && EVP_PKEY_print_private(out, pkey, 0, NULL) <= 0)) {
perror(outfile);
ERR_print_errors(bio_err);
goto end;
@@ -232,7 +228,16 @@ int rsa_main(int argc, char **argv)
}
if (check) {
- int r = RSA_check_key_ex(rsa, NULL);
+ int r;
+
+ pctx = EVP_PKEY_CTX_new_from_pkey(NULL, pkey, NULL);
+ if (pctx == NULL) {
+ BIO_printf(out, "RSA unable to create PKEY context\n");
+ ERR_print_errors(bio_err);
+ goto end;
+ }
+ r = EVP_PKEY_check(pctx);
+ EVP_PKEY_CTX_free(pctx);
if (r == 1) {
BIO_printf(out, "RSA key ok\n");
@@ -321,6 +326,7 @@ int rsa_main(int argc, char **argv)
end:
release_engine(e);
BIO_free_all(out);
+ EVP_PKEY_free(pkey);
RSA_free(rsa);
OPENSSL_free(passin);
OPENSSL_free(passout);
|
sse2: fix set but not used variable in _mm_cvtps_epi32 | @@ -2694,17 +2694,20 @@ simde_mm_cvtps_epi32 (simde__m128 a) {
return _mm_cvtps_epi32(a);
#else
simde__m128i_private r_;
- simde__m128_private a_ = simde__m128_to_private(a);
+ simde__m128_private a_;
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE) && defined(SIMDE_FAST_CONVERSION_RANGE) && defined(SIMDE_FAST_ROUND_TIES) && !defined(SIMDE_BUG_GCC_95399)
+ a_ = simde__m128_to_private(a);
r_.neon_i32 = vcvtnq_s32_f32(a_.neon_f32);
#elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE) && defined(SIMDE_FAST_CONVERSION_RANGE) && defined(SIMDE_FAST_ROUND_TIES)
+ a_ = simde__m128_to_private(a);
HEDLEY_DIAGNOSTIC_PUSH
SIMDE_DIAGNOSTIC_DISABLE_C11_EXTENSIONS_
SIMDE_DIAGNOSTIC_DISABLE_VECTOR_CONVERSION_
r_.altivec_i32 = vec_cts(a_.altivec_f32, 1);
HEDLEY_DIAGNOSTIC_POP
#elif defined(SIMDE_WASM_SIMD128_NATIVE) && defined(SIMDE_FAST_CONVERSION_RANGE) && defined(SIMDE_FAST_ROUND_TIES)
+ a_ = simde__m128_to_private(a);
r_.wasm_v128 = wasm_i32x4_trunc_sat_f32x4(a_.wasm_v128);
#else
a_ = simde__m128_to_private(simde_x_mm_round_ps(a, SIMDE_MM_FROUND_TO_NEAREST_INT, 1));
|
Tried to compensate 6 button read to avoid the UP+DOWN issue state (emulator or unofficial controller) | @@ -649,11 +649,13 @@ static u16 read6Btn(u16 port)
v1 = TH_CONTROL_PHASE(pb); /* - 0 s a 0 0 d u - 1 c b r l d u */
val = TH_CONTROL_PHASE(pb); /* - 0 s a 0 0 d u - 1 c b r l d u */
v2 = TH_CONTROL_PHASE(pb); /* - 0 s a 0 0 0 0 - 1 c b m x y z */
- val = TH_CONTROL_PHASE(pb); /* - 0 s a - - - - - 1 c b r l d u */
+ val = TH_CONTROL_PHASE(pb); /* - 0 s a x x x x - 1 c b r l d u */
+ /* x should be read as 1 on a 6 button controller but in some case we read 0 so take care of that */
// On a six-button controller, bits 0-3 of the high byte will always read 0.
- // This corresponds to up + down on a 3-button controller.
- if ((v2 & 0x0F00) != 0x0000) v2 = (JOY_TYPE_PAD3 << JOY_TYPE_SHIFT) | 0x0F00; /* three button pad */
+ // This corresponds to up + down on a 3-button controller, on some controller or emulator that is a possible combination so we try
+ // to compensante using last TH low read which should return 1111 on 6 buttons controller (not 100% though).
+ if (((v2 & 0x0F00) != 0x0000) || ((val & 0x0C00) == 0x0000)) v2 = (JOY_TYPE_PAD3 << JOY_TYPE_SHIFT) | 0x0F00; /* three button pad */
else v2 = (JOY_TYPE_PAD6 << JOY_TYPE_SHIFT) | ((v2 & 0x000F) << 8); /* six button pad */
val = ((v1 & 0x3000) >> 6) | (v1 & 0x003F); /* 0 0 0 0 0 0 0 0 s a c b r l d u */
|
Include client credential keys in devModeKeyProvisioning | /* Client credential includes. */
#include "aws_clientcredential.h"
+#include "aws_clientcredential_keys.h"
#include "aws_default_root_certificates.h"
/* Key provisioning include. */
|
publish: fix notebook deletion card flushing bug | =/ note-name i.t.t.t.t.pax
=/ book (~(get by books.sty) book-name)
?~ book
- [~ sty]
+ [cad sty]
=. notes.u.book (~(del by notes.u.book) note-name)
=/ delta=notebook-delta [%del-note our.bol book-name note-name]
=^ cards sty (handle-notebook-delta delta sty)
=/ note-name i.t.t.t.t.pax
=/ comment-date (slaw %da i.t.t.t.t.t.pax)
?~ comment-date
- [~ sty]
+ [cad sty]
=/ delta=notebook-delta
[%del-comment our.bol book-name note-name u.comment-date]
=^ cards sty (handle-notebook-delta delta sty)
|
CMakeLists: bump btc-only firmware patch version | @@ -87,7 +87,7 @@ endif()
# Versions MUST contain three parts and start with lowercase 'v'.
# Example 'v1.0.0'. They MUST not contain a pre-release label such as '-beta'.
set(FIRMWARE_VERSION "v4.1.0")
-set(FIRMWARE_BTC_ONLY_VERSION "v4.1.0")
+set(FIRMWARE_BTC_ONLY_VERSION "v4.1.1")
set(BOOTLOADER_VERSION "v1.0.1")
find_package(PythonInterp 3.6 REQUIRED)
|
esp_timer: fix ESP_TIMER_ISR dispatch method due to off by one error | @@ -959,7 +959,7 @@ static void timer_isr_callback(void* arg)
int64_t now = esp_timer_get_time();
int64_t dt = now - old_time[num_timer];
old_time[num_timer] = now;
- if (num_timer == 1) {
+ if (num_timer == 0) {
esp_rom_printf("(%lld): \t\t\t\t timer ISR, dt: %lld us\n", now, dt);
assert(xPortInIsrContext());
} else {
@@ -971,7 +971,7 @@ static void timer_isr_callback(void* arg)
TEST_CASE("Test ESP_TIMER_ISR dispatch method", "[esp_timer]")
{
TEST_ESP_OK(esp_timer_dump(stdout));
- int timer[2]= {1, 2};
+ int timer[2]= {0, 1};
const esp_timer_create_args_t periodic_timer1_args = {
.callback = &timer_isr_callback,
.dispatch_method = ESP_TIMER_ISR,
|
Fixes Update reference to issues
Thanks Mats Dufberg | @@ -97,7 +97,7 @@ contrib/build-solaris.sh
KNOWN ISSUES
A complete list of currently known open issues can be found here:
-http://www.nlnetlabs.nl/projects/ldns/bugs
+https://github.com/NLnetLabs/ldns/issues
* pyldns
Compiling pyldns produces many ``unused parameter'' warnings. Those are
|
Don't trigger buttonevents for Xiaomi WXKG01LM in hourly report
Also don't fire state.lastupdated event, since this might cause rules
for Xiaomi motion and contact sensors to fire.
Issue | @@ -8744,10 +8744,13 @@ void DeRestPluginPrivate::handleZclAttributeReportIndicationXiaomiSpecial(const
{
// don't update Mija devices
// e.g. lumi.sensor_motion always reports 1
+ if (item)
+ {
sensor.updateStateTimestamp();
- enqueueEvent(Event(RSensors, RStateLastUpdated, sensor.id()));
+ //enqueueEvent(Event(RSensors, RStateLastUpdated, sensor.id()));
updated = true;
}
+ }
else if (sensor.modelId().startsWith(QLatin1String("lumi.sensor_wleak")))
{
// only update state timestamp assuming last known value is valid
|
Add "loaded.anchor" event for anchor widget | #define DEFAULT_PATH
static struct LCUI_Anchor {
+ int event_id;
LCUI_WidgetPrototype proto;
} self;
-void AppendToTarget( LCUI_Widget target, LCUI_Widget box )
+void AppendToTarget( LCUI_Widget w, LCUI_Widget box )
{
+ const char *attr_target;
+ LCUI_Widget target, root;
+ LCUI_WidgetEventRec ev = { 0 };
+
+ attr_target = Widget_GetAttribute( w, "target" );
+ if( !attr_target ) {
+ return;
+ }
+ target = LCUIWidget_GetById( attr_target );
+ if( !target ) {
+ return;
+ }
+ root = LCUIWidget_GetRoot();
Widget_Empty( target );
Widget_Append( target, box );
Widget_Unwrap( box );
+ ev.target = w;
+ ev.type = self.event_id;
+ ev.cancel_bubble = TRUE;
+ Widget_TriggerEvent( root, &ev, NULL );
}
void Anchor_Open( LCUI_Widget w )
@@ -91,18 +109,18 @@ void Anchor_Open( LCUI_Widget w )
strcpy( href, prefix );
strcat( href, attr_href );
box = LCUIBuilder_LoadFile( href );
- attr_href = href;
+ free( href );
+ if( box ) {
+ LCUI_PostSimpleTask( AppendToTarget, w, box );
+ return;
+ }
}
box = LCUIBuilder_LoadFile( attr_href );
if( box ) {
- LCUI_PostSimpleTask( AppendToTarget, target, box );
- } else {
- LOG( "[anchor] href (%s): cannot load xml resource\n",
- attr_href );
- }
- if( href ) {
- free( href );
+ LCUI_PostSimpleTask( AppendToTarget, w, box );
+ return;
}
+ LOG( "[anchor] href (%s): cannot load xml resource\n", attr_href );
}
static void Anchor_OnClick( LCUI_Widget w, LCUI_WidgetEvent e, void *arg )
@@ -123,4 +141,6 @@ void LCUIWidget_AddAnchor( void )
{
self.proto = LCUIWidget_NewPrototype( "a", "textview" );
self.proto->init = Anchor_OnInit;
+ self.event_id = LCUIWidget_AllocEventId();
+ LCUIWidget_SetEventName( self.event_id, "loaded.anchor" );
}
|
Add comment to non-obvious code guard
Ad and body lengths can only be too big on builds where size_t is bigger
than 32 bits. This checking code therefore generates always true
comparison warnings on 32 bit platforms, and thus had to be guarded. | @@ -447,6 +447,9 @@ psa_status_t mbedtls_psa_aead_set_lengths( mbedtls_psa_aead_operation_t
#if defined(MBEDTLS_PSA_BUILTIN_ALG_GCM)
if( operation->alg == PSA_ALG_GCM )
{
+ /* Lengths can only be too large for GCM if size_t is bigger than 32
+ * bits. Without the guard this code will generate warnings on 32bit
+ builds */
#if SIZE_MAX > UINT32_MAX
if( ( (uint64_t) ad_length ) >> 61 != 0 ||
( (uint64_t) plaintext_length ) > 0xFFFFFFFE0ull )
|
release: print gradle debug and stacktrace | @@ -1096,7 +1096,7 @@ def buildAndPublishMaven() {
}
dir('src/bindings/jna') {
sh """\
-gradle -i -PreleaseVersion=${mavenReleaseVersion} \
+gradle --debug --full-stacktrace -PreleaseVersion=${mavenReleaseVersion} \
-PsonatypeUsername=${SONATYPE_USERNAME} -PsonatypePassword=${SONATYPE_PASSWORD} \
-Psigning.secretKeyRingFile=${KEY} -Psigning.keyId=07235980 -Psigning.password=\"${PASS}\" \
publishToSonatype closeAndReleaseSonatypeStagingRepository"""
|
BugID:21931778:Update OTA system reboot
OTA system reboot patch from ESP8266 | @@ -41,13 +41,9 @@ int hal_reboot_bank(void)
{
printf("reboot to banker\n");
wifi_set_sleep_type(NONE_SLEEP_T);
- vPortETSIntrLock();
- krhino_sched_disable();
- delay();
- delay();
+ aos_msleep(300);
system_upgrade_init();
system_upgrade_flag_set(UPGRADE_FLAG_FINISH);
system_upgrade_reboot();
- aos_msleep(300);
return 0;
}
|
grecon/optreg: remove unnecessary initialization | @@ -302,10 +302,6 @@ void opt_reg_configure(unsigned int N, const long img_dims[N], struct opt_reg_s*
long minsize[DIMS] = { [0 ... DIMS - 1] = 1 };
- minsize[0] = MIN(img_dims[0], 16);
- minsize[1] = MIN(img_dims[1], 16);
- minsize[2] = MIN(img_dims[2], 16);
-
unsigned int wflags = 0;
for (unsigned int i = 0; i < DIMS; i++) {
@@ -333,10 +329,6 @@ void opt_reg_configure(unsigned int N, const long img_dims[N], struct opt_reg_s*
md_calc_strides(N, img_strs, img_dims, CFL_SIZE);
long minsize[DIMS] = { [0 ... DIMS - 1] = 1 };
- minsize[0] = MIN(img_dims[0], 16);
- minsize[1] = MIN(img_dims[1], 16);
- minsize[2] = MIN(img_dims[2], 16);
-
unsigned int wflags = 0;
unsigned int wxdim = 0;
|
Clean up opae-c events tests | @@ -65,7 +65,6 @@ class event_c_p : public ::testing::TestWithParam<std::string> {
system_ = test_system::instance();
system_->initialize();
system_->prepare_syfs(platform_);
- invalid_device_ = test_device::unknown();
ASSERT_EQ(fpgaInitialize(NULL), FPGA_OK);
ASSERT_EQ(fpgaGetProperties(nullptr, &filter_), FPGA_OK);
@@ -74,7 +73,7 @@ class event_c_p : public ::testing::TestWithParam<std::string> {
ASSERT_EQ(fpgaEnumerate(&filter_, 1, tokens_.data(), tokens_.size(),
&num_matches_),
FPGA_OK);
- EXPECT_EQ(num_matches_, platform_.devices.size());
+ EXPECT_GT(num_matches_, 0);
accel_ = nullptr;
ASSERT_EQ(fpgaOpen(tokens_[0], &accel_, 0), FPGA_OK);
@@ -133,7 +132,6 @@ class event_c_p : public ::testing::TestWithParam<std::string> {
fpga_event_handle event_handle_;
test_platform platform_;
uint32_t num_matches_;
- test_device invalid_device_;
test_system *system_;
};
@@ -258,6 +256,5 @@ TEST_P(event_c_p, destroy_err) {
event_handle_), FPGA_OK);
}
-
-
-INSTANTIATE_TEST_CASE_P(event_c, event_c_p, ::testing::ValuesIn(test_platform::keys(true)));
+INSTANTIATE_TEST_CASE_P(event_c, event_c_p,
+ ::testing::ValuesIn(test_platform::platforms({})));
|
curve448: Use NLIMBS where appropriate to simplify the code | @@ -22,7 +22,7 @@ void gf_add_RAW(gf out, const gf a, const gf b)
{
unsigned int i;
- for (i = 0; i < 8; i++)
+ for (i = 0; i < NLIMBS; i++)
out->limb[i] = a->limb[i] + b->limb[i];
gf_weak_reduce(out);
@@ -33,8 +33,8 @@ void gf_sub_RAW(gf out, const gf a, const gf b)
uint64_t co1 = ((1ULL << 56) - 1) * 2, co2 = co1 - 2;
unsigned int i;
- for (i = 0; i < 8; i++)
- out->limb[i] = a->limb[i] - b->limb[i] + ((i == 4) ? co2 : co1);
+ for (i = 0; i < NLIMBS; i++)
+ out->limb[i] = a->limb[i] - b->limb[i] + ((i == NLIMBS / 2) ? co2 : co1);
gf_weak_reduce(out);
}
@@ -46,11 +46,11 @@ void gf_bias(gf a, int amt)
void gf_weak_reduce(gf a)
{
uint64_t mask = (1ULL << 56) - 1;
- uint64_t tmp = a->limb[7] >> 56;
+ uint64_t tmp = a->limb[NLIMBS - 1] >> 56;
unsigned int i;
- a->limb[4] += tmp;
- for (i = 7; i > 0; i--)
+ a->limb[NLIMBS / 2] += tmp;
+ for (i = NLIMBS - 1; i > 0; i--)
a->limb[i] = (a->limb[i] & mask) + (a->limb[i - 1] >> 56);
a->limb[0] = (a->limb[0] & mask) + tmp;
}
|
invoke github_changelog_generator via docker | @@ -406,7 +406,7 @@ html:
release:
$(call announce-begin,"Run release boilerplate")
- github_changelog_generator --no-author \
+ docker run -it --rm -v $(PWD):/usr/local/src/your-app ferrarimarco/github-changelog-generator \
--max-issues $(CHANGELOG_MAX_ISSUES) \
-t $(CHANGELOG_GITHUB_TOKEN)$ \
--user swift-nav --project libsbp \
|
Don't hardcode states strings - they've changed so use the httpStateString API instead. | @@ -3746,25 +3746,6 @@ process_http(ipp3d_client_t *client) /* I - Client connection */
hostname[HTTP_MAX_HOST];
/* Hostname */
int port; /* Port number */
- static const char * const http_states[] =
- { /* Strings for logging HTTP method */
- "WAITING",
- "OPTIONS",
- "GET",
- "GET_SEND",
- "HEAD",
- "POST",
- "POST_RECV",
- "POST_SEND",
- "PUT",
- "PUT_RECV",
- "DELETE",
- "TRACE",
- "CONNECT",
- "STATUS",
- "UNKNOWN_METHOD",
- "UNKNOWN_VERSION"
- };
/*
@@ -3812,7 +3793,7 @@ process_http(ipp3d_client_t *client) /* I - Client connection */
return (0);
}
- fprintf(stderr, "%s %s %s\n", client->hostname, http_states[http_state], uri);
+ fprintf(stderr, "%s %s %s\n", client->hostname, httpStateString(http_state), uri);
/*
* Separate the URI into its components...
|
extmod/modnxtdevices/TouchSensor: drop verify_type
Make this sensor consistent with other generic I/O classes: force port mode if needed. | @@ -84,8 +84,7 @@ typedef struct _nxtdevices_TouchSensor_obj_t {
// pybricks.nxtdevices.TouchSensor.__init__
STATIC mp_obj_t nxtdevices_TouchSensor_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args ) {
PB_PARSE_ARGS_CLASS(n_args, n_kw, args,
- PB_ARG_REQUIRED(port),
- PB_ARG_DEFAULT_TRUE(verify_type)
+ PB_ARG_REQUIRED(port)
);
nxtdevices_TouchSensor_obj_t *self = m_new_obj(nxtdevices_TouchSensor_obj_t);
@@ -93,9 +92,7 @@ STATIC mp_obj_t nxtdevices_TouchSensor_make_new(const mp_obj_type_t *type, size_
mp_int_t port_num = pb_type_enum_get_value(port, &pb_enum_type_Port);
- pbio_iodev_type_id_t id = mp_obj_is_true(verify_type) ? PBIO_IODEV_TYPE_ID_NXT_TOUCH_SENSOR : PBIO_IODEV_TYPE_ID_CUSTOM_ANALOG;
-
- self->pbdev = pbdevice_get_device(port_num, id);
+ self->pbdev = pbdevice_get_device(port_num, PBIO_IODEV_TYPE_ID_NXT_TOUCH_SENSOR);
return MP_OBJ_FROM_PTR(self);
}
|
Improve explanation in _preparation_next_release.md | @@ -49,7 +49,7 @@ The following section lists news about the [plugins](https://www.libelektra.org/
### opts
-- The `opts` plugin now includes deeply nested options and arguments in the help message. _(Tobias Schubert @qwepoizt)_
+- The `opts` plugin now includes deeply nested options and arguments in the generated help message. _(Tobias Schubert @qwepoizt)_
### <<Plugin2>>
|
file/close returns an integer.
If opened with popen, returns the exit code. Otherwise
returns nil. | @@ -286,12 +286,15 @@ static Janet cfun_io_fclose(int32_t argc, Janet *argv) {
#ifdef JANET_WINDOWS
#define pclose _pclose
#endif
- if (pclose(iof->file)) janet_panic("could not close file");
+ int status = pclose(iof->file);
+ iof->flags |= IO_CLOSED;
+ if (status) janet_panic("could not close file");
+ return janet_wrap_integer(status);
} else {
if (fclose(iof->file)) janet_panic("could not close file");
- }
iof->flags |= IO_CLOSED;
- return argv[0];
+ return janet_wrap_nil();
+ }
}
/* Seek a file */
|
hexnumber: fix formatting | @@ -317,9 +317,8 @@ void parseConfig (KeySet * config, HexnumberData * data)
if (!data->integerTypes)
{
- static char * default_types[] = { "byte", "short", "unsigned_short",
- "long", "unsigned_long", "long_long", "unsigned_long_long",
- NULL };
+ static char * default_types[] = { "byte", "short", "unsigned_short", "long",
+ "unsigned_long", "long_long", "unsigned_long_long", NULL };
data->integerTypes = default_types;
}
}
|
Add connection close in header for cloud rest | @@ -142,6 +142,7 @@ static int call_cloud_rest(CURL_HANDLE curl_handle, const char* request, char *a
elog(DEBUG3, "in call_cloud_rest: %s", buf);
headers = curl_slist_append(headers, buf);
}
+ headers = curl_slist_append(headers, "connection:close");
curl_easy_setopt(curl_handle->curl_handle, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl_handle->curl_handle, CURLOPT_POSTFIELDS, request);
|
Re-introduce ENUM validation in ecjpake.c | #if !defined(MBEDTLS_ECJPAKE_ALT)
-/* Parameter validation macros based on platform_util.h */
-#define ECJPAKE_VALIDATE_RET( cond ) \
- MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_ECP_BAD_INPUT_DATA )
-#define ECJPAKE_VALIDATE( cond ) \
- MBEDTLS_INTERNAL_VALIDATE( cond )
-
/*
* Convert a mbedtls_ecjpake_role to identifier string
*/
@@ -105,8 +99,8 @@ int mbedtls_ecjpake_setup( mbedtls_ecjpake_context *ctx,
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
- ECJPAKE_VALIDATE_RET( role == MBEDTLS_ECJPAKE_CLIENT ||
- role == MBEDTLS_ECJPAKE_SERVER );
+ if( role != MBEDTLS_ECJPAKE_CLIENT && role != MBEDTLS_ECJPAKE_SERVER )
+ return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
ctx->role = role;
|
[Rust] build_rust_toolchain.py can run unit tests on host machine | @@ -103,11 +103,18 @@ def setup_rust_toolchain():
if file.suffix == '.rlib':
shutil.copy(file.as_posix(), rust_target_dir.as_posix())
+
+def test_rust_programs() -> None:
+ programs_with_tests = [
+ "libfs",
]
+
+ for program_dir_name in programs_with_tests:
program_dir = _RUST_PROGRAMS_DIR / program_dir_name
run_and_check(
[
'cargo',
+ 'test',
'--release',
],
cwd=program_dir
@@ -148,12 +155,16 @@ def build_rust_programs() -> None:
def main() -> None:
parser = argparse.ArgumentParser()
parser.add_argument("--rebuild_libc", action="store_true")
+ parser.add_argument("--test", action="store_true")
parser.set_defaults(rebuild_libc=False)
args = parser.parse_args()
if args.rebuild_libc:
setup_rust_toolchain()
+ if args.test:
+ test_rust_programs()
+
build_rust_programs()
|
synthetic: commit changes to memcached module | @@ -13,18 +13,22 @@ use backend::*;
use Packet;
-static NVALUES : u64 = 100000;
-static PCT_SET : u64 = 10; // out of 100
-// static value_size : u32 = 0;
-// static key_size : u32 = 0;
-fn set_request(key: &String, opaque: u32, buf: &mut Vec<u8>) {
+static NVALUES : u64 = 1000000;
+static PCT_SET : u64 = 2; // out of 1000
+static VALUE_SIZE : usize = 2;
+static KEY_SIZE : usize = 20;
+
+macro_rules! key_fmt { ($key:expr) => (format_args!("{:020}", $key)) }
+
+fn set_request(key: u64, opaque: u32, buf: &mut Vec<u8>) {
+
let request_header = PacketHeader {
magic: Magic::Request as u8,
opcode: Opcode::Set as u8,
- key_length: key.len() as u16,
+ key_length: KEY_SIZE as u16,
extras_length: 8,
- total_body_length: (8 + key.len() + key.len()) as u32,
+ total_body_length: (8 + KEY_SIZE + VALUE_SIZE) as u32,
opaque: opaque,
..Default::default()
};
@@ -34,32 +38,33 @@ fn set_request(key: &String, opaque: u32, buf: &mut Vec<u8>) {
buf.push(0 as u8);
}
- buf.write_all(key.as_bytes()).unwrap();
- buf.write_all(key.as_bytes()).unwrap();
+ buf.write_fmt(key_fmt!(key)).unwrap();
+ for i in 0..VALUE_SIZE {
+ buf.push((((key * i as u64) >> (i % 4)) & 0xff) as u8);
+ }
}
pub fn create_request(i: usize, packet: &Packet, buf: &mut Vec<u8>) {
// Use first 32 bits of randomness to determine if this is a SET or GET req
let low32 = packet.randomness & 0xffffffff;
- // Use high 32 bits of randomness to select the key
- let key = ((packet.randomness >> 32) % NVALUES).to_string();
+ let key = (packet.randomness >> 32) % NVALUES;
- if low32 % 100 < PCT_SET {
- set_request(&key, i as u32, buf);
+ if low32 % 1000 < PCT_SET {
+ set_request(key, i as u32, buf);
return;
}
let request_header = PacketHeader {
magic: Magic::Request as u8,
opcode: Opcode::Get as u8,
- key_length: key.len() as u16,
- total_body_length: key.len() as u32,
+ key_length: KEY_SIZE as u16,
+ total_body_length: KEY_SIZE as u32,
opaque: i as u32,
..Default::default()
};
request_header.write(buf).unwrap();
- buf.write_all(key.as_bytes()).unwrap();
+ buf.write_fmt(key_fmt!(key)).unwrap();
}
pub fn parse_response(buf: &[u8]) -> Result<usize, ()> {
@@ -103,8 +108,7 @@ pub fn warmup(
for n in 0..perthread {
let mut vec: Vec<u8> = Vec::new();
- let key = (i * perthread + n).to_string();
- set_request(&key, 0, &mut vec);
+ set_request(i * perthread + n, 0, &mut vec);
if let Err(e) = sock1.send(&vec[..]) {
println!("Warmup send: {}", e);
|
Remove unused stored value | @@ -606,7 +606,7 @@ ngtcp2_ssize ngtcp2_pkt_decode_stream_frame(ngtcp2_stream *dest,
return NGTCP2_ERR_FRAME_ENCODING;
}
- p = ngtcp2_get_uvarint(&vi, p);
+ /* p = */ ngtcp2_get_uvarint(&vi, p);
if (payloadlen - len < vi) {
return NGTCP2_ERR_FRAME_ENCODING;
}
|
Don't fast poll OSRAM, IKEA and reporting devices after a group command was send | @@ -605,7 +605,21 @@ void DeRestPluginPrivate::apsdeDataConfirm(const deCONZ::ApsDataConfirm &conf)
for (LightNode &l : nodes)
{
- if (isLightNodeInGroup(&l, groupId))
+ if (!l.isAvailable() ||
+ !l.lastRx().isValid() ||
+ l.manufacturerCode() == VENDOR_IKEA ||
+ l.manufacturerCode() == VENDOR_OSRAM ||
+ l.manufacturerCode() == VENDOR_OSRAM_STACK ||
+ l.manufacturer().startsWith(QLatin1String("IKEA")) ||
+ l.manufacturer().startsWith(QLatin1String("OSRAM")))
+ {
+ continue;
+ }
+
+ // fast poll lights which don't support or have enabled ZCL reporting
+ const NodeValue &val = l.getZclValue(ONOFF_CLUSTER_ID, 0x0000);
+ if (!val.timestampLastReport.isValid() &&
+ isLightNodeInGroup(&l, groupId))
{
DBG_Printf(DBG_INFO, "\t0x%016llX force poll\n", l.address().ext());
pollManager->poll(&l);
|
refactor IP address handling - part 2 | @@ -99,7 +99,7 @@ nt_linux_handle_addr(struct neat_ctx *ctx, struct nlmsghdr *nl_hdr)
//TODO: Should this function be a callback instead? Will we have multiple
//addresses handlers/types of context?
- return nt_addr_update_src_list(ctx, &src_addr, ifm->ifa_index,
+ return nt_addr_update_src_list(ctx, (struct sockaddr*) &src_addr, ifm->ifa_index,
nl_hdr->nlmsg_type == RTM_NEWADDR,
ifm->ifa_prefixlen, ifa_pref, ifa_valid);
}
|
Add hardware reset pin support for STM32 port | @@ -288,17 +288,22 @@ configure_uart(uint32_t baudrate) {
if (usart_ll_thread_id == NULL) {
usart_ll_thread_id = osThreadCreate(osThread(usart_ll_thread), usart_ll_mbox_id);
}
+}
#if defined(ESP_RESET_PIN)
- /* Reset device on first init */
- if (!initialized) {
+/**
+ * \brief Hardware reset callback
+ */
+static uint8_t
+reset_device(uint8_t state) {
+ if (state) { /* Activate reset line */
LL_GPIO_ResetOutputPin(ESP_RESET_PORT, ESP_RESET_PIN);
- osDelay(1);
+ } else {
LL_GPIO_SetOutputPin(ESP_RESET_PORT, ESP_RESET_PIN);
- osDelay(200);
}
-#endif /* defined(ESP_RESET_PIN) */
+ return 1;
}
+#endif /* defined(ESP_RESET_PIN) */
/**
* \brief Send data to ESP device
@@ -333,6 +338,9 @@ esp_ll_init(esp_ll_t* ll) {
if (!initialized) {
ll->send_fn = send_data; /* Set callback function to send data */
+#if defined(ESP_RESET_PIN)
+ ll->reset_fn = reset_device; /* Set callback for hardware reset */
+#endif /* defined(ESP_RESET_PIN) */
esp_mem_assignmemory(mem_regions, ESP_ARRAYSIZE(mem_regions)); /* Assign memory for allocations */
}
|
azimuth: update state on-watch | ::
%- %- slog :_ ~
leaf+"azimuth: loading snapshot with {<(lent logs.state)>} events"
- =/ res (%*(run-logs do nas.state *^state:naive) logs.state)
- [(weld (jael-update:do (to-udiffs:do -.res)) start:do) this]
+ =^ snap-cards state
+ (%*(run-logs do nas.state *^state:naive) logs.state)
+ [(weld (jael-update:do (to-udiffs:do snap-cards)) start:do) this]
::
++ on-leave on-leave:def
++ on-peek
|
[core] fall back to getauxval(AT_RANDOM), if avail
fall back to use getauxval(AT_RANDOM), if available, for srand() init
getauxval(AT_RANDOM) is a glibc extension | #endif
#endif
+#ifdef __has_include
+#if __has_include(<sys/auxv.h>)
+#include <sys/auxv.h> /* getauxval(AT_RANDOM) is a glibc extension */
+#ifdef AT_RANDOM
+#define HAVE_GETAUXVAL
+#endif
+#endif
+#endif
+
/* Take some reasonable steps to attempt to *seed* random number generators with
* cryptographically random data. Some of these initialization routines may
* block, and are intended to be called only at startup in lighttpd, or
@@ -262,10 +271,24 @@ static void li_rand_init (void)
u = (unsigned int)(time(NULL) ^ getpid());
#else
/* NOTE: not cryptographically random !!! */
+ #ifdef HAVE_GETAUXVAL
+ char *auxv_random = (char *)(uintptr_t)getauxval(AT_RANDOM);
+ if (auxv_random) {
+ memcpy(&u, auxv_random, 4);
+ memcpy(xsubi, auxv_random+4, 6);
+ }
+ else
+ memset(xsubi, (u = 0), sizeof(xsubi));
+ srand((unsigned int)(time(NULL) ^ getpid()) ^ u);
+ for (u = 0; u < sizeof(unsigned short); ++u)
+ /* coverity[dont_call : FALSE] */
+ xsubi[u] ^= (unsigned short)(rand() & 0xFFFF);
+ #else
srand((unsigned int)(time(NULL) ^ getpid()));
for (u = 0; u < sizeof(unsigned short); ++u)
/* coverity[dont_call : FALSE] */
xsubi[u] = (unsigned short)(rand() & 0xFFFF);
+ #endif
u = ((unsigned int)xsubi[0] << 16) | xsubi[1];
#endif
}
|
update connect tooltips
add tooltips for connect in en | @@ -1974,3 +1974,25 @@ Blockly.MIXLY_ESP32_MONITOR_SHOW_STATIC='Display String Static';
Blockly.MIXLY_ESP32_SENOR_GYRO='GYPO(rad/s)';
Blockly.Msg.DATAFRAME_RAW = "Raw";
Blockly.Msg.DATAFRAME_COLUMN = "Column";
+Blockly.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP="Set sensor brightness level";
+Blockly.MIXLY_ESP32_SENSOR_RTC_INT_TOOLTIP="Initialize the real time clock";
+Blockly.MIXLY_ESP32_RTC_SET_DATATIME_TOOLTIP="Set the RTC clock module time";
+Blockly.MIXLY_ESP32_NETWORK_INIT_TOOLTIP="Set wifi working mode and initialize wifi";
+Blockly.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP="Turn on or disable network connections";
+Blockly.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP="Return the connectable wifi address";
+Blockly.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP="Set the wifi name and password";
+Blockly.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP="Return true when connected to wifi";
+Blockly.MIXLY_ESP32_NETWORK_GET_CONNECT_TOOLTIP="Return the address of the connected wifi";
+Blockly.MIXLY_ESP32_NETWORK_STOP_TOOLTIP="Disconnect wifi";
+Blockly.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP="Return the connection name of wifi";
+Blockly.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP="Set the name of the access point";
+Blockly.MIXLY_ESP32_NETWORK_SERVER_TOOLTIP="Turn off network connection";
+Blockly.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP="Initialize network connection";
+Blockly.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP="Bind a socket to a network address";
+Blockly.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP="Listen for incoming connections";
+Blockly.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP="Accept the connection and return the connected object";
+Blockly.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP="Return received data";
+Blockly.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP="send Message";
+Blockly.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP="Return received data";
+Blockly.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP="Send a message to the specified network address";
+Blockly.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP="Turn off network connection";
|
Update: comments fixed | @@ -15,10 +15,10 @@ the car has width 2
//does car fit into parking lot?
G! :|:
5
-//expected: ^mul executed with args ({SELF} * (6 * 4))
+//expected: ^mul executed with args ({SELF} * (4 * 2))
G! :|:
5
-//expected: ^smaller executed with args ({SELF} * (24.0 * 10))
+//expected: ^smaller executed with args ({SELF} * (8.0 * 10))
G! :|:
5
//expected: ^say executed with args ({SELF} * True)
|
pg_amcheck: Keep trying to fix the tests.
Fix another example of non-portable option ordering in the tests.
Oversight in
Mark Dilger
Discussion: | @@ -468,7 +468,7 @@ command_fails_like(
'pg_amcheck rejects garbage startblock');
command_fails_like(
- [ @cmd, 'db1', '-s', 's5', '--endblock', '1234junk' ],
+ [ @cmd, '-s', 's5', '--endblock', '1234junk', 'db1' ],
qr/invalid end block/,
'pg_amcheck rejects garbage endblock');
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.