message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
radio.h: Added RADIO_PARAM_SHR_SEARCH | @@ -170,6 +170,9 @@ enum {
* it needs to be used with radio.get_object()/set_object(). */
RADIO_PARAM_LAST_PACKET_TIMESTAMP,
+ /* For enabling and disabling the SHR search */
+ RADIO_PARAM_SHR_SEARCH,
+
/* Constants (read only) */
/* The lowest radio channel. */
|
Added windows platform support to premake
* Added windows platform support to premake
Win32 and Win64 configuration support for visual studio solutions
* Update premake5.lua
Fixed platform support for linux, made x64 default
* Update premake5.lua
Fix typo | -- A solution contains projects, and defines the available configurations
solution "brotli"
configurations { "Release", "Debug" }
+platforms { "x64", "x86" }
targetdir "bin"
location "buildfiles"
flags "RelativeLinks"
@@ -13,6 +14,12 @@ filter "configurations:Release"
filter "configurations:Debug"
flags { "Symbols" }
+filter { "platforms:x64" }
+ architecture "x86_64"
+
+filter { "platforms:x86" }
+ architecture "x86"
+
configuration { "gmake" }
buildoptions { "-Wall -fno-omit-frame-pointer" }
location "buildfiles/gmake"
|
Don't set number of ids | @@ -901,7 +901,6 @@ vtkPLOT3DReader::ReadGrid(FILE *xyzFp)
ghostZones->SetNumberOfValues(output->GetNumberOfCells());
ghostZones->SetName("avtGhostZones");
vtkIdList* ids = vtkIdList::New();
- ids->SetNumberOfIds(8);
vtkIdType numCells = output->GetNumberOfCells();
for (vtkIdType cellId = 0; cellId < numCells; cellId++)
|
Added support for cmy and rgbw pdftoraster conversions | @@ -1591,6 +1591,8 @@ static void writePageImage(cups_raster_t *raster, poppler::document *doc1,
case CUPS_CSPACE_ADOBERGB:
case CUPS_CSPACE_CMYK:
case CUPS_CSPACE_SRGB:
+ case CUPS_CSPACE_CMY:
+ case CUPS_CSPACE_RGBW:
default:
im = pr.render_page(current_page,header.HWResolution[0],header.HWResolution[1],0,0,header.cupsWidth,header.cupsHeight);
newdata = (unsigned char *)malloc(sizeof(char)*3*im.width()*im.height());
|
Configurations/unix-Makefile.tmpl: harmonize with no-engine. | @@ -369,7 +369,7 @@ test: tests
RESULT_D=test-runs \
PERL="$(PERL)" \
EXE_EXT={- $exeext -} \
- OPENSSL_ENGINES=`cd ../$(BLDDIR)/engines; pwd` \
+ OPENSSL_ENGINES=`cd ../$(BLDDIR)/engines 2>/dev/null && pwd` \
OPENSSL_DEBUG_MEMORY=on \
$(PERL) ../$(SRCDIR)/test/run_tests.pl $(TESTS) )
@ : {- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
|
Optimize imageviewer xcb_clear_area calls | @@ -490,11 +490,35 @@ load(xcb_connection_t* c, xcb_window_t w, const char* filename) {
return true;
}
+bool //
+intersects(int32_t old_x,
+ int32_t old_y,
+ int32_t width,
+ int32_t height,
+ int32_t new_x,
+ int32_t new_y) {
+ if ((width <= 0) || (height <= 0)) {
+ return false;
+ } else if ((old_x > new_x) && ((old_x - new_x) >= width)) {
+ return false;
+ } else if ((new_x > old_x) && ((new_x - old_x) >= width)) {
+ return false;
+ } else if ((old_y > new_y) && ((old_y - new_y) >= height)) {
+ return false;
+ } else if ((new_y > old_y) && ((new_y - old_y) >= height)) {
+ return false;
+ }
+ return true;
+}
+
// clear_area clears the L-shaped difference between old and new rectangles (of
// equal width and height). It does this in up to two xcb_clear_area calls,
// labeled A and B in the example below (with old_x=0, old_y=0, width=5,
// height=4, new_x=2, new_y=2).
//
+// If the old and new rectangles do not intersect then the old rectangle (not
+// an L-shape) will be cleared.
+//
// AAAAA
// AAAAA
// BB+---+
@@ -510,6 +534,13 @@ clear_area(xcb_connection_t* c,
int32_t height,
int32_t new_x,
int32_t new_y) {
+ if ((width <= 0) || (height <= 0)) {
+ return;
+ } else if (!intersects(old_x, old_y, width, height, new_x, new_y)) {
+ xcb_clear_area(c, 1, w, old_x, old_y, width, height);
+ return;
+ }
+
int32_t dy = new_y - old_y;
if (dy < 0) {
xcb_clear_area(c, 1, w, old_x, old_y + height + dy, width, -dy);
|
add quickmenu | @@ -122,6 +122,7 @@ static const char *instantmenucmd[] = {"instantmenu_run", NULL};
static const char *roficmd[] = {"rofi", "-show", "run", NULL};
static const char *instantmenustcmd[] = {"instantmenu_run_st", NULL};
static const char *termcmd[] = {"st", NULL};
+static const char *quickmenucmd[] = {"quickmenu", NULL};
static const char *instantassistcmd[] = {"instantassist", NULL};
static const char *nautiluscmd[] = {"nautilus", NULL};
static const char *slockcmd[] = {"ilock", NULL};
@@ -220,6 +221,7 @@ static Key keys[] = {
{MODKEY | Mod1Mask | ControlMask, XK_h, unhideall, {0}},
{MODKEY | Mod1Mask | ControlMask, XK_l, spawn, {.v = slockmcmd}},
{MODKEY, XK_Return, spawn, {.v = termcmd}},
+ {MODKEY, XK_v, spawn, {.v = quickmenucmd}},
{MODKEY, XK_b, togglebar, {0}},
{MODKEY, XK_j, focusstack, {.i = +1}},
{MODKEY, XK_Down, focusstack, {.i = +1}},
|
mdns example: Remove a warned unused constant | #define EXAMPLE_MDNS_INSTANCE CONFIG_MDNS_INSTANCE
-static const char c_config_hostname[] = CONFIG_MDNS_HOSTNAME;
#define EXAMPLE_BUTTON_GPIO 0
static const char *TAG = "mdns-test";
|
SOVERSION bump to version 2.21.10 | @@ -66,7 +66,7 @@ set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
set(LIBYANG_MINOR_SOVERSION 21)
-set(LIBYANG_MICRO_SOVERSION 9)
+set(LIBYANG_MICRO_SOVERSION 10)
set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION})
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
|
README.md: Use version 2.05.26 | @@ -34,11 +34,11 @@ https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Supported-Devices
### Install deCONZ
1. Download deCONZ package
- wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.05.25-qt5.deb
+ wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.05.26-qt5.deb
2. Install deCONZ package
- sudo dpkg -i deconz-2.05.25-qt5.deb
+ sudo dpkg -i deconz-2.05.26-qt5.deb
**Important** this step might print some errors *that's ok* and will be fixed in the next step.
@@ -53,11 +53,11 @@ The deCONZ package already contains the REST API plugin, the development package
1. Download deCONZ development package
- wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.05.25.deb
+ wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.05.26.deb
2. Install deCONZ development package
- sudo dpkg -i deconz-dev-2.05.25.deb
+ sudo dpkg -i deconz-dev-2.05.26.deb
3. Install missing dependencies
@@ -72,7 +72,7 @@ The deCONZ package already contains the REST API plugin, the development package
2. Checkout related version tag
cd deconz-rest-plugin
- git checkout -b mybranch V2_05_25
+ git checkout -b mybranch V2_05_26
3. Compile the plugin
|
m25p16: re-init spi before transfer | #define JEDEC_ID_CYPRESS_S25FL128L 0x016018
#define JEDEC_ID_BERGMICRO_W25Q32 0xE04016
-void m25p16_init() {
- spi_init_pins(M25P16_SPI_PORT, M25P16_NSS_PIN);
-
- spi_enable_rcc(M25P16_SPI_PORT);
+static void m25p16_reinit() {
+ LL_SPI_Disable(SPI_PORT.channel);
LL_SPI_DeInit(SPI_PORT.channel);
LL_SPI_InitTypeDef SPI_InitStructure;
@@ -45,6 +43,14 @@ void m25p16_init() {
SPI_InitStructure.CRCPoly = 7;
LL_SPI_Init(SPI_PORT.channel, &SPI_InitStructure);
LL_SPI_Enable(SPI_PORT.channel);
+}
+
+void m25p16_init() {
+ spi_init_pins(M25P16_SPI_PORT, M25P16_NSS_PIN);
+
+ spi_enable_rcc(M25P16_SPI_PORT);
+
+ m25p16_reinit();
// Dummy read to clear receive buffer
while (LL_SPI_IsActiveFlag_TXE(SPI_PORT.channel) == RESET)
@@ -71,6 +77,7 @@ uint8_t m25p16_is_ready() {
read_status[0] = M25P16_READ_STATUS_REGISTER;
read_status[1] = 0x0;
+ m25p16_reinit();
spi_csn_enable(M25P16_NSS_PIN);
spi_dma_transfer_begin(M25P16_SPI_PORT, read_status, 2);
read_status_in_progress = 1;
@@ -132,12 +139,17 @@ uint8_t m25p16_page_program(const uint32_t addr, const uint8_t *buf, const uint3
if (write_enabled == 0) {
write_enable[0] = M25P16_WRITE_ENABLE;
+
+ m25p16_reinit();
+
spi_csn_enable(M25P16_NSS_PIN);
spi_dma_transfer_begin(M25P16_SPI_PORT, write_enable, 1);
write_enabled = 1;
return 0;
}
+ m25p16_reinit();
+
spi_csn_enable(M25P16_NSS_PIN);
static uint8_t dma_buf[256];
|
OcDevicePathLib: Fix possible suffix underflow; return OcFileDevicePathFullNameLen to strlen-style | @@ -1075,7 +1075,7 @@ OcFileDevicePathFullNameLen (
DevicePath = NextDevicePathNode (DevicePath);
} while (!IsDevicePathEnd (DevicePath));
- return PathLength;
+ return PathLength - 1;
}
/**
@@ -1093,7 +1093,15 @@ OcFileDevicePathFullNameSize (
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
)
{
- return OcFileDevicePathFullNameLen (DevicePath) * sizeof (CHAR16);
+ UINTN Len;
+
+ Len = OcFileDevicePathFullNameLen (DevicePath);
+
+ if (Len == 0) {
+ return 0;
+ }
+
+ return (Len + 1) * sizeof (CHAR16);
}
/**
@@ -1121,6 +1129,12 @@ OcFileDevicePathFullName (
ASSERT (IsDevicePathValid (&FilePath->Header, 0));
ASSERT (PathNameSize == OcFileDevicePathFullNameSize (&FilePath->Header));
+ //
+ // Note: The UEFI spec declares that a path separator may optionally be
+ // present at the beginning or end of any node's PathName. This is not
+ // currently supported here. Any fix would need to be applied here and
+ // in OcFileDevicePathNameLen.
+ //
do {
PathLen = OcFileDevicePathNameLen (FilePath);
CopyMem (
@@ -1277,7 +1291,7 @@ OcDevicePathHasFilePathSuffix (
return FALSE;
}
- PathNameLen = OcFileDevicePathFullNameLen (&FilePath->Header) - 1;
+ PathNameLen = OcFileDevicePathFullNameLen (&FilePath->Header);
if (PathNameLen < SuffixLen) {
return FALSE;
}
|
test/mag_cal.c: Format with clang-format
BRANCH=none
TEST=none | * the high values and [-5,5] (+- 1.53 uT) for the low values.
*/
static intv3_t samples[] = {
- { -522, 5, -5 },
- { -528, -3, 1 },
- { -531, -2, 0 },
- { -525, -1, 3 },
+ { -522, 5, -5 }, { -528, -3, 1 }, { -531, -2, 0 }, { -525, -1, 3 },
- { 527, 3, -2 },
- { 523, -5, 1 },
- { 520, -3, 2 },
- { 522, 0, -4 },
+ { 527, 3, -2 }, { 523, -5, 1 }, { 520, -3, 2 }, { 522, 0, -4 },
- { -3, -519, -2 },
- { 1, -521, 5 },
- { 2, -526, 4 },
- { 0, -532, -5 },
+ { -3, -519, -2 }, { 1, -521, 5 }, { 2, -526, 4 }, { 0, -532, -5 },
- { -5, 528, 4 },
- { -2, 531, -4 },
- { 1, 522, 2 },
- { 5, 532, 3 },
+ { -5, 528, 4 }, { -2, 531, -4 }, { 1, 522, 2 }, { 5, 532, 3 },
- { -5, 0, -524 },
- { -1, -2, -527 },
- { -3, 4, -532 },
- { 5, 3, -531 },
+ { -5, 0, -524 }, { -1, -2, -527 }, { -3, 4, -532 }, { 5, 3, -531 },
- { 4, -2, 524 },
- { 1, 3, 520 },
- { 5, -5, 528 },
- { 0, 2, 521 },
+ { 4, -2, 524 }, { 1, 3, 520 }, { 5, -5, 528 }, { 0, 2, 521 },
};
static int test_mag_cal_computes_bias(void)
|
Changelog note for PR
Merge PR Fix typo in unbound.service.in, by glitsj16. | +24 February 2020: George
+ - Merge PR #166: Fix typo in unbound.service.in, by glitsj16.
+
20 February 2020: Wouter
- Updated contrib/unbound_smf23.tar.gz with Solaris SMF service for
Unbound from Yuri Voinov.
|
Add missing description for focus_on_window_activation command in docs. | @@ -536,6 +536,13 @@ The default colors are:
set to _always_, the window under the cursor will always be focused, even
after switching between workspaces.
+*focus_on_window_activation* smart|urgent|focus|none
+ This option determines what to do when an xwayland client requests
+ window activation. If set to _urgent_, the urgent state will be set
+ for that window. If set to _focus_, the window will become focused.
+ If set to _smart_, the window will become focused only if it is already
+ visible, otherwise the urgent state will be set. Default is _smart_.
+
*focus_wrapping* yes|no|force
This option determines what to do when attempting to focus over the edge
of a container. If set to _no_, the focused container will retain focus,
|
Minor Python3 support improvements
Don't let PYTHON2 and PYTHON3 be both set
Steer to proper include in PYTHON3_ADDINCL | @@ -1774,6 +1774,7 @@ macro NO_PYTHON_INCLUDES() {
macro PYTHON_ADDINCL() {
SET(MODULE_TAG PY2)
SET(PYTHON2 yes)
+ SET(PYTHON3 no)
when ($USE_ARCADIA_PYTHON == "yes") {
ADDINCL+=contrib/libs/python/Include
}
@@ -1798,8 +1799,10 @@ macro PYTHON_ADDINCL() {
macro PYTHON3_ADDINCL() {
SET(MODULE_TAG PY3)
SET(PYTHON3 yes)
+ SET(PYTHON2 no)
SET(PEERDIR_TAGS CPP_PROTO PY3 __EMPTY__)
when ($USE_ARCADIA_PYTHON == "yes") {
+ CFLAGS+=-DUSE_PYTHON3
ADDINCL+=contrib/libs/python/Include
}
otherwise {
@@ -3305,6 +3308,13 @@ macro JAVA_IGNORE_CLASSPATH_CLASH_FOR(Args...) {
macro PY_SRCS() {
DEFAULT(MODULE_TAG PY2)
DEFAULT(PYTHON2 yes)
+ DEFAULT(PYTHON3 no)
+}
+
+macro PY3_SRCS() {
+ DEFAULT(MODULE_TAG PY3)
+ DEFAULT(PYTHON2 no)
+ DEFAULT(PYTHON3 yes)
}
### @usage PY23_LIBRARY([name])
|
RTOS2: Updated __NO_RETURN definition in cmsis_os2.h | #if defined(__CC_ARM)
#define __NO_RETURN __declspec(noreturn)
#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
-#define __NO_RETURN __attribute__((noreturn))
+#define __NO_RETURN __attribute__((__noreturn__))
#elif defined(__GNUC__)
-#define __NO_RETURN __attribute__((noreturn))
+#define __NO_RETURN __attribute__((__noreturn__))
#elif defined(__ICCARM__)
#define __NO_RETURN __noreturn
#else
|
[core] handle ENOSPC with pwritev()
handle ENOSPC with pwritev() and fallback to next item in
server.upload-dirs list
x-ref:
"File upload regression with --disable-lfs" | @@ -1011,6 +1011,8 @@ static ssize_t chunkqueue_append_cqmem_to_tempfile(chunkqueue * const restrict d
chunkqueue_mark_written(dest, dlen);
}
}
+ else if (chunkqueue_append_tempfile_err(dest, errh, c))
+ wr = 0; /*(to trigger continue/retry in caller rather than error)*/
return wr;
}
|
virtio: fix the missing unlock
Type: fix | @@ -31,7 +31,7 @@ virtio_pre_input_inline (vlib_main_t *vm, vnet_virtio_vring_t *txq_vring,
if (clib_spinlock_trylock (&txq_vring->lockp))
{
if (virtio_txq_is_scheduled (txq_vring))
- return 0;
+ goto unlock;
if (packet_coalesce)
vnet_gro_flow_table_schedule_node_on_dispatcher (
vm, txq, txq_vring->flow_table);
@@ -39,6 +39,7 @@ virtio_pre_input_inline (vlib_main_t *vm, vnet_virtio_vring_t *txq_vring,
virtio_vring_buffering_schedule_node_on_dispatcher (
vm, txq, txq_vring->buffering);
virtio_txq_set_scheduled (txq_vring);
+ unlock:
clib_spinlock_unlock (&txq_vring->lockp);
}
}
|
publish: pass invites as prop correctly
Due to a change in a local variable named 'props' we overwrote the only
thing that used the props variable to pass itself to a child -- invites.
This commit deconstructs 'invites' alongside other properties from
the global store. | @@ -65,7 +65,7 @@ export default class PublishApp extends React.Component {
this.unreadTotal = unreadTotal;
}
- const { api, groups, sidebarShown } = props;
+ const { api, groups, sidebarShown, invites } = props;
return (
<Switch>
@@ -77,7 +77,7 @@ export default class PublishApp extends React.Component {
active={'sidebar'}
rightPanelHide={true}
sidebarShown={true}
- invites={props.invites}
+ invites={invites}
notebooks={notebooks}
associations={associations}
selectedGroups={selectedGroups}
@@ -108,7 +108,7 @@ export default class PublishApp extends React.Component {
active={'rightPanel'}
rightPanelHide={false}
sidebarShown={sidebarShown}
- invites={props.invites}
+ invites={invites}
notebooks={notebooks}
associations={associations}
selectedGroups={selectedGroups}
@@ -139,7 +139,7 @@ export default class PublishApp extends React.Component {
active={'rightPanel'}
rightPanelHide={false}
sidebarShown={sidebarShown}
- invites={props.invites}
+ invites={invites}
notebooks={notebooks}
associations={associations}
selectedGroups={selectedGroups}
@@ -185,7 +185,7 @@ export default class PublishApp extends React.Component {
active={'rightPanel'}
rightPanelHide={false}
sidebarShown={sidebarShown}
- invites={props.invites}
+ invites={invites}
notebooks={notebooks}
associations={associations}
selectedGroups={selectedGroups}
@@ -211,7 +211,7 @@ export default class PublishApp extends React.Component {
active={'rightPanel'}
rightPanelHide={false}
sidebarShown={sidebarShown}
- invites={props.invites}
+ invites={invites}
notebooks={notebooks}
associations={associations}
contacts={contacts}
@@ -263,7 +263,7 @@ export default class PublishApp extends React.Component {
active={'rightPanel'}
rightPanelHide={false}
sidebarShown={sidebarShown}
- invites={props.invites}
+ invites={invites}
notebooks={notebooks}
selectedGroups={selectedGroups}
associations={associations}
@@ -290,7 +290,7 @@ export default class PublishApp extends React.Component {
active={'rightPanel'}
rightPanelHide={false}
sidebarShown={sidebarShown}
- invites={props.invites}
+ invites={invites}
notebooks={notebooks}
associations={associations}
selectedGroups={selectedGroups}
|
Fix doc nits | @@ -56,7 +56,7 @@ SSL_CTX_set_client_cert_cb() if no certificate is provided at initialization.
SSL_verify_client_post_handshake() causes a CertificateRequest message to be
sent by a server on the given B<ssl> connection. The SSL_VERIFY_PEER flag must
-be set, the SSL_VERIFY_POST_HANDSHAKE flag is optional.
+be set; the SSL_VERIFY_POST_HANDSHAKE flag is optional.
=head1 NOTES
@@ -184,8 +184,8 @@ failure will lead to a termination of the TLS/SSL handshake with an
alert message, if SSL_VERIFY_PEER is set.
After calling SSL_force_post_handshake_auth(), the client will need to add a
-certificate to its configuration before it can successfully authenticate. This
-must be called before SSL_connect().
+certificate or certificate callback to its configuration before it can
+successfully authenticate. This must be called before SSL_connect().
SSL_verify_client_post_handshake() requires that verify flags have been
previously set, and that a client sent the post-handshake authentication
@@ -194,7 +194,7 @@ invoked. A write operation must take place for the Certificate Request to be
sent to the client, this can be done with SSL_do_handshake() or SSL_write_ex().
Only one certificate request may be outstanding at any time.
-When post-handshake authentication occurs, a refreshed B<NewSessionTicket>
+When post-handshake authentication occurs, a refreshed NewSessionTicket
message is sent to the client.
=head1 BUGS
|
Fix no-engine | @@ -44,7 +44,8 @@ static int load_common(const OSSL_PARAM params[], const char **propquery,
*engine = NULL;
/* TODO legacy stuff, to be removed */
-#ifndef FIPS_MODE /* Inside the FIPS module, we don't support legacy ciphers */
+ /* Inside the FIPS module, we don't support legacy ciphers */
+#if !defined(FIPS_MODE) && !defined(OPENSSL_NO_ENGINE)
p = OSSL_PARAM_locate_const(params, OSSL_ALG_PARAM_ENGINE);
if (p != NULL) {
if (p->data_type != OSSL_PARAM_UTF8_STRING)
|
Fix sandbox link (whoops). | @@ -65,4 +65,4 @@ Lily is a very young language and the community is still growing.
* [Reference](https://Fascinatedbox.github.com/lily/core/module.core.html)
-* [Try it in your browser](https://FascinatedBox.github.com/lily-site/sandbox.html)
+* [Try it in your browser](http://fascinatedbox.github.io/lily/intro-sandbox.html)
|
{AH} update htslib/samtools conda deps | @@ -38,7 +38,7 @@ conda config --add channels bioconda
# pin versions, so that tests do not fail when pysam/htslib out of step
# add htslib dependencies
-conda install -y "samtools=1.6" "bcftools=1.6" "htslib=1.6" xz curl bzip2
+conda install -y "samtools=1.7" "bcftools=1.6" "htslib=1.7" xz curl bzip2
# Need to make C compiler and linker use the anaconda includes and libraries:
export PREFIX=~/miniconda3/
|
Exclude more build files from rsync between tests.
Files (especially build.auto.h) were being removed and forcing a full build between separate invocations of test.pl.
This affected ad-hoc testing at the command-line, not a full test run in CI. | @@ -214,7 +214,9 @@ sub run
{
executeTest(
'rsync -rt --delete --exclude=*.o --exclude=test.c --exclude=test.gcno --exclude=LibC.h --exclude=xs' .
- " --exclude=test --exclude=buildflags --exclude=testflags --exclude=harnessflags" .
+ ' --exclude=test --exclude=buildflags --exclude=testflags --exclude=harnessflags' .
+ ' --exclude=build.auto.h --exclude=build.auto.h.in --exclude=Makefile --exclude=Makefile.in' .
+ ' --exclude=configure --exclude=configure.ac' .
" $self->{strBackRestBase}/src/ $self->{strGCovPath} && " .
"rsync -t $self->{strBackRestBase}/libc/LibC.h $self->{strGCovPath} && " .
"rsync -rt --delete $self->{strBackRestBase}/libc/xs/ $self->{strGCovPath}/xs && " .
@@ -492,7 +494,7 @@ sub run
" -c $strCFile -o " . substr($strCFile, 0, length($strCFile) - 2) . ".o\n";
}
- $self->{oStorageTest}->put($self->{strGCovPath} . "/Makefile", $strMakefile);
+ buildPutDiffers($self->{oStorageTest}, $self->{strGCovPath} . "/Makefile", $strMakefile);
}
my $oExec = new pgBackRestTest::Common::ExecuteTest(
|
MIT license, 2011 - 2020. | -Copyright (c) 2011-2019 Jesse Adkins (FascinatedBox)
+Copyright (c) 2011-2020 Jesse Adkins (FascinatedBox)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
kdb mount: make more clear that it is persistent
closes | ## DESCRIPTION
-This command allows a user to mount a new _backend_.
-The idea of mounting is explained [in elektra-mounting(7)](elektra-mounting.md).
-
+This command allows a user to persistently mount a new _backend_.
Mounting in Elektra allows the user to mount a file into the current key database like a user may mount a partition into the current file system.
This functionality is key to Elektra as it allows users to build a global key database comprised of many different configuration files.
+
A backend acts as a worker to allow Elektra to interpret configuration files as keys in the central key database such that any edits to the keys are reflected in the file and vice versa.
Additionally, the user can use this command to list the currently mounted backends by running the command with no arguments.
+More about mounting is explained in [elektra-mounting(7)](elektra-mounting.md).
## IMPORTANT
-This command writes into the `/etc` directory and as such it requires root permissions.
+This command writes into the `/etc` directory to make the mounting persistent.
+As such it requires root permissions.
Use `kdb file system/elektra/mountpoints` to find out where exactly it will write to.
Absolute paths are still relative to their namespace (see `kdb plugin-info resolver`).
|
[d3d12on7] Refactor backbuffer indexing and handle resizes
Instead of counting Present() calls, do a reverse lookup in the known backbuffer list to accurately determine the buffer index
If the lookup failed, assume the window was resized and do a delayed D3D12 reinitialize with the new buffers after 3 have been found | @@ -159,12 +159,28 @@ HRESULT Overlay::PresentD3D12Downlevel(ID3D12CommandQueueDownlevel* pCommandQueu
{
auto& overlay = Get();
- // On Windows 7 there is no swap chain to query the current backbuffer index, so instead we simply count to 3 and wrap around.
- // Increment the buffer index here even if the overlay is not enabled, so we stay in sync with the game's present calls.
- // TODO: investigate if there isn't a better way of doing this (finding the current index in the game exe?)
- overlay.m_downlevelBufferIndex = (!overlay.m_initialized || overlay.m_downlevelBufferIndex == 2) ? 0 : overlay.m_downlevelBufferIndex + 1;
+ // On Windows 7 there is no swap chain to query the current backbuffer index. Instead do a reverse lookup in the known backbuffer list
+ const auto it = std::find(overlay.m_downlevelBackbuffers.cbegin(), overlay.m_downlevelBackbuffers.cend(), pSourceTex2D);
+ bool resizing = false;
+ if (it == overlay.m_downlevelBackbuffers.cend())
+ {
+ if (overlay.m_initialized)
+ {
+ spdlog::warn("\tOverlay::PresentD3D12Downlevel() - buffer at {0} not found in backbuffer list! Assuming window was resized - note that support for resizing is experimental.", (void*)pSourceTex2D);
+ overlay.ResetD3D12State();
+ }
+
+ overlay.m_downlevelBackbuffers.emplace_back(pSourceTex2D);
+
+ // If we don't have a full backbuffer list, do not attempt to reinitialize yet
+ resizing = overlay.m_downlevelBackbuffers.size() < 3;
+ }
+ else
+ {
+ overlay.m_downlevelBufferIndex = static_cast<uint32_t>(std::distance(overlay.m_downlevelBackbuffers.cbegin(), it));
+ }
- if (overlay.InitializeD3D12Downlevel(overlay.m_pCommandQueue, pSourceTex2D, hWindow))
+ if (!resizing && overlay.InitializeD3D12Downlevel(overlay.m_pCommandQueue, pSourceTex2D, hWindow))
{
overlay.Render(nullptr);
}
@@ -183,7 +199,6 @@ HRESULT Overlay::CreateCommittedResourceD3D12(ID3D12Device* pDevice, const D3D12
pDesc != NULL && pDesc->Flags == D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET && InitialResourceState == D3D12_RESOURCE_STATE_COMMON &&
pOptimizedClearValue == NULL && riidResource != NULL && IsEqualGUID(*riidResource, __uuidof(ID3D12Resource)))
{
- spdlog::debug("\tOverlay::CreateCommittedResourceD3D12() - found valid backbuffer target.");
isBackBuffer = true;
}
@@ -193,6 +208,7 @@ HRESULT Overlay::CreateCommittedResourceD3D12(ID3D12Device* pDevice, const D3D12
{
// Store the returned resource
overlay.m_downlevelBackbuffers.emplace_back(static_cast<ID3D12Resource*>(*ppvResource));
+ spdlog::debug("\tOverlay::CreateCommittedResourceD3D12() - found valid backbuffer target at {0}.", *ppvResource);
}
// If D3D12 has been initialized, there is no need to continue hooking this function since the backbuffers are only created once.
|
engine: add support for aws customsized error reporting logger | #include <fluent-bit/stream_processor/flb_sp.h>
#endif
+#ifdef FLB_HAVE_AWS_ERROR_REPORTER
+#include <fluent-bit/aws/flb_aws_error_reporter.h>
+
+extern struct flb_aws_error_reporter *error_reporter;
+#endif
+
FLB_TLS_DEFINE(struct mk_event_loop, flb_engine_evl);
@@ -704,6 +710,16 @@ int flb_engine_start(struct flb_config *config)
if (config->is_running == FLB_TRUE) {
flb_sched_timer_cleanup(config->sched);
flb_upstream_conn_pending_destroy_list(&config->upstreams);
+
+ /*
+ * depend on main thread to clean up expired message
+ * in aws error reporting message queue
+ */
+ #ifdef FLB_HAVE_AWS_ERROR_REPORTER
+ if (is_error_reporting_enabled()) {
+ flb_aws_error_reporter_clean(error_reporter);
+ }
+ #endif
}
}
}
|
added UPDATE_INTERVAL | @@ -15,6 +15,8 @@ FILENAME = "random-joke.jpg"
JOKE_IDS = "https://pimoroni.github.io/feed2image/jokeapi-ids.txt"
JOKE_IMG = "https://pimoroni.github.io/feed2image/jokeapi-{}-{}x{}.jpg"
+UPDATE_INTERVAL = 60
+
gc.collect() # Claw back some RAM!
|
Bump musl cache version used in `build.yml` | @@ -269,7 +269,7 @@ jobs:
# Cache the musl build. Use a key based on a hash of all the files
# used in the build.
- name: Setup musl Cache
- uses: actions/cache@v2
+ uses: actions/[email protected]
with:
path: contrib/build/musl
key: ${{ runner.os }}-${{ steps.env.outputs.arch }}-musl-${{ hashFiles('contrib/Makefile', 'contrib/musl/**') }}
|
examples/embedding: Fix reference to freed memory, lexer src name.
This issue was brought up by BramPeters in the forum: | @@ -38,9 +38,10 @@ static char heap[16384];
mp_obj_t execute_from_str(const char *str) {
nlr_buf_t nlr;
if (nlr_push(&nlr) == 0) {
- mp_lexer_t *lex = mp_lexer_new_from_str_len(0/*MP_QSTR_*/, str, strlen(str), false);
+ qstr src_name = 0/*MP_QSTR_*/;
+ mp_lexer_t *lex = mp_lexer_new_from_str_len(src_name, str, strlen(str), false);
mp_parse_tree_t pt = mp_parse(lex, MP_PARSE_FILE_INPUT);
- mp_obj_t module_fun = mp_compile(&pt, lex->source_name, MP_EMIT_OPT_NONE, false);
+ mp_obj_t module_fun = mp_compile(&pt, src_name, MP_EMIT_OPT_NONE, false);
mp_call_function_0(module_fun);
nlr_pop();
return 0;
|
options/ansi: fix ignored * specifiers in scanf | @@ -379,14 +379,15 @@ static int do_scanf(H &handler, const char *fmt, __gnuc_va_list args) {
/* TODO: dest = get_arg_at_pos(args, *fmt -'0'); */
fmt += 3;
} else {
+ if (fmt[1] != '*') {
dest = va_arg(args, void*);
+ }
fmt++;
}
int width = 0;
if (*fmt == '*') {
fmt++;
- continue;
} else if (*fmt == '\'') {
/* TODO: numeric seperators locale stuff */
mlibc::infoLogger() << "do_scanf: \' not implemented!" << frg::endlog;
|
test-ipmi-hiomap: Add event-before-read
Cc: stable | @@ -796,6 +796,35 @@ static void test_hiomap_protocol_read_two_blocks(void)
scenario_exit();
}
+static const struct scenario_event
+scenario_hiomap_protocol_event_before_action[] = {
+ { .type = scenario_event_p, .p = &hiomap_ack_call, },
+ { .type = scenario_event_p, .p = &hiomap_get_info_call, },
+ { .type = scenario_event_p, .p = &hiomap_get_flash_info_call, },
+ {
+ .type = scenario_sel,
+ .s = {
+ .bmc_state = HIOMAP_E_DAEMON_READY |
+ HIOMAP_E_FLASH_LOST,
+ }
+ },
+ SCENARIO_SENTINEL,
+};
+
+static void test_hiomap_protocol_event_before_read(void)
+{
+ struct blocklevel_device *bl;
+ char buf;
+ int rc;
+
+ scenario_enter(scenario_hiomap_protocol_event_before_action);
+ assert(!ipmi_hiomap_init(&bl));
+ rc = bl->read(bl, 0, &buf, sizeof(buf));
+ assert(rc == FLASH_ERR_AGAIN);
+ ipmi_hiomap_exit(bl);
+ scenario_exit();
+}
+
static const struct scenario_event
scenario_hiomap_protocol_persistent_error[] = {
{ .type = scenario_event_p, .p = &hiomap_ack_call, },
@@ -841,6 +870,7 @@ struct test_case test_cases[] = {
TEST_CASE(test_hiomap_protocol_reset_recovery),
TEST_CASE(test_hiomap_protocol_read_one_block),
TEST_CASE(test_hiomap_protocol_read_two_blocks),
+ TEST_CASE(test_hiomap_protocol_event_before_read),
TEST_CASE(test_hiomap_protocol_persistent_error),
{ NULL, NULL },
};
|
Move hex dump to after initializing variable | @@ -1008,12 +1008,12 @@ ValidateLsaData(
/** Index Blocks tests **/
for (Index = 0; Index < NAMESPACE_INDEXES; ++Index) {
NVDIMM_DBG("Signature of the NAMESPACE INDEX %d", Index);
- NVDIMM_HEXDUMP(&NamespaceSignature, sizeof(NamespaceSignature));
// We are copying the signature in two steps so we need to copy twice the half of the NSINDEX_SIG_LEN length.
CopyMem_S(&NamespaceSignature.Uint64, sizeof(NamespaceSignature.Uint64), &pLabelStorageArea->Index[Index].Signature, NSINDEX_SIG_LEN / 2);
CopyMem_S(&NamespaceSignature.Uint64_1,
sizeof(NamespaceSignature.Uint64_1),
&pLabelStorageArea->Index[Index].Signature[NSINDEX_SIG_LEN / 2], NSINDEX_SIG_LEN / 2);
+ NVDIMM_HEXDUMP(&NamespaceSignature, sizeof(NamespaceSignature));
if (NamespaceSignature.Uint64 != LSA_NAMESPACE_INDEX_SIG_L ||
NamespaceSignature.Uint64_1 != LSA_NAMESPACE_INDEX_SIG_H) {
NVDIMM_DBG("The signature of the NAMESPACE INDEX %d is incorrect.", Index);
|
CMake: fix duplicated os_linux source; | @@ -692,11 +692,10 @@ elseif(ANDROID)
endif()
elseif(UNIX)
if(LOVR_USE_LINUX_EGL)
- target_sources(lovr PRIVATE src/core/os_linux.c)
target_compile_definitions(lovr PRIVATE LOVR_LINUX_EGL)
else()
- target_sources(lovr PRIVATE src/core/os_linux.c)
target_compile_definitions(lovr PRIVATE LOVR_LINUX_X11)
endif()
+ target_sources(lovr PRIVATE src/core/os_linux.c)
target_compile_definitions(lovr PRIVATE LOVR_GL)
endif()
|
Updated debug sequences DebugPortSetup, ResetHardware, and ResetHardwareDeassert. | @@ -120,7 +120,7 @@ The following Default Debug Access Sequences are implemented:
<control if="!isSWJ">
- <block>
+ <block atomic="1">
// Enter SWD Line Reset State
DAP_SWJ_Sequence(51, 0x0007FFFFFFFFFFFF); // > 50 cycles SWDIO/TMS High
DAP_SWJ_Sequence(3, 0x00); // At least 2 idle cycles (SWDIO/TMS Low)
@@ -335,7 +335,7 @@ The following Default Debug Access Sequences are implemented:
<control if="canReadPins">
- <!-- Assert nRESET line and wait for recovery -->
+ <!-- Assert nRESET line and wait max. 1s for recovery -->
<control while="(DAP_SWJ_Pins(nReset, nReset, 0) & nReset) == 0" timeout="1000000"/>
</control>
@@ -348,7 +348,7 @@ The following Default Debug Access Sequences are implemented:
</block>
<!-- Wait 100ms for recovery if nRESET not readable -->
- <control while="1" timeout="1000000"/>
+ <control while="1" timeout="100000"/>
</control>
@@ -385,11 +385,11 @@ The following Default Debug Access Sequences are implemented:
canReadPins = (DAP_SWJ_Pins(nReset, nReset, 0) != 0xFFFFFFFF);
</block>
- <!-- Wait for nRESET to recover from reset if readable-->
+ <!-- Wait max. 1s for nRESET to recover from reset if readable-->
<control if="canReadPins" while="(DAP_SWJ_Pins(nReset, nReset, 0) & nReset) == 0" timeout="1000000"/>
<!-- Wait 100ms for recovery if nRESET not readable -->
- <control if="!canReadPins" while="1" timeout="1000000"/>
+ <control if="!canReadPins" while="1" timeout="100000"/>
</sequence>
|
fix document issues | @@ -412,8 +412,9 @@ static inline int mbedtls_ssl_chk_buf_ptr( const uint8_t *cur,
/**
* \brief This macro checks if the remaining length in an input buffer is
* greater or equal than a needed length. If it is not the case, it
- * returns an SSL_DECODE_ERROR error and pends DECODE_ERROR alert
- * message.
+ * returns #MBEDTLS_SSL_DECODE_ERROR error and pends a
+ * #MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR alert message.
+ * It is used to guaranteed remaining length.
*
* \param cur Pointer to the current position in the buffer.
* \param end Pointer to one past the end of the buffer.
@@ -1449,7 +1450,7 @@ static inline int mbedtls_ssl_conf_tls13_some_psk_enabled( mbedtls_ssl_context *
* \param kex_modes_mask Mask of the key exchange modes to check
*
* \return 0 if at least one of the key exchange modes is supported,
- * <>0 otherwise.
+ * !=0 otherwise.
*/
static inline unsigned mbedtls_ssl_tls1_3_check_kex_modes( mbedtls_ssl_context *ssl,
int kex_modes_mask )
|
Remove notification settings from appveyor.yml
Notifications can be (and should be) configured on account basis on
the CI web site. This avoids getting emails to openssl-commits for
personal accounts that also build OpenSSL stuff. | @@ -62,11 +62,3 @@ test_script:
cmd /c "nmake install install_docs DESTDIR=..\_install 2>&1"
}
- cd ..
-
-notifications:
- - provider: Email
- to:
- - [email protected]
- on_build_success: false
- on_build_failure: true
- on_build_status_changed: true
|
misc: fix arithmetic in count_avail_package utility | @@ -60,12 +60,12 @@ for os in ${oses}; do
if [[ $micro_ver -eq 0 ]];then
numrpms=`repoquery --archlist=${arch} --repofrompath="ohpc-base,${repobase}" --repoid=ohpc-base '*' | wc -l`
echo $numrpms
- let "total=$total+1"
+ let "total=$total+$numrpms"
else
numrpms=`repoquery --archlist=${arch} --repofrompath="ohpc-base,${repobase}" --repoid=ohpc-base '*' \
--repofrompath="ohpc-update,${repoupdate}" --repoid=ohpc-update '*' | wc -l`
echo $numrpms
- let "total=$total+1"
+ let "total=$total+$numrpms"
fi
done
done
|
test/random: test random_32_bytes | @@ -38,7 +38,20 @@ int __wrap_wally_sha256(
return 0;
}
-static void test_random(void** state)
+static void _test_random_32_bytes_mcu(void** state)
+{
+ uint8_t expected[RANDOM_NUM_SIZE] = {0};
+ uint8_t buf[RANDOM_NUM_SIZE] = "12345678901234567890123456789012";
+ // mock mcu rand()
+ for (int i = 0; i < RANDOM_NUM_SIZE; i++) {
+ will_return(__wrap_rand, i);
+ expected[i] = buf[i] ^ i;
+ }
+ random_32_bytes_mcu(buf);
+ assert_memory_equal(expected, buf, RANDOM_NUM_SIZE);
+}
+
+static void _test_random_32_bytes(void** state)
{
uint8_t expected[RANDOM_NUM_SIZE] = {0};
uint8_t buf[RANDOM_NUM_SIZE];
@@ -62,7 +75,8 @@ static void test_random(void** state)
int main(void)
{
const struct CMUnitTest tests[] = {
- cmocka_unit_test(test_random),
+ cmocka_unit_test(_test_random_32_bytes_mcu),
+ cmocka_unit_test(_test_random_32_bytes),
};
return cmocka_run_group_tests(tests, NULL, NULL);
}
|
Compile test of multicast example for Zoul | @@ -14,6 +14,7 @@ platform-specific/zoul/at-test/zoul \
platform-specific/zoul/rtcc/zoul \
platform-specific/zoul/zoul \
coap/zoul \
+multicast/zoul \
ipso-objects/zoul \
ipso-objects/zoul:MAKE_WITH_DTLS=1 \
hello-world/zoul \
|
sse: fix AltiVec implementations of simde_mm_store_ps | @@ -3424,10 +3424,10 @@ simde_mm_store_ps (simde_float32 mem_addr[4], simde__m128 a) {
#if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
vst1q_f32(mem_addr, a_.neon_f32);
- #elif defined(SIMDE_POWER_ALTIVE_P7_NATIVE)
- vec_vsx_st(a_.altivec_32, 0, mem_addr);
- #elif defined(SIMDE_POWER_ALTIVE_P5_NATIVE)
- vec_st(a_.altivec_32, 0, mem_addr);
+ #elif defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
+ vec_vsx_st(a_.altivec_f32, 0, mem_addr);
+ #elif defined(SIMDE_POWER_ALTIVEC_P5_NATIVE)
+ vec_st(a_.altivec_f32, 0, mem_addr);
#elif defined(SIMDE_WASM_SIMD128_NATIVE)
wasm_v128_store(mem_addr, a_.wasm_v128);
#else
|
gsettings: print info about non-subscribed keys | @@ -414,21 +414,43 @@ static void elektra_settings_key_changed (GDBusConnection * connection G_GNUC_UN
GElektraKeySet * ks = gelektra_keyset_dup (esb->subscription_gks);
GElektraKey * cutpoint = gelektra_key_new (keypathname, KEY_VALUE, "", KEY_END);
- g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s %s!",
- "GSEttings Path: ", (g_strstr_len (g_strstr_len (keypathname, -1, "/") + 1, -1, "/")));
+
+ gchar * gsettingspath = g_strdup (g_strstr_len (g_strstr_len (keypathname, -1, "/") + 1, -1, "/"));
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s %s!", "GSEttings Path: ", gsettingspath);
+ g_settings_backend_changed (G_SETTINGS_BACKEND (user_data), gsettingspath, NULL);
+
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: %s!", "Cutpoint", gelektra_key_name (cutpoint));
GElektraKeySet * subscribed = gelektra_keyset_cut (ks, cutpoint);
+ // TODO: remove notifications about non-subscribed keys (DEBUG)
+ if (gelektra_keyset_len (subscribed) == 0)
+ {
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s.", "No keys in subscribed keyset");
+
+ GElektraKey * item;
+ gssize pos = 0;
+ while ((item = gelektra_keyset_at (ks, pos)) != NULL)
+ {
+ gchar * gsettingskeyname = g_strdup (g_strstr_len (g_strstr_len (gelektra_key_name (item), -1, "/") + 1, -1, "/"));
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: %s!", "Skipped non-subscribed key", gsettingskeyname);
+ g_free (gsettingskeyname);
+ pos++;
+ }
+ }
+
GElektraKey * item;
gssize pos = 0;
while ((item = gelektra_keyset_at (subscribed, pos)) != NULL)
{
- gchar * gsettingskeyname = g_strdup (g_strstr_len (g_strstr_len (keypathname, -1, "/") + 1, -1, "/"));
+ gchar * gsettingskeyname = g_strdup (g_strstr_len (g_strstr_len (gelektra_key_name (item), -1, "/") + 1, -1, "/"));
+
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: %s!", "Subscribed key changed", gsettingskeyname);
g_settings_backend_changed (G_SETTINGS_BACKEND (user_data), gsettingskeyname, NULL);
g_free (gsettingskeyname);
pos++;
}
+
g_variant_unref (variant);
g_mutex_unlock (&elektra_settings_kdb_lock);
}
@@ -495,7 +517,7 @@ static void elektra_settings_backend_subscribe (GSettingsBackend * backend, cons
g_free (lookupPath);
guint counter = 1;
- gchar * pathToSubscribe = g_strconcat ("default:/", G_ELEKTRA_SETTINGS_PATH, name, NULL);
+ gchar * pathToSubscribe = g_strconcat (G_ELEKTRA_SETTINGS_USER, G_ELEKTRA_SETTINGS_PATH, name, NULL);
gkey = gelektra_key_new (pathToSubscribe, KEY_BINARY, KEY_SIZE, sizeof (guint), // now the size is important
KEY_VALUE, &counter, // sets the binary value of the counter
KEY_END);
|
Fixed from local storage to session storage | # Indicates whether POST data will be preserved across authentication requests (and discovery in case of multiple OPs).
# This is designed to prevent data loss when a session timeout occurs in a (long) user filled HTML form.
# It cannot handle arbitrary payloads for security (DOS) reasons, merely form-encoded user data.
-# Preservation is done via HTML 5 local storage: note that this can lead to private data exposure on shared terminals.
+# Preservation is done via HTML 5 session storage: note that this can lead to private data exposure on shared terminals.
# The default is "Off" (for security reasons). Can be configured on a per Directory/Location basis.
#OIDCPreservePost [On|Off]
|
driver/temp_sensor/g753.c: Format with clang-format
BRANCH=none
TEST=none | @@ -31,15 +31,14 @@ static int has_power(void)
static int raw_read8(const int offset, int *data_ptr)
{
- return i2c_read8(I2C_PORT_THERMAL, G753_I2C_ADDR_FLAGS,
- offset, data_ptr);
+ return i2c_read8(I2C_PORT_THERMAL, G753_I2C_ADDR_FLAGS, offset,
+ data_ptr);
}
#ifdef CONFIG_CMD_TEMP_SENSOR
static int raw_write8(const int offset, int data)
{
- return i2c_write8(I2C_PORT_THERMAL, G753_I2C_ADDR_FLAGS,
- offset, data);
+ return i2c_write8(I2C_PORT_THERMAL, G753_I2C_ADDR_FLAGS, offset, data);
}
#endif
@@ -93,8 +92,7 @@ static void temp_sensor_poll(void)
DECLARE_HOOK(HOOK_SECOND, temp_sensor_poll, HOOK_PRIO_TEMP_SENSOR);
#ifdef CONFIG_CMD_TEMP_SENSOR
-static void print_temps(const char *name,
- const int temp_reg,
+static void print_temps(const char *name, const int temp_reg,
const int high_limit_reg)
{
int value;
@@ -106,7 +104,6 @@ static void print_temps(const char *name,
if (get_temp(high_limit_reg, &value) == EC_SUCCESS)
ccprintf(" High Alarm: %3dC\n", value);
-
}
static int print_status(void)
@@ -118,8 +115,7 @@ static int print_status(void)
return EC_ERROR_NOT_POWERED;
}
- print_temps("Local", G753_TEMP_LOCAL,
- G753_LOCAL_TEMP_HIGH_LIMIT_R);
+ print_temps("Local", G753_TEMP_LOCAL, G753_LOCAL_TEMP_HIGH_LIMIT_R);
ccprintf("\n");
@@ -161,8 +157,8 @@ static int command_g753(int argc, char **argv)
rv = raw_read8(offset, &data);
if (rv < 0)
return rv;
- ccprintf("Byte at offset 0x%02x is %pb\n",
- offset, BINARY_VALUE(data, 8));
+ ccprintf("Byte at offset 0x%02x is %pb\n", offset,
+ BINARY_VALUE(data, 8));
return rv;
}
@@ -185,7 +181,8 @@ static int command_g753(int argc, char **argv)
return rv;
}
-DECLARE_CONSOLE_COMMAND(g753, command_g753,
+DECLARE_CONSOLE_COMMAND(
+ g753, command_g753,
"[settemp|setbyte <offset> <value>] or [getbyte <offset>]. "
"Temps in Celsius.",
"Print g753 temp sensor status or set parameters.");
|
Run cmake against archive created by make dist to check missing files | @@ -35,6 +35,9 @@ jobs:
steps:
- uses: actions/checkout@v2
+ - name: Startup
+ run: |
+ echo 'NGTCP2_SOURCE_DIR='"$PWD" >> $GITHUB_ENV
- name: Linux setup
if: runner.os == 'Linux'
run: |
@@ -153,16 +156,28 @@ jobs:
- name: Configure cmake
if: matrix.buildtool == 'cmake'
run: |
+ autoreconf -i && ./configure
+ make dist
+
+ VERSION=$(grep PACKAGE_VERSION config.h | cut -d' ' -f3 | tr -d '"')
+ tar xf ngtcp2-$VERSION.tar.gz
+ cd ngtcp2-$VERSION
+ mkdir build
+ cd build
+
+ echo 'NGTCP2_BUILD_DIR='"$PWD" >> $GITHUB_ENV
+
cmake $CMAKE_OPTS \
-DENABLE_GNUTLS=ON \
-DENABLE_BORINGSSL=ON \
-DBORINGSSL_LIBRARIES="$BORINGSSL_LIBS" \
- -DBORINGSSL_INCLUDE_DIR="$PWD/boringssl/include/" \
+ -DBORINGSSL_INCLUDE_DIR="$NGTCP2_SOURCE_DIR/boringssl/include/" \
-DPICOTLS_LIBRARIES="$PICOTLS_LIBS" \
- -DPICOTLS_INCLUDE_DIR="$PWD/picotls/include/" .
+ -DPICOTLS_INCLUDE_DIR="$NGTCP2_SOURCE_DIR/picotls/include/" ..
- name: Build ngtcp2
if: matrix.buildtool != 'distcheck'
run: |
+ [ -n "$NGTCP2_BUILD_DIR" ] && cd "$NGTCP2_BUILD_DIR"
make
make check
- name: Build ngtcp2 with distcheck
@@ -173,8 +188,9 @@ jobs:
- name: Integration test
if: matrix.buildtool != 'distcheck' && matrix.sockaddr == 'native-sockaddr'
run: |
- ./ci/gen-certificate.sh
- NETTLE_PATH=$PWD/nettle-3.6/build/lib64
+ [ -n "$NGTCP2_BUILD_DIR" ] && cd "$NGTCP2_BUILD_DIR"
+ "$NGTCP2_SOURCE_DIR"/ci/gen-certificate.sh
+ NETTLE_PATH=$NGTCP2_SOURCE_DIR/nettle-3.6/build/lib64
for client in client gtlsclient bsslclient; do
for server in server gtlsserver bsslserver; do
echo "# $client - $server"
|
Testing: add test for catching asserts | #include <assert.h>
#include "grib_api_internal.h"
+int assertion_caught = 0;
+
typedef enum {IBM_FLOAT, IEEE_FLOAT} FloatRep;
void compare_doubles(const double d1, const double d2, const double epsilon)
@@ -1398,9 +1400,32 @@ void test_string_splitting()
/* input having several adjacent delimiters e.g. 'A||B|||C' */
}
+static void my_assertion_proc(const char* message)
+{
+ printf("Caught it: %s\n", message);
+ assertion_caught = 1;
+}
+
+void test_assertion_catching()
+{
+ assert(assertion_caught == 0);
+ codes_set_codes_assertion_failed_proc(&my_assertion_proc);
+
+ /* Do something illegal */
+ string_split("", " ");
+
+ assert(assertion_caught == 1);
+
+ /* Restore everything */
+ codes_set_codes_assertion_failed_proc(NULL);
+ assertion_caught = 0;
+}
+
int main(int argc, char** argv)
{
- /*printf("Doing unit tests. GRIB API version = %ld\n", grib_get_api_version());*/
+ /*printf("Doing unit tests. ecCodes version = %ld\n", grib_get_api_version());*/
+
+ test_assertion_catching();
test_gaussian_latitude_640();
|
CI: Sonarqube: run python analysis with python 3 | @@ -424,7 +424,7 @@ build_template_app:
.sonar_scan_template:
stage: build
image:
- name: $CI_DOCKER_REGISTRY/sonarqube-scanner:1
+ name: $CI_DOCKER_REGISTRY/sonarqube-scanner:2
before_script:
- export PYTHONPATH="$CI_PROJECT_DIR/tools:$CI_PROJECT_DIR/tools/ci/python_packages:$PYTHONPATH"
- python $SUBMODULE_FETCH_TOOL
|
allow reset on large pages; check commit status before reset | @@ -231,7 +231,7 @@ static void mi_segment_protect(mi_segment_t* segment, bool protect, mi_os_tld_t*
static void mi_page_reset(mi_segment_t* segment, mi_page_t* page, size_t size, mi_segments_tld_t* tld) {
mi_assert_internal(page->is_committed);
if (!mi_option_is_enabled(mi_option_page_reset)) return;
- if (segment->mem_is_fixed || page->segment_in_use || page->is_reset) return;
+ if (segment->mem_is_fixed || page->segment_in_use || !page->is_committed || page->is_reset) return;
size_t psize;
void* start = mi_segment_raw_page_start(segment, page, &psize);
page->is_reset = true;
@@ -281,12 +281,12 @@ static bool mi_page_reset_is_expired(mi_page_t* page, mi_msecs_t now) {
}
static void mi_pages_reset_add(mi_segment_t* segment, mi_page_t* page, mi_segments_tld_t* tld) {
- mi_assert_internal(!page->segment_in_use);
+ mi_assert_internal(!page->segment_in_use || !page->is_committed);
mi_assert_internal(mi_page_not_in_queue(page,tld));
mi_assert_expensive(!mi_pages_reset_contains(page, tld));
mi_assert_internal(_mi_page_segment(page)==segment);
if (!mi_option_is_enabled(mi_option_page_reset)) return;
- if (segment->mem_is_fixed || page->segment_in_use || page->is_reset) return;
+ if (segment->mem_is_fixed || page->segment_in_use || !page->is_committed || page->is_reset) return;
if (mi_option_get(mi_option_reset_delay) == 0) {
// reset immediately?
@@ -782,7 +782,7 @@ static void mi_segment_page_clear(mi_segment_t* segment, mi_page_t* page, bool a
segment->used--;
// add to the free page list for reuse/reset
- if (allow_reset && segment->page_kind <= MI_PAGE_MEDIUM) {
+ if (allow_reset) {
mi_pages_reset_add(segment, page, tld);
}
}
@@ -1096,6 +1096,9 @@ static mi_segment_t* mi_segment_reclaim(mi_segment_t* segment, mi_heap_t* heap,
}
}
}
+ else if (page->is_committed && !page->is_reset) { // not in-use, and not reset yet
+ mi_pages_reset_add(segment, page, tld);
+ }
}
mi_assert_internal(segment->abandoned == 0);
if (right_page_reclaimed) {
|
Support standalone clang with GCC frontend | @@ -128,7 +128,7 @@ elseif(WASIENV)
#-flto -Wl,--lto-O3
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,stack-size=8388608")
-elseif(WIN32 AND NOT MINGW)
+elseif(MSVC OR CMAKE_C_COMPILER_FRONTEND_VARIANT MATCHES "MSVC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Dd_m3HasTracer -D_CRT_SECURE_NO_WARNINGS /WX- /diagnostics:column")
|
test/usb_tcpmv2_td_pd_src3_e1.c: Format with clang-format
BRANCH=none
TEST=none | @@ -69,21 +69,17 @@ int test_td_pd_src3_e1(void)
* 5. Message Type field = 00001b (Source Capabilities)
* 6. Extended field = 0b
*/
- TEST_EQ(verify_tcpci_tx_with_data(TCPCI_MSG_SOP,
- PD_DATA_SOURCE_CAP,
- data,
- sizeof(data),
- &msg_len,
- 0),
+ TEST_EQ(verify_tcpci_tx_with_data(TCPCI_MSG_SOP, PD_DATA_SOURCE_CAP,
+ data, sizeof(data), &msg_len, 0),
EC_SUCCESS, "%d");
TEST_GE(msg_len, HEADER_BYTE_CNT, "%d");
header = UINT16_FROM_BYTE_ARRAY_LE(data, HEADER_BYTE_OFFSET);
pd_cnt = PD_HEADER_CNT(header);
TEST_NE(pd_cnt, 0, "%d");
- TEST_EQ(msg_len, HEADER_BYTE_OFFSET +
- HEADER_BYTE_CNT +
- (pd_cnt * PDO_BYTE_CNT), "%d");
+ TEST_EQ(msg_len,
+ HEADER_BYTE_OFFSET + HEADER_BYTE_CNT + (pd_cnt * PDO_BYTE_CNT),
+ "%d");
TEST_EQ(PD_HEADER_PROLE(header), PD_ROLE_SOURCE, "%d");
TEST_EQ(PD_HEADER_REV(header), REVISION_3, "%d");
TEST_EQ(PD_HEADER_DROLE(header), PD_ROLE_DFP, "%d");
@@ -96,8 +92,8 @@ int test_td_pd_src3_e1(void)
* 2. Voltage field = 100 (5 V)
* 3. Bits 23..22 = 000b (Reserved)
*/
- pdo = UINT32_FROM_BYTE_ARRAY_LE(data, HEADER_BYTE_OFFSET +
- HEADER_BYTE_CNT);
+ pdo = UINT32_FROM_BYTE_ARRAY_LE(data,
+ HEADER_BYTE_OFFSET + HEADER_BYTE_CNT);
type = pdo & PDO_TYPE_MASK;
TEST_EQ(type, PDO_TYPE_FIXED, "%d");
@@ -135,15 +131,14 @@ int test_td_pd_src3_e1(void)
int offset;
uint32_t voltage;
- offset = HEADER_BYTE_OFFSET +
- HEADER_BYTE_CNT +
+ offset = HEADER_BYTE_OFFSET + HEADER_BYTE_CNT +
(i * PDO_BYTE_CNT);
pdo = UINT32_FROM_BYTE_ARRAY_LE(data, offset);
type = pdo & PDO_TYPE_MASK;
if (type == PDO_TYPE_FIXED) {
- TEST_EQ(pdo & (GENMASK(28, 26)|GENMASK(24, 22)),
- 0, "%d");
+ TEST_EQ(pdo & (GENMASK(28, 26) | GENMASK(24, 22)), 0,
+ "%d");
TEST_EQ(last_battery_voltage, 0, "%d");
TEST_EQ(last_variable_voltage, 0, "%d");
TEST_EQ(last_programmable_voltage, 0, "%d");
|
Remove dead loop in verifyArchive().
This loop has been dead since the code was initially committed in It looks like it was used at one point but became dead when the enclosing if-else was added during development.
Found by Coverity. | @@ -744,8 +744,6 @@ verifyArchive(void *data)
// If there are WAL files, then verify them
if (!strLstEmpty(jobData->walFileList))
- {
- do
{
// Get the fully qualified file name and checksum
const String *fileName = strLstGet(jobData->walFileList, 0);
@@ -772,11 +770,6 @@ verifyArchive(void *data)
// If this is the last file to process for this timeline, then remove the path
if (strLstEmpty(jobData->walFileList))
strLstRemoveIdx(jobData->walPathList, 0);
-
- // Return to process the job found
- break;
- }
- while (!strLstEmpty(jobData->walFileList));
}
else
{
|
offcputime: fix no comm&delta output if missed user stack | @@ -241,7 +241,7 @@ print_ustack:
if (bpf_map_lookup_elem(sfd, &next_key.user_stack_id, ip) != 0) {
fprintf(stderr, " [Missed User Stack]\n");
- continue;
+ goto skip_ustack;
}
syms = syms_cache__get_syms(syms_cache, next_key.tgid);
|
No more deploy with releases provider | @@ -33,81 +33,35 @@ matrix:
language: cpp
env: CB_BUILD_AGENT='clang-linux-x86_64-release-cuda'
script: ~/build/${TRAVIS_REPO_SLUG}/ci/travis/script.sh
- deploy:
- provider: releases
- api_key: $GITHUB_OAUTH_TOKEN
- file: catboost-cuda-linux
- skip_cleanup: true
- on:
- tags: true
- os: linux
dist: trusty
language: python
python: 2.7
env: CB_BUILD_AGENT='python2-linux-x86_64-release'
script: ~/build/${TRAVIS_REPO_SLUG}/ci/travis/script.sh
- deploy:
- provider: releases
- api_key: $GITHUB_OAUTH_TOKEN
- file_glob: true
- file: catboost/python-package/*.whl
- skip_cleanup: true
- on:
- tags: true
- os: linux
dist: trusty
language: python
python: 3.5
env: CB_BUILD_AGENT='python35-linux-x86_64-release'
script: ~/build/${TRAVIS_REPO_SLUG}/ci/travis/script.sh
- deploy:
- provider: releases
- api_key: $GITHUB_OAUTH_TOKEN
- file_glob: true
- file: catboost/python-package/*.whl
- skip_cleanup: true
- on:
- tags: true
- os: linux
dist: trusty
language: python
python: 3.4
env: CB_BUILD_AGENT='python34-linux-x86_64-release'
script: ~/build/${TRAVIS_REPO_SLUG}/ci/travis/script.sh
- deploy:
- provider: releases
- api_key: $GITHUB_OAUTH_TOKEN
- file_glob: true
- file: catboost/python-package/*.whl
- skip_cleanup: true
- on:
- tags: true
- os: linux
dist: trusty
language: python
python: 3.6
env: CB_BUILD_AGENT='python36-linux-x86_64-release'
script: ~/build/${TRAVIS_REPO_SLUG}/ci/travis/script.sh
- deploy:
- provider: releases
- api_key: $GITHUB_OAUTH_TOKEN
- file_glob: true
- file: catboost/python-package/*.whl
- skip_cleanup: true
- on:
- tags: true
- os: osx
osx_image: xcode8.3
language: cpp
env: CB_BUILD_AGENT='clang-darwin-x86_64-release'
script: ~/build/${TRAVIS_REPO_SLUG}/ci/travis/script.sh
- deploy:
- provider: releases
- api_key: $GITHUB_OAUTH_TOKEN
- file: catboost-darwin
- skip_cleanup: true
- on:
- tags: true
- os: osx
osx_image: xcode8.3
language: cpp
|
docs: Correct Linux port names for more relevance | @@ -326,7 +326,7 @@ Some environment variables can be specified whilst calling ``make`` allowing use
+=================+==============================================================+
| ``ESPPORT`` | Overrides the serial port used in ``flash`` and ``monitor``. |
| | |
-| | Examples: ``make flash ESPPORT=/dev/tty/USB0``, |
+| | Examples: ``make flash ESPPORT=/dev/ttyUSB1``, |
| | ``make monitor ESPPORT=COM1`` |
+-----------------+--------------------------------------------------------------+
| ``ESPBAUD`` | Overrides the serial baud rate when flashing the ESP32. |
@@ -339,7 +339,7 @@ Some environment variables can be specified whilst calling ``make`` allowing use
+-----------------+--------------------------------------------------------------+
.. note::
- Users can export environment variables (e.g. ``export ESPPORT=/dev/tty/USB0``).
+ Users can export environment variables (e.g. ``export ESPPORT=/dev/ttyUSB1``).
All subsequent calls of ``make`` within the same terminal session will use
the exported value given that the variable is not simultaneously overridden.
|
[tools] fix the spawn except handling. | @@ -105,8 +105,11 @@ class Win32Spawn:
try:
proc = subprocess.Popen(cmdline, env=_e, shell=False)
except Exception as e:
- print ('Error in calling:\n' + cmdline)
- print ('Exception: ' + e + ': ' + os.strerror(e.errno))
+ print ('Error in calling command:' + cmdline.split(' ')[0])
+ print ('Exception: ' + os.strerror(e.errno))
+ if (os.strerror(e.errno) == "No such file or directory"):
+ print ("\nPlease check Toolchains PATH setting.\n")
+
return e.errno
finally:
os.environ['PATH'] = old_path
|
client: Ingore stream not found error in ngtcp2_conn_write_stream | @@ -644,6 +644,8 @@ int Client::on_write_stream(uint32_t stream_id, uint8_t fin, Buffer &data) {
switch (n) {
case NGTCP2_ERR_STREAM_DATA_BLOCKED:
case NGTCP2_ERR_STREAM_SHUT_WR:
+ case NGTCP2_ERR_INVALID_ARGUMENT: // This means that stream is
+ // closed.
return 0;
}
std::cerr << "ngtcp2_conn_write_stream: " << ngtcp2_strerror(n)
|
Contract: Fix incorrect character in description | @@ -147,7 +147,7 @@ description = Introduces a more abstract name (=provider) for the type
is a provider for all activities necessary to fulfil
a specific mission. The name already provides users with an
understanding what this assignment is. Together with an informal text
- (`infos/description?) it exactly describes the responsibilities.
+ (`infos/description`) it exactly describes the responsibilities.
Other plugins can utilise this service.
The above enum lists (in type) the current known providers, even though any other
|
Stop at the first return statement | @@ -159,50 +159,43 @@ function Parser:Program()
-- module contents
local tls = {}
- while not self:peek("EOF") do
+ while not self:peek("EOF") and not self:peek("return") do
table.insert(tls, self:Toplevel())
end
-- returm <modname>
- local last_stat
- do
- local last_tl = tls[#tls]
-
- if not (
- last_tl and
- last_tl._tag == "ast.Toplevel.Stats" and
- last_tl.stats[#last_tl.stats] and
- last_tl.stats[#last_tl.stats]._tag == "ast.Stat.Return")
- then
+ if self:peek("EOF") then
self:syntax_error(self.lexer:loc(),
"must end by returning the module table; return %s", modname)
end
- last_stat = table.remove(last_tl.stats)
- if not last_tl.stats[1] then
- table.remove(tls)
+ local return_stat = self:Stat(true)
+ assert(return_stat._tag == "ast.Stat.Return")
+
+ if not self:peek("EOF") then
+ local tok = self:e()
+ self:syntax_error(tok.loc, "statement after the return statement") -- TODO
end
- if #last_stat.exps ~= 1 then
- self:syntax_error(last_stat.loc,
+ if #return_stat.exps ~= 1 then
+ self:syntax_error(return_stat.loc,
"final return statement must return a single value")
end
- local exp = last_stat.exps[1]
+ local returned_exp = return_stat.exps[1]
if not (
- exp._tag == "ast.Exp.Var" and
- exp.var._tag == "ast.Var.Name" and
- exp.var.name == modname)
+ returned_exp._tag == "ast.Exp.Var" and
+ returned_exp.var._tag == "ast.Var.Name" and
+ returned_exp.var.name == modname)
then
-- The checker also needs to check that this name has not been shadowed
- self:syntax_error(exp.loc,
+ self:syntax_error(returned_exp.loc,
"must return exactly the module variable '%s'", modname)
end
- end
return ast.Program.Program(
- start_loc, last_stat.loc, modname, tls, self.type_regions, self.comment_regions)
+ start_loc, return_stat.loc, modname, tls, self.type_regions, self.comment_regions)
end
function Parser:Toplevel()
@@ -232,10 +225,14 @@ function Parser:Toplevel()
else
local stats = {}
- while not (self:peek("EOF") or self:peek("typealias") or self:peek("record")) do
+ while
+ not self:peek("EOF") and
+ not self:peek("return") and
+ not self:peek("typealias") and
+ not self:peek("record")
+ do
local stat = self:Stat(true)
- if stat._tag ~= "ast.Stat.Return" and
- stat._tag ~= "ast.Stat.Decl" and
+ if stat._tag ~= "ast.Stat.Decl" and
stat._tag ~= "ast.Stat.Assign" and
stat._tag ~= "ast.Stat.Func"
then
|
Fix emitting 1-byte long metadata block | @@ -1188,7 +1188,7 @@ static size_t WriteMetadataHeader(
if (block_size == 0) {
BrotliWriteBits(2, 0, &storage_ix, header);
} else {
- uint32_t nbits = (block_size == 1) ? 0 :
+ uint32_t nbits = (block_size == 1) ? 1 :
(Log2FloorNonZero((uint32_t)block_size - 1) + 1);
uint32_t nbytes = (nbits + 7) / 8;
BrotliWriteBits(2, nbytes, &storage_ix, header);
|
Wierd "Unindent error..." temp fix | @@ -143,14 +143,14 @@ for s in parser.states:
#[ dbg_bytes(pd->data + pd->parsed_length, pd->payload_length, " " T4LIT(%%%%%%%%,success) " Packet is $$[success]{}{accepted}, " T4LIT(%d) "B of headers, " T4LIT(%d) "B of payload: ", pd->parsed_length, pd->payload_length);
#[ } else {
#[ debug(" " T4LIT(%%%%%%%%,success) " Packet is $$[success]{}{accepted}, " T4LIT(%d) "B of headers, " T4LIT(empty payload) "\n", pd->parsed_length);
- #} }
+ #[ }
#} }
continue
if s.name == 'reject':
#[ debug(" " T4LIT(%%%%%%%%,status) " Parser state $$[parserstate]{s.name}, packet is $$[status]{}{dropped}\n");
#[ drop_packet(STDPARAMS_IN);
- #} }
+ #[ }
continue
#[ debug(" %%%%%%%% Parser state $$[parserstate]{s.name}\n");
|
Fix HAL erase Memory | @@ -269,7 +269,7 @@ uint16_t LuosHAL_GetNodeID(void)
******************************************************************************/
void LuosHAL_EraseMemory(uint32_t address, uint16_t size)
{
- uint32_t nb_sectors_to_erase = FLASH_SECTOR_TOTAL - 1 - APP_ADDRESS_SECTOR;
+ uint32_t nb_sectors_to_erase = FLASH_SECTOR_TOTAL - APP_ADDRESS_SECTOR;
uint32_t sector_to_erase = APP_ADDRESS_SECTOR;
uint32_t sector_error = 0;
|
mdns: Use memcpy() for copy to support non-text TXTs | @@ -513,6 +513,37 @@ static inline uint8_t _mdns_append_string(uint8_t * packet, uint16_t * index, co
return len + 1;
}
+/**
+ * @brief appends one TXT record ("key=value" or "key")
+ *
+ * @param packet MDNS packet
+ * @param index offset in the packet
+ * @param txt one txt record
+ *
+ * @return length of added data: length of the added txt value + 1 on success
+ * 0 if data won't fit the packet
+ * -1 if invalid TXT entry
+ */
+static inline int append_one_txt_record_entry(uint8_t * packet, uint16_t * index, mdns_txt_linked_item_t * txt)
+{
+ if (txt == NULL || txt->key == NULL) {
+ return -1;
+ }
+ size_t key_len = strlen(txt->key);
+ size_t len = key_len + txt->value_len + (txt->value ? 1 : 0);
+ if ((*index + len + 1) >= MDNS_MAX_PACKET_SIZE) {
+ return 0;
+ }
+ _mdns_append_u8(packet, index, len);
+ memcpy(packet + *index, txt->key, key_len);
+ if (txt->value) {
+ packet[*index + key_len] = '=';
+ memcpy(packet + *index + key_len + 1, txt->value, txt->value_len);
+ }
+ *index += len;
+ return len + 1;
+}
+
/**
* @brief appends FQDN to a packet, incrementing the index and
* compressing the output if previous occurrence of the string (or part of it) has been found
@@ -775,19 +806,13 @@ static uint16_t _mdns_append_txt_record(uint8_t * packet, uint16_t * index, mdns
uint16_t data_len_location = *index - 2;
uint16_t data_len = 0;
- char * tmp;
mdns_txt_linked_item_t * txt = service->txt;
while (txt) {
- if (asprintf(&tmp, "%s%s%.*s", txt->key, txt->value ? "=" : "", txt->value_len, txt->value) > 0) {
- uint8_t l = _mdns_append_string(packet, index, tmp);
- free(tmp);
- if (!l) {
- return 0;
- }
+ int l = append_one_txt_record_entry(packet, index, txt);
+ if (l > 0) {
data_len += l;
- } else {
- HOOK_MALLOC_FAILED;
- // continue
+ } else if (l == 0) { // TXT entry won't fit into the mdns packet
+ return 0;
}
txt = txt->next;
}
@@ -2574,17 +2599,10 @@ static int _mdns_check_txt_collision(mdns_service_t * service, const uint8_t * d
uint8_t ours[len];
uint16_t index = 0;
- char * tmp;
txt = service->txt;
while (txt) {
- if (asprintf(&tmp, "%s%s%.*s", txt->key, txt->value ? "=" : "", txt->value_len, txt->value) > 0) {
- _mdns_append_string(ours, &index, tmp);
- free(tmp);
- } else {
- HOOK_MALLOC_FAILED;
- // continue
- }
+ append_one_txt_record_entry(ours, &index, txt);
txt = txt->next;
}
|
MSR: Allow spaces after `Backup-and-Restore:` | @@ -39,7 +39,8 @@ translate()
{
TMPFILE=$(mktemp)
MOUNTPOINT=$(echo "$BUF" | head -n 1)
- if grep -Eq 'Backup-and-Restore:' <<< "$MOUNTPOINT"; then echo "Mountpoint: $(cut -d ':' -f2 <<< "$MOUNTPOINT")" >> "$TMPFILE"
+ if grep -Eq 'Backup-and-Restore:' <<< "$MOUNTPOINT"; then
+ echo "Mountpoint: $(cut -d ':' -f2 <<< "$MOUNTPOINT" | sed 's/^[[:space:]]*//')" >> "$TMPFILE"
else echo 'Mountpoint: /examples' >> "$TMPFILE"
fi
|
Added square search | @@ -706,9 +706,10 @@ static void hexagon_search(inter_search_info_t *info, vector2d_t extra_mv, uint3
// 1
// 2 0 3
// 4
- static const vector2d_t small_hexbs[5] = {
+ static const vector2d_t small_hexbs[9] = {
{ 0, 0 },
- { 0, -1 }, { -1, 0 }, { 1, 0 }, { 0, 1 }
+ { 0, -1 }, { -1, 0 }, { 1, 0 }, { 0, 1 },
+ { -1, -1 }, { 1, -1 }, { -1, 1 }, { 1, 1 }
};
info->best_cost = UINT32_MAX;
@@ -771,7 +772,7 @@ static void hexagon_search(inter_search_info_t *info, vector2d_t extra_mv, uint3
//mv.y += large_hexbs[best_index].y;
// Do the final step of the search with a small pattern.
- for (int i = 1; i < 5; ++i) {
+ for (int i = 1; i < 9; ++i) {
check_mv_cost(info, mv.x + small_hexbs[i].x, mv.y + small_hexbs[i].y);
}
}
|
use dedicated callback | @@ -1019,6 +1019,15 @@ static void on_handshake_complete(h2o_socket_t *sock, const char *err)
handshake_cb(sock, err);
}
+static void on_alert_sent(h2o_socket_t *sock, const char *err)
+{
+ if (err != NULL) {
+ on_handshake_complete(sock, err);
+ } else {
+ on_handshake_complete(sock, "handshake failure");
+ }
+}
+
static void proceed_handshake(h2o_socket_t *sock, const char *err)
{
h2o_iovec_t first_input = {NULL};
@@ -1129,7 +1138,6 @@ Redo:
ret = SSL_connect(sock->ssl->ossl);
}
- int is_complete = 0;
if (ret == 0 || (ret < 0 && SSL_get_error(sock->ssl->ossl, ret) != SSL_ERROR_WANT_READ)) {
/* failed */
long verify_result = SSL_get_verify_result(sock->ssl->ossl);
@@ -1139,17 +1147,16 @@ Redo:
err = "ssl handshake failure";
}
- if (sock->ssl->output.bufs.size == 0)
- goto Complete;
-
- is_complete = 1;
+ if (sock->ssl->output.bufs.size != 0) {
+ h2o_socket_read_stop(sock);
+ flush_pending_ssl(sock, on_alert_sent);
+ return;
+ }
}
if (sock->ssl->output.bufs.size != 0) {
h2o_socket_read_stop(sock);
flush_pending_ssl(sock, ret == 1 ? on_handshake_complete : proceed_handshake);
- if (is_complete)
- goto Complete;
} else {
if (ret == 1) {
if (!SSL_is_server(sock->ssl->ossl)) {
|
sdk 4.1.0 ver in objc doc | @@ -38,7 +38,7 @@ PROJECT_NAME = "CARTO Mobile SDK iOS"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = "4.0.0"
+PROJECT_NUMBER = "4.1.0"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
|
properly check for integer | @@ -27,7 +27,7 @@ const INTEGER_TYPES = [
const FLOAT_TYPES = [ 'float', 'double' ]
const isNumber = (value) => !isNaN(value)
-const isInt = (value) => /^(-|\+)?[0-9]+$/.test(value)
+const isInt = (value) => Number.isInteger(value)
const elektraEnumToJSON = (val) => {
const convertedVal = val.replace(/'/g, '"')
|
iOS: only active Arch for Debug | "$(SRCROOT)",
"$(SRCROOT)/build/Debug-iphonesimulator",
);
- ONLY_ACTIVE_ARCH = NO;
+ ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "";
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
"OTHER_LDFLAGS[sdk=*][arch=*]" = (
|
Fix doubled up bits in time flag | @@ -84,7 +84,7 @@ definitions:
fields:
- 5-7:
desc: Reserved
- - 2-4:
+ - 3-4:
desc: UTC offset source
values:
- 0: Factory Default
|
When used with FreeRTOS, lower the interrupt priority for OTG_FS_IRQn | @@ -51,7 +51,7 @@ void board_init(void)
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
- //NVIC_SetPriority(USB0_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
+ NVIC_SetPriority(OTG_FS_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
#endif
GPIO_InitTypeDef GPIO_InitStruct;
|
exclude more symbols for utils.symbols.export_all | @@ -66,8 +66,14 @@ function main (target, opt)
symbol = symbol:sub(2)
end
if export_classes or not symbol:startswith("?") then
+ if export_classes then
+ if not symbol:startswith("??_G") and not symbol:startswith("??_E") then
allsymbols:insert(symbol)
end
+ else
+ allsymbols:insert(symbol)
+ end
+ end
end
end
end
|
moved RINGBUFFER info to end of status line | @@ -473,7 +473,7 @@ static inline void printtimestatus()
static char timestring[16];
strftime(timestring, 16, "%H:%M:%S", localtime(&tv.tv_sec));
-snprintf(servermsg, SERVERMSG_MAX, "%s %3d INFO ERROR:%d INCOMMING:%" PRIu64 " OUTGOING:%" PRIu64 " RINGBUFFER:%d GPS:%d\n", timestring, channelscanlist[cpa], errorcount, incommingcount, outgoingcount, ringbuffercount, gpscount);
+snprintf(servermsg, SERVERMSG_MAX, "%s %3d INFO ERROR:%d INCOMMING:%" PRIu64 " OUTGOING:%" PRIu64 " GPS:%d RINGBUFFER:%d\n", timestring, channelscanlist[cpa], errorcount, incommingcount, outgoingcount, gpscount, ringbuffercount);
if(((statusout &STATUS_SERVER) == STATUS_SERVER) && (fd_socket_mcsrv > 0))
{
sendto(fd_socket_mcsrv, servermsg, strlen(servermsg), 0, (struct sockaddr*)&mcsrvaddress, sizeof(mcsrvaddress));
@@ -2949,7 +2949,7 @@ static fd_set readfds;
static struct timeval tvfd;
snprintf(servermsg, SERVERMSG_MAX, "\e[?25l\nstart capturing (stop with ctrl+c)\n"
- "NMEA 0183 RMC SENTENCE..: %s\n"
+ "NMEA 0183 SENTENCE......: %s\n"
"INTERFACE NAME..........: %s\n"
"INTERFACE HARDWARE MAC..: %02x%02x%02x%02x%02x%02x\n"
"DRIVER..................: %s\n"
|
Fix 2d arrows | @@ -93,7 +93,7 @@ void __declspec(naked) gbh_DrawQuad()
}
else if (((*gGame)))
{
- if (esp44 != dword_4C834B && esp40 != dword_4C74EA && esp44 != dword_4C83B2)
+ if (esp44 != dword_4C834B && esp40 != dword_4C74EA && esp44 != dword_4C83B2 && esp40 != dword_4C834B && esp44 != dword_4C74EA && esp40 != dword_4C83B2)
{
*(float*)(dword_6733F0 + 0x00) += hud_offset;
*(float*)(dword_6733F0 + 0x20) += hud_offset;
|
esp32/machine_touchpad: Use HW timer for FSM to enable wake-on-touch. | @@ -69,6 +69,7 @@ STATIC mp_obj_t mtp_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_
static int initialized = 0;
if (!initialized) {
touch_pad_init();
+ touch_pad_set_fsm_mode(TOUCH_FSM_MODE_TIMER);
initialized = 1;
}
esp_err_t err = touch_pad_config(self->touchpad_id, 0);
|
mpi-families/mvapich2: bump to v2.3.5 | Summary: OSU MVAPICH2 MPI implementation
Name: %{pname}%{COMM_DELIM}-%{compiler_family}%{RMS_DELIM}%{PROJ_DELIM}
-Version: 2.3.2
+Version: 2.3.5
Release: 1%{?dist}
License: BSD
Group: %{PROJ_NAME}/mpi-families
|
[Bsp][STM32F4xx_HAL]Fix hal_conf.h to include rtthread.h | #ifdef __cplusplus
extern "C" {
#endif
-#include "board.h"
+#include <rtthread.h>
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
|
SOVERSION bump to version 1.0.4 | @@ -48,7 +48,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 1)
set(LIBNETCONF2_MINOR_SOVERSION 0)
-set(LIBNETCONF2_MICRO_SOVERSION 3)
+set(LIBNETCONF2_MICRO_SOVERSION 4)
set(LIBNETCONF2_SOVERSION_FULL ${LIBNETCONF2_MAJOR_SOVERSION}.${LIBNETCONF2_MINOR_SOVERSION}.${LIBNETCONF2_MICRO_SOVERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_SOVERSION})
|
Remove obsolete comment
Removed TBD comment that is no longer relevant since
that portion of the code has been updated. | @@ -273,9 +273,6 @@ static psa_status_t get_expected_key_size( const psa_key_attributes_t *attribute
#if defined(PSA_CRYPTO_DRIVER_TEST)
case PSA_CRYPTO_TEST_DRIVER_LIFETIME:
- /* TBD: opaque driver support: need to calculate size through a
- * driver-defined size function, since the size of an opaque (wrapped)
- * key will be different for each implementation. */
#ifdef TEST_KEY_CONTEXT_SIZE_FUNCTION
*expected_size = test_size_function( key_type, key_bits );
return( PSA_SUCCESS );
|
Adjustments for xr path changes and idsig file; | @@ -296,14 +296,14 @@ end
if config.headsets.openxr then
if target == 'android' then
- cflags_openxr += '-Ideps/OpenXR-Oculus/Include'
+ cflags_headset_openxr += '-Ideps/OpenXR-Oculus/Include'
lflags += 'lopenxr_loader'
copy('deps/OpenXR-Oculus/Libs/Android/arm64-v8a/Release/libopenxr_loader.so', '$(bin)/%b')
else
if type(config.headsets.openxr) ~= 'string' then
error('Sorry, building OpenXR is not supported yet. However, you can set config.headsets.openxr to a path to a folder containing the OpenXR library.')
end
- cflags += '-Ideps/openxr/include'
+ cflags_headset_openxr += '-Ideps/openxr/include'
lflags += '-L' .. config.headsets.openxr
lflags += '-lopenxr_loader'
end
@@ -311,13 +311,16 @@ end
if config.headsets.oculus then
assert(target == 'windows', 'LibOVR is not supported on this target')
- cflags_oculus += '-Ideps/LibOVR/Include'
+ cflags_headset_oculus += '-Ideps/LibOVR/Include'
copy('deps/LibOVR/LibWindows/x64/Release/VS2017/LibOVR.dll', lib('LibOVR'))
end
if config.headsets.vrapi then
assert(target == 'android', 'VrApi is not supported on this target')
- cflags_vrapi += '-Ideps/VrApi/Include'
+ cflags_headset_vrapi += '-Ideps/VrApi/Include'
+ cflags_headset_vrapi += '-Wno-gnu-empty-initializer'
+ cflags_headset_vrapi += '-Wno-c11-extensions'
+ cflags_headset_vrapi += '-Wno-pedantic'
lflags += '-lvrapi'
copy('deps/VrApi/Libs/Android/arm64-v8a/Release/libvrapi.so', '$(bin)/%b')
end
@@ -329,7 +332,7 @@ if config.headsets.pico then
end
if config.spatializers.oculus then
- cflags_oculus += '-Ideps/AudioSDK/Include'
+ cflags_headset_oculus += '-Ideps/AudioSDK/Include'
ovraudio_libs = {
win32 = 'deps/AudioSDK/Lib/x64/ovraudio64.dll',
linux = 'deps/AudioSDK/Lib/Linux64/libovraudio64.so',
@@ -340,7 +343,7 @@ if config.spatializers.oculus then
end
if config.spatializers.phonon then
- cflags_phonon += '-Ideps/phonon/include'
+ cflags_spatializer_phonon += '-Ideps/phonon/include'
phonon_libs = {
win32 = 'deps/phonon/bin/Windows/x64/phonon.dll',
macos = 'deps/phonon/lib/OSX/libphonon.dylib',
@@ -487,5 +490,5 @@ if target == 'android' then
unaligned
)
tup.rule(unaligned, '^ ZIPALIGN %f^ $(tools)/zipalign -f -p 4 %f %o', unsigned)
- tup.rule(unsigned, '^ APKSIGNER %o^ $(tools)/apksigner sign --ks $(ks) --ks-pass $(kspass) --out %o %f', apk)
+ tup.rule(unsigned, '^ APKSIGNER %o^ $(tools)/apksigner sign --ks $(ks) --ks-pass $(kspass) --out %o %f', { apk, extra_outputs = 'bin/lovr.apk.idsig' })
end
|
h2olog: implement the header tracer func | @@ -11,6 +11,7 @@ import getopt, sys
bpf = """
#define MAX_STR_LEN 128
+#define MIN(x, y) (((x) < (y)) ? (x) : (y))
/*
* "req_line_t" represents an individual log line for a given request.
@@ -43,7 +44,30 @@ int trace_receive_req(struct pt_regs *ctx) {
return 0;
}
-int trace_receive_req_header(void *ctx) {
+int trace_receive_req_header(struct pt_regs *ctx) {
+ struct req_line_t line = {};
+ uint64_t conn_id, req_id = 0;
+ size_t n_len, v_len;
+ void *pos = NULL;
+
+ bpf_usdt_readarg(1, ctx, &line.conn_id);
+ bpf_usdt_readarg(2, ctx, &line.req_id);
+
+ // Extract the Header Name
+ bpf_usdt_readarg(3, ctx, &pos);
+ bpf_usdt_readarg(4, ctx, &n_len);
+ line.header_name_len = MIN(MAX_STR_LEN, n_len);
+ bpf_probe_read(&line.header_name, line.header_name_len, pos);
+
+ // Extract the Header Value
+ bpf_usdt_readarg(5, ctx, &pos);
+ bpf_usdt_readarg(6, ctx, &v_len);
+ line.header_value_len = MIN(MAX_STR_LEN, v_len);
+ bpf_probe_read(&line.header_value, line.header_value_len, pos);
+
+ if (reqbuf.perf_submit(ctx, &line, sizeof(line)) < 0)
+ bpf_trace_printk("failed to perf_submit\\n");
+
return 0;
}
"""
@@ -53,6 +77,8 @@ def print_req_line(cpu, data, size):
if line.http_version:
v = "HTTP/%d.%d" % (line.http_version / 256, line.http_version % 256)
print("%u %u: %s" % (line.conn_id, line.req_id, v))
+ else:
+ print("%u %u: %s %s" % (line.conn_id, line.req_id, line.header_name, line.header_value))
try:
h2o_pid = 0
|
Fix missing assignment. Updated recursive now compiles and is ready for testing. | @@ -25111,7 +25111,7 @@ void check_damage_recursive(entity *ent, entity *other, s_collision_attack *atta
cursor = malloc(sizeof(*cursor));
// Assign to entity.
- ent->recursive_damage;
+ ent->recursive_damage = cursor;
}
// Now we have a target recursive element to populate with
|
No Ticket - add sensor_device_create()
This is to clean up hal_bsp_init() | @@ -204,6 +204,38 @@ slinky_color_init(struct os_dev *dev, void *arg)
}
#endif
+static void
+sensor_dev_create(void)
+{
+ int rc;
+
+ rc = 0;
+#if MYNEWT_VAL(LSM303DLHC_PRESENT)
+ rc = os_dev_create((struct os_dev *) &lsm303dlhc, "accel0",
+ OS_DEV_INIT_PRIMARY, 0, slinky_accel_init, NULL);
+ assert(rc == 0);
+#endif
+
+#if MYNEWT_VAL(BNO055_PRESENT)
+ rc = os_dev_create((struct os_dev *) &bno055, "accel1",
+ OS_DEV_INIT_PRIMARY, 0, slinky_accel_init, NULL);
+ assert(rc == 0);
+#endif
+
+#if MYNEWT_VAL(TSL2561_PRESENT)
+ rc = os_dev_create((struct os_dev *) &tsl2561, "light0",
+ OS_DEV_INIT_PRIMARY, 0, slinky_light_init, NULL);
+ assert(rc == 0);
+#endif
+
+#if MYNEWT_VAL(TCS34725_PRESENT)
+ rc = os_dev_create((struct os_dev *) &tcs34725, "color0",
+ OS_DEV_INIT_PRIMARY, 0, slinky_color_init, NULL);
+ assert(rc == 0);
+#endif
+
+}
+
void
hal_bsp_init(void)
{
@@ -255,30 +287,6 @@ hal_bsp_init(void)
assert(rc == 0);
#endif
-#if MYNEWT_VAL(LSM303DLHC_PRESENT)
- rc = os_dev_create((struct os_dev *) &lsm303dlhc, "accel0",
- OS_DEV_INIT_PRIMARY, 0, slinky_accel_init, NULL);
- assert(rc == 0);
-#endif
-
-#if MYNEWT_VAL(BNO055_PRESENT)
- rc = os_dev_create((struct os_dev *) &bno055, "accel1",
- OS_DEV_INIT_PRIMARY, 0, slinky_accel_init, NULL);
- assert(rc == 0);
-#endif
-
-#if MYNEWT_VAL(TSL2561_PRESENT)
- rc = os_dev_create((struct os_dev *) &tsl2561, "light0",
- OS_DEV_INIT_PRIMARY, 0, slinky_light_init, NULL);
- assert(rc == 0);
-#endif
-
-#if MYNEWT_VAL(TCS34725_PRESENT)
- rc = os_dev_create((struct os_dev *) &tcs34725, "color0",
- OS_DEV_INIT_PRIMARY, 0, slinky_color_init, NULL);
- assert(rc == 0);
-#endif
-
#if MYNEWT_VAL(UART_0)
rc = os_dev_create((struct os_dev *) &os_bsp_uart0, "uart0",
OS_DEV_INIT_PRIMARY, 0, uart_hal_init, (void *)&os_bsp_uart0_cfg);
@@ -291,4 +299,5 @@ hal_bsp_init(void)
assert(rc == 0);
#endif
+ sensor_dev_create();
}
|
Checkmatch shouldn't allow coerceable types
That was a leftover from when we had implicit coercions everywhere.
In any case, when we add more automatic coercions back we should insert
cast nodes explicitly, instead of telling checkmatch to be lax and
pushing the coercion insertion to the code generator... | @@ -52,7 +52,7 @@ end
-- errors: list of compile-time errors
-- loc: location of the term that is being compared
local function checkmatch(term, expected, found, errors, loc)
- if types.coerceable(found, expected) or not types.equals(expected, found) then
+ if not types.equals(expected, found) then
local msg = "types in %s do not match, expected %s but found %s"
msg = string.format(msg, term, types.tostring(expected), types.tostring(found))
type_error(errors, loc, msg)
|
TLSProxy/Message.pm: refine end-of-conversation detection logic. | @@ -267,15 +267,18 @@ sub get_messages
}
} elsif ($record->content_type == TLSProxy::Record::RT_ALERT) {
my ($alertlev, $alertdesc) = unpack('CC', $record->decrypt_data);
+ print " [$alertlev, $alertdesc]\n";
#A CloseNotify from the client indicates we have finished successfully
#(we assume)
if (!$end && !$server && $alertlev == AL_LEVEL_WARN
&& $alertdesc == AL_DESC_CLOSE_NOTIFY) {
$success = 1;
}
- #All alerts end the test
+ #Fatal or close notify alerts end the test
+ if ($alertlev == AL_LEVEL_FATAL || $alertdesc == AL_DESC_CLOSE_NOTIFY) {
$end = 1;
}
+ }
return @messages;
}
|
Apply refactor to CamelCase | @@ -19,7 +19,7 @@ using namespace blit;
void init() {
- set_screen_mode(screen_mode::lores);
+ set_screen_mode(ScreenMode::lores);
}
@@ -28,15 +28,15 @@ void render(uint32_t time) {
for(int b = 0; b < SCREEN_WIDTH; b++){
for(int v = 0; v < SCREEN_HEIGHT; v++){
- fb.pen(blit::hsv_to_rgba(float(b) / (float)(SCREEN_WIDTH), 1.0f, float(v) / (float)(SCREEN_HEIGHT)));
- fb.pixel(point(b, v));
+ screen.pen(blit::hsv_to_rgba(float(b) / (float)(SCREEN_WIDTH), 1.0f, float(v) / (float)(SCREEN_HEIGHT)));
+ screen.pixel(Point(b, v));
}
}
- fb.text("Time:", &minimal_font[0][0], point(COL1, ROW1));
+ screen.text("Time:", &minimal_font[0][0], Point(COL1, ROW1));
sprintf(text_buf, "%" PRIu32, time);
- fb.text(text_buf, &minimal_font[0][0], point(COL2, ROW1));
+ screen.text(text_buf, &minimal_font[0][0], Point(COL2, ROW1));
blit::debugf("Hello from 32blit time = %lu\n\r", time);
|
PicoGraphics: Fix P8 buffer size. | @@ -62,7 +62,7 @@ namespace pimoroni {
row_buf[x] = cache[src[bounds.w * y + x]];
}
// Callback to the driver with the row data
- callback(row_buf, bounds.w * sizeof(RGB565));
+ callback(row_buf, bounds.w * sizeof(uint8_t));
}
}
}
|
Fix for dylib mac build | @@ -211,6 +211,7 @@ def getFrameworks(binaryPath, verbose):
raise RuntimeError("otool failed with return code %d" % otool.returncode)
otoolLines = o_stdout.split("\n")
+ otoolLines.append(" /usr/local/opt/boost/lib/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)")
otoolLines.pop(0) # First line is the inspected binary
if ".framework" in binaryPath or binaryPath.endswith(".dylib"):
otoolLines.pop(0) # Frameworks and dylibs list themselves as a dependency.
|
Typo in aws_iot_config.h
breaks compilation when 'Override Shadow RX buffer size' is enabled via
menuconfig
Merges | // Thing Shadow specific configs
#ifdef CONFIG_AWS_IOT_OVERRIDE_THING_SHADOW_RX_BUFFER
-#define SHADOW_MAX_SIZE_OF_RX_BUFFER CONFIG AWS_IOT_SHADOW_MAX_SIZE_OF_RX_BUFFER ///< Maximum size of the SHADOW buffer to store the received Shadow message, including NULL termianting byte
+#define SHADOW_MAX_SIZE_OF_RX_BUFFER CONFIG_AWS_IOT_SHADOW_MAX_SIZE_OF_RX_BUFFER ///< Maximum size of the SHADOW buffer to store the received Shadow message, including NULL terminating byte
#else
#define SHADOW_MAX_SIZE_OF_RX_BUFFER (AWS_IOT_MQTT_RX_BUF_LEN + 1)
#endif
|
Travis: Use default install location on macOS
After this change `pkg-config` is able to detect Elektra on macOS. This
means that tests such as `testscr_check_gen` will now run actual test
code, and not exit successfully after they failed to locate the
installed version of Elektra. | @@ -80,7 +80,8 @@ before_install:
#
before_script:
- cd $TRAVIS_BUILD_DIR/..
- - INSTALL_DIR="$PWD/install"
+ - >
+ [[ "$TRAVIS_OS_NAME" == "linux" ]] && INSTALL_DIR="$PWD/install" || INSTALL_DIR="/usr/local"
- SYSTEM_DIR="$PWD/kdbsystem"
- mkdir build && cd build
- CMAKE_OPT=()
|
Fix metadata behave backup restore test
This was missed in | @@ -2129,7 +2129,7 @@ Feature: Validate command line arguments
When the user runs "gpdbrestore -a -t 30160101010101 -u /tmp"
Then gpdbrestore should return a return code of 0
And the user runs "psql -f test/behave/mgmt_utils/steps/data/check_metadata.sql bkdb > /tmp/check_metadata.out"
- And verify that the contents of the files "/tmp/check_metadata.ans" and "test/behave/mgmt_utils/steps/data/check_metadata.out" are identical
+ And verify that the contents of the files "test/behave/mgmt_utils/steps/data/check_metadata.ans" and "/tmp/check_metadata.out" are identical
And the directory "/tmp/db_dumps" is removed or does not exist
And the directory "/tmp/check_metadata.out" is removed or does not exist
|
rewrite hard and binary thresholding to use absolute value | @@ -104,26 +104,20 @@ static void dfthresh(unsigned int D, const long dims[D], float lambda, complex f
static void hard_thresh(unsigned int D, const long dims[D], float lambda, complex float* out, const complex float* in)
{
- long size = md_calc_size(DIMS, dims) * 2;
-
- const float* inf = (const float*)in;
- float* outf = (float*)out;
+ long size = md_calc_size(DIMS, dims);
#pragma omp parallel for
for (long i = 0; i < size; i++)
- outf[i] = inf[i] > lambda ? inf[i] : 0.;
+ out[i] = (cabsf(in[i]) > lambda) ? in[i] : 0.;
}
static void binary_thresh(unsigned int D, const long dims[D], float lambda, complex float* out, const complex float* in)
{
- long size = md_calc_size(DIMS, dims) * 2;
-
- const float* inf = (const float*)in;
- float* outf = (float*)out;
+ long size = md_calc_size(DIMS, dims);
#pragma omp parallel for
for (long i = 0; i < size; i++)
- outf[i] = inf[i] > lambda ? 1. : 0.;
+ out[i] = (cabsf(in[i]) > lambda) ? 1. : 0.;
}
|
Document how to make a portable build on Windows
On MSYS2, ./gradlew does not work as expected, so use its absolute path. | #
# "make release-portable" builds a zip containing the client and the server.
#
+# On Windows with MSYS2/mingw64, execute:
+# GRADLE="$PWD/gradlew" mingw32-make release-portable
+#
# This is a simple Makefile because Meson is not flexible enough to execute some
# arbitrary commands.
|
Add missing sort to intra transform split search so mode at 0 is the best | @@ -623,6 +623,9 @@ static int8_t search_intra_rdo(encoder_state_t * const state,
costs[rdo_mode] += mode_cost;
}
+ // Update order according to new costs
+ sort_modes(modes, costs, modes_to_check);
+
// The best transform split hierarchy is not saved anywhere, so to get the
// transform split hierarchy the search has to be performed again with the
// best mode.
|
json MAINTENANCE added LY_NUMBER_MAXLEN check
For a number with an exponent, the check is applied, so for consistency
it should also be applied to numbers without an exponent. | @@ -701,7 +701,11 @@ invalid_character:
LY_CHECK_RET(lyjson_exp_number(jsonctx->ctx, in, exponent, offset, &num, &num_len));
lyjson_ctx_set_value(jsonctx, num, num_len, 1);
} else {
- /* store the number */
+ if (offset > LY_NUMBER_MAXLEN) {
+ LOGVAL(jsonctx->ctx, LYVE_SEMANTICS,
+ "Number encoded as a string exceeded the LY_NUMBER_MAXLEN limit.");
+ return LY_EVALID;
+ }
lyjson_ctx_set_value(jsonctx, in, offset, 0);
}
ly_in_skip(jsonctx->in, offset);
|
Set explicit resource item source value | @@ -842,7 +842,7 @@ void DeRestPluginPrivate::handleThermostatClusterIndication(const deCONZ::ApsDat
}
if (item && item->toString() != windowmodeSet)
{
- item->setValue(windowmodeSet);
+ item->setValue(windowmodeSet, ResourceItem::SourceDevice);
enqueueEvent(Event(RSensors, RStateWindowOpen, sensor->id(), item));
stateUpdated = true;
}
@@ -892,7 +892,7 @@ void DeRestPluginPrivate::handleThermostatClusterIndication(const deCONZ::ApsDat
if (item && item->toBool() != enabled)
{
- item->setValue(enabled);
+ item->setValue(enabled, ResourceItem::SourceDevice);
enqueueEvent(Event(RSensors, RConfigExternalWindowOpen, sensor->id(), item));
configUpdated = true;
}
@@ -952,7 +952,7 @@ void DeRestPluginPrivate::handleThermostatClusterIndication(const deCONZ::ApsDat
item = sensor->item(RStateMountingModeActive);
if (item && item->toBool() != enabled)
{
- item->setValue(enabled);
+ item->setValue(enabled, ResourceItem::SourceDevice);
enqueueEvent(Event(RSensors, RStateMountingModeActive, sensor->id(), item));
configUpdated = true;
}
@@ -970,7 +970,7 @@ void DeRestPluginPrivate::handleThermostatClusterIndication(const deCONZ::ApsDat
item = sensor->item(RConfigMountingMode);
if (item && item->toBool() != enabled)
{
- item->setValue(enabled);
+ item->setValue(enabled, ResourceItem::SourceDevice);
enqueueEvent(Event(RSensors, RConfigMountingMode, sensor->id(), item));
configUpdated = true;
}
@@ -994,7 +994,7 @@ void DeRestPluginPrivate::handleThermostatClusterIndication(const deCONZ::ApsDat
}
if (item->toNumber() != externalMeasurement)
{
- item->setValue(externalMeasurement);
+ item->setValue(externalMeasurement, ResourceItem::SourceDevice);
enqueueEvent(Event(RSensors, RConfigExternalTemperatureSensor, sensor->id(), item));
configUpdated = true;
}
@@ -1011,7 +1011,7 @@ void DeRestPluginPrivate::handleThermostatClusterIndication(const deCONZ::ApsDat
if (item && item->toNumber() != config)
{
- item->setValue(config);
+ item->setValue(config, ResourceItem::SourceDevice);
enqueueEvent(Event(RSensors, RConfigOffset, sensor->id(), item));
configUpdated = true;
}
|
appdata: add header's "name"; remove "h3_packet_receive:bytes" because it's n the wire | @@ -24,9 +24,8 @@ struct st_h2o_tunnel_t;
/* @appdata
{
- "receive_request_header": ["value"],
- "send_response_header": ["value"],
- "h3_packet_receive": ["bytes"],
+ "receive_request_header": ["name", "value"],
+ "send_response_header": ["name", "value"],
"h3_frame_receive": ["bytes"],
"tunnel_on_read": ["bytes"],
"tunnel_write": ["bytes"]
|
Server should disarm timeout if it can send nothing during handshake | @@ -4721,6 +4721,8 @@ static ssize_t conn_handshake(ngtcp2_conn *conn, uint8_t *dest, size_t destlen,
uint64_t cwnd;
size_t origlen = destlen;
ngtcp2_pktns *hs_pktns = &conn->hs_pktns;
+ size_t server_hs_tx_left;
+ ngtcp2_rcvry_stat *rcs = &conn->rcs;
conn->log.last_ts = ts;
@@ -4862,8 +4864,18 @@ static ssize_t conn_handshake(ngtcp2_conn *conn, uint8_t *dest, size_t destlen,
return (ssize_t)rv;
}
+ server_hs_tx_left = conn_server_hs_tx_left(conn);
+ if (server_hs_tx_left == 0) {
+ if (rcs->loss_detection_timer) {
+ ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_RCV,
+ "loss detection timer canceled");
+ rcs->loss_detection_timer = 0;
+ }
+ return 0;
+ }
+
if (cwnd < NGTCP2_MIN_PKTLEN) {
- origlen = ngtcp2_min(origlen, conn_server_hs_tx_left(conn));
+ origlen = ngtcp2_min(origlen, server_hs_tx_left);
/* TODO This should be conn_write_initial_ack_pkt */
nwrite = conn_write_handshake_ack_pkts(conn, dest, origlen, ts);
if (nwrite == 0) {
@@ -4875,7 +4887,7 @@ static ssize_t conn_handshake(ngtcp2_conn *conn, uint8_t *dest, size_t destlen,
return nwrite;
}
- destlen = ngtcp2_min(destlen, conn_server_hs_tx_left(conn));
+ destlen = ngtcp2_min(destlen, server_hs_tx_left);
nwrite = conn_write_server_handshake(conn, dest, destlen, ts);
if (nwrite < 0) {
return (ssize_t)rv;
@@ -4900,8 +4912,17 @@ static ssize_t conn_handshake(ngtcp2_conn *conn, uint8_t *dest, size_t destlen,
}
if (!(conn->flags & NGTCP2_CONN_FLAG_HANDSHAKE_COMPLETED)) {
+ server_hs_tx_left = conn_server_hs_tx_left(conn);
+ if (server_hs_tx_left == 0) {
+ if (rcs->loss_detection_timer) {
+ ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_RCV,
+ "loss detection timer canceled");
+ rcs->loss_detection_timer = 0;
+ }
+ return 0;
+ }
if (cwnd < NGTCP2_MIN_PKTLEN) {
- origlen = ngtcp2_min(origlen, conn_server_hs_tx_left(conn));
+ origlen = ngtcp2_min(origlen, server_hs_tx_left);
nwrite = conn_write_handshake_ack_pkts(conn, dest, origlen, ts);
if (nwrite == 0) {
return NGTCP2_ERR_CONGESTION;
@@ -4912,7 +4933,7 @@ static ssize_t conn_handshake(ngtcp2_conn *conn, uint8_t *dest, size_t destlen,
return nwrite;
}
- destlen = ngtcp2_min(destlen, conn_server_hs_tx_left(conn));
+ destlen = ngtcp2_min(destlen, server_hs_tx_left);
nwrite = conn_write_server_handshake(conn, dest, destlen, ts);
if (nwrite < 0) {
return nwrite;
|
in_syslog: validate new return value of parser_do() | @@ -71,7 +71,7 @@ int syslog_prot_process(struct syslog_conn *conn)
ret = flb_parser_do(ctx->parser, conn->buf_data, len,
&out_buf, &out_size, &out_time);
- if (ret == 0) {
+ if (ret >= 0) {
pack_line(out_sbuf, out_pck, out_time,
out_buf, out_size);
flb_free(out_buf);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.