message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
acl-plugin: add MAINTAINERS entry | @@ -117,6 +117,11 @@ M: Keith Burns <[email protected]>
M: Hongjun Ni <[email protected]>
F: src/vnet/vxlan-gpe/
+Plugin - ACL
+M: Andrew Yourtchenko <[email protected]>
+F: src/plugins/acl/
+F: src/plugins/acl.am
+
Plugin - flowprobe
M: Ole Troan <[email protected]>
F: src/plugins/flowprobe/
|
RHBZ#2075862: VirtIO-FS: rework VirtFsStop | @@ -134,6 +134,7 @@ struct VIRTFS
VIRTFS(ULONG DebugFlags, const std::wstring& MountPoint);
NTSTATUS Start();
+ VOID Stop();
NTSTATUS SubmitInitRequest();
NTSTATUS SubmitOpenRequest(UINT32 GrantedAccess,
VIRTFS_FILE_CONTEXT *FileContext);
@@ -275,17 +276,17 @@ static DWORD VirtFsRegDevHandleNotification(VIRTFS *VirtFs)
return CM_MapCrToWin32Err(ConfigRet, ERROR_NOT_SUPPORTED);
}
-static VOID VirtFsStop(VIRTFS *VirtFs)
+VOID VIRTFS::Stop()
{
- FspFileSystemStopDispatcher(VirtFs->FileSystem);
+ FspFileSystemStopDispatcher(FileSystem);
- if (VirtFs->FileSystem != NULL)
+ if (FileSystem != NULL)
{
- FspFileSystemDelete(VirtFs->FileSystem);
- VirtFs->FileSystem = NULL;
+ FspFileSystemDelete(FileSystem);
+ FileSystem = NULL;
}
- VirtFs->LookupMap.clear();
+ LookupMap.clear();
}
static DWORD VirtFsDevInterfaceArrival(VIRTFS *VirtFs, HCMNOTIFICATION Notify)
@@ -327,7 +328,7 @@ static DWORD VirtFsDevInterfaceArrival(VIRTFS *VirtFs, HCMNOTIFICATION Notify)
return ERROR_SUCCESS;
out_stop_virtfs:
- VirtFsStop(VirtFs);
+ VirtFs->Stop();
out_unreg_dh_notify:
VirtFsNotificationAsyncUnreg(&VirtFs->DevHandleNotification);
out_close_handle:
@@ -349,7 +350,7 @@ static VOID VirtFsDevQueryRemove(VIRTFS *VirtFs, HCMNOTIFICATION Notify)
{
DBG("Notify = 0x%x", Notify);
- VirtFsStop(VirtFs);
+ VirtFs->Stop();
VirtFsNotificationAsyncUnreg(&VirtFs->DevHandleNotification);
CloseDeviceInterface(&VirtFs->Device);
}
@@ -2857,7 +2858,7 @@ static NTSTATUS SvcStop(FSP_SERVICE *Service)
{
VIRTFS *VirtFs = (VIRTFS *)Service->UserContext;
- VirtFsStop(VirtFs);
+ VirtFs->Stop();
VirtFsNotificationUnreg(&VirtFs->DevHandleNotification);
CloseDeviceInterface(&VirtFs->Device);
VirtFsNotificationDelete(&VirtFs->DevHandleNotification);
|
vnet/tcp/tcp.c: address a corner case.
Avoid possible null pointer dereference | @@ -1803,12 +1803,15 @@ tcp_scoreboard_replay (u8 * s, tcp_connection_t * tc, u8 verbose)
scoreboard_init (&dummy_tc->sack_sb);
dummy_tc->rcv_opts.flags |= TCP_OPTS_FLAG_SACK;
-#if TCP_SCOREBOARD_TRACE
+/* Since this is also accessible via decl. in tcp.h.
+ * Otherwise, it is gated earlier by cli parser.
+ */
+#if (!TCP_SCOREBOARD_TRACE)
+ s = format (0, "scoreboard tracing not enabled");
+ return s;
+#else
trace = tc->sack_sb.trace;
trace_len = vec_len (tc->sack_sb.trace);
-#else
- trace = 0;
- trace_len = 0;
#endif
for (i = 0; i < trace_len; i++)
|
Disable recv_host_interrupt test because it fails in travis CI
Filed issue to debug. | @@ -67,7 +67,8 @@ RECV_PIPE_NAME = test_harness.WORK_DIR + '/nyuzi_emulator_recvint'
SEND_PIPE_NAME = test_harness.WORK_DIR + '/nyuzi_emulator_sendint'
-@test_harness.test(['emulator'])
+# XXX disabled because it fails on Travis CI
+#@test_harness.test(['emulator'])
def recv_host_interrupt(*unused):
try:
os.remove(RECV_PIPE_NAME)
|
build - less verbose win scp command. | @@ -700,10 +700,10 @@ else
fi
ssh $(WIX_PACKAGER) 'if [ -d $(BLD_PACKAGING_PID) ]; then rm -rf $(BLD_PACKAGING_PID); fi'
ssh $(WIX_PACKAGER) 'mkdir -p $(BLD_PACKAGING_PID)/packaging/src/windows'
- scp -r client/install/src/windows/* $(WIX_PACKAGER):$(BLD_PACKAGING_PID)/packaging/src/windows/
- scp -r $(CLIENTINSTLOC) $(WIX_PACKAGER):$(BLD_PACKAGING_PID)/packaging/
+ scp -qr client/install/src/windows/* $(WIX_PACKAGER):$(BLD_PACKAGING_PID)/packaging/src/windows/
+ scp -qr $(CLIENTINSTLOC) $(WIX_PACKAGER):$(BLD_PACKAGING_PID)/packaging/
ssh $(WIX_PACKAGER) 'cd $(BLD_PACKAGING_PID)/packaging/src/windows/ && make PACKAGE=greenplum-$@ VERSION=$(VERSION_SHORT) SRCDIR=../../$(notdir $(CLIENTINSTLOC))'
- scp $(WIX_PACKAGER):$(BLD_PACKAGING_PID)/packaging/greenplum-$@-$(VERSION_SHORT)-WinXP-x86_32.msi .
+ scp -q $(WIX_PACKAGER):$(BLD_PACKAGING_PID)/packaging/greenplum-$@-$(VERSION_SHORT)-WinXP-x86_32.msi .
chmod 755 greenplum-$@-$(VERSION_SHORT)-WinXP-x86_32.msi
ssh $(WIX_PACKAGER) 'rm -rf $(BLD_PACKAGING_PID)'
endif
@@ -772,10 +772,10 @@ else
fi
ssh $(WIX_PACKAGER) 'if [ -d $(BLD_PACKAGING_PID) ]; then rm -rf $(BLD_PACKAGING_PID); fi'
ssh $(WIX_PACKAGER) 'mkdir -p $(BLD_PACKAGING_PID)/packaging/src/windows'
- scp -r client/install/src/windows/* $(WIX_PACKAGER):$(BLD_PACKAGING_PID)/packaging/src/windows/
- scp -r $(LOADERSINSTLOC) $(WIX_PACKAGER):$(BLD_PACKAGING_PID)/packaging/
+ scp -qr client/install/src/windows/* $(WIX_PACKAGER):$(BLD_PACKAGING_PID)/packaging/src/windows/
+ scp -qr $(LOADERSINSTLOC) $(WIX_PACKAGER):$(BLD_PACKAGING_PID)/packaging/
ssh $(WIX_PACKAGER) 'cd $(BLD_PACKAGING_PID)/packaging/src/windows/ && make PACKAGE=greenplum-$@ VERSION=$(VERSION_SHORT) SRCDIR=../../$(notdir $(LOADERSINSTLOC))'
- scp $(WIX_PACKAGER):$(BLD_PACKAGING_PID)/packaging/greenplum-$@-$(VERSION_SHORT)-WinXP-x86_32.msi .
+ scp -q $(WIX_PACKAGER):$(BLD_PACKAGING_PID)/packaging/greenplum-$@-$(VERSION_SHORT)-WinXP-x86_32.msi .
chmod 755 greenplum-$@-$(VERSION_SHORT)-WinXP-x86_32.msi
ssh $(WIX_PACKAGER) 'rm -rf $(BLD_PACKAGING_PID)'
endif
|
USB cleanup: make file consistent with k26 and lpc55s69 version | #include "util.h"
+//*** <<< Use Configuration Wizard in Context Menu >>> ***
+
+// ****
+// NOTE: The high speed packet sizes are set to the same size as full speed in this
+// USB configuration in order to increase the number of devices that can
+// simultaneously be connected to a single USB controller. With the maximium
+// high speed packet sizes, only 1 or 2 devices can be connected.
+// ****
+
// <e> USB Device
// <i> Enable the USB Device functionality
#define USBD_ENABLE 1
#define USBD_MAX_PACKET0 64
#define USBD_DEVDESC_IDVENDOR 0x0D28
#define USBD_DEVDESC_IDPRODUCT 0x0204
-#define USBD_DEVDESC_BCDDEVICE 0x1000
+#define USBD_DEVDESC_BCDDEVICE 0x1000 //was 0x0100
// <h> Configuration Settings
// <i> These settings affect Configuration Descriptor
#define USBD_HID_EP_INTIN 1
#define USBD_HID_EP_INTOUT 1
-#define USBD_HID_ENABLE HID_ENDPOINT
#define USBD_HID_EP_INTIN_STACK 0
#define USBD_HID_WMAXPACKETSIZE 64
#define USBD_HID_BINTERVAL 1
#define USBD_HID_HS_ENABLE 1
-#define USBD_HID_HS_WMAXPACKETSIZE 64
+#define USBD_HID_HS_WMAXPACKETSIZE 64 //| (2<<11)
#define USBD_HID_HS_BINTERVAL 1
#define USBD_HID_STRDESC L"CMSIS-DAP v1"
#define USBD_WEBUSB_STRDESC L"WebUSB: CMSIS-DAP"
|
misc: updating obs config for v1.3.8 | @@ -17,7 +17,7 @@ io-libs = ["hdf5","netcdf","netcdf-fortran","phdf5","pnetcdf"]
runtimes = ["singularity","ocr","charliecloud"]
rms = ["slurm","pbspro","pmix"]
serial-libs = ["R","openblas","plasma"]
-parallel-libs = ["boost","hypre","opencoarrays","petsc","slepc","superlu_dist"]
+parallel-libs = ["boost","hypre","mumps","opencoarrays","petsc","slepc","superlu_dist"]
perf-tools = ["dimemas","extrae","likwid","scorep","tau"]
compiler-families=["gnu-compilers","intel-compilers-devel"]
@@ -61,9 +61,9 @@ skip_aarch=["-intel\\b","lustre-client","-impi\\b","-mvapich2\\b","likwid-gnu"]
compiler_families=["gnu8","intel"]
mpi_families=["openmpi3","mpich","mvapich2","impi"]
-standalone = ["lmod"]
+standalone = ["charliecloud","clustershell","easybuild","lmod"]
# define (compiler dependent) packages
-compiler_dependent = ["openmpi","mvapich2"]
+compiler_dependent = ["hdf5","openmpi","mvapich2","likwid"]
-mpi_dependent = []
+mpi_dependent = ["boost","mumps","petsc","phdf5","scorep","slepc"]
|
WRITEMEM_32BIT: removed checks limit | @@ -306,12 +306,6 @@ int _stlink_usb_write_mem32(stlink_t *sl, uint32_t addr, uint16_t len) {
unsigned char* const cmd = sl->c_buf;
int i, ret;
- if ((sl->version.jtag_api < STLINK_JTAG_API_V3 && len > 64) ||
- (sl->version.jtag_api >= STLINK_JTAG_API_V3 && len > 512)) {
- ELOG("WRITEMEM_32BIT: bulk packet limits exceeded (data len %d byte)\n", len);
- return (-1);
- }
-
i = fill_command(sl, SG_DXFER_TO_DEV, len);
cmd[i++] = STLINK_DEBUG_COMMAND;
cmd[i++] = STLINK_DEBUG_WRITEMEM_32BIT;
|
Add protection against successfully loading a 0x0 file | @@ -3451,6 +3451,14 @@ int main(int argc, char **argv) {
Field_load_error fle = field_load_file(osoc(t.file_name), &t.ged.field);
switch (fle) {
case Field_load_error_ok:
+ if (t.ged.field.height < 1 || t.ged.field.width < 1) {
+ // Opening an empty file or attempting to open a directory can lead us
+ // here.
+ field_deinit(&t.ged.field);
+ qmsg_printf_push("Unusable File", "Not a usable file:\n%s",
+ (osoc(t.file_name)));
+ break;
+ }
grid_initialized = true;
break;
case Field_load_error_cant_open_file: {
|
Lock the GIL when destroying the Python Loader. | @@ -3799,6 +3799,8 @@ int py_loader_impl_destroy(loader_impl impl)
/* Destroy children loaders */
loader_unload_children(impl, 0);
+ PyGILState_STATE gstate = PyGILState_Ensure();
+
/* Stop event loop for async calls */
PyObject *args_tuple = PyTuple_New(0);
PyObject_Call(py_impl->thread_background_stop, args_tuple, NULL);
@@ -3840,6 +3842,8 @@ int py_loader_impl_destroy(loader_impl impl)
}
#endif
+ PyGILState_Release(gstate);
+
int result = py_loader_impl_finalize(py_impl);
free(py_impl);
|
taniks: rgbkbd: Add rgb keyboard type field
rgbkbd_type describes number of zones and LEDs supported.
BRANCH=none
TEST=make -j buildall
Cq-Depend: chromium:3732802 | @@ -66,8 +66,11 @@ const uint8_t rgbkbd_count = ARRAY_SIZE(rgbkbds);
const uint8_t rgbkbd_hsize = RGB_GRID0_COL;
const uint8_t rgbkbd_vsize = RGB_GRID0_ROW;
+const enum ec_rgbkbd_type rgbkbd_type = EC_RGBKBD_TYPE_FOUR_ZONES_40_LEDS;
+
#define LED(x, y) RGBKBD_COORD((x), (y))
#define DELM RGBKBD_DELM
+
const uint8_t rgbkbd_map[] = {
DELM, LED(0, 0), DELM, LED(1, 0), DELM, LED(2, 0), DELM, LED(3, 0),
DELM, LED(4, 0), DELM, LED(5, 0), DELM, LED(6, 0), DELM, LED(7, 0),
|
docker: add opensuse dependencies for xerces plugin and io bindings | @@ -18,6 +18,7 @@ RUN zypper update -y && zypper install -y \
ghostscript \
git \
glib2 \
+ glib2-devel \
gzip \
gpgme-devel \
graphviz \
@@ -34,6 +35,7 @@ RUN zypper update -y && zypper install -y \
libqt5-qtdeclarative-devel \
libqt5-qtsvg-devel \
libuv-devel \
+ libxerces-c-devel \
libxml2-devel \
llvm \
lua-devel \
|
libhfcommon/files: bugaround for freebsd | @@ -453,7 +453,15 @@ void* files_mapSharedMem(size_t sz, int* fd, const char* name) {
*fd = -1;
return NULL;
}
- void* ret = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, *fd, 0);
+ int mmapflags = MAP_SHARED;
+#if defined(MAP_NOSYNC)
+ /*
+ * Some kind of bug in FreeBSD kernel. Without this flag, the shm_open() memory will cause a lot
+ * of troubles to the calling process when mmap()'d
+ */
+ mmapflags |= MAP_NOSYNC;
+#endif /* defined(MAP_NOSYNC) */
+ void* ret = mmap(NULL, sz, PROT_READ | PROT_WRITE, mmapflags, *fd, 0);
if (ret == MAP_FAILED) {
PLOG_W("mmap(sz=%zu, fd=%d)", sz, *fd);
*fd = -1;
|
toml: Changes in lastScalar functions | @@ -17,6 +17,8 @@ static void driverNewCommentList (Driver * driver, const char * comment, size_t
static void driverClearCommentList (Driver * driver);
static void driverDrainCommentsToKey (Key * key, Driver * driver);
static void firstCommentAsInlineToPrevKey (Driver * driver);
+static void driverCommitLastScalarToParentKey (Driver * driver);
+static void driverClearLastScalar (Driver * driver);
static void pushCurrKey (Driver * driver);
static void setCurrKey (Driver * driver, const Key * parent);
@@ -26,7 +28,6 @@ static ParentList * pushParent (ParentList * top, Key * key);
static ParentList * popParent (ParentList * top);
static IndexList * pushIndex (IndexList * top, int value);
static IndexList * popIndex (IndexList * top);
-static void lastScalarToParentKey (Driver * driver);
Driver * createDriver (const Key * parent)
{
@@ -122,7 +123,7 @@ void driverExitKey (Driver * driver)
void driverExitKeyValue (Driver * driver)
{
- lastScalarToParentKey (driver);
+ driverCommitLastScalarToParentKey (driver);
if (driver->prevKey != NULL)
{
@@ -322,7 +323,7 @@ void driverExitArrayElement (Driver * driver)
{
assert (driver->lastScalar != NULL);
driverEnterArrayElement (driver);
- lastScalarToParentKey (driver);
+ driverCommitLastScalarToParentKey (driver);
driver->prevKey = driver->parentStack->key;
keyIncRef (driver->prevKey);
@@ -337,12 +338,7 @@ void driverEnterInlineTable (Driver * driver)
void driverExitInlineTable (Driver * driver)
{
- if (driver->lastScalar != NULL)
- {
- elektraFree (driver->lastScalar->str);
- elektraFree (driver->lastScalar);
- driver->lastScalar = NULL;
- }
+ driverClearLastScalar (driver);
}
void driverEmptyInlineTable (Driver * driver)
@@ -519,7 +515,7 @@ static IndexList * popIndex (IndexList * top)
return newTop;
}
-static void lastScalarToParentKey (Driver * driver)
+static void driverCommitLastScalarToParentKey (Driver * driver)
{
if (driver->lastScalar != NULL)
{
@@ -527,8 +523,13 @@ static void lastScalarToParentKey (Driver * driver)
// printf ("COMMIT %s -> %s\n", keyName (driver->parentStack->key), driver->lastScalar->str);
keySetString (driver->parentStack->key, driver->lastScalar->str);
ksAppendKey (driver->keys, driver->parentStack->key);
- elektraFree (driver->lastScalar->str);
+ driverClearLastScalar (driver);
+ }
+}
+
+static void driverClearLastScalar (Driver * driver)
+{
+ if (driver->lastScalar != NULL) elektraFree (driver->lastScalar->str);
elektraFree (driver->lastScalar);
driver->lastScalar = NULL;
}
-}
|
Increase FIR I2C GPIO speed. | @@ -179,7 +179,7 @@ void HAL_I2C_MspInit(I2C_HandleTypeDef *hi2c)
/* Configure FIR I2C GPIOs */
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.Pull = GPIO_NOPULL;
- GPIO_InitStructure.Speed = GPIO_SPEED_LOW;
+ GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStructure.Mode = GPIO_MODE_AF_OD;
GPIO_InitStructure.Alternate = FIR_I2C_AF;
|
Application.mk: fix generated empty Make.dep for SRCS with VPATH
resulted in generated empty
Make.dep for SRCS with VPATH. | @@ -220,11 +220,11 @@ else
context::
endif
-.depend: Makefile $(wildcard $(SRCS))
+.depend: Makefile $(SRCS)
ifeq ($(filter %$(CXXEXT),$(SRCS)),)
- $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(filter-out Makefile,$^) >Make.dep
+ $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(filter-out Makefile,$(wildcard $^)) >Make.dep
else
- $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $(filter-out Makefile,$^) >Make.dep
+ $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $(filter-out Makefile,$(wildcard $^)) >Make.dep
endif
$(Q) touch $@
|
Reduce unacked ack backlog | @@ -52,7 +52,7 @@ int ngtcp2_acktr_init(ngtcp2_acktr *acktr, ngtcp2_log *log,
const ngtcp2_mem *mem) {
int rv;
- rv = ngtcp2_ringbuf_init(&acktr->acks, 128, sizeof(ngtcp2_acktr_ack_entry),
+ rv = ngtcp2_ringbuf_init(&acktr->acks, 32, sizeof(ngtcp2_acktr_ack_entry),
mem);
if (rv != 0) {
return rv;
|
s5j_dma: relocation of callback call in ISR.
In order to restat DMA from callback, entry poin is changed. | @@ -115,9 +115,9 @@ int pdma_irq_handler(int irq, FAR void *context, FAR void *arg)
for (i = 0; i < dma->max_ch_num; i++) {
if ((intstatus & (1 << i)) && (dma->dma_ch[i].task->callback)) {
- dma->dma_ch[i].task->callback(&dma->dma_ch[i], dma->dma_ch[i].task->arg, 0);
dma_clear_ch_interrupt(dma, i);
dma_disable_ch_interrupt(dma, i);
+ dma->dma_ch[i].task->callback(&dma->dma_ch[i], dma->dma_ch[i].task->arg, 0);
}
}
|
Fix CMakeLists.txt specifying a nonexistent pkgconfig package | @@ -408,7 +408,7 @@ generate_pkg_config ("${CMAKE_CURRENT_BINARY_DIR}/libbrotlienc.pc"
DESCRIPTION "Brotli encoder library"
VERSION "${BROTLI_VERSION_MAJOR}.${BROTLI_VERSION_MINOR}.${BROTLI_VERSION_REVISION}"
URL "https://github.com/google/brotli"
- DEPENDS_PRIVATE brotlicommon
+ DEPENDS_PRIVATE libbrotlicommon
LIBRARIES brotlienc)
if(NOT BROTLI_BUNDLED_MODE)
|
Testing setting timezone using tzFilespec | @@ -1960,23 +1960,23 @@ int DeRestPluginPrivate::modifyConfig(const ApiRequest &req, ApiResponse &rsp)
gwTimezone = timezone;
queSaveDb(DB_CONFIG, DB_SHORT_SAVE_DELAY);
changed = true;
-
#ifdef ARCH_ARM
- int rc = setenv("TZ", qPrintable(timezone), 1);
+ const QString tzFilespec = QString(":") + timezone;
+ int rc = setenv("TZ", qPrintable(tzFilespec), 1);
tzset();
//also set zoneinfo on RPI
- char param1[100];
- strcpy(param1, "/usr/share/zoneinfo/");
- strcpy(param1, qPrintable(timezone));
+ //char param1[100];
+ //strcpy(param1, "/usr/share/zoneinfo/");
+ //strcpy(param1, qPrintable(timezone));
- if (symlink(param1, "/etc/localtime") == -1)
- {
- DBG_Printf(DBG_INFO, "Create symlink to timezone failed with errno: %s\n", strerror(errno));
+ //if (symlink(param1, "/etc/localtime") == -1)
+ //{
+ //DBG_Printf(DBG_INFO, "Create symlink to timezone failed with errno: %s\n", strerror(errno));
//rsp.list.append(errorToMap(ERR_INTERNAL_ERROR, QString("/config/timezone"), QString("Link timezone failed with errno: %1\n").arg(strerror(errno))));
//rsp.httpStatus = HttpStatusServiceUnavailable;
//return REQ_READY_SEND;
- }
+ //}
if (rc != 0)
{
|
Typo fix (thanks | @@ -176,7 +176,7 @@ To flash the firmware, first put your board into bootloader mode by double click
or the one that is part of your keyboard). The controller should appear in your OS as a new USB storage device.
Once this happens, copy the correct UF2 file (e.g. left or right if working on a split), and paste it onto the root of that USB mass
-storage device. One the flash is complete, the controller should automatically restart, and load your newfly flashed firmware.
+storage device. Once the flash is complete, the controller should automatically restart, and load your newfly flashed firmware.
## Customization
|
Add automatic BearSSL and OpenSSL macros and linker flags | @@ -45,6 +45,15 @@ ifdef DEBUG
FLAGS:=$(FLAGS) DEBUG
endif
+# add BearSSL/OpenSSL library flags
+ifeq ($(shell printf "int main(void) {}" | gcc -lbearssl -xc -o /dev/null - >& /dev/null ; echo $$? ), 0)
+FLAGS:=$(FLAGS) HAVE_BEARSSL
+LINKER_FLAGS:=$(LINKER_FLAGS) -lbearssl
+else ifeq ($(shell printf "int main(void) {}" | gcc -lcrypto -lssl -xc -o /dev/null - >& /dev/null ; echo $$? ), 0)
+FLAGS:=$(FLAGS) HAVE_OPENSSL
+LINKER_FLAGS:=$(LINKER_FLAGS) -lcrypto -lssl
+endif
+
##############
## OS specific data - compiler, assembler etc.
@@ -232,3 +241,5 @@ vars:
@echo "CFLAGS: $(CFLAGS)"
@echo ""
@echo "CPPFLAGS: $(CPPFLAGS)"
+ @echo ""
+ @echo "LINKER_FLAGS: $(LINKER_FLAGS)"
|
unspecialize spawn proxy change | |= =^state:naive
=^ f1 state (init-bud state)
=^ f2 state (n state (owner-changed:l1 ~dopbud (key ~dopbud)))
- =^ f3 state (n state (changed-spawn-proxy:l1 ~dopbud))
+ =^ f3 state (n state (changed-spawn-proxy:l1 ~dopbud deposit-address:naive))
[:(welp f1 f2 f3) state]
::
:: ~marbud is for testing L2 ownership
(log broke-continuity:log-names:naive rift ship ~)
::
++ changed-spawn-proxy
- |= =ship
- (log changed-spawn-proxy:log-names:naive *@t ship deposit-address:naive ~)
+ |= [=ship =address]
+ (log changed-spawn-proxy:log-names:naive *@t ship address ~)
::
++ changed-transfer-proxy
|= [=ship =address]
|
parser was wrong. | @@ -114,18 +114,20 @@ instance FromNoun UV where
Just uv -> pure (UV uv)
fromUV :: String -> Maybe Atom
-fromUV = go (0, 0)
+fromUV = \case
+ ('0':'v':cs) -> go (0, 0) (reverse cs)
+ _ -> Nothing
where
go (i, acc) [] = pure acc
go (i, acc) ('.' : cs) = go (i, acc) cs
go (i, acc) (c : cs) = do
n <- uvCharNum c
- go (i+1, i*n) cs
+ go (i+1, acc+(32^i)*n) cs
toUV :: Atom -> String
toUV = go []
where
- go acc 0 = reverse acc
+ go acc 0 = "0v" <> uvAddDots acc
go acc n = go (char n : acc) (n `div` 32)
char n = base32Chars !! (fromIntegral (n `mod` 32))
@@ -133,6 +135,15 @@ toUV = go []
base32Chars :: [Char]
base32Chars = (['0'..'9'] <> ['a'..'v'])
+uvAddDots :: String -> String
+uvAddDots = reverse . go . reverse
+ where
+ go s = if null tel then hed
+ else hed <> "." <> go tel
+ where
+ hed = take 5 s
+ tel = drop 5 s
+
uvCharNum :: Char -> Maybe Atom
uvCharNum = \case
'0' -> pure 0
|
decision: define false positives | @@ -74,6 +74,7 @@ Plugins relying on change tracking plugins (e.g. notification plugins) will howe
## Assumptions
1. False positives for change tracking algorithms are only a minor problem.
+ False positives are that changes are detected, even though nothing changed.
2. There is no reason to modify or delete existing `meta:/` keys.
3. Newly generated `meta:/...` keys can
- either stay and get permanently stored during `kdbSet`
|
Fix py_cpufreq. | @@ -97,8 +97,6 @@ mp_obj_t py_cpufreq_set_frequency(mp_obj_t cpufreq_idx_obj)
nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "RCC CLK Initialization Error!!"));
}
- SystemCoreClockUpdate();
-
// Do a soft-reset ?
//nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Frequency is set!"));
return mp_const_true;
|
[persistence] fix ovflact text | @@ -101,7 +101,7 @@ static uint8_t get_it_link_updtype(uint8_t type)
static char *get_coll_ovflact_text(uint8_t ovflact)
{
- char *ovfarr[7] = { "error", "head_trim", "tail_trim",
+ char *ovfarr[8] = { "null", "error", "head_trim", "tail_trim",
"smallest_trim", "largest_trim",
"smallest_silent_trim", "largest_silent_trim" };
|
Add luarocks. | @@ -20,15 +20,15 @@ MIT License - see the LICENSE file in the source distribution.
Releases can be downloaded from the
[releases](https://github.com/msteinbeck/tinyspline/releases) page.
-You can also obtain packages from the following repositories:
+Packages can also be obtained from the following repositories:
-PyPI:
+Luarocks (Lua; currently only Linux and macOS):
```bash
-python -m pip install tinyspline
+luarocks install --server=https://msteinbeck.github.io/tinyspline/luarocks tinyspline
```
-Maven:
-```
+Maven (Java):
+```xml
<dependency>
<groupId>org.tinyspline</groupId>
<artifactId>tinyspline</artifactId>
@@ -36,6 +36,11 @@ Maven:
</dependency>
```
+PyPI (Python):
+```bash
+python -m pip install tinyspline
+```
+
#### Compiling From Source
See [BUILD.md](BUILD.md)
|
Fix wrong size in memmove | @@ -102,7 +102,7 @@ void compound_plugin_call(int message, void *parameters) {
if(context->selectorIndex == CETH_MINT){
// ETH amount 0x1234 is stored 0x12340000...000 instead of 0x00....001234, so we strip the following zeroes when copying
memset(context->amount, 0, sizeof(context->amount));
- memmove(context->amount + sizeof(context->amount) - msg->pluginSharedRO->txContent->value.length, msg->pluginSharedRO->txContent->value.value, 32);
+ memmove(context->amount + sizeof(context->amount) - msg->pluginSharedRO->txContent->value.length, msg->pluginSharedRO->txContent->value.value, msg->pluginSharedRO->txContent->value.length);
}
PRINTF("compound plugin inititialized\n");
msg->result = ETH_PLUGIN_RESULT_OK;
|
Manually inline ascii_isspace() function into handle_in_table_text() | @@ -3382,19 +3382,6 @@ static bool handle_in_table(GumboParser* parser, GumboToken* token) {
}
}
-static bool ascii_isspace(unsigned char ch) {
- switch (ch) {
- case ' ':
- case '\f':
- case '\n':
- case '\r':
- case '\t':
- case '\v':
- return true;
- }
- return false;
-}
-
// https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-intabletext
static bool handle_in_table_text(GumboParser* parser, GumboToken* token) {
if (token->type == GUMBO_TOKEN_NULL) {
@@ -3415,16 +3402,21 @@ static bool handle_in_table_text(GumboParser* parser, GumboToken* token) {
// Note that TextNodeBuffer may contain UTF-8 characters, but the presence
// of any one byte that is not whitespace means we flip the flag, so this
// loop is still valid.
- for (size_t i = 0; i < buffer->length; ++i) {
- if (
- !ascii_isspace((unsigned char)buffer->data[i])
- || buffer->data[i] == '\v'
- ) {
+ for (size_t i = 0, n = buffer->length; i < n; ++i) {
+ switch (buffer->data[i]) {
+ case '\t':
+ case '\n':
+ case '\f':
+ case '\r':
+ case ' ':
+ continue;
+ default:
state->_foster_parent_insertions = true;
reconstruct_active_formatting_elements(parser);
- break;
+ goto loopbreak;
}
}
+ loopbreak:
maybe_flush_text_node_buffer(parser);
state->_foster_parent_insertions = false;
state->_reprocess_current_token = true;
|
Add FourCC comment | @@ -560,7 +560,17 @@ typedef struct wuffs_base__transform__output__struct {
// --------
-// FourCC constants.
+// FourCC constants. Four Character Codes are literally four ASCII characters
+// (sometimes padded with ' ' spaces) that pack neatly into a signed or
+// unsigned 32-bit integer. ASCII letters are conventionally upper case.
+//
+// They are often used to identify video codecs (e.g. "H265") and pixel formats
+// (e.g. "YV12"). Wuffs uses them for that but also generally for naming
+// various things: compression formats (e.g. "BZ2 "), image metadata (e.g.
+// "EXIF"), file formats (e.g. "HTML"), etc.
+//
+// Wuffs' u32 values are big-endian ("JPEG" is 0x4A504547 not 0x4745504A) to
+// preserve ordering: "JPEG" < "MP3 " and 0x4A504547 < 0x4D503320.
// Bitmap.
#define WUFFS_BASE__FOURCC__BMP 0x424D5020
|
refactor: use json_extract in git-op so we can test it in use | #include "json-scanf.h"
#include "json-actor.h"
-#define Q
-
namespace github {
namespace config {
@@ -23,12 +21,17 @@ void
init(struct dati *data, char * username, char *file)
{
size_t len = 0;
- char *content = orka_load_whole_file(file, &len);
-
- json_scanf(content, len, "[owner]%?s [repo]%?s [default_branch]%?s",
+ char *json = orka_load_whole_file(file, &len);
+#ifdef P
+ json_scanf(json, len, "[owner]%?s [repo]%?s [default_branch]%?s",
+ &data->owner, &data->repo, &data->default_branch);
+#else
+ json_extract(json, len, "(owner):?s (repo):?s (default_branch):?s",
&data->owner, &data->repo, &data->default_branch);
+#endif
+
data->username = username;
- free(content);
+ free(json);
}
} // namespace config
@@ -58,10 +61,14 @@ load_object_sha(char *str, size_t len, void *ptr)
}
static void
-load_sha(char *str, size_t len, void *ptr)
+load_sha(char *json, size_t len, void *ptr)
{
- fprintf(stderr, "%.*s\n", (int)len, str);
+ fprintf(stderr, "%.*s\n", (int)len, json);
+#ifdef P
json_scanf(str, len, "[sha]%?s", ptr);
+#else
+ json_extract(json, len, "(sha):?s", ptr);
+#endif
}
static void
|
workflow/pr_basic_compilation_check: clean up | -name: Compile check
+name: Basic Compilation Check
-# Controls when the action will run. Triggers the workflow on push or pull request
on: pull_request
jobs:
- Compile:
+ basic_complication_check:
runs-on: ubuntu-18.04
container: inclavarecontainers/test:${{ matrix.tag }}
strategy:
matrix:
- tag: [compile-check-ubuntu18.04, compile-check-centos8.2, compile-check-alinux2]
+ tag: [compilation-check-ubuntu18.04, compilation-check-centos8.2, compilation-check-alinux2]
+ defaults:
+ run:
+ shell: bash
+ working-directory: ${{ github.workspace }}
steps:
- uses: actions/checkout@v1
- - name: Get cpu number
- run: echo "CPU_NUM=$(nproc --all)" >> $GITHUB_ENV
+ - name: Preparations
+ # Touch all .pb.go to prevent from calling protobuf compiler
+ run:
+ echo "CPU_NUM=$(nproc --all)" >> $GITHUB_ENV;
+ find ./ -name *.pb.go -exec touch {} \;;
- name: Compile "enclave-tls"
- shell: bash
- run: cd $GITHUB_WORKSPACE/enclave-tls;
- source /root/.bashrc && make && make clean && make SGX=1 && make clean && make OCCLUM=1;
+ run:
+ cd enclave-tls;
+ source /root/.bashrc && make && make clean && make SGX=1 && make clean && make OCCLUM=1
- name: Compile "rune shim-rune sgx-tools epm pal"
- run: cd $GITHUB_WORKSPACE;
- find ./ -name *.pb.go | xargs -I files touch files;
+ run:
make -j${CPU_NUM} && make install -j${CPU_NUM};
cd rune/libenclave/internal/runtime/pal/skeleton && make -j${CPU_NUM} && ls liberpal-skeleton-v*.so;
cd ../nitro_enclaves && make -j${CPU_NUM} && ls libpal_ne.so;
|
Feat:ADD function(dam_byte_pool_init) for boatplatform.c | #include "qapi_fibocom.h"
+
+#define TEST_BYTE_POOL_SIZE 30720*8
+
+uint32 free_memory_test[TEST_BYTE_POOL_SIZE/4];
+
TX_BYTE_POOL *byte_pool_test;
@@ -81,6 +86,32 @@ BOAT_RESULT BoatHash(const BoatHashAlgType type, const BUINT8 *input, BUINT32 i
}
+qapi_Status_t dam_byte_pool_init(void)
+{
+ int ret;
+
+ do
+ {
+ /* Allocate byte_pool_dam (memory heap) */
+ ret = txm_module_object_allocate(&byte_pool_test, sizeof(TX_BYTE_POOL));
+ if(ret != TX_SUCCESS)
+ {
+ LOG_ERROR("DAM_APP:Allocate byte_pool_dam fail \n");
+ break;
+ }
+
+ /* Create byte_pool_dam */
+ ret = tx_byte_pool_create(byte_pool_test, "Test application pool", free_memory_test, TEST_BYTE_POOL_SIZE);
+ if(ret != TX_SUCCESS)
+ {
+ LOG_ERROR("DAM_APP:Create byte_pool_dam fail \n");
+ break;
+ }
+
+ }while(0);
+
+ return ret;
+}
void *data_malloc(uint32_t size)
|
Add execinfo to the linked libraries, if it's present | @@ -58,6 +58,11 @@ __sync_add_and_fetch(&a, 1);
return 0;
}" ARCH_SUPPORTS_64BIT_ATOMICS)
+FIND_LIBRARY(LIBC_BACKTRACE_LIB "execinfo")
+IF (LIBC_BACKTRACE_LIB)
+ SET(CMAKE_REQUIRED_LIBRARIES ${LIBC_BACKTRACE_LIB})
+ LIST(APPEND EXTRA_LIBS ${LIBC_BACKTRACE_LIB})
+ENDIF()
CHECK_C_SOURCE_COMPILES("
#include <execinfo.h>
int main(void) {
|
extmod/modiodevices: add power supply setter
Some PUP sensors require power for the lights. This adds the MicroPython method to access this functionality. | @@ -102,10 +102,24 @@ STATIC mp_obj_t iodevices_LUMPDevice_write(size_t n_args, const mp_obj_t *pos_ar
}
MP_DEFINE_CONST_FUN_OBJ_KW(iodevices_LUMPDevice_write_obj, 0, iodevices_LUMPDevice_write);
+// pybricks.iodevices.LUMPDevice.power
+STATIC mp_obj_t iodevices_LUMPDevice_power(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
+ PB_PARSE_ARGS_METHOD(n_args, pos_args, kw_args,
+ iodevices_LUMPDevice_obj_t, self,
+ PB_ARG_REQUIRED(on)
+ );
+
+ pbdevice_set_power_supply(self->pbdev, mp_obj_is_true(on));
+
+ return mp_const_none;
+}
+MP_DEFINE_CONST_FUN_OBJ_KW(iodevices_LUMPDevice_power_obj, 0, iodevices_LUMPDevice_power);
+
// dir(pybricks.iodevices.LUMPDevice)
STATIC const mp_rom_map_elem_t iodevices_LUMPDevice_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&iodevices_LUMPDevice_read_obj) },
{ MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&iodevices_LUMPDevice_write_obj)},
+ { MP_ROM_QSTR(MP_QSTR_power), MP_ROM_PTR(&iodevices_LUMPDevice_power_obj)},
};
STATIC MP_DEFINE_CONST_DICT(iodevices_LUMPDevice_locals_dict, iodevices_LUMPDevice_locals_dict_table);
|
OcBootManagementLib: Fix predefined Apple Boot variable idices | @@ -632,7 +632,7 @@ InternalGetBootOptionData (
STATIC
VOID
InternalDebugBootEnvironment (
- IN UINT16 *BootOrder,
+ IN CONST UINT16 *BootOrder,
IN UINTN BootOrderSize
)
{
@@ -648,8 +648,8 @@ InternalDebugBootEnvironment (
L"efi-apple-recovery-data"
};
- STATIC UINT16 ApplePredefinedVariables[] = {
- 80, 81, 82
+ STATIC CONST UINT16 ApplePredefinedVariables[] = {
+ 0x80, 0x81, 0x82
};
for (Index = 0; Index < ARRAY_SIZE (AppleDebugVariables); ++Index) {
|
CMSIS-DSP: Improved Helium implementation of fir q7. | while (blkCnt > 0); \
}
+
+static void arm_fir_q7_49_64_mve(const arm_fir_instance_q7 * S,
+ const q7_t * __restrict pSrc,
+ q7_t * __restrict pDst, uint32_t blockSize)
+{
+ #define NBTAPS 64
+ FIR_Q7_MAIN_CORE();
+ #undef NBTAPS
+}
+
+
+void arm_fir_q7_33_48_mve(const arm_fir_instance_q7 * S,
+ const q7_t * __restrict pSrc,
+ q7_t * __restrict pDst, uint32_t blockSize)
+{
+ #define NBTAPS 48
+ FIR_Q7_MAIN_CORE();
+ #undef NBTAPS
+}
+
static void arm_fir_q7_17_32_mve(const arm_fir_instance_q7 * S,
const q7_t * __restrict pSrc,
q7_t * __restrict pDst, uint32_t blockSize)
@@ -196,6 +216,22 @@ void arm_fir_q7(
arm_fir_q7_17_32_mve(S, pSrc, pDst, blockSize);
return;
}
+ else if (numTaps <= 48)
+ {
+ /*
+ * [33 to 48 taps] specialized routine
+ */
+ arm_fir_q7_33_48_mve(S, pSrc, pDst, blockSize);
+ return;
+ }
+ else if (numTaps <= 64)
+ {
+ /*
+ * [49 to 64 taps] specialized routine
+ */
+ arm_fir_q7_49_64_mve(S, pSrc, pDst, blockSize);
+ return;
+ }
/*
* pState points to state array which contains previous frame (numTaps - 1) samples
|
Tests: retrying directory remove if resource is busy. | @@ -328,7 +328,14 @@ def run(request):
):
os.remove(path)
else:
+ for attempt in range(10):
+ try:
shutil.rmtree(path)
+ break
+ except OSError as err:
+ if err.errno != 16:
+ raise
+ time.sleep(1)
# check descriptors
|
Hotkeys are now stable | @@ -57,7 +57,8 @@ ScriptContext::ScriptContext(LuaSandbox& aLuaSandbox, const std::filesystem::pat
m_logger->error("Tried to register an unknown event '{}'!", acName);
};
- env["registerHotkey"] = [this, &env](const std::string& acID, const std::string& acDescription, sol::function aCallback)
+ env["registerHotkey"] = [this, &sb = m_sandbox, id = m_sandboxID](const std::string& acID, const std::string& acDescription,
+ sol::function aCallback)
{
if (acID.empty() ||
(std::find_if(acID.cbegin(), acID.cend(), [](char c){ return !(isalpha(c) || isdigit(c) || c == '_'); }) != acID.cend()))
@@ -74,8 +75,9 @@ ScriptContext::ScriptContext(LuaSandbox& aLuaSandbox, const std::filesystem::pat
auto loggerRef = m_logger;
std::string vkBindID = m_name + '.' + acID;
- VKBind vkBind = { vkBindID, acDescription, [loggerRef, aCallback, &env]()
+ VKBind vkBind = {vkBindID, acDescription, [loggerRef, aCallback, &sb, id]()
{
+ auto& env = sb[id].GetEnvironment();
TryLuaFunction(loggerRef, env, aCallback);
}};
|
Fix the background color on the template chooser | @@ -81,6 +81,12 @@ class TemplateChooserTableViewController: UITableViewController, UIDocumentPicke
// MARK: - Table view controller
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ tableView.backgroundColor = .systemGroupedBackground
+ }
+
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
|
most of sponsor heartbeat compiles | :: message on a "forward flow" from a peer, originally passed from
:: one of the peer's vanes to the peer's Ames.
::
+:: Ames passes a %memo to itself to trigger a heartbeat message to
+:: our sponsor.
+::
+$ note
- $% $: %b
+ $% $: %a
+ $% [%memo sponsor=ship message=_[/a/ping ~]]
+ == ==
+ $: %b
$% [%wait date=@da]
[%rest date=@da]
== ==
:: message to the remote vane from which the forward flow message
:: originated.
::
+:: Ames gives a %done sign to itself when our sponsor acks a
+:: heartbeat message we sent it. This triggers a timer, which then
+:: triggers the next heartbeat message to be sent.
+::
+$ sign
- $% $: %b
+ $% $: %a
+ $% [%done error=(unit error)]
+ == ==
+ $: %b
$% [%wake error=(unit tang)]
== ==
$: %c
== == ==
:: $message-pump-task: job for |message-pump
::
+:: TODO: rename %send to %memo
+::
:: %send: packetize and send application-level message
:: %hear: handle receipt of ack on fragment or message
:: %wake: handle timer firing
?- sign
[%b %wake *] (on-take-wake:event-core wire error.sign)
::
+ [%a %done *] (on-take-done:event-core wire error.sign)
[%c %done *] (on-take-done:event-core wire error.sign)
[%g %done *] (on-take-done:event-core wire error.sign)
[%j %done *] (on-take-done:event-core wire error.sign)
|= [=wire error=(unit error)]
^+ event-core
::
+ ?: =(/ping wire)
+ set-sponsor-heartbeat-timer
+ ::
=+ ^- [her=ship =bone] (parse-bone-wire wire)
::
=/ =peer-state (got-peer-state her)
|= [=wire error=(unit tang)]
^+ event-core
::
- ?: =(/a/ping wire)
+ ?: =(/ping wire)
ping-sponsor
::
=+ ^- [her=ship =bone] (parse-pump-timer-wire wire)
?: already-pending
event-core
(emit duct %pass /alien %j %pubs ship)
+ :: +set-sponsor-heartbeat-timer: trigger sponsor ping after timeout
+ ::
+ ++ set-sponsor-heartbeat-timer
+ ^+ event-core
+ ::
+ (emit duct %pass /ping %b %wait `@da`(add now ~m1))
:: +ping-sponsor: message our sponsor so they know our lane
::
- ++ ping-sponsor (on-memo sponsor.ames-state /a/ping ~)
+ ++ ping-sponsor
+ ^+ event-core
+ ::
+ (emit duct %pass /ping %a %memo sponsor.ames-state /a/ping ~)
:: +send-blob: fire packet at .ship and maybe sponsors
::
:: Send to .ship and sponsors until we find a direct lane.
::
?: =(1 (end 0 1 bone))
=/ =wire (make-bone-wire her.channel bone)
+ :: /a/ping means sponsor ping timer; no-op
+ ::
+ ?: =(`path`/a/ping path.message)
+ peer-core
::
=^ client-duct ossuary.peer-state
(get-duct ossuary.peer-state bone duct)
::
?- i.path.message
- %a ~| %pass-to-ames^her.channel !!
+ %a ~| %bad-ames-message^path.message^her.channel !!
%c (emit client-duct %pass wire %c %memo her.channel message)
%g (emit client-duct %pass wire %g %memo her.channel message)
%j (emit client-duct %pass wire %j %memo her.channel message)
|
libc/stdio/vsnprintf.c: add explicit fallthrough
silences recent GCC warning | @@ -164,6 +164,7 @@ print_format(char **buffer, size_t bufsize, const char *format, void *var)
break;
case 'X':
upper = true;
+ /* fallthrough */
case 'x':
sizec[i] = '\0';
value = (unsigned long) var & convert[length_mod];
|
Legrand test | @@ -1659,6 +1659,13 @@ void DeRestPluginPrivate::addLightNode(const deCONZ::Node *node)
lightNode.setHaEndpoint(*i);
}
+ //Test for Legrand din module
+ if ((node->nodeDescriptor().manufacturerCode() == VENDOR_LEGRAND) && (false) )
+ {
+ lightNode.setHaEndpoint(*i);
+ }
+
+
if (!i->inClusters().isEmpty())
{
|
[mod_magnet] lighty.c.hrtime high-resolution time | @@ -693,6 +693,16 @@ static int magnet_time(lua_State *L) {
}
+static int magnet_hrtime(lua_State *L) {
+ unix_timespec64_t ts;
+ if (0 != log_clock_gettime_realtime(&ts))
+ return 0;
+ lua_pushinteger(L, (lua_Integer)ts.tv_sec);
+ lua_pushinteger(L, (lua_Integer)ts.tv_nsec);
+ return 2;
+}
+
+
static int magnet_rand(lua_State *L) {
lua_pushinteger(L, (lua_Integer)li_rand_pseudo());
return 1;
@@ -2809,6 +2819,7 @@ magnet_init_lighty_table (lua_State * const L, request_st **rr)
static const luaL_Reg cmethods[] = {
{ "stat", magnet_stat }
,{ "time", magnet_time }
+ ,{ "hrtime", magnet_hrtime }
,{ "rand", magnet_rand }
,{ "md", magnet_md_once } /* message digest */
,{ "hmac", magnet_hmac_once } /* HMAC */
|
diff MAINTENANCE non-null strdup arg
False-positive warning by Debian. | @@ -459,6 +459,7 @@ lyd_diff_attrs(const struct lyd_node *first, const struct lyd_node *second, uint
const char **orig_default, char **orig_value)
{
const struct lysc_node *schema;
+ const char *str_val;
assert(first || second);
@@ -526,7 +527,8 @@ lyd_diff_attrs(const struct lyd_node *first, const struct lyd_node *second, uint
/* orig-value */
if ((schema->nodetype & (LYS_LEAF | LYS_ANYDATA)) && (*op == LYD_DIFF_OP_REPLACE)) {
if (schema->nodetype == LYS_LEAF) {
- *orig_value = strdup(lyd_get_value(first));
+ str_val = lyd_get_value(first);
+ *orig_value = strdup(str_val ? str_val : "");
LY_CHECK_ERR_RET(!*orig_value, LOGMEM(schema->module->ctx), LY_EMEM);
} else {
LY_CHECK_RET(lyd_any_value_str(first, orig_value));
|
npu2/tce: Fix page size checking
The page size is encoded in the TVT data [59:63] as but
the tce_kill handler does not do the math right; this fixes it.
Acked-By: Alistair Popple | @@ -1256,7 +1256,9 @@ static int64_t npu2_tce_kill(struct phb *phb, uint32_t kill_type,
sync();
switch(kill_type) {
case OPAL_PCI_TCE_KILL_PAGES:
- tce_page_size = GETFIELD(npu->tve_cache[pe_number], NPU2_ATS_IODA_TBL_TVT_PSIZE);
+ tce_page_size = 1ULL << (
+ 11 + GETFIELD(npu->tve_cache[pe_number],
+ NPU2_ATS_IODA_TBL_TVT_PSIZE));
if (tce_page_size != tce_size) {
NPU2ERR(npu, "npu2_tce_kill: Unexpected TCE size (got 0x%x expected 0x%x)\n",
tce_size, tce_page_size);
|
Fix incorrect argument check.
Could result in underflow if a negative value is specified. | @@ -1931,7 +1931,7 @@ int main(int argc, char** argv) {
} break;
case Argopt_seed: {
init_seed = atol(optarg);
- if (init_bpm < 1) {
+ if (init_seed < 1) {
fprintf(stderr,
"Bad seed argument %s.\n"
"Must be positive integer.\n",
|
remove spurious new variable
i added this while exploring possible solutions and didn't mean to
commit it | @@ -104,7 +104,6 @@ struct gmskframesync_s {
float dphi_hat; // carrier frequency offset estimate
float gamma_hat; // channel gain estimate
windowcf buffer; // pre-demod buffered samples, size: k*(pn_len+m)
- int buffer_index; // pre-demod buffer read index
nco_crcf nco_coarse; // coarse carrier frequency recovery
// preamble
|
dbus plugin: solution for | @@ -132,6 +132,7 @@ static DBusConnection * getDbusConnection (DBusBusType type)
printf ("connect: Failed to open connection to %s message bus: %s\n", (type == DBUS_BUS_SYSTEM) ? "system" : "session",
error.message);
dbus_error_free (&error);
+ dbus_shutdown ();
return NULL;
}
dbus_error_free (&error);
|
[update] openamp. | #ifdef BSP_USING_OPENAMP
+#include <finsh.h>
#include <drv_openamp.h>
#include <openamp.h>
#include <virt_uart.h>
@@ -235,7 +236,10 @@ int rt_hw_openamp_init(void)
rt_hw_openamp_register(&dev_openamp, "openamp", 0, NULL);
- rt_console_set_device("openamp");
+ if (RT_CONSOLE_DEVICE_NAME == "openamp")
+ {
+ rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
+ }
return RT_EOK;
}
@@ -289,4 +293,36 @@ static int creat_openamp_thread(void)
}
INIT_APP_EXPORT(creat_openamp_thread);
+#ifdef FINSH_USING_MSH
+
+static int console(int argc, char **argv)
+{
+ rt_err_t result = RT_EOK;
+
+ if (argc > 1)
+ {
+ if (!strcmp(argv[1], "set"))
+ {
+ rt_kprintf("console change to %s\n", argv[2]);
+ rt_console_set_device(argv[2]);
+ finsh_set_device(argv[2]);
+ }
+ else
+ {
+ rt_kprintf("Unknown command. Please enter 'console' for help\n");
+ result = -RT_ERROR;
+ }
+ }
+ else
+ {
+ rt_kprintf("Usage: \n");
+ rt_kprintf("console set <name> - change console by name\n");
+ result = -RT_ERROR;
+ }
+ return result;
+}
+MSH_CMD_EXPORT(console, set console name);
+
+#endif /* FINSH_USING_MSH */
+
#endif
|
[mod_mbedtls] newer mbedTLS vers support TLSv1.3 | @@ -3580,11 +3580,20 @@ static void
mod_mbedtls_ssl_conf_proto (server *srv, plugin_config_socket *s, const buffer *b, int max)
{
int v = MBEDTLS_SSL_MINOR_VERSION_3; /* default: TLS v1.2 */
- if (NULL == b) /* default: min TLSv1.2, max TLSv1.2 */
+ if (NULL == b) /* default: min TLSv1.2, max TLSv1.3 */
+ #ifdef MBEDTLS_SSL_MINOR_VERSION_4
+ v = max ? MBEDTLS_SSL_MINOR_VERSION_4 : MBEDTLS_SSL_MINOR_VERSION_3;
+ #else
v = max ? MBEDTLS_SSL_MINOR_VERSION_3 : MBEDTLS_SSL_MINOR_VERSION_3;
+ #endif
else if (buffer_eq_icase_slen(b, CONST_STR_LEN("None"))) /*"disable" limit*/
v = max
- ? MBEDTLS_SSL_MINOR_VERSION_3 /* TLS v1.2 */
+ ?
+ #ifdef MBEDTLS_SSL_MINOR_VERSION_4
+ MBEDTLS_SSL_MINOR_VERSION_4 /* TLS v1.3 */
+ #else
+ MBEDTLS_SSL_MINOR_VERSION_3 /* TLS v1.2 */
+ #endif
: s->ssl_use_sslv3
? MBEDTLS_SSL_MINOR_VERSION_0 /* SSL v3.0 */
: MBEDTLS_SSL_MINOR_VERSION_1; /* TLS v1.0 */
@@ -3596,6 +3605,10 @@ mod_mbedtls_ssl_conf_proto (server *srv, plugin_config_socket *s, const buffer *
v = MBEDTLS_SSL_MINOR_VERSION_2; /* TLS v1.1 */
else if (buffer_eq_icase_slen(b, CONST_STR_LEN("TLSv1.2")))
v = MBEDTLS_SSL_MINOR_VERSION_3; /* TLS v1.2 */
+ #ifdef MBEDTLS_SSL_MINOR_VERSION_4
+ else if (buffer_eq_icase_slen(b, CONST_STR_LEN("TLSv1.3")))
+ v = MBEDTLS_SSL_MINOR_VERSION_4; /* TLS v1.3 */
+ #endif
else {
if (buffer_eq_icase_slen(b, CONST_STR_LEN("TLSv1.3")))
log_error(srv->errh, __FILE__, __LINE__,
|
Definitions: Fix code table title | -# CODE TABLE 10, Coefficient Storage Mode
+# CODE TABLE 10, Spectral data representation mode
1 1 The complex coefficients Xnm are stored for m>0 as pairs of real numbers
2 2 Spherical harmonics-complex packing
3 3 Spherical harmonics ieee packing
|
travis: Build esp32 firmware as part of Travis CI.
Toolchain installation and build takes about 3 minutes. | @@ -121,6 +121,23 @@ jobs:
- make ${MAKEOPTS} -C mpy-cross
- make ${MAKEOPTS} -C ports/windows CROSS_COMPILE=i686-w64-mingw32-
+ # esp32 port
+ - stage: test
+ env: NAME="esp32 port build"
+ install:
+ - sudo apt-get install python3-pip
+ - sudo pip3 install pyparsing
+ - wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz
+ - zcat xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz | tar x
+ - export PATH=$(pwd)/xtensa-esp32-elf/bin:$PATH
+ - git clone https://github.com/espressif/esp-idf.git
+ - git -C esp-idf checkout $(grep "ESPIDF_SUPHASH :=" ports/esp32/Makefile | cut -d " " -f 3)
+ - git -C esp-idf submodule update --init components/json/cJSON components/esp32/lib components/esptool_py/esptool components/expat/expat components/lwip/lwip components/mbedtls/mbedtls components/micro-ecc/micro-ecc components/nghttp/nghttp2
+ script:
+ - git submodule update --init lib/berkeley-db-1.xx
+ - make ${MAKEOPTS} -C mpy-cross
+ - make ${MAKEOPTS} -C ports/esp32 ESPIDF=$(pwd)/esp-idf
+
# esp8266 port
- stage: test
env: NAME="esp8266 port build"
|
Disable warning C4324: structure padding | @@ -20,6 +20,10 @@ cmake_minimum_required(VERSION 3.15)
cmake_policy(SET CMP0069 NEW) # LTO support
cmake_policy(SET CMP0091 NEW) # MSVC runtime support
+if(MSVC)
+ add_compile_options("/wd4324") # Disable structure was padded due to alignment specifier
+endif()
+
project(astcencoder VERSION 3.0.0)
set(CMAKE_CXX_STANDARD 14)
|
Fix TBX_GENERIC/TBX_SAM/TBX_VCF/TBX_UCSC data types
These are bitmasks used with tbx_conf_t::preset, which is an int32_t.
In particular, TBX_UCSC's value does not fit in an int8_t. | @@ -1353,10 +1353,10 @@ cdef extern from "htslib/tbx.h" nogil:
# tbx.h definitions
int8_t TBX_MAX_SHIFT
- int8_t TBX_GENERIC
- int8_t TBX_SAM
- int8_t TBX_VCF
- int8_t TBX_UCSC
+ int32_t TBX_GENERIC
+ int32_t TBX_SAM
+ int32_t TBX_VCF
+ int32_t TBX_UCSC
ctypedef struct tbx_conf_t:
int32_t preset
|
LocalReducer: fix empty case of localStorage rehydration | @@ -8,7 +8,7 @@ type LocalState = Pick<StoreState, 'sidebarShown' | 'omniboxShown' | 'baseHash'
export default class LocalReducer<S extends LocalState> {
rehydrate(state: S) {
try {
- const json = JSON.parse(localStorage.getItem('localReducer') || '');
+ const json = JSON.parse(localStorage.getItem('localReducer') || '{}');
_.forIn(json, (value, key) => {
state[key] = value;
});
|
NAT44: prohibit multiple static mappings for a single local address | @@ -785,6 +785,17 @@ int snat_add_static_mapping(ip4_address_t l_addr, ip4_address_t e_addr,
vrf_id = sm->inside_vrf_id;
}
+ if (!out2in_only)
+ {
+ m_key.addr = l_addr;
+ m_key.port = addr_only ? 0 : l_port;
+ m_key.protocol = addr_only ? 0 : proto;
+ m_key.fib_index = fib_index;
+ kv.key = m_key.as_u64;
+ if (!clib_bihash_search_8_8 (&sm->static_mapping_by_local, &kv, &value))
+ return VNET_API_ERROR_VALUE_EXIST;
+ }
+
/* Find external address in allocated addresses and reserve port for
address and port pair mapping when dynamic translations enabled */
if (!(addr_only || sm->static_mapping_only || out2in_only))
|
session server BUGFIX release context only after session free | @@ -3464,7 +3464,7 @@ nc_server_ch_client_thread_session_cond_wait(struct nc_session *session, struct
/* CH UNLOCK */
pthread_mutex_unlock(&session->opts.server.ch_lock);
- /* session terminated, release its context */
+ /* session terminated, free it and release its context */
nc_session_free(session, NULL);
data->release_ctx_cb(data->ctx_cb_data);
return ret;
@@ -3522,9 +3522,6 @@ nc_server_ch_client_thread_session_cond_wait(struct nc_session *session, struct
/* CH UNLOCK */
pthread_mutex_unlock(&session->opts.server.ch_lock);
- /* session terminated, release its context */
- data->release_ctx_cb(data->ctx_cb_data);
-
return ret;
}
|
Refactor: move element event handlers together | @@ -1192,6 +1192,14 @@ END_TEST
* Element event tests.
*/
+static void XMLCALL
+start_element_event_handler(void *userData,
+ const XML_Char *name,
+ const XML_Char **UNUSED_P(atts))
+{
+ CharData_AppendXMLChars((CharData *)userData, name, -1);
+}
+
static void XMLCALL
end_element_event_handler(void *userData, const XML_Char *name)
{
@@ -6937,14 +6945,6 @@ START_TEST(test_ns_utf16_leafname)
}
END_TEST
-static void XMLCALL
-start_element_event_handler(void *userData,
- const XML_Char *name,
- const XML_Char **UNUSED_P(atts))
-{
- CharData_AppendXMLChars((CharData *)userData, name, -1);
-}
-
START_TEST(test_ns_utf16_element_leafname)
{
const char text[] =
|
[core] explicitly return 0 instead of constant result | @@ -408,7 +408,7 @@ static int request_uri_is_valid_char(unsigned char c) {
return 1;
}
-static int http_request_missing_CR_before_LF(server *srv, connection *con) {
+static void http_request_missing_CR_before_LF(server *srv, connection *con) {
if (srv->srvconf.log_request_header_on_error) {
log_error_write(srv, __FILE__, __LINE__, "s", "missing CR before LF in header -> 400");
log_error_write(srv, __FILE__, __LINE__, "Sb", "request-header:\n", con->request.request);
@@ -417,7 +417,6 @@ static int http_request_missing_CR_before_LF(server *srv, connection *con) {
con->http_status = 400;
con->keep_alive = 0;
con->response.keep_alive = 0;
- return 0;
}
enum keep_alive_set {
@@ -622,7 +621,10 @@ int http_request_parse(server *srv, connection *con) {
} else if (con->request_count > 0 &&
con->request.request->ptr[1] == '\n') {
/* we are in keep-alive and might get \n after a previous POST request.*/
- if (http_header_strict) return http_request_missing_CR_before_LF(srv, con);
+ if (http_header_strict) {
+ http_request_missing_CR_before_LF(srv, con);
+ return 0;
+ }
#ifdef __COVERITY__
if (buffer_string_length(con->request.request) < 1) {
con->keep_alive = 0;
@@ -662,7 +664,8 @@ int http_request_parse(server *srv, connection *con) {
con->parse_request->ptr[i] = '\0';
++i;
} else if (http_header_strict) { /* '\n' */
- return http_request_missing_CR_before_LF(srv, con);
+ http_request_missing_CR_before_LF(srv, con);
+ return 0;
}
con->parse_request->ptr[i] = '\0';
@@ -1036,7 +1039,8 @@ int http_request_parse(server *srv, connection *con) {
break;
case '\n':
if (http_header_strict) {
- return http_request_missing_CR_before_LF(srv, con);
+ http_request_missing_CR_before_LF(srv, con);
+ return 0;
} else if (i == first) {
con->parse_request->ptr[i] = '\0';
done = 1;
@@ -1070,7 +1074,10 @@ int http_request_parse(server *srv, connection *con) {
if (*cur == '\n' || con->parse_request->ptr[i+1] == '\n') {
data_string *ds = NULL;
if (*cur == '\n') {
- if (http_header_strict) return http_request_missing_CR_before_LF(srv, con);
+ if (http_header_strict) {
+ http_request_missing_CR_before_LF(srv, con);
+ return 0;
+ }
} else { /* (con->parse_request->ptr[i+1] == '\n') */
con->parse_request->ptr[i] = '\0';
++i;
|
FireRedz AR fix
idk | +
# Circle
from PIL import Image
+import numpy as np
+
from osr2mp4 import logger
from osr2mp4.EEnum.EImageFrom import ImageFrom
from osr2mp4.ImageProcess import imageproc
@@ -27,13 +30,13 @@ def prepare_approach(scale, time_preempt, settings):
img = YImage(approachcircle, settings).img
approach_frames = []
interval = settings.timeframe / settings.fps
+ time_preempt = time_preempt
s = 3.5
- time_left = time_preempt
- while time_left >= 0:
+
+ for time_left in np.arange(time_preempt, 0, -interval):
s -= 2.5 * interval / time_preempt
p = imageproc.change_size(img, s * scale, s * scale)
approach_frames.append(p)
- time_left -= interval
return approach_frames
@@ -173,8 +176,9 @@ def prepare_circle(diff, scale, settings, hd):
fade_out = time_preempt * 0.3
fade_out_interval = 100 * interval/fade_out
- time_left = time_preempt
- while time_left >= 0:
+ time_preempt = time_preempt
+ #interval = 1 if not interval else interval
+ for i in np.arange(time_preempt, 0, -interval):
if alpha != 0:
circle_frames[-1].append(newalpha(orig_circle, alpha/100))
slidercircle_frames[-1].append(newalpha(orig_slider, alpha/100))
@@ -188,8 +192,6 @@ def prepare_circle(diff, scale, settings, hd):
alphas.append(alpha)
alpha = max(0, min(100, alpha + ii))
- time_left -= interval
-
logger.debug("done")
return slidercircle_frames, circle_frames, fadeout, alphas
|
allow `tls://` in `connect`/`listen` service
(raw with encryption) | @@ -832,10 +832,22 @@ FIO_FUNC iodine_connection_args_s iodine_connect_args(VALUE s, uint8_t is_srv) {
r.service = IODINE_SERVICE_RAW;
if (service_str.data) {
switch (service_str.data[0]) {
+ case 't': /* overflow */
+ /* tcp or tls */
+ if (service_str.data[1] == 'l') {
+ char *local = NULL;
+ char buf[1024];
+ buf[1023] = 0;
+ if (is_srv) {
+ local = buf;
+ if (fio_local_addr(buf, 1023) >= 1022)
+ local = NULL;
+ }
+ r.tls = fio_tls_new(local, NULL, NULL, NULL);
+ }
+ /* overflow */
case 'u': /* overflow */
/* unix */
- case 't': /* overflow */
- /* tcp */
case 'r':
/* raw */
r.service = IODINE_SERVICE_RAW;
@@ -898,7 +910,7 @@ Supported Settigs:
| `:ping` | (`:raw` clients and WebSockets only) ping interval (in seconds). Up to 255 seconds. |
| `:port` | port number to listen to either a String or Number) |
| `:public` | (HTTP server only) public folder for static file service. |
-| `:service` | (`:raw` / `:ws` / `:wss` / `:http` / `:https` ) a supported service this socket will listen to. |
+| `:service` | (`:raw` / `:tls` / `:ws` / `:wss` / `:http` / `:https` ) a supported service this socket will listen to. |
| `:timeout` | (HTTP only) keep-alive timeout in seconds. Up to 255 seconds. |
| `:tls` | an {Iodine::TLS} context object for encrypted connections. |
@@ -1040,7 +1052,7 @@ Supported Settigs:
| `:ping` | ping interval (in seconds). Up to 255 seconds. |
| `:port` | port number to listen to either a String or Number) |
| `:public` | (public folder, HTTP server only) |
-| `:service` | (raw / ws / wss ) |
+| `:service` | (`:raw` / `:tls` / `:ws` / `:wss` ) |
| `:timeout` | (HTTP only) keep-alive timeout in seconds. Up to 255 seconds. |
| `:tls` | an {Iodine::TLS} context object for encrypted connections. |
|
Add new SLOTSRANGE to subcommands table | @@ -555,6 +555,9 @@ struct redisCommand clusterSubcommands[] = {
{"addslots",clusterCommand,-3,
"admin ok-stale random"},
+ {"addslotsrange",clusterCommand,-4,
+ "admin ok-stale random"},
+
{"bumpepoch",clusterCommand,2,
"admin ok-stale random"},
@@ -567,6 +570,9 @@ struct redisCommand clusterSubcommands[] = {
{"delslots",clusterCommand,-3,
"admin ok-stale random"},
+ {"delslotsrange",clusterCommand,-4,
+ "admin ok-stale random"},
+
{"failover",clusterCommand,-2,
"admin ok-stale random"},
|
VERSION bump to version 1.1.16 | @@ -43,7 +43,7 @@ set(CMAKE_C_FLAGS_PACKAGE "-g -O2 -DNDEBUG")
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(LIBNETCONF2_MAJOR_VERSION 1)
set(LIBNETCONF2_MINOR_VERSION 1)
-set(LIBNETCONF2_MICRO_VERSION 15)
+set(LIBNETCONF2_MICRO_VERSION 16)
set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION})
# Version of the library
|
delete hal method rp2040 | @@ -49,27 +49,4 @@ void hal_init(void){
clocks_hw->sleep_en1 = CLOCKS_SLEEP_EN1_CLK_SYS_TIMER_BITS | CLOCKS_SLEEP_EN1_CLK_SYS_USBCTRL_BITS | CLOCKS_SLEEP_EN1_CLK_USB_USBCTRL_BITS;
}
-//================================================================
-/*!@brief
- Write
-
- @param fd dummy, but 1.
- @param buf pointer of buffer.
- @param nbytes output byte length.
-*/
-int hal_write(int fd, const void *buf, int nbytes){
- printf(buf);
- return nbytes;
-}
-
-//================================================================
-/*!@brief
- Flush write baffer
-
- @param fd dummy, but 1.
-*/
-int hal_flush(int fd) {
- return 0;
-}
-
#endif /* ifndef MRBC_NO_TIMER */
|
Bump xcode version to 10.1 to make sure it handles AVX512 | @@ -149,7 +149,7 @@ matrix:
- &test-macos
os: osx
- osx_image: xcode8.3
+ osx_image: xcode10.1
before_script:
- COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32"
- brew update
|
stats: strings in string vector are c strings
Type: fix | @@ -341,6 +341,7 @@ vlib_stats_set_string_vector (vlib_stats_string_vector_t *svp,
va_start (va, fmt);
s = va_format (s, fmt, &va);
va_end (va);
+ vec_add1 (s, 0);
e->string_vector[vector_index] = s;
|
doc/compiling.md: fix package name "devscripts"
the command 'debuild' is (and always was) part of the devscripts package | @@ -83,7 +83,7 @@ Options (do one of these before you plug it in)
### Build Debian Package
-To build the debian package you need the following extra packages: `debuild debhelper`.
+To build the debian package you need the following extra packages: `devscripts debhelper`.
```
$ git archive --prefix=$(git describe)/ HEAD | bzip2 --stdout > ../libstlink_$(sed -En -e "s/.*\((.*)\).*/\1/" -e "1,1 p" debian/changelog).orig.tar.bz2
|
Fix review issues
Use git options to remove last commit from list to verify.
Check each line of a commit for a "Signed-off-by" line.
Exit with error in the event of no commits in PR! | MAIN_BRANCH=master
# ignores last commit because travis/gh creates a merge commit
-commits=$(git log --format=%h ${MAIN_BRANCH}..HEAD | tail -n +2)
+commits=$(git log --format=%h ${MAIN_BRANCH}..HEAD~1)
+has_commits=false
for sha in $commits; do
- actual=$(git show -s --format=%B ${sha} | sed '/^$/d' | tail -n 1)
expected="Signed-off-by: $(git show -s --format="%an <%ae>" ${sha})"
+ lines="$(git show -s --format=%B ${sha})"
+ found_sob=false
+ IFS=$'\n'
+ for line in ${lines}; do
+ stripped=$(echo $line | sed -e 's/^\s*//' | sed -e 's/\s*$//')
+ if [[ $stripped == ${expected} ]]; then
+ found_sob=true
+ break
+ fi
+ done
- if [ "${actual}" != "${expected}" ]; then
- echo -e "${sha} is missing or using an invalid \"Signed-off-by:\" line"
+ if [[ ${found_sob} = false ]]; then
+ echo -e "No \"${expected}\" found in commit ${sha}"
exit 1
fi
+
+ has_commits=true
done
+
+if [[ ${has_commits} = false ]]; then
+ echo "No commits found in this PR!"
+ exit 1
+fi
|
codegen: change tests for error debugging | @@ -39,7 +39,7 @@ do_tests() {
succeed_if "application didn't read empty menu correctly"
EXPECTED_MENU=$(mktemp)
- cat <<- 'EOF' | tr -d '\n' > "$EXPECTED_MENU"
+ cat <<- 'EOF'
Main Menu:
[1] Menu 1
@@ -73,9 +73,10 @@ do_tests() {
ACTUAL_MENU=$(mktemp)
- : | ./application | tr -d '\n' > "$ACTUAL_MENU"
+ : | ./application
succeed_if "application could not read test menu"
+ : | ./application > "$ACTUAL_MENU"
diff -u "$EXPECTED_MENU" "$ACTUAL_MENU"
succeed_if "application did not read test menu correctly"
|
Fix comment typos in command/expire unit test. | @@ -2325,7 +2325,7 @@ testRun(void)
HRN_STORAGE_PUT_EMPTY(storageRepoWrite(), STORAGE_REPO_BACKUP "/20181119-152900F/" BACKUP_MANIFEST_FILE);
HRN_STORAGE_PUT_EMPTY(storageRepoWrite(), STORAGE_REPO_BACKUP "/20181119-152900F_20181119-152600D/" BACKUP_MANIFEST_FILE);
- // Genreate archive for backups in backup.info
+ // Generate archive for backups in backup.info
archiveGenerate(storageRepoWrite(), STORAGE_REPO_ARCHIVE, 1, 11, "9.4-1", "0000000100000000");
// Set the log level to detail so archive expiration messages are seen
@@ -2349,7 +2349,7 @@ testRun(void)
"20181119-152138F\n20181119-152800F\n20181119-152800F_20181119-152152D\n20181119-152800F_20181119-152155I\n"
"20181119-152900F\n20181119-152900F_20181119-152600D\n", "no backups expired");
- // // Add a time period
+ // Add a time period
StringList *argList = strLstDup(argListTime);
hrnCfgArgRawZ(argList, cfgOptRepoRetentionFull, "35");
HRN_CFG_LOAD(cfgCmdExpire, argList);
|
Fix build for JAVA=1 | @@ -71,7 +71,7 @@ endif
ifeq ($(CLOUD),1)
EXTRA_FLAG += -DOC_CLOUD -DOC_TCP
- CLOUD_OBJ_DIR = $(PORT_OBJ_DIR)cloud/
+ CLOUD_OBJ_DIR = $(PORT_OBJ_DIR)cloud/*.o
endif
SRC = oc_uuid oc_endpoint oc_rep oc_collection oc_clock oc_storage \
@@ -127,7 +127,7 @@ build_jar: copy_java
$(JAR) -cfv $(IOTIVITY_LITE_JAVA_LIBS_DIR)$(JAR_NAME) -C $(IOTIVITY_LITE_JAVA_BIN_DIR) .
build_jni_so: $(JNI_SRC)
- $(CC) -shared $(JAVA_LANG_OBJ_DIR)*.o $(PORT_OBJ_DIR)*.o $(CLIENT_SERVER_OBJ_DIR)*.o $(CLOUD_OBJ_DIR)*.o $(LDFLAG) -o $(IOTIVITY_LITE_JAVA_LIBS_DIR)$(JNI_SO_NAME)
+ $(CC) -shared $(JAVA_LANG_OBJ_DIR)*.o $(PORT_OBJ_DIR)*.o $(CLIENT_SERVER_OBJ_DIR)*.o $(CLOUD_OBJ_DIR) $(LDFLAG) -o $(IOTIVITY_LITE_JAVA_LIBS_DIR)$(JNI_SO_NAME)
install_android_libs: build_swig build_jar build_jni_so
# copy so and jar files to samples
|
Fix typo in plugin-template.c | @@ -142,7 +142,7 @@ static void my_plug_process_event(my_plug_t *plug, const clap_event_header_t *hd
case CLAP_EVENT_NOTE_OFF: {
const clap_event_note_t *ev = (const clap_event_note_t *)hdr;
- // TODO: handle note on
+ // TODO: handle note off
break;
}
|
Fix comment typo in rsa_sign_wrap() | @@ -222,7 +222,7 @@ static int rsa_sign_wrap( void *ctx, mbedtls_md_type_t md_alg,
if( sig_size < *sig_len )
return( MBEDTLS_ERR_PK_BUFFER_TOO_SMALL );
- /* mbedtls_pk_write_pubkey() expects a full PK context;
+ /* mbedtls_pk_write_key_der() expects a full PK context;
* re-construct one to make it happy */
key.pk_info = &pk_info;
key.pk_ctx = ctx;
|
OBJ_nid2sn(NID_sha256) is completely equivalent to OSSL_DIGEST_NAME_SHA2_256
The comment is bogus as that call for NID_sha256 does not do
anything else than looking up the string in an internal table. | @@ -4275,12 +4275,8 @@ const SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt,
if (prefer_sha256) {
const SSL_CIPHER *tmp = sk_SSL_CIPHER_value(allow, ii);
- /*
- * TODO: When there are no more legacy digests we can just use
- * OSSL_DIGEST_NAME_SHA2_256 instead of calling OBJ_nid2sn
- */
if (EVP_MD_is_a(ssl_md(s->ctx, tmp->algorithm2),
- OBJ_nid2sn(NID_sha256))) {
+ OSSL_DIGEST_NAME_SHA2_256)) {
ret = tmp;
break;
}
|
Fix dark mode in conflict resolver | <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="bbP-4b-1Wo">
- <device id="retina4_7" orientation="portrait">
- <adaptation id="fullscreen"/>
- </device>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14810.11" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="bbP-4b-1Wo">
+ <device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
+ <deployment identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14766.13"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="MVl-On-EgY">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+ <color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="checkmark" indentationWidth="10" reuseIdentifier="version" textLabel="Tvu-zv-BTP" detailTextLabel="rBb-Gh-Au2" rowHeight="85" style="IBUITableViewCellStyleSubtitle" id="D9G-OU-l26">
<rect key="frame" x="0.0" y="28" width="375" height="85"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="D9G-OU-l26" id="AvT-Ls-AZR">
- <rect key="frame" x="0.0" y="0.0" width="335" height="84.5"/>
+ <rect key="frame" x="0.0" y="0.0" width="335" height="85"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Modified on iPad de Adrian" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Tvu-zv-BTP">
|
Check that the web file content is well accessible. | @@ -1141,6 +1141,8 @@ int demo_file_access_test()
char const* bad_path = "/../etc/passwd";
size_t f_size = 0;
size_t echo_size = 0;
+ char buf[128];
+ const int nb_blocks = 16;
FILE* F = picoquic_file_open(path + 1, "wb");
@@ -1149,8 +1151,7 @@ int demo_file_access_test()
ret = -1;
}
else {
- char buf[128];
- for (int i = 0; i < 16; i++) {
+ for (int i = 0; i < nb_blocks; i++) {
memset(buf, i, sizeof(buf));
fwrite(buf, 1, sizeof(buf), F);
f_size += sizeof(buf);
@@ -1167,6 +1168,23 @@ int demo_file_access_test()
DBG_PRINTF("Found size = %d instead of %d", (int)echo_size, (int)f_size);
ret = -1;
}
+ else {
+ for (int i = 0; ret == 0 && i < nb_blocks; i++) {
+ int nb_read = (int)fread(buf, 1, sizeof(buf), F);
+ if (nb_read != (int)sizeof(buf)) {
+ ret = -1;
+ }
+ else {
+ for (size_t j = 0; j < sizeof(buf); j++) {
+ if (buf[j] != i) {
+ ret = -1;
+ break;
+ }
+ }
+ }
+ }
+ }
+
if (F != NULL) {
F = picoquic_file_close(F);
}
|
Add missing error return code | @@ -7335,6 +7335,7 @@ Finish:
RequestedCapacity = BlockCount * BlockSize;
if (RequestedCapacity > MaxSize) {
ResetCmdStatus(pCommandStatus, NVM_ERR_NOT_ENOUGH_FREE_SPACE);
+ ReturnCode = EFI_INVALID_PARAMETER;
goto Finish;
}
ReturnCode = ConvertUsableSizeToActualSize(BlockSize, RequestedCapacity, Mode,
|
ini draft feature complete, compiling, hopefully correct | @@ -78,30 +78,31 @@ extend handleNewBindings oldEnv = \case
extend1 :: Typ a -> Env a -> Env (Var () a)
extend1 t = extend \() -> t
-infer :: forall a. (a -> Typ a) -> Exp a -> Typ a
+type Typing = Maybe
+
+check :: Eq a => Env a -> Exp a -> Typ a -> Typing ()
+check env e t = do
+ t' <- infer env e
+ guard (t == t')
+
+infer :: forall a. Eq a => Env a -> Exp a -> Typing (Typ a)
infer env = \case
- Var v -> env v
- Uni n -> Uni (n + 1)
- Fun (Abs t b) -> Uni (max n k)
- where
- n = extractUni $ infer env t
- k = extractUni $ infer (extend1 t env) (fromScope b)
- Lam (Abs t b) -> Fun (Abs t t')
- where
- -- FIXME require t to be in a universe
- t' = toScope $ infer (extend1 t env) (fromScope b)
- App x y -> t'
- where
- (Abs t b) = extractFun $ infer env x
- t' = undefined
-
-extractUni :: Exp a -> Natural
-extractUni = normalize >>> \case
- Uni n -> n
-
-extractFun :: Exp a -> Abs a
-extractFun = normalize >>> \case
- Fun a -> a
-
-normalize :: Exp a -> Exp a
-normalize = undefined
+ Var v -> pure $ env v
+ Uni n -> pure $ Uni (n + 1)
+ Lam (Abs t b) -> do
+ Uni _ <- infer env t
+ (toScope -> t') <- infer (extend1 t env) (fromScope b)
+ pure $ Fun (Abs t t')
+ Fun (Abs t b) -> do
+ Uni n <- infer env t
+ Uni k <- infer (extend1 t env) (fromScope b)
+ pure $ Uni (max n k)
+ App x y -> do
+ Fun (Abs t b) <- infer env x
+ check env y t
+ pure $ whnf (instantiate1 y b)
+
+whnf :: Eq a => Exp a -> Exp a
+whnf = \case
+ App (whnf -> Lam (Abs _ b)) x -> instantiate1 x b
+ e -> e
|
Docs: Replace ambiguous "it" in the description of ApfsTrimTimeout | @@ -2832,7 +2832,7 @@ blocking.
such that \texttt{apfs.kext} will remain untouched.
\emph{Note 2}: On macOS 12.0 and above, it is no longer possible to specify trim timeout.
- However, it can be disabled by setting \texttt{0}.
+ However, trim can be disabled by setting \texttt{0}.
\emph{Note 3}: Trim operations are \emph{only} affected at booting phase when the startup volume is mounted.
Either specifying timeout, or completely disabling trim with \texttt{0}, will not affect normal macOS running.
|
Test automation: Added SIGINT support for Linux | @@ -778,6 +778,9 @@ class ExeRun():
retry = 5
while (self._process.poll() is None) and (retry > 0):
# Try to stop with CTRL-C
+ if platform.system() == 'Linux':
+ self._process.send_signal(signal.SIGINT)
+ else:
self._process.send_signal(signal.CTRL_BREAK_EVENT)
sleep(1)
retry -= 1
|
Just for the sake of safety + cleanup | * This unit provides basic null terminated string operations and type conversions.
*/
-#if (ENABLE_NEWLIB == 1) && !defined(_NEWLIB_STRING_H_)
+#if (ENABLE_NEWLIB != 0) && !defined(_NEWLIB_STRING_H_)
#define _NEWLIB_STRING_H_
#include_next <string.h> // Include string.h from newlib
#undef _STRING_H_ // Will be defined again just below
#ifndef _STRING_H_
#define _STRING_H_
-#if (ENABLE_NEWLIB == 0)
+#if (ENABLE_NEWLIB == 0) || !defined(ENABLE_NEWLIB)
/**
* \brief
@@ -35,21 +35,6 @@ typedef __gnuc_va_list va_list;
#define va_end(v) __builtin_va_end(v)
#define va_arg(v,l) __builtin_va_arg(v,l)
-/*
-//#define __va_rounded_size(TYPE) \
-// (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
-//
-//#define va_start(AP, LASTARG) \
-// (AP = ((__gnuc_va_list) __builtin_next_arg (LASTARG)))
-//
-//#define va_end(AP) ((void)0)
-//
-//#define va_arg(AP, TYPE) \
-// (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \
-// *((TYPE *) (void *) ((char *) (AP) \
-// - ((sizeof (TYPE) < __va_rounded_size (char) \
-// ? sizeof (TYPE) : __va_rounded_size (TYPE))))))
-*/
/**
* \brief
|
hv:Unmap AP trampoline region from service VM's EPT
AP trampoline code should be accessible
to hypervisor only, this patch is to unmap
this region from service VM's EPT for security
reason.
Acked-by: Eddie Dong | #include <mmu.h>
#include <logmsg.h>
#include <vboot_info.h>
+#include <vboot.h>
#include <board.h>
#include <sgx.h>
#include <sbuf.h>
@@ -380,6 +381,14 @@ static void prepare_sos_vm_memmap(struct acrn_vm *vm)
ept_del_mr(vm, pml4_page, vm_config->memory.start_hpa, vm_config->memory.size);
}
}
+
+ /* unmap AP trampoline code for security
+ * 'allocate_pages()' in depri boot mode or
+ * 'e820_alloc_low_memory()' in direct boot
+ * mode will ensure the base address of tramploline
+ * code be page-aligned.
+ */
+ ept_del_mr(vm, pml4_page, get_ap_trampoline_buf(), CONFIG_LOW_RAM_SIZE);
}
/* Add EPT mapping of EPC reource for the VM */
|
build/tools: Update the Makefile of esptool.
1. Add esptool_py submodule checking.
2. Change some downloading peremeters to capital letter form. | @@ -52,6 +52,16 @@ ESPTOOLPY_SRC := $(CURRENTDIR)/esptool_py/esptool/esptool.py
ESPTOOLPY := $(PYTHON) $(ESPTOOLPY_SRC) --chip esp32
ESPTOOLPY_SERIAL := $(ESPTOOLPY) --port $(ESPPORT) --baud $(ESPBAUD) --before $(CONFIG_ESPTOOLPY_BEFORE) --after $(CONFIG_ESPTOOLPY_AFTER)
+#Check submodule
+ESPTOOLPY_SUBMODULE_PATH := esptool_py/esptool
+ESPTOOLPY_SUBMODULE := esptool_modules
+
+$(ESPTOOLPY_SUBMODULE):
+ifneq ($(ESPTOOLPY_SRC), $(wildcard $(ESPTOOLPY_SRC)))
+ @echo "Get submodule $(ESPTOOLPY_SUBMODULE_PATH) firstly:"
+ git submodule update --init $(ESPTOOLPY_SUBMODULE_PATH)
+endif
+
ESPTOOL_FLASH_OPTIONS := --flash_mode $(ESPFLASHMODE) --flash_freq $(ESPFLASHFREQ) --flash_size $(ESPFLASHSIZE)
ifdef CONFIG_ESPTOOLPY_FLASHSIZE_DETECT
ESPTOOL_WRITE_FLASH_OPTIONS := --flash_mode $(ESPFLASHMODE) --flash_freq $(ESPFLASHFREQ) --flash_size detect
@@ -68,7 +78,7 @@ ESPTOOL_ALL_FLASH_ARGS += $(APP_OFFSET) $(APP_BIN)
# non-secure boot (or bootloader), both these files are the same
APP_BIN_UNSIGNED ?= $(APP_BIN)
-$(APP_BIN_UNSIGNED): $(APP_ELF) $(ESPTOOLPY_SRC)
+$(APP_BIN_UNSIGNED): $(APP_ELF) $(ESPTOOLPY_SUBMODULE)
$(ESPTOOLPY) elf2image $(ESPTOOL_FLASH_OPTIONS) $(ESPTOOL_ELF2IMAGE_OPTIONS) -o $@ $<
@@ -80,21 +90,26 @@ OS:app-flash
ROMFS: romfs
-romfs: $(ESPTOOLPY_SRC)
+BOOTLOADER: bootloader
+
+ERASE_ALL: erase_flash
+
+
+romfs: $(ESPTOOLPY_SUBMODULE)
ifneq ($(ROMFS_OFFSET),-1)
@echo "Flashing romfs image to serial port $(ESPPORT), offset $(ROMFS_OFFSET)..."
$(ESPTOOLPY_WRITE_FLASH) $(ROMFS_OFFSET) $(ROMFS_IMG)
endif
-BOOTLOADER:
+bootloader: $(ESPTOOLPY_SUBMODULE)
@echo "Flashing bootloader to serial port $(ESPPORT) (app at offset $(BOOTLOADER_OFFSET))..."
$(ESPTOOLPY_WRITE_FLASH) $(ESPTOOL_BOOTLOADER_FLASH_ARGS)
-flash: $(APP_BIN) $(ESPTOOLPY_SRC) $(call prereq_if_explicit,erase_flash) partition_table_get_info
+flash: $(APP_BIN) $(call prereq_if_explicit,erase_flash) partition_table_get_info
@echo "Flashing binaries to serial port $(ESPPORT) (app at offset $(APP_OFFSET))..."
$(ESPTOOLPY_WRITE_FLASH) $(ESPTOOL_ALL_FLASH_ARGS)
-app-flash: $(APP_BIN) $(ESPTOOLPY_SRC) $(call prereq_if_explicit,erase_flash) partition_table_get_info
+app-flash: $(APP_BIN) $(call prereq_if_explicit,erase_flash) partition_table_get_info
@echo "Flashing app to serial port $(ESPPORT), offset $(APP_OFFSET)..."
$(ESPTOOLPY_WRITE_FLASH) $(APP_OFFSET) $(APP_BIN)
@@ -106,7 +121,7 @@ BOOTLOADER_OFFSET := 0x1000
BOOTLOADER_BIN := $(CURRENTDIR)/bootloader/bootloader.bin
-erase_flash:
+erase_flash: $(ESPTOOLPY_SUBMODULE)
@echo "Erasing entire flash..."
$(ESPTOOLPY_SERIAL) erase_flash
|
Remove unused ngtcp2_iovec | @@ -2239,16 +2239,6 @@ NGTCP2_EXTERN int ngtcp2_conn_early_data_rejected(ngtcp2_conn *conn);
NGTCP2_EXTERN void ngtcp2_conn_get_rcvry_stat(ngtcp2_conn *conn,
ngtcp2_rcvry_stat *rcs);
-/**
- * @struct
- *
- * ngtcp2_iovec is a struct compatible to standard struct iovec.
- */
-typedef struct ngtcp2_iovec {
- void *iov_base;
- size_t iov_len;
-} ngtcp2_iovec;
-
/**
* @function
*
|
[BSP] add -nostartfiles in lpc2148 bsp | @@ -39,9 +39,9 @@ if PLATFORM == 'gcc':
OBJCPY = PREFIX + 'objcopy'
DEVICE = ' -mcpu=arm7tdmi-s'
- CFLAGS = DEVICE + ' -DRT_USING_MINILIBC'
+ CFLAGS = DEVICE
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
- LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-lpc214x.map,-cref,-u,_start -T lpc2148_rom.ld'
+ LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-lpc214x.map,-cref,-u,_start -T lpc2148_rom.ld -nostartfiles'
CPATH = ''
LPATH = ''
|
Reduce size of node deps docker image. | # Configure MetaCall Depends node image
ARG METACALL_BASE_IMAGE
-# MetaCall Depends node image
-FROM ${METACALL_BASE_IMAGE} AS deps_node
+# MetaCall Depends node builder image
+FROM ${METACALL_BASE_IMAGE} AS builder
# Image descriptor
LABEL copyright.name="Vicente Eduardo Ferrer Garcia" \
@@ -57,3 +57,17 @@ RUN cmake \
-DCMAKE_FIND_LIBRARY_PREFIXES=lib \
-DCMAKE_FIND_LIBRARY_SUFFIXES=".a;.so" \
-P $METACALL_PATH/cmake/FindNodeJS.cmake
+
+# MetaCall Depends node image
+FROM scratch AS deps_node
+
+# Image descriptor
+LABEL copyright.name="Vicente Eduardo Ferrer Garcia" \
+ copyright.address="[email protected]" \
+ maintainer.name="Vicente Eduardo Ferrer Garcia" \
+ maintainer.address="[email protected]" \
+ vendor="MetaCall Inc." \
+ version="0.1"
+
+# Copy MetaCall NodeJS dependencies
+COPY --from=builder /usr/local/lib/libnode.so.* /usr/local/lib/
|
jenkins: fix syntax error | @@ -188,7 +188,7 @@ def dockerImages() {
def retainNewestImages(image, n, withTag='', excludeTag='none') {
sh """docker images ${image} --format \"{{.Repository}} {{.Tag}}\" \
| grep -v \"${excludeTag}\" \
-| grep \"${withTag}\"
+| grep \"${withTag}\" \
| sort -k 2,2 \
| head -n -${n} \
| awk \'BEGIN{OFS=\":\"} {print \$1,\$2}' \
|
Base 666: Use macro for return value | @@ -108,7 +108,7 @@ int elektraBase666Get (Plugin * handle ELEKTRA_UNUSED, KeySet * keySet, Key * pa
KeySet * contract = base666Contract ();
ksAppend (keySet, contract);
ksDel (contract);
- return 1;
+ return ELEKTRA_PLUGIN_STATUS_SUCCESS;
}
Key * key;
|
platform: Log error to BMC even if diag data is missing
Also fix "DESC" to ASCII conversion. | @@ -94,10 +94,10 @@ static int64_t opal_cec_reboot2(uint32_t reboot_type, char *diag)
"OPAL: Reboot requested due to Platform error.");
if (diag) {
/* Add user section "DESC" */
- log_add_section(buf, 0x44455350);
+ log_add_section(buf, 0x44455343);
log_append_data(buf, diag, strlen(diag));
- log_commit(buf);
}
+ log_commit(buf);
} else {
prerror("OPAL: failed to log an error\n");
}
|
oc_collection:exclude rts/rts-m unless defined | @@ -577,6 +577,7 @@ oc_handle_collection_request(oc_method_t method, oc_request_t *request,
oc_rep_start_root_object();
oc_process_baseline_interface(request->resource);
/* rts */
+ if (oc_list_length(collection->supported_rts) > 0) {
oc_rep_open_array(root, rts);
oc_rt_t *rtt = (oc_rt_t *)oc_list_head(collection->supported_rts);
while (rtt) {
@@ -584,7 +585,9 @@ oc_handle_collection_request(oc_method_t method, oc_request_t *request,
rtt = rtt->next;
}
oc_rep_close_array(root, rts);
+ }
/* rts-m */
+ if (oc_list_length(collection->mandatory_rts) > 0) {
const char *rtsm_key = "rts-m";
oc_rep_set_key(oc_rep_object(root), rtsm_key);
oc_rep_start_array(oc_rep_object(root), rtsm);
@@ -594,6 +597,7 @@ oc_handle_collection_request(oc_method_t method, oc_request_t *request,
rtt = rtt->next;
}
oc_rep_end_array(oc_rep_object(root), rtsm);
+ }
oc_rep_set_array(root, links);
while (link != NULL) {
if (oc_filter_resource_by_rt(link->resource, request)) {
|
acme: point acme to /~debug | ::
=/ =purl
:- [sec=| por=~ host=[%& turf.next]]
- [[ext=`~.udon path=/static] query=~]
+ [[ext=~ path=/'~debug'] query=~]
=/ =wire
(acme-wire try %validate-domain /idx/(scot %ud idx.next))
(emit (request wire purl %get ~ ~))
|
Enable clearing of alarm bit for Develco smoke, heat and water leak sensor | @@ -1985,6 +1985,52 @@ int DeRestPluginPrivate::setWarningDeviceState(const ApiRequest &req, ApiRespons
{
task.options = 0x00; // Warning mode 0 (no warning), No strobe, Low sound
task.duration = 0;
+
+ // Quickfix for clearing the alarm bit of Develco smoke, heat and water leak sensor
+ if (taskRef.lightNode->modelId() == QLatin1String("SMSZB-120") ||
+ taskRef.lightNode->modelId() == QLatin1String("HESZB-120") ||
+ taskRef.lightNode->modelId() == QLatin1String("FLSZB-110"))
+ {
+ deCONZ::ApsDataRequest apsReq;
+
+ // ZDP Header
+ apsReq.dstAddress() = taskRef.lightNode->node()->address();
+ apsReq.setDstAddressMode(deCONZ::ApsNwkAddress);
+ apsReq.setDstEndpoint(0x23);
+ apsReq.setSrcEndpoint(0x01);
+ apsReq.setProfileId(HA_PROFILE_ID);
+ apsReq.setRadius(0);
+ apsReq.setClusterId(IAS_ZONE_CLUSTER_ID);
+
+ deCONZ::ZclFrame outZclFrame;
+ outZclFrame.setSequenceNumber(zclSeq++);
+ outZclFrame.setCommandId(deCONZ::ZclDefaultResponseId);
+ outZclFrame.setFrameControl(deCONZ::ZclFCProfileCommand |
+ deCONZ::ZclFCDirectionClientToServer |
+ deCONZ::ZclFCDisableDefaultResponse);
+
+ { // ZCL payload
+ QDataStream stream(&outZclFrame.payload(), QIODevice::WriteOnly);
+ stream.setByteOrder(QDataStream::LittleEndian);
+
+ quint8 cmd = 0x00; // Zone Status Change notification
+ quint8 status = 0x00; // Success
+
+ stream << cmd;
+ stream << status;
+ }
+
+ { // ZCL frame
+ QDataStream stream(&apsReq.asdu(), QIODevice::WriteOnly);
+ stream.setByteOrder(QDataStream::LittleEndian);
+ outZclFrame.writeToStream(stream);
+ }
+
+ if (apsCtrl && apsCtrl->apsdeDataRequest(apsReq) == deCONZ::Success)
+ {
+ queryTime = queryTime.addSecs(1);
+ }
+ }
}
else if (alert == "select")
{
|
Base64: Save test data below `/tests` | @@ -25,13 +25,13 @@ The values are decoded back to their original value after `kdb get` has read fro
To mount a simple backend that uses the Base64 encoding, you can use:
```sh
-sudo kdb mount test.ecf /examples/base64/test base64
+sudo kdb mount test.ecf /tests/base64/test base64
```
. To unmount the plugin use the following command:
```sh
-sudo kdb umount /examples/base64/test
+sudo kdb umount /tests/base64/test
```
. All encoded binary values will look something like this:
@@ -61,22 +61,22 @@ The following example shows how you can use this plugin together with the INI pl
```sh
# Mount the INI and Base64 plugin
-kdb mount config.ini user/examples/base64 ini base64
+kdb mount config.ini user/tests/base64 ini base64
# Copy binary data
-kdb cp system/elektra/modules/base64/exports/get user/examples/base64/binary
+kdb cp system/elektra/modules/base64/exports/get user/tests/base64/binary
# Print binary data
-kdb get user/examples/base64/binary
+kdb get user/tests/base64/binary
# STDOUT-REGEX: ^(\\x[0-9a-f]{1,2})+$
# The value inside the configuration file is encoded by the Base64 plugin
-kdb file user/examples/base64 | xargs cat
+kdb file user/tests/base64 | xargs cat
# STDOUT-REGEX: binary = "@BASE64[a-zA-Z0-9+/]+={0,2}"
# Undo modifications
-kdb rm -r user/examples/base64
-kdb umount user/examples/base64
+kdb rm -r user/tests/base64
+kdb umount user/tests/base64
```
### Meta Mode
@@ -107,23 +107,23 @@ The following example shows you how you can use the INI plugin together with Bas
```sh
# Mount INI and Base64 plugin (provides `binary`) with the configuration key `binary/meta`
-kdb mount config.ini user/examples/base64 ini base64 binary/meta=
+kdb mount config.ini user/tests/base64 ini base64 binary/meta=
# Save base64 encoded data `"value"` (`0x76616c7565`)
-kdb set user/examples/base64/encoded dmFsdWUA
-kdb file user/examples/base64/encoded | xargs cat | grep encoded
+kdb set user/tests/base64/encoded dmFsdWUA
+kdb file user/tests/base64/encoded | xargs cat | grep encoded
#> encoded = dmFsdWUA
# Tell Base64 plugin to decode and encode key value
-kdb setmeta user/examples/base64/encoded type binary
+kdb setmeta user/tests/base64/encoded type binary
# Receive key data (the `\x0` at the end marks the end of the string)
-kdb get user/examples/base64/encoded
+kdb get user/tests/base64/encoded
#> \x76\x61\x6c\x75\x65\x0
# Undo modifications
-kdb rm -r user/examples/base64
-kdb umount user/examples/base64
+kdb rm -r user/tests/base64
+kdb umount user/tests/base64
```
For another usage example, please take a look at the ReadMe of the [YAML CPP plugin](../yamlcpp).
|
testing: fix a bug (incorrect " at end of line for "well-defined") and some
overmatching problems | @@ -26,7 +26,7 @@ s/([Ss])ummarise/\1ummarize/g
s/([Ss])ynchronisation/\1ynchronization/g
s/([Ss])ynchronised/\1ynchronized/g
s/\<([Uu]tili)s/\1z/g
-s/([Pp])rogramm(e)?(s)?/\1rogram\3/g
+s/^([Pp])rogramm(e)?(s)?$/\1rogram\3/g
# ==========
# = Brands =
@@ -93,16 +93,16 @@ s/\<[^-]symlink/symbolic link/g
s/\<([Mm])iddle[- ][Ww]are/\1iddleware/g
# plural
-s/\<([Ff])iles?[- ]?[Ss]ystem(s)?\>/\1ile system\2/g
-s/\<([Tt])ypes?[- ]?[Ss]ystem(s)?\>/\1ype system\2/g
-s/\<([Tt])ypes?[- ]?[Cc]hecker(s)?\>/\1ype checker\2/g
+s/\<^([Ff])iles?[- ]?([Ss])ystem(s)?$\>/\1ile \2ystem\3/g
+s/\<^([Tt])ypes?[- ]?([Ss])ystem(s)?$\>/\1ype \2ystem\3/g
+s/\<^([Tt])ypes?[- ]?([Cc])hecker(s)?$\>/\1ype \2hecker\3/g
s/\<([Tt])ypecheck((s|ing)?)\>/\1ype check\2/g
s/\<([Ii])nformations\>/\1nformation/g
# hyphens
s/\<([Ff])ull[- ]?[Bb]lown\>/\1ull-blown/g
-s/\<([Ww])ell[- ]?[Dd]efined\>/\1ell-defined/g"
+s/\<([Ww])ell[- ]?[Dd]efined\>/\1ell-defined/g
s/\<([Ss])o[- ]?[Cc]alled\>/\1o-called/g
s/\<([Ee])rror[- ]?[Pp]rone\>/\1rror-prone/g
s/\<([Ee])rror[- ]?[Rr]elated\>/\1rror-related/g
|
Total number of nvic vectors now 48 as supported my nrf52840. Moved SPI3M to last vector | @@ -129,9 +129,11 @@ __isr_vector:
.long UARTE1_IRQHandler
.long QSPI_IRQHandler
.long CRYPTOCELL_IRQHandler
- .long SPIM3_IRQHandler
.long 0 /*Reserved */
.long PWM3_IRQHandler
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long SPIM3_IRQHandler
.size __isr_vector, . - __isr_vector
|
link ssp as static only for WIN32 | @@ -71,7 +71,11 @@ include(CheckLibraryExists)
CHECK_LIBRARY_EXISTS(ssp __stack_chk_fail "" _stack_chk_fail_exists)
if (_stack_chk_fail_exists)
+ if(WIN32)
set(SSP_LIB -static ssp)
+ else()
+ set(SSP_LIB -static ssp)
+ endif()
else ()
set(SSP_LIB "")
endif ()
|
jenkinsfile.release: add opensuse packaging and docker image publishing | @@ -209,6 +209,12 @@ def dockerInit() {
'./scripts/docker/fedora/34/Dockerfile'
)
+ DOCKER_IMAGES.opensuse_15_3 = dockerUtils.createDockerImageDesc(
+ "opensuse-15-3", dockerUtils.&idTesting,
+ "./scripts/docker/opensuse/15.3",
+ "./scripts/docker/opensuse/15.3/Dockerfile"
+ )
+
/* Install and test the built packages with theses images. */
DOCKER_IMAGES.buster_installed = dockerUtils.createDockerImageDesc(
'debian-buster-installed', dockerUtils.&idArtifact,
@@ -252,6 +258,13 @@ def dockerInit() {
false
)
+ DOCKER_IMAGES.opensuse_15_3_installed = dockerUtils.createDockerImageDesc(
+ 'opensuse-15-3-installed', dockerUtils.&idArtifact,
+ './release-artifact/*/package/opensuse-leap15.3/',
+ './scripts/docker/opensuse/15.3/release.Dockerfile',
+ false
+ )
+
/* Install packages for Docker image release */
DOCKER_IMAGES.buster_release = createDockerImageDescForRelease(
'elektra/elektra',
@@ -295,6 +308,13 @@ def dockerInit() {
false
)
+ DOCKER_IMAGES.opensuse_15_3_release = createDockerImageDescForRelease(
+ 'elektra/elektra',
+ './release-artifact/*/package/opensuse-leap15.3/',
+ './scripts/docker/opensuse/15.3/release.Dockerfile',
+ false
+ )
+
/* Build Elektra's documentation with this image.
* Also contains latex for pdf creation.
*/
@@ -388,6 +408,14 @@ def generateReleaseStages() {
true // use placeholder dirs
)
+ tasks << buildRelease(
+ 'opensuse-15-3',
+ DOCKER_IMAGES.opensuse_15_3,
+ params.fedora_revision,
+ false, // do not bundle git repo
+ true // use placeholder dirs
+ )
+
return tasks
}
@@ -420,6 +448,10 @@ def generateDockerBuildStagesWithPackagesInstalled() {
DOCKER_IMAGES.bullseye_installed,
'debian-bullseye'
)
+ tasks << buildImageWithPackagesStage(
+ DOCKER_IMAGES.opensuse_15_3_installed,
+ 'opensuse-15-3'
+ )
// build website
tasks << buildWebsite('debian-buster')
@@ -466,6 +498,10 @@ def generateInstalledPackagesTestStages() {
'debian-bullseye-installed',
DOCKER_IMAGES.bullseye_installed
)
+ tasks << testInstalledPackage(
+ 'opensuse-15-3-installed',
+ DOCKER_IMAGES.opensuse_15_3_installed
+ )
return tasks
}
@@ -572,6 +608,15 @@ def generatePublishStages() {
params.fedora_revision
)
+ tasks << publish(
+ 'opensuse-15-3',
+ 'opensuse-leap15.3',
+ 'opensuse-leap-15.3',
+ 'opensuse-leap-15.3',
+ release.&publishRpmPackages,
+ params.fedora_revision
+ )
+
tasks << buildDoc()
// publish source package built in debian-buster stage
@@ -646,6 +691,12 @@ def generateImageUploadStages() {
debian_revision,
'bullseye'
)
+ tasks << publishImage(
+ DOCKER_IMAGES.opensuse_15_3_release,
+ 'opensuse-15-3',
+ fedora_revision,
+ 'opensuse-leap-15.3'
+ )
return tasks
}
|
Don't free read control entries still on the stream queue. | #ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctputil.c 347975 2019-05-19 17:28:00Z tuexen $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctputil.c 350011 2019-07-15 20:45:01Z tuexen $");
#endif
#include <netinet/sctp_os.h>
@@ -4948,12 +4948,14 @@ sctp_add_to_readq(struct sctp_inpcb *inp,
if (inp_read_lock_held == 0)
SCTP_INP_READ_LOCK(inp);
if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_CANT_READ) {
+ if (!control->on_strm_q) {
sctp_free_remote_addr(control->whoFrom);
if (control->data) {
sctp_m_freem(control->data);
control->data = NULL;
}
sctp_free_a_readq(stcb, control);
+ }
if (inp_read_lock_held == 0)
SCTP_INP_READ_UNLOCK(inp);
return;
@@ -4998,8 +5000,10 @@ sctp_add_to_readq(struct sctp_inpcb *inp,
control->tail_mbuf = prev;
} else {
/* Everything got collapsed out?? */
+ if (!control->on_strm_q) {
sctp_free_remote_addr(control->whoFrom);
sctp_free_a_readq(stcb, control);
+ }
if (inp_read_lock_held == 0)
SCTP_INP_READ_UNLOCK(inp);
return;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.