message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
[example] fix BouncingBallTS-CompliantContact example | @@ -151,7 +151,7 @@ int main(int argc, char* argv[])
// --- Simulation initialization ---
cout << "====> Initialisation ..." << endl;
- s->prepareIntegratorForDS(OSI, ball, bouncingBall, t0)
+ s->prepareIntegratorForDS(OSI, ball, bouncingBall, t0);
bouncingBall->initialize();
// -- set the integrator for the ball --
|
Limit main CPU to 900 MHz and set "sdram_freq" / "core_freq" as in pre-Jessie.
Issue | @@ -12,3 +12,8 @@ dtoverlay=pi3-miniuart-bt
# disable default (mmc0) behavior on the ACT LED.
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off
+
+# The below has been added as a proposed EMI reduction measure. Issue #573.
+sdram_freq=450
+core_freq=450
+arm_freq=900
|
Ensure pkey_set_type handles ENGINE references correctly
pkey_set_type should not consume the ENGINE references that may be
passed to it.
Fixes | @@ -1554,7 +1554,6 @@ static int pkey_set_type(EVP_PKEY *pkey, ENGINE *e, int type, const char *str,
*/
if (keymgmt == NULL)
pkey->ameth = ameth;
- pkey->engine = e;
/*
* The EVP_PKEY_ASN1_METHOD |pkey_id| retains its legacy key purpose
@@ -1570,6 +1569,13 @@ static int pkey_set_type(EVP_PKEY *pkey, ENGINE *e, int type, const char *str,
} else {
pkey->type = EVP_PKEY_KEYMGMT;
}
+# ifndef OPENSSL_NO_ENGINE
+ if (eptr == NULL && e != NULL && !ENGINE_init(e)) {
+ ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
+ return 0;
+ }
+# endif
+ pkey->engine = e;
#endif
}
return 1;
|
engine: initialize cmetrics and print version | #include <fluent-bit/flb_sosreport.h>
#include <fluent-bit/flb_storage.h>
#include <fluent-bit/flb_http_server.h>
+#include <cmetrics/cmetrics.h>
#ifdef FLB_HAVE_METRICS
#include <fluent-bit/flb_metrics_exporter.h>
@@ -517,6 +518,10 @@ int flb_engine_start(struct flb_config *config)
return -1;
}
+ /* Init Metrics engine */
+ cmt_initialize();
+ flb_info("[cmetrics] version=%s", cmt_version());
+
/* Initialize the scheduler */
sched = flb_sched_create(config, config->evl);
if (!sched) {
|
The Windows port layer is built with both MSVC and GCC. GCC generated a warning relating to the variable lWaitForYield being set but not used. This change removes the variable. | @@ -641,11 +641,10 @@ void vPortEnterCritical( void )
void vPortExitCritical( void )
{
-int32_t lMutexNeedsReleasing, lWaitForYield = pdFALSE;
+int32_t lMutexNeedsReleasing;
/* The interrupt event mutex should already be held by this thread as it was
obtained on entry to the critical section. */
-
lMutexNeedsReleasing = pdTRUE;
if( ulCriticalNesting > portNO_CRITICAL_NESTING )
@@ -677,7 +676,6 @@ int32_t lMutexNeedsReleasing, lWaitForYield = pdFALSE;
critical section is exited - so make sure the event is not
already signaled. */
ResetEvent( pxThreadState->pvYieldEvent );
- lWaitForYield = pdTRUE;
/* Mutex will be released now so the (simulated) interrupt can
execute, so does not require releasing on function exit. */
|
Hide wsmc_get_conffile behind _WIN32 (like prototype) | @@ -283,7 +283,10 @@ init_curl_transport(WsManClient *cl)
CURLcode r = CURLE_OK;
char *sslhack;
long sslversion;
- dictionary *ini = iniparser_new(wsmc_get_conffile(cl));
+ dictionary *ini = NULL;
+#ifndef _WIN32
+ ini = iniparser_new(wsmc_get_conffile(cl));
+#endif
#define curl_err(str) debug("Error = %d (%s); %s", \
r, curl_easy_strerror(r), str);
|
Update script to compare to 2.2 by default | @@ -369,7 +369,7 @@ def parse_command_line():
parser.add_argument("--encoder", dest="encoders", default="avx2",
choices=coders, help="test encoder variant")
- parser.add_argument("--reference", dest="reference", default="ref-2.1-avx2",
+ parser.add_argument("--reference", dest="reference", default="ref-2.2-avx2",
choices=refcoders, help="reference encoder variant")
astcProfile = ["ldr", "ldrs", "hdr", "all"]
|
Mordin: Add one more SKUIDs
BRANCH=firmware-grunt-11031.B
TEST=make buildall -j | @@ -786,6 +786,7 @@ __override uint32_t board_override_feature_flags0(uint32_t flags0)
sku_id == 20 || sku_id == 21 ||
sku_id == 32 || sku_id == 33 ||
sku_id == 40 || sku_id == 41 ||
+ sku_id == 44 || sku_id == 45 ||
((sku_id >= 0xa0) && (sku_id <= 0xaf)))
return (flags0 & ~EC_FEATURE_MASK_0(EC_FEATURE_PWM_KEYB));
else
|
rename kernel.cpp to hls_bfs.cpp | # This is solution specific. Check if we can replace this by generics too.
SOLUTION_NAME ?= bfs
SOLUTION_DIR ?= hlsBfs
-srcs += kernel.cpp
+srcs += hls_bfs.cpp
include ../hls.mk
|
Cleanup old code comment | @@ -86,7 +86,6 @@ static int run_decoder(void *data) {
format_ctx->pb = avio_ctx;
- //const char *url = "tcp://127.0.0.1:1234";
if (avformat_open_input(&format_ctx, NULL, NULL, NULL) < 0) {
LOGE("Could not open video stream");
ret = -1;
|
fix TCP retransmission interval | @@ -353,6 +353,13 @@ menu "LWIP"
change the memory usage of LWIP, except for preventing
new listening TCP connections after the limit is reached.
+ config LWIP_TCP_HIGH_SPEED_RETRANSMISSION
+ bool "TCP high speed retransmissions"
+ default y
+ help
+ Speed up the TCP retransmission interval. If disabled,
+ it is recommended to change the number of SYN retransmissions to 6,
+ TCP timer interval to 250, and TCP rto time to 3000.
config LWIP_TCP_MAXRTX
int "Maximum number of retransmissions of data segments"
@@ -363,7 +370,8 @@ menu "LWIP"
config LWIP_TCP_SYNMAXRTX
int "Maximum number of retransmissions of SYN segments"
- default 6
+ default 6 if !LWIP_TCP_HIGH_SPEED_RETRANSMISSION
+ default 12 if LWIP_TCP_HIGH_SPEED_RETRANSMISSION
range 3 12
help
Set maximum number of retransmissions of SYN segments.
@@ -381,7 +389,8 @@ menu "LWIP"
config LWIP_TCP_TMR_INTERVAL
int "TCP timer interval(ms)"
- default 250
+ default 250 if !LWIP_TCP_HIGH_SPEED_RETRANSMISSION
+ default 125 if LWIP_TCP_HIGH_SPEED_RETRANSMISSION
help
Set TCP timer interval in milliseconds.
@@ -512,7 +521,8 @@ menu "LWIP"
config LWIP_TCP_RTO_TIME
int "Default TCP rto time"
- default 3000
+ default 3000 if !LWIP_TCP_HIGH_SPEED_RETRANSMISSION
+ default 1500 if LWIP_TCP_HIGH_SPEED_RETRANSMISSION
help
Set default TCP rto time for a reasonable initial rto.
In bad network environment, recommend set value of rto time to 1500.
|
Prevent firmware update on x86 linux headless
Not supported yet since relying on pkexec (gui) | #include <QApplication>
#include <QDesktopServices>
+#include <QProcessEnvironment>
#include <QFile>
#include <QDir>
#include <QString>
@@ -37,6 +38,17 @@ void DeRestPluginPrivate::initFirmwareUpdate()
fwUpdateTimer->setSingleShot(true);
connect(fwUpdateTimer, SIGNAL(timeout()),
this, SLOT(firmwareUpdateTimerFired()));
+
+
+#if defined(Q_OS_LINUX) && !defined(ARCH_ARM)
+ QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
+ if (!env.contains(QLatin1String("DISPLAY")))
+ {
+ DBG_Printf(DBG_INFO, "GW firmware update not supported on x86 linux headless\n");
+ return;
+ }
+#endif
+
fwUpdateTimer->start(5000);
}
@@ -64,7 +76,7 @@ void DeRestPluginPrivate::updateFirmware()
#ifdef Q_OS_WIN
gcfFlasherBin.append(".exe");
QString bin = gcfFlasherBin;
-#elif defined(Q_OS_LINUX) && !defined(ARCH_ARM) // on RPi a normal sudo is ok since we don't need password there
+#elif defined(Q_OS_LINUX) && !defined(ARCH_ARM) // on x86 linux
QString bin = "pkexec";
gcfFlasherBin = "/usr/bin/GCFFlasher_internal";
fwProcessArgs.prepend(gcfFlasherBin);
@@ -73,7 +85,7 @@ void DeRestPluginPrivate::updateFirmware()
// /usr/bin/osascript -e 'do shell script "make install" with administrator privileges'
QString bin = "sudo";
fwProcessArgs.prepend(gcfFlasherBin);
-#else
+#else // on RPi a normal sudo is ok since we don't need password there
QString bin = "sudo";
gcfFlasherBin = "/usr/bin/GCFFlasher_internal";
fwProcessArgs.prepend(gcfFlasherBin);
@@ -285,7 +297,7 @@ void DeRestPluginPrivate::queryFirmwareVersion()
QString gcfFlasherBin = qApp->applicationDirPath() + "/GCFFlasher";
#ifdef Q_OS_WIN
gcfFlasherBin.append(".exe");
-#elif defined(Q_OS_LINUX) && !defined(ARCH_ARM) // on RPi a normal sudo is ok since we don't need password there
+#elif defined(Q_OS_LINUX) && !defined(ARCH_ARM)
gcfFlasherBin = "/usr/bin/GCFFlasher_internal";
#elif defined(Q_OS_OSX)
// TODO
|
Overload AtkResNode.AddEvent and AtkResNode.RemoveEvent | @@ -133,10 +133,14 @@ namespace FFXIVClientStructs.FFXIV.Component.GUI
public partial void AddEvent(ushort eventType, uint eventParam, AtkEventListener* listener,
AtkResNode* nodeParam, bool isSystemEvent);
+ public void AddEvent(AtkEventType eventType, uint eventParam, AtkEventListener* listener, AtkResNode* nodeParam, bool isSystemEvent) => AddEvent((ushort)eventType, eventParam, listener, nodeParam, isSystemEvent);
+
[MemberFunction("E8 ? ? ? ? 44 38 7D 67")]
public partial void RemoveEvent(ushort eventType, uint eventParam, AtkEventListener* listener,
bool isSystemEvent);
+ public void RemoveEvent(AtkEventType eventType, uint eventParam, AtkEventListener* listener, bool isSystemEvent) => RemoveEvent((ushort)eventType, eventParam, listener, isSystemEvent);
+
[MemberFunction("48 85 C9 74 0B 8B 41 44")]
public partial void GetPositionFloat(float* outX, float* outY);
|
Add -flto to jpm builds as well. | (def threads? (not (not (env 'thread/new))))
# Default flags for natives, but not required
-(def default-lflags (if is-win ["/nologo"] []))
+(def default-lflags (if is-win ["/nologo"] ["-flto"]))
(def default-cflags
(if is-win
["/nologo" "/MD"]
- ["-std=c99" "-Wall" "-Wextra"]))
+ ["-std=c99" "-Wall" "-Wextra" "-flto"]))
# Link to pthreads
(def- dynamic-cflags
(if is-win
["/LD"]
- ["-fPIC"]))
+ ["-fPIC" "-flto"]))
(def- dynamic-lflags
(if is-win
["/DLL" ;thread-flags]
(if is-mac
- ["-shared" "-undefined" "dynamic_lookup" ;thread-flags]
- ["-shared" ;thread-flags])))
+ ["-shared" "-undefined" "dynamic_lookup" "-flto" ;thread-flags]
+ ["-shared" "-flto" ;thread-flags])))
(defn- opt
"Get an option, allowing overrides via dynamic bindings AND some
|
Work CD-CI
Fix variable comparison.
***NO_CI*** | @@ -29,7 +29,7 @@ jobs:
# get commint message
- powershell: |
- if($env:StartReleaseCandidate -eq true)
+ if($env:StartReleaseCandidate -eq $true)
{
# this is a release prep so NO build
echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]true"
|
ev3sensor: give port mode change time to complete
If we return ERROR_AGAIN, the module will know to try getting the sensor again later when the mode switch is complete. | @@ -133,7 +133,6 @@ static pbio_error_t sysfs_read_int(FILE *file, int *dest) {
// Set the port mode
pbio_error_t ev3_sensor_set_port_mode(pbio_port_t port, _pbdrv_ev3dev_port_t mode) {
-
// Read lego-port number
int n_lport;
pbio_error_t err;
@@ -143,24 +142,48 @@ pbio_error_t ev3_sensor_set_port_mode(pbio_port_t port, _pbdrv_ev3dev_port_t mod
return err;
}
- // Open mode file for writing
- char path[MAX_PATH_LENGTH];
- snprintf(path, MAX_PATH_LENGTH, "/sys/class/lego-port/port%d/mode", n_lport);
- FILE *file = fopen(path, "w");
- if (file == NULL) {
+ // Status file path
+ char p_status[MAX_PATH_LENGTH];
+ snprintf(p_status, MAX_PATH_LENGTH, "/sys/class/lego-port/port%d/status", n_lport);
+ // Open status file for reading
+ char status[12];
+ FILE *f_status = fopen(p_status, "r");
+ if (f_status == NULL) {
+ return PBIO_ERROR_IO;
+ }
+ // Read the current status
+ if (fscanf(f_status, "%" MAX_READ_LENGTH "s", status) < 1) {
+ return PBIO_ERROR_IO;
+ }
+ // Close the status file
+ if (fclose(f_status) != 0) {
return PBIO_ERROR_IO;
}
+ // If the mode is already set, we are done
+ if (!strcmp(status, port_modes[mode])) {
+ return PBIO_SUCCESS;
+ }
+
+ // Mode file path
+ char p_mode[MAX_PATH_LENGTH];
+ snprintf(p_mode, MAX_PATH_LENGTH, "/sys/class/lego-port/port%d/mode", n_lport);
+ // Open mode file for writing
+ FILE *f_port_mode = fopen(p_mode, "w");
+ if (f_port_mode == NULL) {
+ return PBIO_ERROR_IO;
+ }
// Write mode
- if (fprintf(file, "%s", port_modes[mode]) != strlen(port_modes[mode])) {
+ if (fprintf(f_port_mode, "%s", port_modes[mode]) != strlen(port_modes[mode])) {
return PBIO_ERROR_IO;
}
-
- // Close the file
- if (fclose(file) != 0) {
+ // Close the mode file
+ if (fclose(f_port_mode) != 0) {
return PBIO_ERROR_IO;
}
- return PBIO_SUCCESS;
+
+ // This should be called again later when the mode switch is complete
+ return PBIO_ERROR_AGAIN;
}
// Set port configuration for some devices
|
Add media-col-ready and media-ready. | @@ -3882,6 +3882,9 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
margins[16]; /* media-*-margin-supported values */
const char *filter, /* Current filter */
*mandatory; /* Current mandatory attribute */
+ const char *ready_size; /* Current ReadyPaperSizes value */
+ ipp_attribute_t *media_col_ready, /* media-col-ready attribute */
+ *media_ready; /* media-ready attribute */
int num_urf; /* Number of urf-supported values */
const char *urf[16]; /* urf-supported values */
char urf_rs[32]; /* RS (resolution) value */
@@ -4352,6 +4355,36 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
ippDelete(col);
}
}
+
+ /*
+ * media[-col]-ready
+ */
+
+ for (media_col_ready = NULL, media_ready = NULL, ready_size = (char *)cupsArrayFirst(ReadyPaperSizes); ready_size; ready_size = (char *)cupsArrayNext(ReadyPaperSizes))
+ {
+ for (i = p->pc->num_sizes, pwgsize = p->pc->sizes; i > 0; i --, pwgsize --)
+ {
+ if (!strcasecmp(ready_size, pwgsize->map.ppd))
+ break;
+ }
+
+ if (i)
+ {
+ ipp_t *col = new_media_col(pwgsize);
+
+ if (media_ready)
+ ippSetString(p->ppd_attrs, &media_ready, ippGetCount(media_ready), pwgsize->map.pwg);
+ else
+ media_ready = ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "media-ready", NULL, pwgsize->map.pwg);
+
+ if (media_col_ready)
+ ippSetCollection(p->ppd_attrs, &media_col_ready, ippGetCount(media_col_ready), col);
+ else
+ media_col_ready = ippAddCollection(p->ppd_attrs, IPP_TAG_PRINTER, "media-col-ready", col);
+
+ ippDelete(col);
+ }
+ }
}
ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_TEXT), "mopria-certified", NULL, "1.3");
|
netif require vfs | @@ -16,7 +16,7 @@ set(COMPONENT_SRCDIRS
${LWIP_PPP_DIRS} netif
port/freertos port/netif port/debug port)
-set(COMPONENT_REQUIRES "")
+set(COMPONENT_REQUIRES vfs)
set(COMPONENT_PRIV_REQUIRES ethernet tcpip_adapter)
register_component()
|
printf is mirrored to syslog | @@ -262,6 +262,8 @@ static int print_common(print_destination dest, const char* fmt, va_list va) {
switch (dest) {
case PRINT_DESTINATION_TEXT_MODE:
text_mode_puts(buf);
+ // Always mirror text-mode output to the syslog
+ serial_puts(buf);
break;
case PRINT_DESTINATION_SERIAL:
default:
|
Prevent Ames from sending and receiving remote packets if remote networking is disabled | @@ -210,6 +210,10 @@ u3_ames_ef_send(u3_noun lan, u3_noun pac)
u3r_bytes(0, len_w, buf_y, pac);
+ if ( c3n == u3_Host.ops_u.net && 0x7f000001 != pip_w) {
+ return; // remote sending disabled
+ }
+
if ( 0 == pip_w ) {
pip_w = 0x7f000001;
por_s = u3_Host.sam_u.por_s;
@@ -349,7 +353,9 @@ u3_ames_io_init()
memset(&add_u, 0, sizeof(add_u));
add_u.sin_family = AF_INET;
- add_u.sin_addr.s_addr = htonl(INADDR_ANY);
+ add_u.sin_addr.s_addr = _(u3_Host.ops_u.net) ?
+ htonl(INADDR_ANY) :
+ htonl(INADDR_LOOPBACK);
add_u.sin_port = htons(por_s);
int ret;
|
integration test: TestTraceExec: add sleep
Wait until kubectl-gadget started the tracer before starting the busybox
pod. | @@ -80,6 +80,8 @@ func TestTraceExec(t *testing.T) {
commands := []*Command{
CreateTestNamespaceCommand(ns),
traceExecCmd,
+ // Give time to kubectl-gadget to start the tracer
+ SleepForSecondsCommand(3),
BusyboxPodCommand(ns, cmd),
WaitUntilTestPodReadyCommand(ns),
DeleteTestNamespaceCommand(ns),
|
Update lua_auxlib.c
fix minor typo. | @@ -32,7 +32,7 @@ LUALIB_API int luaL_loadfilex (lua_State* L, const char* filename, const char* m
int bottom = lua_gettop(L);
int z = !OKAY;
- /* If filename istarts with "$/" then we want to load the version that
+ /* If filename starts with "$/" then we want to load the version that
* was embedded into the executable and skip the local file system */
if (filename[0] == '$') {
z = premake_load_embedded_script(L, filename + 2); /* Skip over leading "$/" */
|
vp8l_enc.c: normalize index types
fixes conversion warnings in visual studio after:
Add modified Zeng's method to palette sorting.
src\enc\vp8l_enc.c(296) : warning C4244: '=' : conversion from 'const
uint16_t' to 'uint8_t', possible loss of data
src\enc\vp8l_enc.c(299) : warning C4244: '=' : conversion from 'const
uint16_t' to 'uint8_t', possible loss of data | @@ -230,7 +230,7 @@ static WebPEncodingError CoOccurrenceBuild(const WebPPicture* const pic,
}
struct Sum {
- uint16_t index;
+ uint8_t index;
uint32_t sum;
};
@@ -282,7 +282,7 @@ static WebPEncodingError PaletteSortModifiedZeng(
}
while (num_sums > 0) {
- const uint16_t best_index = best_sum->index;
+ const uint8_t best_index = best_sum->index;
// Compute delta to know if we need to prepend or append the best index.
int32_t delta = 0;
const int32_t n = num_colors - num_sums;
|
Changelog entry for
Fix Fix: passed to proc after free. | 20 August 2021: Wouter
- Fix #529: Fix: log_assert does nothing if UNBOUND_DEBUG is
undefined.
+ - Fix #531: Fix: passed to proc after free.
17 August 2021: Wouter
- Fix that --with-ssl can use "/usr/include/openssl11" to pass the
|
replace __disable_irq() and __enable_irq() LuosHAL_SetIrqState from profile | @@ -106,10 +106,10 @@ void ProfileServo_Handler(service_t *service, msg_t *msg)
case REINIT:
{
// set state to 0
- __disable_irq();
+ LuosHAL_SetIrqState(false);
servo_motor_profile->angular_position = 0.0;
servo_motor_profile->target_angular_position = 0.0;
- __enable_irq();
+ LuosHAL_SetIrqState(true);
}
break;
case DIMENSION:
@@ -126,9 +126,9 @@ void ProfileServo_Handler(service_t *service, msg_t *msg)
if (msg->header.size == sizeof(angular_position_t))
{
// set the motor target angular position
- __disable_irq();
+ LuosHAL_SetIrqState(false);
AngularOD_PositionFromMsg((angular_position_t *)&servo_motor_profile->target_angular_position, msg);
- __enable_irq();
+ LuosHAL_SetIrqState(true);
}
else
{
|
Test Doctype marked PUBLIC but with no ID is rejected | @@ -6706,6 +6706,14 @@ START_TEST(test_short_doctype)
}
END_TEST
+START_TEST(test_short_doctype_2)
+{
+ const char *text = "<!DOCTYPE doc PUBLIC></doc>";
+ expect_failure(text, XML_ERROR_SYNTAX,
+ "DOCTYPE without Public ID not rejected");
+}
+END_TEST
+
/*
* Namespaces tests.
*/
@@ -12190,6 +12198,7 @@ make_suite(void)
tcase_add_test(tc_basic, test_entity_public_utf16_be);
tcase_add_test(tc_basic, test_entity_public_utf16_le);
tcase_add_test(tc_basic, test_short_doctype);
+ tcase_add_test(tc_basic, test_short_doctype_2);
suite_add_tcase(s, tc_namespace);
tcase_add_checked_fixture(tc_namespace,
|
"on" should be typo of "one"
minor updates | **Chain** - a sequence of blocks each block of which is referenced by the previous block.
-**Cheato** - on XDAG consists of power(2, 32) cheato.
+**Cheato** - 1 XDAG consists of power(2, 32) cheato.
**Dagger era** - time 0x5A500000 in Unix format, i.e. January 6, 2018, 22:45:20 GMT.
|
AppVeyor: Fix test | @@ -143,11 +143,12 @@ grib_check_key_equals $temp3 packingType grid_second_order
# ECC-1219: packingType conversion from grid_ieee to grid_second_order
# ---------------------------------------------------------------------
+if [ $ECCODES_ON_WINDOWS -eq 0 ]; then
infile=grid_ieee.grib
${tools_dir}/grib_set -r -s packingType=grid_second_order $infile $temp1
grib_check_key_equals $temp1 packingType grid_second_order
${tools_dir}/grib_compare -cdata:n -R all=3e-06 $infile $temp1
-
+fi
# Clean up
rm -f $temp_stat1 $temp_stat2
|
fix for issue slop should use -b or -l and -r, not all 3. | @@ -120,6 +120,10 @@ int slop_main(int argc, char* argv[]) {
cerr << endl << "*****" << endl << "*****ERROR: Need -l and -r together or -b alone. " << endl << "*****" << endl;
showHelp = true;
}
+ if (haveLeft && haveRight && haveBoth) {
+ cerr << endl << "*****" << endl << "*****ERROR: Use -l and -r together or just -b alone. " << endl << "*****" << endl;
+ showHelp = true;
+ }
if ((!haveLeft && haveRight) || (haveLeft && !haveRight)) {
cerr << endl << "*****" << endl << "*****ERROR: Need both -l and -r. " << endl << "*****" << endl;
showHelp = true;
|
apps/graphics/littlevgl: Update include guard macro of lv_conf.h | * COPY THIS FILE AS `lv_conf.h` NEXT TO the `lvgl` FOLDER
*/
-#ifndef LV_CONF_H
-#define LV_CONF_H
+#ifndef __APPS_GRAPHICS_LITTLEVGL_LV_CONF_H
+#define __APPS_GRAPHICS_LITTLEVGL_LV_CONF_H
/* clang-format off */
#include <nuttx/config.h>
@@ -809,9 +809,7 @@ typedef void * lv_obj_user_data_t;
# define _CRT_SECURE_NO_WARNINGS
#endif
-/*--END OF LV_CONF_H--*/
-
/*Be sure every define has a default value*/
#include "lvgl/src/lv_conf_checker.h"
-#endif /*LV_CONF_H*/
+#endif /*__APPS_GRAPHICS_LITTLEVGL_LV_CONF_H*/
|
kline checksum algo was broken... | @@ -468,6 +468,8 @@ class Panda(object):
ret = self._handle.controlRead(Panda.REQUEST_IN, 0xe0, bus, 0, 0x40)
if len(ret) == 0:
break
+ elif DEBUG:
+ print("kline drain: "+str(ret).encode("hex"))
bret += ret
return bytes(bret)
@@ -484,6 +486,7 @@ class Panda(object):
def get_checksum(dat):
result = 0
result += sum(map(ord, dat)) if isinstance(b'dat', str) else sum(dat)
+ result = -result
return struct.pack("B", result % 0x100)
self.kline_drain(bus=bus)
|
psp2: Fix wrong located comma | @@ -818,8 +818,8 @@ typedef enum SceGxmTextureType {
typedef enum SceGxmTextureFilter {
SCE_GXM_TEXTURE_FILTER_POINT = 0x00000000u,
SCE_GXM_TEXTURE_FILTER_LINEAR = 0x00000001u,
- SCE_GXM_TEXTURE_FILTER_MIPMAP_LINEAR = 0x00000002u
- SCE_GXM_TEXTURE_FILTER_MIPMAP_POINT = 0x00000003u,
+ SCE_GXM_TEXTURE_FILTER_MIPMAP_LINEAR = 0x00000002u,
+ SCE_GXM_TEXTURE_FILTER_MIPMAP_POINT = 0x00000003u
} SceGxmTextureFilter;
typedef enum SceGxmTextureMipFilter {
|
BugID:17023361:[WhiteScan] [579396]:fix Dereference before null check | @@ -837,6 +837,7 @@ static int MQTTUnsubscribe(iotx_mc_client_t *c, const char *topicFilter, unsigne
|| iotx_mc_is_topic_matched((char *)h->topic_filter, &cur_topic)) {
mqtt_debug("topic be matched");
remove_handle_from_list(c, h);
+ mqtt_free(h->topic_filter);
mqtt_free(h);
}
@@ -2127,20 +2128,6 @@ int iotx_mc_unsubscribe(iotx_mc_client_t *c, const char *topicFilter)
}
iotx_mc_topic_handle_t *h, *h_next;
- HAL_MutexLock(c->lock_generic);
- for (h = c->first_sub_handle; h; h = h_next) {
- h_next = h->next;
- if (strcmp(h->topic_filter, topicFilter) == 0) {
- remove_handle_from_list(c, h);
- if (h->topic_filter != NULL) {
- mqtt_free(h->topic_filter);
- h->topic_filter = NULL;
- }
- mqtt_free(h);
- }
- }
- HAL_MutexUnlock(c->lock_generic);
-
mqtt_info("mqtt unsubscribe packet sent,topic = %s!", topicFilter);
return (int)msgId;
}
|
Memory leak in case of error | @@ -269,14 +269,12 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len)
}
code = (long*)grib_context_malloc_clear(a->context, sizeof(long) * size);
- if (!code) {
- grib_context_log(a->context, GRIB_LOG_FATAL,
- "unable to allocate %ld bytes", (long)size);
- return GRIB_OUT_OF_MEMORY;
- }
+ if (!code) return GRIB_OUT_OF_MEMORY;
- if ((err = grib_unpack_long((grib_accessor*)tableAccessor, code, &size)) != GRIB_SUCCESS)
+ if ((err = grib_unpack_long((grib_accessor*)tableAccessor, code, &size)) != GRIB_SUCCESS) {
+ grib_context_free(a->context, code);
return err;
+ }
table = tableAccessor->table;
|
Fix OpenVR getSkeleton; | @@ -438,17 +438,25 @@ static bool openvr_getSkeleton(Device device, float* poses) {
mat4_getOrientation(transform, orientation);
InputSkeletalActionData_t info;
- VRActionHandle_t skeleton = state.skeletonActions[device - DEVICE_HAND_LEFT];
- EVRInputError error = state.input->GetSkeletalActionData(skeleton, &info, sizeof(info));
+ VRActionHandle_t action = state.skeletonActions[device - DEVICE_HAND_LEFT];
+ EVRInputError error = state.input->GetSkeletalActionData(action, &info, sizeof(info));
if (error || !info.bActive) {
return false;
}
VRBoneTransform_t bones[32];
+
+ uint32_t boneCount;
+ error = state.input->GetBoneCount(action, &boneCount);
+ if (error || boneCount > sizeof(bones) / sizeof(bones[0])) {
+ return false;
+ }
+
EVRSkeletalTransformSpace space = EVRSkeletalTransformSpace_VRSkeletalTransformSpace_Model;
EVRSkeletalMotionRange motionRange = EVRSkeletalMotionRange_VRSkeletalMotionRange_WithController;
- error = state.input->GetSkeletalBoneData(skeleton, space, motionRange, bones, 32);
+ error = state.input->GetSkeletalBoneData(action, space, motionRange, bones, boneCount);
if (error) {
+ printf("No bone data %d\n", error);
return false;
}
@@ -456,7 +464,13 @@ static bool openvr_getSkeleton(Device device, float* poses) {
// Swap x/w (HmdQuaternionf_t has w first)
// Premultiply by hand pose
float* pose = poses;
- for (uint32_t i = 0; i < HAND_JOINT_COUNT; i++) {
+
+ // SteamVR has a root joint instead of a palm joint, we zero out the root joint so it is the same
+ // as the regular hand pose
+ memset(&bones[0], 0, sizeof(bones[0]));
+ bones[0].orientation.w = 1.f;
+
+ for (uint32_t i = 1; i < HAND_JOINT_COUNT; i++) {
memcpy(pose, &bones[i].position, 8 * sizeof(float));
float w = pose[4];
pose[4] = pose[7];
|
NVS: fixed coverage-report target in Makefile | @@ -54,7 +54,7 @@ COVERAGE_FILES = $(OBJ_FILES:.o=.gc*)
$(OBJ_FILES): %.o: %.cpp
-$(TEST_PROGRAM): $(OBJ_FILES) clean-coverage
+$(TEST_PROGRAM): clean-coverage $(OBJ_FILES)
$(MAKE) -C ../../mbedtls/mbedtls/ lib
g++ $(LDFLAGS) -o $(TEST_PROGRAM) $(OBJ_FILES) ../../mbedtls/mbedtls/library/libmbedcrypto.a
|
travis: Add an explicit tmpfs mount
A tempfs mount is missing on fedora 32 which seems to be causing errors
when testcases attempt to write there. | @@ -42,6 +42,7 @@ script:
--volume $HOME/.ccache:/root/.ccache
--volume `pwd`:/build
--volume `pwd`/ci_build_cache/${RUN_ON_CONTAINER}:/root/ci_build_cache/
+ --tmpfs /tmp/
--rm -t $RUN_ON_CONTAINER
bash -c "./opal-ci/build-${RUN_ON_CONTAINER}.sh"
|
Limit amount of 0-rtt data. | @@ -2117,11 +2117,19 @@ int picoquic_prepare_packet_client_init(picoquic_cnx_t* cnx, picoquic_path_t * p
}
}
- if (ret == 0 && length == 0 && cnx->crypto_context[1].aead_encrypt != NULL) {
+ if (ret == 0 && length == 0 && cnx->crypto_context[1].aead_encrypt != NULL &&
+ path_x->bytes_in_transit < 10*PICOQUIC_ENFORCED_INITIAL_MTU) {
/* Consider sending 0-RTT */
+ if (path_x->bytes_in_transit + send_buffer_max > 10 * PICOQUIC_ENFORCED_INITIAL_MTU) {
+ uint64_t max_data = 10 * PICOQUIC_ENFORCED_INITIAL_MTU;
+ max_data -= path_x->bytes_in_transit;
+ send_buffer_max = max_data;
+ }
+ if (send_buffer_max > PICOQUIC_MIN_SEGMENT_SIZE) {
ret = picoquic_prepare_packet_0rtt(cnx, path_x, packet, current_time, send_buffer, send_buffer_max, send_length,
*is_initial_sent, next_wake_time);
}
+ }
else {
if (ret == 0 && *is_initial_sent) {
if (packet->ptype == picoquic_packet_initial) {
|
Apply current library name suffix | @@ -239,7 +239,7 @@ set(ZLINTSTRFP zchkrfp.f zdrvrfp.f zdrvrf1.f zdrvrf2.f zdrvrf3.f zdrvrf4.f zerrr
macro(add_lin_executable name)
add_executable(${name} ${ARGN})
- target_link_libraries(${name} openblas)
+ target_link_libraries(${name} openblas${SUFFIX64_UNDERSCORE})
#${TMGLIB} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
endmacro()
|
filter_geoip2: validate hash return value | @@ -197,6 +197,7 @@ static void add_geoip_fields(msgpack_object *map,
struct geoip2_ctx *ctx,
msgpack_packer *packer)
{
+ int ret;
struct mk_list *head;
struct mk_list *tmp;
struct geoip2_record *record;
@@ -222,8 +223,13 @@ static void add_geoip_fields(msgpack_object *map,
msgpack_pack_str(packer, record->key_len);
msgpack_pack_str_body(packer, record->key, record->key_len);
- flb_hash_get(lookup_keys, record->lookup_key, record->lookup_key_len,
+ ret = flb_hash_get(lookup_keys, record->lookup_key, record->lookup_key_len,
(void *) &ip, &ip_size);
+ if (ret == -1) {
+ msgpack_pack_nil(packer);
+ continue;
+ }
+
result = mmdb_lookup(ctx, ip);
if (!result.found_entry) {
msgpack_pack_nil(packer);
|
[core] fix crash if 'host' empty in config (fixes
x-ref:
"segfault with fastcgi app" | @@ -1399,8 +1399,12 @@ int gw_set_defaults_backend(server *srv, gw_plugin_data *p, data_unset *du, size
host->port = 80;
}
- host->family = (!buffer_string_is_empty(host->host)
- && NULL != strchr(host->host->ptr, ':'))
+ if (buffer_string_is_empty(host->host)) {
+ buffer_copy_string_len(host->host,
+ CONST_STR_LEN("127.0.0.1"));
+ }
+
+ host->family = (NULL != strchr(host->host->ptr, ':'))
? AF_INET6
: AF_INET;
}
|
update NEWS
drop iOS framework update, that was included in 0.5.2 | * webpmux gained a -duration option allowing for frame timing modification
* new img2webp utility allowing a sequence of images to be converted to
animated webp
- * WebPDecoder framework for IOS, WebP framework now contains the encoder
* API changes:
- libwebp:
WebPPictureSharpARGBToYUVA
|
Ignore warnings on console output | @@ -223,10 +223,15 @@ export const runBuild = ({
buildType,
outputRoot,
progress: message => {
+ if (
+ message !== "'" &&
+ message.indexOf("unknown or unsupported #pragma") === -1
+ ) {
dispatch({ type: types.CMD_STD_OUT, text: message });
+ }
},
warnings: message => {
- dispatch({ type: types.CMD_STD_ERR, text: message });
+ // dispatch({ type: types.CMD_STD_ERR, text: message });
}
});
|
use int instead of uint8_t to allwo expanded channel range | @@ -129,7 +129,7 @@ static struct timeval tv;
static struct timeval tvold;
static struct timeval tvtot;
static struct timeval tvpacketsent;
-static uint8_t cpa;
+static int cpa;
static uint32_t staytime;
static uint16_t reasoncode;
static uint32_t attackcount;
@@ -6429,7 +6429,7 @@ return gpioperibase;
/*===========================================================================*/
static inline bool ischannelindefaultlist(uint8_t userchannel)
{
-static uint8_t cpd;
+static int cpd;
cpd = 0;
while(channeldefaultlist[cpd] != 0)
|
Guard GSO send code with UDP_SEGMENT | @@ -161,6 +161,9 @@ int h2o_quic_send_datagrams(h2o_quic_ctx_t *ctx, quicly_address_t *dest, quicly_
}
int ret;
+#ifdef UDP_SEGMENT
+ /* a user of libh2o might accidentally set use_gso even if the libh2o build does not support GSO.
+ * the ifdef guard above is to safeguard such a case */
if (ctx->use_gso) {
mess.msg_iov = datagrams;
mess.msg_iovlen = num_datagrams;
@@ -168,7 +171,9 @@ int h2o_quic_send_datagrams(h2o_quic_ctx_t *ctx, quicly_address_t *dest, quicly_
;
if (ret == -1)
goto SendmsgError;
- } else {
+ goto GsoSendDone;
+ }
+#endif
for (size_t i = 0; i < num_datagrams; ++i) {
mess.msg_iov = datagrams + i;
mess.msg_iovlen = 1;
@@ -177,7 +182,9 @@ int h2o_quic_send_datagrams(h2o_quic_ctx_t *ctx, quicly_address_t *dest, quicly_
if (ret == -1)
goto SendmsgError;
}
- }
+#ifdef UDP_SEGMENT
+GsoSendDone:
+#endif
h2o_error_reporter_record_success(&track_sendmsg);
|
Add assert to check success of a CPU memory allocation | @@ -1880,6 +1880,7 @@ Features deliberately excluded from the scope of this library:
objects in CPU memory (not Vulkan memory), allocation failures are not checked
and handled gracefully, because that would complicate code significantly and
is usually not needed in desktop PC applications anyway.
+ Success of an allocation is just checked with an assert.
- Code free of any compiler warnings. Maintaining the library to compile and
work correctly on so many different platforms is hard enough. Being free of
any warnings, on any version of any compiler, is simply not feasible.
@@ -4626,10 +4627,11 @@ static inline void VmaPnextChainPushFront(MainT* mainStruct, NewT* newStruct)
static void* VmaMalloc(const VkAllocationCallbacks* pAllocationCallbacks, size_t size, size_t alignment)
{
+ void* result = VMA_NULL;
if((pAllocationCallbacks != VMA_NULL) &&
(pAllocationCallbacks->pfnAllocation != VMA_NULL))
{
- return (*pAllocationCallbacks->pfnAllocation)(
+ result = (*pAllocationCallbacks->pfnAllocation)(
pAllocationCallbacks->pUserData,
size,
alignment,
@@ -4637,8 +4639,10 @@ static void* VmaMalloc(const VkAllocationCallbacks* pAllocationCallbacks, size_t
}
else
{
- return VMA_SYSTEM_ALIGNED_MALLOC(size, alignment);
+ result = VMA_SYSTEM_ALIGNED_MALLOC(size, alignment);
}
+ VMA_ASSERT(result != VMA_NULL && "CPU memory allocation failed.");
+ return result;
}
static void VmaFree(const VkAllocationCallbacks* pAllocationCallbacks, void* ptr)
|
metadata-hook: fix default-agent | ^- agent:gall
|_ =bowl:gall
+* this .
- def ~(. (default-agent *agent:gall %|) bowl)
+ def ~(. (default-agent this %|) bowl)
++ on-init on-init:def
++ on-save !>(state)
++ on-load
|
Fix Ownship Target Identity Information | @@ -295,7 +295,10 @@ func makeOwnshipReport() bool {
// See p.16.
msg[0] = 0x0A // Message type "Ownship".
- msg[1] = 0x01 // Alert status, address type.
+ // Ownship Target Identify (see 3.5.1.2 of GDL-90 Specifications)
+ // First half of byte is 0 for 'No Traffic Alert'
+ // Second half of byte is 0 for 'ADS-B with ICAO'
+ msg[1] = 0x00 // Alert status, address type.
code, _ := hex.DecodeString(globalSettings.OwnshipModeS)
if len(code) != 3 {
|
remove IMU specific structures | @@ -72,27 +72,6 @@ typedef struct __attribute__((__packed__))
};
} handy_t;
-// Imu report struct
-typedef struct __attribute__((__packed__))
-{
- union {
- struct __attribute__((__packed__))
- {
- unsigned short accell : 1;
- unsigned short gyro : 1;
- unsigned short quat : 1;
- unsigned short compass : 1;
- unsigned short euler : 1;
- unsigned short rot_mat : 1;
- unsigned short pedo : 1;
- unsigned short linear_accel : 1;
- unsigned short gravity_vector : 1;
- unsigned short heading : 1;
- };
- unsigned char unmap[2];
- };
-} imu_report_t;
-
// Pid
typedef struct __attribute__((__packed__))
{
|
test-ipmi-hiomap: Add write-one-block-twice test
Cc: stable | @@ -1127,6 +1127,70 @@ static void test_hiomap_protocol_write_two_blocks(void)
scenario_exit();
}
+static const struct scenario_event
+scenario_hiomap_protocol_write_one_block_twice[] = {
+ { .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_event_p,
+ .p = &hiomap_create_write_window_qs0l1_rs0l1_call,
+ },
+ { .type = scenario_event_p, .p = &hiomap_mark_dirty_qs0l1_call, },
+ { .type = scenario_event_p, .p = &hiomap_flush_call, },
+ {
+ .type = scenario_cmd,
+ .c = {
+ .req = {
+ .cmd = HIOMAP_C_MARK_DIRTY,
+ .seq = 7,
+ .args = {
+ [0] = 0x00, [1] = 0x00,
+ [2] = 0x01, [3] = 0x00,
+ },
+ },
+ .resp = {
+ .cmd = HIOMAP_C_MARK_DIRTY,
+ .seq = 7,
+ },
+ },
+ },
+ {
+ .type = scenario_cmd,
+ .c = {
+ .req = {
+ .cmd = HIOMAP_C_FLUSH,
+ .seq = 8,
+ },
+ .resp = {
+ .cmd = HIOMAP_C_FLUSH,
+ .seq = 8,
+ },
+ },
+ },
+ SCENARIO_SENTINEL,
+};
+
+static void test_hiomap_protocol_write_one_block_twice(void)
+{
+ struct blocklevel_device *bl;
+ struct ipmi_hiomap *ctx;
+ uint8_t *buf;
+ size_t len;
+
+ scenario_enter(scenario_hiomap_protocol_write_one_block_twice);
+ assert(!ipmi_hiomap_init(&bl));
+ ctx = container_of(bl, struct ipmi_hiomap, bl);
+ len = 1 << ctx->block_size_shift;
+ buf = calloc(1, len);
+ assert(buf);
+ assert(!bl->write(bl, 0, buf, len));
+ assert(!bl->write(bl, 0, buf, len));
+ free(buf);
+ ipmi_hiomap_exit(bl);
+ scenario_exit();
+}
+
static void test_hiomap_protocol_event_before_write(void)
{
struct blocklevel_device *bl;
@@ -2955,6 +3019,7 @@ struct test_case test_cases[] = {
TEST_CASE(test_hiomap_protocol_event_during_read),
TEST_CASE(test_hiomap_protocol_write_one_block),
TEST_CASE(test_hiomap_protocol_write_two_blocks),
+ TEST_CASE(test_hiomap_protocol_write_one_block_twice),
TEST_CASE(test_hiomap_protocol_event_before_write),
TEST_CASE(test_hiomap_protocol_event_during_write),
TEST_CASE(test_hiomap_protocol_erase_one_block),
|
publish: don't require a new notebook to trigger upgrading the old | :: send invites to all previously subscribed ships
::
|^
- =/ rav [%sing %t [%da now.bol] /app/publish/notebooks]
+ =/ rav [%next %t [%da now.bol] /app/publish/notebooks]
=/ tile-json
(frond:enjs:format %notifications (numb:enjs:format 0))
=/ init-cards=(list card)
|
libhfuzz/memorycmp: __builtin_cmp is not defined everywhere: | +#include <ctype.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
@@ -24,14 +25,14 @@ static inline int HF_strcmp(const char* s1, const char* s2, uintptr_t addr) {
static inline int HF_strcasecmp(const char* s1, const char* s2, uintptr_t addr) {
size_t i;
- for (i = 0; __builtin_tolower((unsigned char)s1[i]) == __builtin_tolower((unsigned char)s2[i]);
+ for (i = 0; tolower((unsigned char)s1[i]) == tolower((unsigned char)s2[i]);
i++) {
if (s1[i] == '\0' || s2[i] == '\0') {
break;
}
}
instrumentUpdateCmpMap(addr, i);
- return (__builtin_tolower((unsigned char)s1[i]) - __builtin_tolower((unsigned char)s2[i]));
+ return (tolower((unsigned char)s1[i]) - tolower((unsigned char)s2[i]));
}
static inline int HF_strncmp(const char* s1, const char* s2, size_t n, uintptr_t addr) {
@@ -52,7 +53,7 @@ static inline int HF_strncmp(const char* s1, const char* s2, size_t n, uintptr_t
static inline int HF_strncasecmp(const char* s1, const char* s2, size_t n, uintptr_t addr) {
size_t i;
for (i = 0; i < n; i++) {
- if ((__builtin_tolower((unsigned char)s1[i]) != __builtin_tolower((unsigned char)s2[i])) ||
+ if ((tolower((unsigned char)s1[i]) != tolower((unsigned char)s2[i])) ||
s1[i] == '\0' || s2[i] == '\0') {
break;
}
@@ -62,7 +63,7 @@ static inline int HF_strncasecmp(const char* s1, const char* s2, size_t n, uintp
if (i == n) {
return 0;
}
- return __builtin_tolower((unsigned char)s1[i]) - __builtin_tolower((unsigned char)s2[i]);
+ return tolower((unsigned char)s1[i]) - tolower((unsigned char)s2[i]);
}
static inline char* HF_strstr(const char* haystack, const char* needle, uintptr_t addr) {
|
Resolved conflicts in valgrind.py. | @@ -2,7 +2,6 @@ import os
import subprocess
import sys
-<<<<<<< HEAD
subdir = sorted([f.name for f in os.scandir('.') if f.is_dir()])
# First make debug
@@ -17,18 +16,6 @@ with open('make_log','w') as m:
subprocess.run(['rm','make_log'])
os.chdir('tests/')
-=======
-import numpy as np
-
-subdir = [f.name for f in os.scandir(".") if f.is_dir()]
-
-# First make debug
-sys.stdout.write("Making VPLanet...")
-sys.stdout.flush()
-os.chdir("..")
-subprocess.run(["make debug >& /dev/null"], shell=True)
-os.chdir("tests")
->>>>>>> 0b3ea1c78b49901fe8c6b823f81d8ff0c84f81f8
print("done.")
@@ -40,7 +27,6 @@ for sub in subdir:
#sys.stdout.write("")
sys.stdout.flush()
os.chdir(sub)
-<<<<<<< HEAD
fout = sub +'.valgrind'
#cmd='/usr/bin/valgrind --track-origins=yes ../../bin/vplanet vpl.in &> '+ fout
cmd='/usr/bin/valgrind --track-origins=yes ../../bin/vplanet vpl.in '
@@ -50,11 +36,6 @@ for sub in subdir:
with open(fout,"w+") as f:
subprocess.run(cmd, shell=True,stdout=f,stderr=f)
-=======
- fout = sub + ".valgrind"
- cmd = "valgrind --track-origins=yes ../../vplanet vpl.in >& " + fout
- subprocess.run(cmd, shell=True)
->>>>>>> 0b3ea1c78b49901fe8c6b823f81d8ff0c84f81f8
f = open(fout, "r")
last_line = f.readlines()[-1]
#print(last_line)
@@ -63,7 +44,6 @@ for sub in subdir:
n_errors = int(words[3])
if n_errors > 0:
tot_fail += 1
-<<<<<<< HEAD
print(': '+repr(n_errors)+' error(s)')
os.chdir('../')
@@ -76,14 +56,3 @@ if (tot_fail == 0):
else:
print(repr(tot_fail)+'/'+repr(tot_test)+' test(s) failed.')
assert(False)
-=======
- print(": " + repr(n_errors) + " error(s)")
- os.chdir("..")
-
-sys.stdout.write("Done! ")
-
-if tot_fail == 0:
- print("VPLanet is mem-check-clean!")
-else:
- print(repr(tot_fail) + "/" + repr(tot_test) + " test(s) failed.")
->>>>>>> 0b3ea1c78b49901fe8c6b823f81d8ff0c84f81f8
|
Fix monkeycrush index;
There was a bugfix that makes model vertex indices 1-based. | @@ -42,7 +42,7 @@ io.write('};\n\n')
io.write('uint16_t monkey_indices[] = {\n ')
for i = 1, model:getMeshIndexCount(1) do
- local index = model:getMeshIndex(1, i)
+ local index = model:getMeshIndex(1, i) - 1
io.write((' %d,'):format(index))
if i % 10 == 0 then
io.write('\n ')
|
Make hall's ++prep more robust. | $% {$repeat cir/circle ses/(list serial)} :< messaging wire
{$circle nom/name src/source} :< subscription wire
== ::
- ::
- ++ old-state
- (cork state |=(a/state a(stories (~(run by stories.a) old-story))))
- ++ old-story
- (cork story |=(a/story a(shape *old-config, mirrors (~(run by mirrors.a) old-config))))
- ++ old-config
- {src/(set source) cap/cord fit/filter con/control}
--
::
:> #
:> #
:> functional cores and arms.
::
-|_ {bol/bowl:gall state}
+|_ {bol/bowl:gall $1 state}
::
:> # %transition
:> prep transition
++ prep
:> adapts state.
::
- |= old/(unit old-state)
+ => |%
+ ++ states
+ ?(state-0 $%({$1 s/state}))
+ ::
+ ++ state-0
+ (cork state |=(a/state a(stories (~(run by stories.a) story-0))))
+ ++ story-0
+ %+ cork story
+ |=(a/story a(shape *config-0, mirrors (~(run by mirrors.a) config-0)))
+ ++ config-0
+ {src/(set source) cap/cord fit/filter con/control}
+ --
+ =| mos/(list move)
+ |= old/(unit states)
^- (quip move _..prep)
?~ old
%- pre-bake
ta-done:ta-init:ta
- =- [~ ..prep(+<+ `state`u.old(stories -))]
+ ?- -.u.old
+ $1
+ [mos ..prep(+<+ u.old)]
+ ::
+ ?($~ ^) :: $0
+ =- $(old `[%1 u.old(stories -)])
%- ~(run by stories.u.old)
- |= soy/old-story
+ |= soy/story-0
+ ^- story
(story soy(shape [src cap ~ fit con]:shape.soy))
+ ==
::
:> # %engines
:> main cores.
|
Fix bug with twice STA check | @@ -514,7 +514,7 @@ espi_parse_received(esp_recv_t* rcv) {
}
#endif /* ESP_CFG_MODE_STATION */
#if ESP_CFG_MODE_ACCESS_POINT
- if (CMD_IS_CUR(ESP_CMD_WIFI_CIPSTA_GET)) {
+ if (CMD_IS_CUR(ESP_CMD_WIFI_CIPAP_GET)) {
im = &esp.ap; /* Get IP and MAC structure first */
}
#endif /* ESP_CFG_MODE_ACCESS_POINT */
|
Fix prolog | @@ -247,7 +247,7 @@ init(NewS) :-
initial_dram_block(Block),
assert_accept(region(["DRAM"], Block)),
state_add_free(S2, ["DRAM"], [Block], NewS),
- node_enum(DRAM_ID, DRAM_ENUM).
+ node_enum(DRAM_ID, DRAM_ENUM),
printf("Decoding net initialized using %p as DRAM. DRAM nodeid: %p\n",
[Block, DRAM_ENUM]).
|
board/woomax/thermal.c: Format with clang-format
BRANCH=none
TEST=none | @@ -130,10 +130,8 @@ int fan_table_to_rpm(int fan, int *temp)
void board_override_fan_control(int fan, int *tmp)
{
- if (chipset_in_state(CHIPSET_STATE_ON |
- CHIPSET_STATE_ANY_SUSPEND)) {
+ if (chipset_in_state(CHIPSET_STATE_ON | CHIPSET_STATE_ANY_SUSPEND)) {
fan_set_rpm_mode(FAN_CH(fan), 1);
- fan_set_rpm_target(FAN_CH(fan),
- fan_table_to_rpm(fan, tmp));
+ fan_set_rpm_target(FAN_CH(fan), fan_table_to_rpm(fan, tmp));
}
}
|
Pull CPU-related constants from the CPU header (CC2538DK) | #include PROJECT_CONF_PATH
#endif /* PROJECT_CONF_PATH */
/*---------------------------------------------------------------------------*/
-/**
- * \name Compiler configuration and platform-specific type definitions
- *
- * Those values are not meant to be modified by the user
- * @{
- */
-#define CLOCK_CONF_SECOND 128
-
-/* Compiler configurations */
-#define CCIF
-#define CLIF
-
-/* Platform typedefs */
-typedef uint32_t clock_time_t;
-typedef uint32_t uip_stats_t;
-
-/*
- * rtimer.h typedefs rtimer_clock_t as unsigned short. We need to define
- * RTIMER_CLOCK_DIFF to override this
- */
-typedef uint32_t rtimer_clock_t;
-#define RTIMER_CLOCK_DIFF(a,b) ((int32_t)((a)-(b)))
-/** @} */
-/*---------------------------------------------------------------------------*/
-/* 352us from calling transmit() until the SFD byte has been sent */
-#define RADIO_DELAY_BEFORE_TX ((unsigned)US_TO_RTIMERTICKS(352))
-/* 192us as in datasheet but ACKs are not always received, so adjusted to 250us */
-#define RADIO_DELAY_BEFORE_RX ((unsigned)US_TO_RTIMERTICKS(250))
-#define RADIO_DELAY_BEFORE_DETECT 0
-#ifndef TSCH_CONF_BASE_DRIFT_PPM
-/* The drift compared to "true" 10ms slots.
- * Enable adaptive sync to enable compensation for this.
- * Slot length 10000 usec
- * 328 ticks
- * Tick duration 30.517578125 usec
- * Real slot duration 10009.765625 usec
- * Target - real duration = -9.765625 usec
- * TSCH_CONF_BASE_DRIFT_PPM -977
- */
-#define TSCH_CONF_BASE_DRIFT_PPM -977
-#endif
-
-#if MAC_CONF_WITH_TSCH
-#define TSCH_CONF_HW_FRAME_FILTERING 0
-#endif /* MAC_CONF_WITH_TSCH */
+#include "cc2538-def.h"
/*---------------------------------------------------------------------------*/
/**
* \name Serial Boot Loader Backdoor configuration
|
cvsd/autotest: testing for invalid configurations | /*
- * Copyright (c) 2007 - 2015 Joseph Gaeddert
+ * Copyright (c) 2007 - 2021 Joseph Gaeddert
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -61,3 +61,21 @@ void autotest_cvsd_rmse_sine() {
cvsd_destroy(cvsd_decoder);
}
+// configuration
+void autotest_cvsd_invalid_config()
+{
+#if LIQUID_STRICT_EXIT
+ AUTOTEST_WARN("skipping cvsd config test with strict exit enabled");
+ return;
+#endif
+#if !LIQUID_SUPPRESS_ERROR_OUTPUT
+ fprintf(stderr,"warning: ignore potential errors here; checking for invalid configurations\n");
+#endif
+ // test invalid configuration to create()
+ CONTEND_ISNULL(cvsd_create(0, 2.0f, 0.5f)); // too few bits
+ CONTEND_ISNULL(cvsd_create(2, 1.0f, 0.5f)); // zeta too small
+ CONTEND_ISNULL(cvsd_create(2, 0.5f, 0.5f)); // zeta too small
+ CONTEND_ISNULL(cvsd_create(2, 2.0f,-1.0f)); // alpha too small
+ CONTEND_ISNULL(cvsd_create(2, 2.0f, 2.0f)); // alpha too large
+}
+
|
Parse indent in ++snap directly instead of feeding spaces to span-level parsers | ::
:: no unterminated lines
?~ los ~&(%unterminated-line [~ +>(err `naz)])
- ?: =(`@`10 i.los)
+ ?. =(`@`10 i.los)
+ ?: (gth col q.naz)
+ ?. (~(has in ^~((silt " -+>!"))) i.los)
+ ~&(expected-indent+[col naz los] [~ +>(err `naz)])
+ $(los t.los, q.naz +(q.naz))
+ ::
+ :: save byte and repeat
+ $(los t.los, q.naz +(q.naz), nap [i.los nap])
::
:: consume newline
:_ +>(los t.los, naz [+(p.naz) 1])
$(nap t.nap)
(flop nap)
::
- :: save byte and repeat
- $(los t.los, q.naz +(q.naz), nap [i.los nap])
+ ++ skip :: discard line
+ |- ^+ +
+ ::
+ :: no unterminated lines
+ ?~ los ~&(%unterminated-line +(err `naz))
+ ?. =(`@`10 i.los)
+ ::
+ :: eat byte and repeat
+ $(los t.los)
+ ::
+ :: consume newline
+ +(los t.los, naz [+(p.naz) 1])
::
- ++ skip +:snap :: discard line
++ look :: inspect line
^- (unit trig)
(wonk (look:parse naz los))
|= tape ^- mars
::
:: each line is text data with its newline
- ;/((weld (slag (add 4 (dec col)) +<) "\0a"))
+ ;/((weld (slag 4 +<) "\0a"))
::
:: if block is verse
?: ?=($poem p.cur)
:: each line is a paragraph
:- [%p ~]
:_ ~
- ;/((weld (slag (dec col) +<) "\0a"))
+ ;/("{+<}\0a")
::
:: yex: block recomposed, with newlines
=/ yex/tape (join '\0a' (flop q.u.lub))
=/ dif (sub col.pic col)
=/ erp [p.naz col.pic]
::
- :: nap: take first line
- =^ nap +>.$ snap
- ::
:: execute appropriate paragraph form
=< line:abet:apex
|%
::
++ abet :: accept line
+ ::
+ :: nap: take first line
+ =^ nap +>.$ snap
..$(lub `[naz nap ~])
::
++ apex ^+ . :: by column offset
:: indent by 2
=. col (add 2 col)
::
- :: erase marker
- =. nap =+((dec col) (runt [- ' '] (slag - nap)))
- ::
(push typ)
::
++ lent :: list entry
|
context BUGFIX check input parameters of ly_ctx_unset_searchdirs() | @@ -132,6 +132,9 @@ ly_ctx_get_searchdirs(const struct ly_ctx *ctx)
API LY_ERR
ly_ctx_unset_searchdirs(struct ly_ctx *ctx, int index)
{
+ LY_CHECK_ARG_RET(ctx, ctx, LY_EINVAL);
+ LY_CHECK_ERR_RET(index >= 0 && (unsigned int)index >= ctx->search_paths.count, LOGARG(ctx, index), LY_EINVAL);
+
if (!ctx->search_paths.count) {
return LY_SUCCESS;
}
|
sys/config; when checking for duplicate value while writing, we
were only checking the current save destination. Should check if
value exists in load sources instead. | @@ -117,8 +117,7 @@ conf_save_one(const char *name, char *value)
int rc;
conf_lock();
- cs = conf_save_dst;
- if (!cs) {
+ if (!conf_save_dst) {
rc = OS_ENOENT;
goto out;
}
@@ -129,11 +128,14 @@ conf_save_one(const char *name, char *value)
cdca.name = name;
cdca.val = value;
cdca.is_dup = 0;
+ SLIST_FOREACH(cs, &conf_load_srcs, cs_next) {
cs->cs_itf->csi_load(cs, conf_dup_check_cb, &cdca);
+ }
if (cdca.is_dup == 1) {
rc = 0;
goto out;
}
+ cs = conf_save_dst;
rc = cs->cs_itf->csi_save(cs, name, value);
out:
conf_unlock();
|
Legibility tweak to for loop step | @@ -487,8 +487,8 @@ function FunChecker:check_stat(stat)
elseif tag == "ast.Stat.For" then
local loop_type
- loop_type, stat.start = self:check_initializer_exp(stat.decl, stat.start,
- "numeric for-loop initializer")
+ loop_type, stat.start =
+ self:check_initializer_exp(stat.decl, stat.start, "numeric for-loop initializer")
if loop_type._tag ~= "types.T.Integer" and
loop_type._tag ~= "types.T.Float"
@@ -498,23 +498,19 @@ function FunChecker:check_stat(stat)
types.tostring(loop_type), stat.decl.name)
end
- stat.limit = self:check_exp_verify(stat.limit, loop_type,
- "numeric for-loop limit")
-
- if stat.step then
- stat.step = self:check_exp_verify(stat.step, loop_type, "numeric for-loop step")
- else
- local def_step
+ if not stat.step then
if loop_type._tag == "types.T.Integer" then
- def_step = ast.Exp.Integer(stat.limit.loc, 1)
+ stat.step = ast.Exp.Integer(stat.limit.loc, 1)
elseif loop_type._tag == "types.T.Float" then
- def_step = ast.Exp.Float(stat.limit.loc, 1.0)
+ stat.step = ast.Exp.Float(stat.limit.loc, 1.0)
else
error("impossible")
end
- stat.step = self:check_exp_synthesize(def_step)
end
+ stat.limit = self:check_exp_verify(stat.limit, loop_type, "numeric for-loop limit")
+ stat.step = self:check_exp_verify(stat.step, loop_type, "numeric for-loop step")
+
self.p.symbol_table:with_block(function()
self:add_local(stat.decl.name, loop_type)
stat.decl._name = self.p.symbol_table:find_symbol(stat.decl.name)
|
Fix back-patch of "Avoid race in RelationBuildDesc() ..."
The back-patch of commit broke
CLOBBER_CACHE_ALWAYS for v9.6 through v13. It updated the
InvalidateSystemCaches() call for CLOBBER_CACHE_RECURSIVELY, neglecting
the one for CLOBBER_CACHE_ALWAYS. Back-patch to v13, v12, v11, and v10.
Discussion: | @@ -725,7 +725,7 @@ AcceptInvalidationMessages(void)
if (!in_recursion)
{
in_recursion = true;
- InvalidateSystemCaches();
+ InvalidateSystemCachesExtended(true);
in_recursion = false;
}
}
|
Remove redundant const-value bounds check | @@ -469,12 +469,6 @@ func (q *checker) bcheckAssignment2(lhs *a.Expr, lTyp *a.TypeExpr, op t.ID, rhs
rb := a.Bounds{}
if op == t.IDEq {
- if cv := rhs.ConstValue(); cv != nil {
- if (lb[0] != nil && cv.Cmp(lb[0]) < 0) || (lb[1] != nil && cv.Cmp(lb[1]) > 0) {
- return fmt.Errorf("check: constant %v is not within bounds %v", cv, lb)
- }
- return nil
- }
rb, err = q.bcheckExpr(rhs, 0)
} else {
rb, err = q.bcheckExprBinaryOp(op.BinaryForm(), lhs, rhs, 0)
|
kdb-mv: also fail for recursive
when no key was found | @@ -45,11 +45,18 @@ int MvCommand::execute (Cmdline const & cl)
oldConf.append (tmpConf.cut (sourceKey));
+ if (!oldConf.size ())
+ {
+ cerr << "No key to be moved found\n";
+ return 1;
+ }
+
KeySet newConf;
Key k;
oldConf.rewind ();
std::string sourceName = sourceKey.getName ();
+
if (cl.recursive)
{
while ((k = oldConf.next ()))
@@ -61,11 +68,6 @@ int MvCommand::execute (Cmdline const & cl)
{
// just rename one key
k = oldConf.next ();
- if (!k)
- {
- cerr << "Single key to move not found\n";
- return 1;
- }
if (k != sourceKey)
{
cerr << "First key found " << k.getName () << " does not exactly match given key " << sourceKey.getName ()
|
docs: clarify bgw_restart_time documentation
Author: Dave Cramer
Discussion: | @@ -130,8 +130,8 @@ typedef struct BackgroundWorker
<para>
<structfield>bgw_restart_time</structfield> is the interval, in seconds, that
- <command>postgres</command> should wait before restarting the process, in
- case it crashes. It can be any positive value,
+ <command>postgres</command> should wait before restarting the process in
+ the event that it crashes. It can be any positive value,
or <literal>BGW_NEVER_RESTART</literal>, indicating not to restart the
process in case of a crash.
</para>
|
travis: override weird custom CC, CXX variables | @@ -210,6 +210,8 @@ before_script:
export LD_LIBRARY_PATH="$PWD/install/lib"
fi
SYSTEM_DIR="$PWD/kdbsystem"
+ export CC_FOR_BUILD="$CC"
+ export CXX_FOR_BUILD="$CXX"
mkdir build && cd build
CMAKE_OPT+=(
-GNinja
|
extmod/machine_signal: make_new: Support separate __new__ vs __init__ phases. | /*
- * This file is part of the MicroPython project, http://micropython.org/
+ * This file is part of the Pycopy project, https://github.com/pfalcon/pycopy
+ * This file was part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
- * Copyright (c) 2017 Paul Sokolovsky
+ * Copyright (c) 2017-2021 Paul Sokolovsky
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -43,6 +44,9 @@ typedef struct _machine_signal_t {
} machine_signal_t;
STATIC mp_obj_t signal_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
+ MP_MAKE_NEW_GET_ONLY_FLAGS();
+ (void)only_new;
+
mp_obj_t pin;
bool invert = false;
|
Add remove working properly to ruby loader. | typedef struct loader_impl_rb_module_type
{
+ ID id;
VALUE module;
VALUE instance;
set function_map;
@@ -580,6 +581,8 @@ loader_impl_rb_module rb_loader_impl_load_from_file_module(loader_impl impl, con
if (rb_module != NULL)
{
+ rb_module->id = rb_to_id(name_capitalized);
+
rb_module->module = module;
rb_module->instance = rb_funcall(rb_cClass, rb_intern("new"), 1, rb_cObject);
@@ -691,6 +694,8 @@ loader_impl_rb_module rb_loader_impl_load_from_memory_module(loader_impl impl, c
if (rb_module != NULL)
{
+ rb_module->id = rb_to_id(name_capitalized);
+
rb_module->module = module;
rb_module->instance = rb_funcall(rb_cClass, rb_intern("new"), 1, rb_cObject);
@@ -710,7 +715,7 @@ loader_impl_rb_module rb_loader_impl_load_from_memory_module(loader_impl impl, c
return NULL;
}
- log_write("metacall", LOG_LEVEL_DEBUG, "Ruby module %s. loaded", name);
+ log_write("metacall", LOG_LEVEL_DEBUG, "Ruby module %s loaded", name);
rb_loader_impl_key_print(rb_module->function_map);
@@ -781,20 +786,53 @@ loader_handle rb_loader_impl_load_from_package(loader_impl impl, const loader_na
return NULL;
}
+int rb_loader_impl_clear_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args)
+{
+ VALUE * module = (VALUE *)args;
+
+ rb_function_parser function_parser = (rb_function_parser)val;
+
+ VALUE name = rb_str_new_cstr(function_parser->name);
+
+ (void)s;
+ (void)key;
+
+ rb_undef(*module, rb_to_id(name));
+
+ return 0;
+}
+
int rb_loader_impl_clear(loader_impl impl, loader_handle handle)
{
loader_impl_rb_handle rb_handle = (loader_impl_rb_handle)handle;
+ size_t iterator, size;
+
(void)impl;
- if (rb_handle != NULL)
+ if (rb_handle == NULL)
{
- size_t iterator, size = vector_size(rb_handle->modules);
+ return 1;
+ }
+
+ size = vector_size(rb_handle->modules);
for (iterator = 0; iterator < size; ++iterator)
{
loader_impl_rb_module * rb_module = vector_at(rb_handle->modules, iterator);
+ /* Undef all methods */
+ set_iterate((*rb_module)->function_map, &rb_loader_impl_clear_cb_iterate, (set_cb_iterate_args)&((*rb_module)->module));
+
+ /* Remove module */
+ if (rb_is_const_id((*rb_module)->id))
+ {
+ VALUE result = rb_const_remove(rb_cObject, (*rb_module)->id);
+
+ /* TODO: Handle result */
+ (void)result;
+ }
+
set_destroy((*rb_module)->function_map);
}
@@ -805,9 +843,6 @@ int rb_loader_impl_clear(loader_impl impl, loader_handle handle)
return 0;
}
- return 1;
-}
-
int rb_loader_impl_discover_func(loader_impl impl, function f, rb_function_parser function_parser)
{
signature s = function_signature(f);
|
more iterations for eigenmapscu | @@ -148,7 +148,7 @@ static __global__ void eigenmapscu_kern(cuFloatComplex* in_filled, cuFloatComple
void eigenmapscu(const long dims[5], _Complex float* optr, _Complex float* eptr, const _Complex float* imgcov2)
{
- const int iter = 30;
+ const int iter = 300;
const int x = (int) dims[0];
const int y = (int) dims[1];
const int z = (int) dims[2];
|
Doxygen: Minor rework/typo fixes in RTOS Validation page. | /**
\page rtosValidation RTOS Validation
-<a href="https://github.com/ARM-software/CMSIS-RTOS2_Validation" target="_blank"><b>CMSIS-RTOS2 Validation</b></a> framework is available for verifying operation of CMSIS-RTOS2 implementations. The test cases validate the functional behavior, test invalid parameters and call management functions from ISR. The test projects are provided using the <a href=" https://github.com/Open-CMSIS-Pack/devtools/tree/main/tools" target="_blank">CMSIS-Toolbox</a> integrate well in CI workflows.
+<a href="https://github.com/ARM-software/CMSIS-RTOS2_Validation" target="_blank"><b>CMSIS-RTOS2 Validation</b></a> framework is available to verify operation of CMSIS-RTOS2 implementations. The test cases validate the functional behavior, test invalid parameters and call management functions from Interrupt Service Routines (ISRs). The test projects are provided based on the <a href=" https://github.com/Open-CMSIS-Pack/devtools/tree/main/tools" target="_blank">CMSIS-Toolbox</a> and integrate well into CI workflows.
For details about the scope and usage, please, refer to the <a href="https://arm-software.github.io/CMSIS-RTOS2_Validation/main/index.html" target="_blank">CMSIS-RTOS2 Validation manual</a>.
|
travis: add amalgamated build for NEON | @@ -287,6 +287,11 @@ jobs:
../amalgamate.py "$header" > ../amalgamated/"$header"
done);
fi
+ - |
+ if [ ! -e amalgamated/arm]; then
+ mkdir -p amalgamated/arm
+ (cd simde/arm && ../../amalgamate.py neon.h > ../../amalgamated/neon.h)
+ fi
deploy:
provider: pages
target_branch: amalgamated
|
[components][drivers][usb_common]: Fix typo for 'ifndf' in usb_common.h | @@ -225,7 +225,7 @@ extern "C" {
#ifndef USB_TIMEOUT_LONG
#define USB_TIMEOUT_LONG (RT_TICK_PER_SECOND * 5) /* 5s */
#endif
-#ifndf USB_DEBOUNCE_TIME
+#ifndef USB_DEBOUNCE_TIME
#define USB_DEBOUNCE_TIME (RT_TICK_PER_SECOND / 5) /* 0.2s */
#endif
|
test: fix errstr matching for musl libc
This makes the tests pass on musl[1] based distros like Alpine Linux.
[1]: | @@ -450,6 +450,7 @@ static void test_blocking_connection_errors(void) {
c->err == REDIS_ERR_OTHER &&
(strcmp(c->errstr, "Name or service not known") == 0 ||
strcmp(c->errstr, "Can't resolve: " HIREDIS_BAD_DOMAIN) == 0 ||
+ strcmp(c->errstr, "Name does not resolve") == 0 ||
strcmp(c->errstr,
"nodename nor servname provided, or not known") == 0 ||
strcmp(c->errstr, "No address associated with hostname") == 0 ||
|
doc: add precondition to keyValue | @@ -148,6 +148,7 @@ ksDel (ks);
kdbClose (handle);
* @endcode
*
+ * @pre @p key is not NULL and has stored data
* @post returned pointer points to the stored internal value
* @post if the value is a string, the value is NULL terminated
*
|
DE Lighting Switch, forward endpoint 2 events to endpoint 1 sensor | @@ -2348,6 +2348,8 @@ void DeRestPluginPrivate::checkSensorButtonEvent(Sensor *sensor, const deCONZ::A
mode = Sensor::ModeColorTemperature;
}
+ Sensor *other = getSensorNodeForAddressAndEndpoint(sensor->address(), (sensor->fingerPrint().endpoint == 2) ? 1 : 2);
+
if (mode != sensor->mode())
{
sensor->setMode(mode);
@@ -2356,7 +2358,6 @@ void DeRestPluginPrivate::checkSensorButtonEvent(Sensor *sensor, const deCONZ::A
queSaveDb(DB_SENSORS, DB_SHORT_SAVE_DELAY);
// set changed mode for sensor endpoints 1 and 2
- Sensor *other = getSensorNodeForAddressAndEndpoint(sensor->address(), (ind.srcEndpoint() == 2) ? 1 : 2);
if (other)
{
other->setMode(mode);
@@ -2364,6 +2365,11 @@ void DeRestPluginPrivate::checkSensorButtonEvent(Sensor *sensor, const deCONZ::A
updateSensorEtag(other);
}
}
+
+ if (other && ind.srcEndpoint() == 2 && other->fingerPrint().endpoint == 1)
+ { // forward button events 300x and 400x to first endpoint sensor
+ checkSensorButtonEvent(other, ind, zclFrame);
+ }
}
// Busch-Jaeger
else if (sensor->modelId() == QLatin1String("RM01") || sensor->modelId() == QLatin1String("RB01"))
|
Update INSTALL.md to include Ubuntu Bionic (18.04)
Update INSTALL.md to include Ubuntu Bionic (18.04) | @@ -52,7 +52,7 @@ Kernel compile flags can usually be checked by looking at `/proc/config.gz` or
## Ubuntu - Binary
-The stable and the nightly packages are built for Ubuntu Xenial (16.04) and Ubuntu Artful (17.10). The steps are very straightforward, no need to upgrade the kernel or compile from source!
+The stable and the nightly packages are built for Ubuntu Xenial (16.04), Ubuntu Artful (17.10) and Ubuntu Bionic (18.04). The steps are very straightforward, no need to upgrade the kernel or compile from source!
**Stable and Signed Packages**
@@ -62,7 +62,7 @@ echo "deb https://repo.iovisor.org/apt/xenial xenial main" | sudo tee /etc/apt/s
sudo apt-get update
sudo apt-get install bcc-tools libbcc-examples linux-headers-$(uname -r)
```
-(s/xenial/artful as appropriate)
+(replace `xenial` with `artful` or `bionic` as appropriate)
**Nightly Packages**
@@ -71,7 +71,7 @@ echo "deb [trusted=yes] https://repo.iovisor.org/apt/xenial xenial-nightly main"
sudo apt-get update
sudo apt-get install bcc-tools libbcc-examples linux-headers-$(uname -r)
```
-(s/xenial/artful as appropriate)
+(replace `xenial` with `artful` or `bionic` as appropriate)
## Fedora - Binary
|
Documentation: Polish tracing document | # WPP Tracing #
+## Advantages over KdPrint:
+
+* It can be enabled, disabled and filtered during runtime with minimal overhead by logging in real-time binary messages
+* Traces are are automatically included in the crash dumps
+* Logs can be easily collected using a script
+* Can be very useful for automating manual tests which use log's output
+* Time Stamps, Function names and some other useful data can be easily included into log
+
## Viewing the WPP trace messages in real-time ##
1. Copy the driver's PDB file from the build folder to the target machine.
## Getting Driver Binary Traces using Logman (for sending trace logs to developers) ##
-* Copy Tools/Trace subfolder from the driver SOURCE TREE (not netkvm's Tools folder) to the target machine
-* Run netkvm.bat as administrator
+* Copy Tools/Trace subfolder from the root of the source code tree to the target machine
+* Run <driver_name>.bat as administrator (netkvm.bat for example)
* Follow instructions
* Collect the etl file
|
Handle empty values in reboot log | @@ -211,6 +211,7 @@ log_reboot_write(const struct log_reboot_info *info)
cbor_encode_text_stringz(&map, buf);
cbor_encode_text_stringz(&map, "hash");
+ memset(buf, 0, sizeof buf);
off = 0;
for (i = 0; i < sizeof hash; i++) {
off += snprintf(buf + off, sizeof buf - off, "%02x",
@@ -234,12 +235,14 @@ log_reboot_write(const struct log_reboot_info *info)
if (info->pc != 0) {
cbor_encode_text_stringz(&map, "pc");
- cbor_encode_int(&map, (unsigned long)info->pc);
+ cbor_encode_int(&map, info->pc);
}
state_flags = imgmgr_state_flags(boot_current_slot);
cbor_encode_text_stringz(&map, "flags");
off = 0;
+ memset(buf, 0, sizeof buf);
+
if (state_flags & IMGMGR_STATE_F_ACTIVE) {
off += snprintf(buf + off, sizeof buf - off, "%s ", "active");
}
|
defer initial http request from +prep | ::
+= card
$% [%hiss wire [~ ~] %httr %hiss hiss:eyre]
+ [%wait wire @da]
[%well wire path (unit mime)]
[%rule wire %cert (unit [wain wain])]
==
::
:: +retry: retry effect after timeout
::
- ++ retry !!
+ ++ retry
+ |= [wir=wire wen=@da]
+ :: XX validate wire and date
+ (emit %wait [%acme wir] wen)
--
:: |event: accept event, emit next effect(s)
::
:: +retry: retry effect after timeout
::
++ retry
- :: XX implement wire parsing / next effect
- !!
+ |= wir=wire
+ ^+ this
+ ?+ wir
+ ~&(unknown-retry+wir this)
+ :: XX do the needful
+ [%directory ~] directory:effect
+ ==
--
:: +sigh-tang: handle http request failure
::
%finalize-trial finalize-trial:event
:: XX delete-trial?
==
+:: +wake: timer wakeup event
+::
+++ wake
+ |= [wir=wire ~]
+ ^- (quip move _this)
+ ~& [%wake wir]
+ ?> ?=([%acme *] wir)
+ abet:(retry:event t.wir)
:: +poke-acme-order: create new order for a set of domains
::
++ poke-acme-order
++ init
=/ url
'https://acme-staging-v02.api.letsencrypt.org/directory'
- =< directory:effect
+ =< (retry:effect /directory +(now.bow))
%= this
bas (need (de-purl:html url))
act [(rekey eny.bow) ~]
|
nshlib: Fix write buffer position in nsh cp command
The iobuffer for write buffer position need to be update if write
API cannot write data at once. | @@ -587,10 +587,11 @@ int cmd_cp(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{
int nbytesread;
int nbyteswritten;
+ char *iobuffer = vtbl->iobuffer;
do
{
- nbytesread = read(rdfd, vtbl->iobuffer, IOBUFFERSIZE);
+ nbytesread = read(rdfd, iobuffer, IOBUFFERSIZE);
if (nbytesread == 0)
{
/* End of file */
@@ -621,10 +622,11 @@ int cmd_cp(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
do
{
- nbyteswritten = write(wrfd, vtbl->iobuffer, nbytesread);
+ nbyteswritten = write(wrfd, iobuffer, nbytesread);
if (nbyteswritten >= 0)
{
nbytesread -= nbyteswritten;
+ iobuffer += nbyteswritten;
}
else
{
|
Missing clBuildProgram options added | @@ -63,8 +63,8 @@ static const char cl_parameters[] =
"-g "
"-Werror ";
-static const char cl_parameters_not_yet_supported_by_clang[] =
- "-cl-strict-aliasing "
+static const char cl_parameters_supported_after_clang_3_9[] =
+ "-cl-strict-aliasing " /* deprecated after OCL1.0 */
"-cl-denorms-are-zero "
"-cl-no-signed-zeros ";
@@ -225,11 +225,16 @@ CL_API_SUFFIX__VERSION_1_0
/* the LLVM API call pushes the parameters directly to the
frontend without using -Xclang */
}
- else if (strstr (cl_parameters_not_yet_supported_by_clang, token))
+ else if (strstr (cl_parameters_supported_after_clang_3_9, token))
{
- APPEND_TO_MAIN_BUILD_LOG("Build option isnt yet supported by clang: %s\n", token);
+#ifndef LLVM_OLDER_THAN_3_9
+ /* the LLVM API call pushes the parameters directly to the
+ * frontend without using -Xclang*/
+#else
+ APPEND_TO_MAIN_BUILD_LOG("This build option is supported after clang3.9: %s\n", token);
token = strtok_r (NULL, " ", &saveptr);
continue;
+#endif
}
else
{
|
Fix last rogue lowercase heading | @@ -54,7 +54,7 @@ Where "your_command" is any executable and "params" are any parameters needed fo
- The top-level Makefile checks to see what platform you are on and then includes the specific Makefile for the platform from the OS specific directory.
- The run script will determine which platform you are using and will set environment variables accordingly.
-# Environment variables
+# Environment Variables
## Linux Dynamic Loader
|
fix clang build fail | @@ -655,7 +655,6 @@ int mbedtls_ssl_tls13_calculate_verify_data( mbedtls_ssl_context* ssl,
size_t transcript_len;
unsigned char *base_key = NULL;
- size_t base_key_len;
mbedtls_md_type_t const md_type = ssl->handshake->ciphersuite_info->mac;
const mbedtls_md_info_t* const md_info =
@@ -678,15 +677,9 @@ int mbedtls_ssl_tls13_calculate_verify_data( mbedtls_ssl_context* ssl,
MBEDTLS_SSL_DEBUG_BUF( 4, "handshake hash", transcript, transcript_len );
if( from == MBEDTLS_SSL_IS_CLIENT )
- {
base_key = ssl->handshake->tls13_hs_secrets.client_handshake_traffic_secret;
- base_key_len = sizeof( ssl->handshake->tls13_hs_secrets.client_handshake_traffic_secret );
- }
else
- {
base_key = ssl->handshake->tls13_hs_secrets.server_handshake_traffic_secret;
- base_key_len = sizeof( ssl->handshake->tls13_hs_secrets.server_handshake_traffic_secret );
- }
ret = ssl_tls13_calc_finished_core( md_type, base_key, transcript, dst );
if( ret != 0 )
@@ -698,7 +691,10 @@ int mbedtls_ssl_tls13_calculate_verify_data( mbedtls_ssl_context* ssl,
exit:
/* Erase handshake secrets */
- mbedtls_platform_zeroize( base_key, base_key_len );
+ if( from == MBEDTLS_SSL_IS_CLIENT )
+ mbedtls_platform_zeroize( base_key, sizeof( ssl->handshake->tls13_hs_secrets.client_handshake_traffic_secret ) );
+ else
+ mbedtls_platform_zeroize( base_key, sizeof( ssl->handshake->tls13_hs_secrets.server_handshake_traffic_secret ) );
mbedtls_platform_zeroize( transcript, sizeof( transcript ) );
return( ret );
}
|
Fixes for IPv6 parsing with SVCB | @@ -2132,7 +2132,7 @@ parse_svcparam_ipv6hint(const char **s, uint8_t **dp, uint8_t *eod)
}
for (;;) {
const char *ipv6_start = *s;
- char ipv6_str[40];
+ char ipv6_str[INET6_ADDRSTRLEN];
size_t len;
while (isxdigit(**s) || **s == ':')
@@ -2323,9 +2323,9 @@ ldns_str2rdf_svcparams(ldns_rdf **rd, const char *str)
length = strlen(str);
/* Worst case space requirement. We'll realloc to actual size later. */
- if (!(dp = data = LDNS_XMALLOC(uint8_t, length)))
+ if (!(dp = data = LDNS_XMALLOC(uint8_t, length * 4)))
return LDNS_STATUS_MEM_ERR;
- eod = data + length;
+ eod = data + length * 4;
/* Fill data with parsed bytes */
for (;;) {
|
neon/cvt: don't use vec_ctsl on POWER
GCC is okay with it, but clang isn't. On z/Arch it's deprecated in
favor of vec_signed.
Fixes | @@ -293,8 +293,8 @@ simde_vcvtq_s64_f64(simde_float64x2_t a) {
return vcvtq_s64_f64(a);
#elif defined(SIMDE_X86_AVX512VL_NATIVE) && defined(SIMDE_X86_AVX512DQ_NATIVE)
return _mm_cvtpd_epi64(_mm_round_pd(a, _MM_FROUND_TO_ZERO));
- #elif defined(SIMDE_POWER_ALTIVEC_P8_NATIVE) || defined(SIMDE_ZARCH_ZVECTOR_13_NATIVE)
- return vec_ctsl(a, 0);
+ #elif defined(SIMDE_ZARCH_ZVECTOR_13_NATIVE)
+ return vec_signed(a);
#else
simde_float64x2_private a_ = simde_float64x2_to_private(a);
simde_int64x2_private r_;
|
Remove debug typedef | @@ -1376,22 +1376,12 @@ VOID
NTAPI
RtlInitEmptyUnicodeString(
_Out_ PUNICODE_STRING DestinationString,
- _In_opt_ PWCHAR Buffer,
- _In_opt_ USHORT MaximumLength
+ _In_ PWCHAR Buffer,
+ _In_ USHORT MaximumLength
)
-{
- if (Buffer)
{
DestinationString->Buffer = Buffer;
DestinationString->MaximumLength = MaximumLength;
- }
- else
- {
- PTEB currentTeb = NtCurrentTeb();
- DestinationString->Buffer = currentTeb->StaticUnicodeBuffer;
- DestinationString->MaximumLength = sizeof(currentTeb->StaticUnicodeBuffer);
- }
-
DestinationString->Length = 0;
}
|
hw/test: Make tests quieter
The physmap tests prints a few hundred lines of:
Assigning BAR [8] type:01 index:0 0x0000200000000000 for 0x0000034000000000
Assigning BAR [8] type:02 index:5 0x0000234000000000 for 0x0000002000000000
Make it not do that. | @@ -15,13 +15,13 @@ $(HW_TEST:%=%-gcov-run) : %-run: %
$(call QTEST, TEST-COVERAGE ,$< , $<)
$(HW_TEST:%=%-check) : %-check: %
- $(call Q, RUN-TEST ,$(VALGRIND) $<, $<)
+ $(call QTEST, RUN-TEST ,$(VALGRIND) $<, $<)
$(HW_TEST) : % : %.c hw/phys-map.o
$(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) -O0 -g -I include -I . -o $@ $<, $<)
$(HW_TEST:%=%-gcov): %-gcov : %.c %
- $(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) $(HOSTGCOVCFLAGS) -I include -I . -lgcov -o $@ $<, $<)
+ $(call QTEST, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) $(HOSTGCOVCFLAGS) -I include -I . -lgcov -o $@ $<, $<)
clean: hw-clean
|
interface: correct gcgManager comment | // 1. call configure with a GlobalApi and GlobalStore.
// 2. call start() to start the token refresh loop.
//
-// If the ship has S3 credentials set, we don't try to get a token, but we keep
-// checking at regular intervals to see if they get unset. Otherwise, we try to
-// invoke the GCP token thread on the ship until it gives us an access token.
-// Once we have a token, we refresh it every hour or so, since it has an
+// If the ship does not have GCP storage configured, we don't try to get
+// a token, but we keep checking at regular intervals to see if it gets
+// configured. If GCP storage is configured, we try to invoke the GCP
+// get-token thread on the ship until it gives us an access token. Once
+// we have a token, we refresh it every hour or so according to its
// intrinsic expiry.
//
//
|
Show error details when sixel2png fails | @@ -229,6 +229,12 @@ main(int argc, char *argv[])
argerr:
show_help();
+error:
+ fprintf(stderr, "%s\n%s\n",
+ sixel_helper_format_error(status),
+ sixel_helper_get_additional_message());
+ status = (-1);
+
end:
sixel_decoder_unref(decoder);
return status;
|
fixed segmentation fault in case of not allowed characters in option | @@ -220,7 +220,11 @@ ouista = macsta >> 24;
essidptr = hash2500line +59;
l = strlen(essidptr);
+fprintf(stderr, "wrong ESSID length %s\n", hash2500line);
+
passwdptr = strrchr(hash2500line, ':');
+if((passwdptr -hash2500line) > 59)
+ {
if(passwdptr != NULL)
{
l1 = strlen(passwdptr);
@@ -229,14 +233,19 @@ if(passwdptr != NULL)
l -= l1;
}
}
+ }
if(l > 70)
{
- fprintf(stderr, "wrong ESSID length %s\n", essidptr);
+ fprintf(stderr, "wrong ESSID length %s %d\n", essidptr, l);
return;
}
+
+
+
memset(&essidbuffer, 0, 72);
memcpy(&essidbuffer, essidptr, l);
+
if ((fhoui = fopen(ouiname, "r")) == NULL)
{
fprintf(stderr, "unable to open database %s\n", ouiname);
@@ -271,15 +280,7 @@ while((len = fgetline(fhoui, LINEBUFFER, linein)) != -1)
}
}
}
-if(isasciistring(l /2, essidbuffer) == true)
- {
fprintf(stdout, "\nESSID..: %s\n", essidbuffer);
- }
-else
- {
- fprintf(stdout, "\nESSID..: $HEX[%s]\n", essidbuffer);
- }
-
fprintf(stdout, "MAC_AP.: %012llx\n"
"VENDOR.: %s\n"
"MAC_STA: %012llx\n"
|
rust: Use keyset! in Readme example | @@ -114,23 +114,18 @@ See the [full example](example/src/bin/keyset.rs) for more. Run it from the `exa
```rust
extern crate elektra;
-use elektra::{KeyBuilder, KeySet, ReadableKey, StringKey};
+use elektra::{KeyBuilder, KeySet, ReadableKey, StringKey, keyset};
fn main() -> Result<(), Box<dyn std::error::Error>> {
- // Create a new KeySet with enough preallocated space for 5 keys
- let mut keyset = KeySet::with_capacity(5);
-
- // Append some keys
- keyset.append_key(
+ // keyset! works just like vec!
+ let keyset = keyset![
KeyBuilder::<StringKey>::new("user/sw/app/#1/host")?
.value("localhost")
.build(),
- );
- keyset.append_key(
KeyBuilder::<StringKey>::new("user/sw/app/#1/port")?
.value("8080")
.build(),
- );
+ ];
// Iterate the keyset
for key in keyset.iter() {
|
GNSS change only: put the workaround required for early-version SARA-R510M8S modules to enable the GNSS LNA under conditional compilation (U_CFG_SARA_R5_M8_WORKAROUND) since the workaround has an adverse effect on the up-coming SARA-R422M8S module. | @@ -284,7 +284,9 @@ int32_t uGnssPosGet(int32_t gnssHandle,
{
int32_t errorCode = (int32_t) U_ERROR_COMMON_NOT_INITIALISED;
uGnssPrivateInstance_t *pInstance;
+#ifdef U_CFG_SARA_R5_M8_WORKAROUND
char message[4]; // Room for the body of a UBX-CFG-ANT message
+#endif
int64_t startTime;
if (gUGnssPrivateMutex != NULL) {
@@ -293,6 +295,7 @@ int32_t uGnssPosGet(int32_t gnssHandle,
pInstance = pUGnssPrivateGetInstance(gnssHandle);
if (pInstance != NULL) {
+#ifdef U_CFG_SARA_R5_M8_WORKAROUND
if (pInstance->transportType == U_GNSS_TRANSPORT_UBX_AT) {
// Temporary change: on old versions of the
// SARA-R10M8S module the LNA in the GNSS
@@ -306,7 +309,7 @@ int32_t uGnssPosGet(int32_t gnssHandle,
message[3] = 0x39;
uGnssPrivateSendUbxMessage(pInstance, 0x06, 0x13, message, 4);
}
-
+#endif
startTime = uPortGetTickTimeMs();
errorCode = (int32_t) U_ERROR_COMMON_TIMEOUT;
while ((errorCode == (int32_t) U_ERROR_COMMON_TIMEOUT) &&
@@ -346,7 +349,9 @@ int32_t uGnssPosGetStart(int32_t gnssHandle,
uGnssPrivateInstance_t *pInstance;
//lint -esym(593, pParameters) Suppress not free'd - posGetTask() does that
uGnssPosGetTaskParameters_t *pParameters;
+#ifdef U_CFG_SARA_R5_M8_WORKAROUND
char message[4]; // Room for the body of a UBX-CFG-ANT message
+#endif
if (gUGnssPrivateMutex != NULL) {
@@ -370,6 +375,7 @@ int32_t uGnssPosGetStart(int32_t gnssHandle,
// once it has started
pParameters = (uGnssPosGetTaskParameters_t *) malloc(sizeof(*pParameters));
if (pParameters != NULL) {
+#ifdef U_CFG_SARA_R5_M8_WORKAROUND
if (pInstance->transportType == U_GNSS_TRANSPORT_UBX_AT) {
// Temporary change: on old versions of the
// SARA-R10M8S module the LNA in the GNSS
@@ -383,6 +389,7 @@ int32_t uGnssPosGetStart(int32_t gnssHandle,
message[3] = 0x39;
uGnssPrivateSendUbxMessage(pInstance, 0x06, 0x13, message, 4);
}
+#endif
// Fill in the callback and start a task
// that will establish position (or not)
// and call it
|
fix(benchmark): fix run_max_speed score incorrect | @@ -769,12 +769,12 @@ static void benchmark_init(void)
disp->driver->flush_cb = dummy_flush_cb;
if(disp->refr_timer) {
disp_ori_timer_period = disp->refr_timer->period;
- lv_timer_set_period(disp->refr_timer, 1);
+ lv_timer_set_period(disp->refr_timer, 2);
}
lv_timer_t * anim_timer = lv_anim_get_timer();
anim_ori_timer_period = anim_timer->period;
- lv_timer_set_period(anim_timer, 1);
+ lv_timer_set_period(anim_timer, 2);
}
lv_obj_t * scr = lv_scr_act();
|
makefile project: handle case where targetdir is . | @@ -220,8 +220,17 @@ function _make_target(makefile, target, targetflags)
-- make head
local targetfile = target:targetfile()
- makefile:print("%s: %s", target:name(), targetfile)
+ local targetname = target:name()
+
+ -- rules like `./target` and `target` are equivalent and can causes issues
+ -- for cases where targetdir is .
+ -- in these cases, the targetfile rule is not created
+ if targetfile == "./" .. targetname then
+ makefile:printf("%s:", targetname)
+ else
+ makefile:print("%s: %s", targetname, targetfile)
makefile:printf("%s:", targetfile)
+ end
-- make dependence for the dependent targets
for _, depname in ipairs(target:get("deps")) do
|
Prevent dragging scene accidentally while panning world view | @@ -91,7 +91,12 @@ class Scene extends Component {
};
onStartDrag = (e) => {
- const { id, selectScene } = this.props;
+ const { id, selectScene, editable } = this.props;
+
+ if (!editable) {
+ return;
+ }
+
this.lastPageX = e.pageX;
this.lastPageY = e.pageY;
|
nvbios: Add 0xb2 devinit opcode
Seen on Volta+. Unknown purpose. | @@ -811,6 +811,11 @@ void printscript (uint16_t soff) {
maxcond = bios->data[soff+1];
soff += 3;
break;
+ case 0xb2: // Volta: TO CONFIRM
+ printcmd (soff, 22);
+ printf ("UNKB2\n");
+ soff += 22;
+ break;
default:
printcmd (soff, 1);
printf ("???\n");
|
[bug] use pointer that memory had freed. | @@ -110,9 +110,10 @@ static int at_recvpkt_all_delete(rt_slist_t *rlist)
return 0;
}
- for(node = rt_slist_first(rlist); node; node = rt_slist_next(node))
+ for(node = rt_slist_first(rlist); node;)
{
pkt = rt_slist_entry(node, struct at_recv_pkt, list);
+ node = rt_slist_next(node);
if (pkt->buff)
{
rt_free(pkt->buff);
@@ -157,6 +158,7 @@ static int at_recvpkt_node_delete(rt_slist_t *rlist, rt_slist_t *node)
static size_t at_recvpkt_get(rt_slist_t *rlist, char *mem, size_t len)
{
rt_slist_t *node = RT_NULL;
+ rt_slist_t *free_node = RT_NULL;
at_recv_pkt_t pkt = RT_NULL;
size_t content_pos = 0, page_pos = 0;
@@ -165,10 +167,13 @@ static size_t at_recvpkt_get(rt_slist_t *rlist, char *mem, size_t len)
return 0;
}
- for (node = rt_slist_first(rlist); node; node = rt_slist_next(node))
+ for (node = rt_slist_first(rlist); node;)
{
pkt = rt_slist_entry(node, struct at_recv_pkt, list);
+ free_node = node;
+ node = rt_slist_next(node);
+
page_pos = pkt->bfsz_totle - pkt->bfsz_index;
if (page_pos >= len - content_pos)
@@ -177,7 +182,7 @@ static size_t at_recvpkt_get(rt_slist_t *rlist, char *mem, size_t len)
pkt->bfsz_index += len - content_pos;
if (pkt->bfsz_index == pkt->bfsz_totle)
{
- at_recvpkt_node_delete(rlist, node);
+ at_recvpkt_node_delete(rlist, free_node);
}
content_pos = len;
break;
@@ -187,7 +192,7 @@ static size_t at_recvpkt_get(rt_slist_t *rlist, char *mem, size_t len)
rt_memcpy((char *) mem + content_pos, pkt->buff + pkt->bfsz_index, page_pos);
content_pos += page_pos;
pkt->bfsz_index += page_pos;
- at_recvpkt_node_delete(rlist, node);
+ at_recvpkt_node_delete(rlist, free_node);
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.