message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
NSH: Add conditions so that ifconfig and ifup will not be disabled if we are using only PF_IEEE802154 | */
#if !defined(CONFIG_NET_ETHERNET) && !defined(CONFIG_NET_6LOWPAN) && \
- !defined(CONFIG_NET_LOOPBACK) && !defined(CONFIG_NET_SLIP) && \
- !defined(CONFIG_NET_TUN)
+ !defined(CONFIG_NET_IEEE802154) && !defined(CONFIG_NET_LOOPBACK) && \
+ !defined(CONFIG_NET_SLIP) && !defined(CONFIG_NET_TUN)
/* No link layer protocol is a good indication that there is no network
* device.
*/
|
Better check for window | @@ -8,9 +8,11 @@ import "../utils/font-awesome";
const searchIndices = [{ name: `Pages`, title: `Pages` }];
const DARK_MODE_KEY = 'DARK_MODE';
+// Check if window is defined (so if in the browser or in node.js).
+const isBrowser = typeof window !== 'undefined';
export default function DocsNav() {
- const isDarkMode = window ? localStorage.getItem(DARK_MODE_KEY) === 'true' : false;
+ const isDarkMode = isBrowser ? localStorage.getItem(DARK_MODE_KEY) === 'true' : false;
const [darkMode, toggleDarkMode] = useState(isDarkMode);
const [mobileNav, openMobileNav] = useState(false);
const data = useStaticQuery(graphql`
@@ -28,7 +30,7 @@ export default function DocsNav() {
`);
const navItems = data.allDocumentationNavYaml.nodes;
const darkModeClick = () => {
- if (window) {
+ if (isBrowser) {
localStorage.setItem(DARK_MODE_KEY, !darkMode);
}
toggleDarkMode(!darkMode);
|
nimble/ll: Minor fix for missing static | @@ -526,7 +526,7 @@ ble_ll_ctrl_proc_unk_rsp(struct ble_ll_conn_sm *connsm, uint8_t *dptr, uint8_t *
*
* @param arg Pointer to connection state machine.
*/
-void
+static void
ble_ll_ctrl_proc_rsp_timer_cb(struct ble_npl_event *ev)
{
/* Control procedure has timed out. Kill the connection */
@@ -889,7 +889,7 @@ ble_ll_ctrl_rx_phy_rsp(struct ble_ll_conn_sm *connsm, uint8_t *dptr,
* @param connsm
* @param dptr
*/
-void
+static void
ble_ll_ctrl_rx_phy_update_ind(struct ble_ll_conn_sm *connsm, uint8_t *dptr)
{
int no_change;
|
Corrected reporting configuration for other thermostats | @@ -1046,7 +1046,7 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
rq6.reportableChange24bit = 1; // recommended value
rq6.manufacturerCode = VENDOR_JENNIC;
- return sendConfigureReportingRequest(bt, {rq, rq2, rq3, rq4}) ||
+ return sendConfigureReportingRequest(bt, {rq, rq2, rq3, rq4}) || // Use OR because of manuf. specific attributes
sendConfigureReportingRequest(bt, {rq5, rq6});
}
else if (sensor && sensor->modelId() == QLatin1String("Zen-01")) // Zen
@@ -1083,10 +1083,9 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
rq5.attributeId = 0x001C; // Thermostat mode
rq5.minInterval = 1;
rq5.maxInterval = 600;
- rq5.reportableChange16bit = 0xffff;
+ rq5.reportableChange16bit = 0xff;
- return sendConfigureReportingRequest(bt, {rq, rq2, rq3, rq4}) ||
- sendConfigureReportingRequest(bt, {rq5});
+ return sendConfigureReportingRequest(bt, {rq, rq2, rq3, rq4, rq5});
}
else if ((sensor && sensor->modelId() == QLatin1String("SLR2")) || // Hive
(sensor && sensor->modelId().startsWith(QLatin1String("TH112")))) // Sinope
@@ -1098,18 +1097,18 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
rq.reportableChange16bit = 10;
ConfigureReportingRequest rq3;
- rq3.dataType = deCONZ::Zcl16BitBitMap;
+ rq3.dataType = deCONZ::Zcl16BitInt;
rq3.attributeId = 0x0012; // Occupied heating setpoint
rq3.minInterval = 1;
rq3.maxInterval = 600;
- rq3.reportableChange16bit = 0xffff;
+ rq3.reportableChange16bit = 50;
ConfigureReportingRequest rq4;
rq4.dataType = deCONZ::Zcl8BitEnum;
rq4.attributeId = 0x001C; // Thermostat mode
rq4.minInterval = 1;
rq4.maxInterval = 600;
- rq4.reportableChange16bit = 0xffff;
+ rq4.reportableChange16bit = 0xff;
ConfigureReportingRequest rq2;
rq2.dataType = deCONZ::Zcl16BitBitMap;
@@ -1149,6 +1148,7 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
rq4.minInterval = 60;
rq4.maxInterval = 43200;
rq4.reportableChange8bit = 0xff;
+ rq4.manufacturerCode = VENDOR_DANFOSS;
ConfigureReportingRequest rq5;
rq5.dataType = deCONZ::ZclBoolean;
@@ -1156,8 +1156,10 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt)
rq5.minInterval = 1;
rq5.maxInterval = 43200;
rq5.reportableChange8bit = 0xff;
+ rq5.manufacturerCode = VENDOR_DANFOSS;
- return sendConfigureReportingRequest(bt, {rq, rq2, rq3, rq4, rq5});
+ return sendConfigureReportingRequest(bt, {rq, rq2, rq3}) || // Use OR because of manuf. specific attributes
+ sendConfigureReportingRequest(bt, {rq4, rq5});
}
else
|
Build the C# binding for Android ARM. | @@ -23,6 +23,20 @@ docker run \
--volume "${VOLUME}:${STORAGE}" \
${IMAGE_NAME} /bin/bash -c \
"source ~/.bashrc && \
+ mkdir -p ${STORAGE}/android-arm && \
+ chown $(id -u):$(id -g) ${STORAGE}/android-arm && \
+ mkdir android-arm && pushd android-arm && \
+ cmake .. \
+ -DCMAKE_TOOLCHAIN_FILE=/opt/android/android-ndk-r23b/build/cmake/android.toolchain.cmake \
+ -DANDROID_ABI=armeabi-v7a \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DTINYSPLINE_ENABLE_CSHARP=True && \
+ cmake --build . --target tinysplinecsharp && \
+ nuget pack && \
+ chown $(id -u):$(id -g) *.nupkg && \
+ cp -a *.nupkg ${STORAGE}/android-arm && \
+ rm -rf ..?* .[!.]* * && \
+ popd && \
mkdir -p ${STORAGE}/android-arm64 && \
chown $(id -u):$(id -g) ${STORAGE}/android-arm64 && \
mkdir android-arm64 && pushd android-arm64 && \
|
Add -a to gpstop in walrep test.
With commit gpstop -m now behaves
similar to without -m, hence add -a to tests so that it doesn't prompt. | @@ -204,7 +204,7 @@ class neg_test(StandbyRunMixin, MPPTestCase):
os.remove(os.path.join(orig_master.datadir ,'wal_rcv.pid'))
logger.info('Stop the original master...')
- cmd = Command("gpstop", "gpstop -im")
+ cmd = Command("gpstop", "gpstop -aim")
cmd.run()
self.assertEqual(cmd.get_results().rc, 0, str(cmd))
|
websocket_client: fix URI parsing to include also query part in websocket connection path
closes | @@ -382,9 +382,16 @@ esp_err_t esp_websocket_client_set_uri(esp_websocket_client_handle_t client, con
}
- if (puri.field_data[UF_PATH].len) {
+ if (puri.field_data[UF_PATH].len || puri.field_data[UF_QUERY].len) {
free(client->config->path);
+ if (puri.field_data[UF_QUERY].len == 0) {
asprintf(&client->config->path, "%.*s", puri.field_data[UF_PATH].len, uri + puri.field_data[UF_PATH].off);
+ } else if (puri.field_data[UF_PATH].len == 0) {
+ asprintf(&client->config->path, "/?%.*s", puri.field_data[UF_QUERY].len, uri + puri.field_data[UF_QUERY].off);
+ } else {
+ asprintf(&client->config->path, "%.*s?%.*s", puri.field_data[UF_PATH].len, uri + puri.field_data[UF_PATH].off,
+ puri.field_data[UF_QUERY].len, uri + puri.field_data[UF_QUERY].off);
+ }
ESP_WS_CLIENT_MEM_CHECK(TAG, client->config->path, return ESP_ERR_NO_MEM);
}
if (puri.field_data[UF_PORT].off) {
|
replace general rolling heap with mcache | @@ -141,12 +141,13 @@ static void read_kernel_syms(heap h, heap virtual, heap pages)
}
}
-static void init_service_new_stack(heap pages, heap physical, heap backed, heap backed_2M, heap virtual)
+static void __attribute__((noinline))
+init_service_new_stack(heap bootstrap, heap pages, heap physical, heap backed, heap backed_2M, heap virtual)
{
// just to find maintain the convention of faulting on zero references
unmap(0, PAGESIZE, pages);
- heap misc = allocate_rolling_heap(backed, 8);
+ heap misc = allocate_mcache(bootstrap, backed_2M, 5, 20);
// misc = debug_heap(misc, misc);
runqueue = allocate_queue(misc, 64);
start_interrupts(pages, misc, physical);
@@ -239,5 +240,5 @@ void init_service()
stack_location += stack_size - 16;
asm ("mov %0, %%rsp": :"m"(stack_location));
- init_service_new_stack(pages, physical_memory, backed, backed_2M, virtual);
+ init_service_new_stack(&bootstrap, pages, physical_memory, backed, backed_2M, virtual);
}
|
go back to "vbank1 is always on top" | @@ -541,12 +541,12 @@ static inline void memset4(void* dst, u32 val, u32 dwords)
static inline tic_vram* vbank0(tic_core* core)
{
- return &core->memory.ram.vram;
+ return core->state.vbank.id ? &core->state.vbank.mem : &core->memory.ram.vram;
}
static inline tic_vram* vbank1(tic_core* core)
{
- return &core->state.vbank.mem;
+ return core->state.vbank.id ? &core->memory.ram.vram : &core->state.vbank.mem;
}
static inline void updpal(tic_mem* tic, tic_blitpal* pal0, tic_blitpal* pal1)
@@ -617,10 +617,12 @@ void tic_core_blit_ex(tic_mem* tic, tic_blit_callback clb)
enum{OffsetY = TIC80_HEIGHT - TIC80_MARGIN_TOP};
s32 start0 = (row - vbank0(core)->vars.offset.y + OffsetY) % TIC80_HEIGHT * TIC80_WIDTH;
s32 start1 = (row - vbank1(core)->vars.offset.y + OffsetY) % TIC80_HEIGHT * TIC80_WIDTH;
+ s32 offsetX0 = vbank0(core)->vars.offset.x;
+ s32 offsetX1 = vbank1(core)->vars.offset.x;
for(s32 x = TIC80_WIDTH; x != 2 * TIC80_WIDTH; ++x)
- *rowPtr++ = blitpix(tic, (x - vbank0(core)->vars.offset.x) % TIC80_WIDTH + start0,
- (x - vbank1(core)->vars.offset.x) % TIC80_WIDTH + start1, &pal0, &pal1);
+ *rowPtr++ = blitpix(tic, (x - offsetX0) % TIC80_WIDTH + start0,
+ (x - offsetX1) % TIC80_WIDTH + start1, &pal0, &pal1);
}
rowPtr += TIC80_MARGIN_RIGHT;
|
Import backuped homebridge data during deconz backup import | @@ -15359,6 +15359,33 @@ bool DeRestPluginPrivate::importConfiguration()
}
}
+#ifdef Q_OS_LINUX
+ // clean up old homebridge backup files
+ QStringList filters;
+ filters << "AccessoryInfo*";
+ filters << "IdentifierCache*";
+
+ QDir appDir(path);
+ QStringList files = appDir.entryList(filters);
+
+ for (QString f : files)
+ {
+ const QString filePath = path + "/" + f;
+ if (QFile::exists(filePath))
+ {
+ if (QFile::remove(filePath))
+ {
+ DBG_Printf(DBG_INFO, "backup: removed temporary homebridge file %s\n", qPrintable(filePath));
+ }
+ else
+ {
+ DBG_Printf(DBG_ERROR, "backup: failed to remove temporary homebridge file %s\n", qPrintable(filePath));
+ return false;
+ }
+ }
+ }
+ #endif
+
if (QFile::exists(path + QLatin1String("/deCONZ.tar.gz")))
{
// decompress .tar.gz
@@ -15404,6 +15431,42 @@ bool DeRestPluginPrivate::importConfiguration()
DBG_Printf(DBG_INFO, "%s\n", qPrintable(zipProcess->readAllStandardOutput()));
zipProcess->deleteLater();
zipProcess = nullptr;
+
+#ifdef Q_OS_LINUX
+ // copy imported homebridge files to homebridge dir
+ const QString homebridgePersistPath = "/home/pi/.homebridge/persist"; // TODO: get mainuser
+
+ QString FirstFileName ="";
+ QString SecondFileName ="";
+
+ QDir dir(path);
+ QStringList files = dir.entryList(filters);
+
+ if (files.size() > 0)
+ {
+ FirstFileName = files.at(0);
+ DBG_Printf(DBG_INFO, "copy file: %s to homebridge directory\n", qPrintable(FirstFileName));
+ QFile accessoryFile(path + "/" + FirstFileName);
+ if (!accessoryFile.copy(homebridgePersistPath + "/" + FirstFileName))
+ {
+ DBG_Printf(DBG_INFO, "copy file: %s failed. import homebridge backup failed.\n", qPrintable(FirstFileName));
+ FirstFileName = "";
+ return false;
+ }
+ }
+ if (files.size() > 1)
+ {
+ SecondFileName = files.at(1);
+ DBG_Printf(DBG_INFO, "copy file: %s to homebridge directory\n", qPrintable(SecondFileName));
+ QFile IdentifierFile(path + "/" + SecondFileName);
+ if (!IdentifierFile.copy(homebridgePersistPath + "/" + SecondFileName))
+ {
+ DBG_Printf(DBG_INFO, "copy file: %s failed. import homebridge backup failed.\n", qPrintable(SecondFileName));
+ SecondFileName = "";
+ return false;
+ }
+ }
+#endif
}
bool ok = false;
|
[catboost/py] no need to explicitly close file, file is already opened with context manager | @@ -3495,7 +3495,6 @@ def execute_dist_train(cmd):
with open(hosts_path, 'w') as hosts:
hosts.write('localhost:' + str(port0) + '\n')
hosts.write('localhost:' + str(port1) + '\n')
- hosts.close()
worker0 = yatest.common.execute((CATBOOST_PATH, 'run-worker', '--node-port', str(port0), ), wait=False)
worker1 = yatest.common.execute((CATBOOST_PATH, 'run-worker', '--node-port', str(port1), ), wait=False)
|
reorganize bands and pins in misc_write | @@ -221,17 +221,17 @@ inline int lower_bound(int *array, int size, int value)
void misc_write()
{
- uint16_t code, data = 0;
- int i, freqs[20] = {1700000, 2100000, 3400000, 4100000, 6900000, 7350000, 9950000, 10200000, 13850000, 14500000, 18000000, 18250000, 20850000, 21650000, 24700000, 25150000, 27000000, 30000000, 49000000, 55000000};
+ uint16_t code[3], data = 0;
+ int i, freqs[20] = {1700000, 2100000, 3400000, 4100000, 6900000, 7350000, 9950000, 10200000, 12075000, 16209000, 16210000, 19584000, 19585000, 23170000, 23171000, 26465000, 26466000, 39850000, 39851000, 61000000};
for(i = 0; i < 3; ++i)
{
- code = lower_bound(freqs, 20, freq_data[i]);
- code = code % 2 ? code / 2 + 1 : 0;
- data |= code << (i * 4);
+ code[i] = lower_bound(freqs, 20, freq_data[i]);
+ code[i] = code[i] % 2 ? code[i] / 2 + 1 : 0;
}
- data |= (misc_data_0 & 0x03) << 14 | (misc_data_1 & 0x18) << 9;
+ data |= (code[0] != code[1]) << 8 | code[2] << 4 | code[1];
+ data |= (misc_data_0 & 0x03) << 11 | (misc_data_1 & 0x18) << 6;
if(i2c_misc_data != data)
{
|
Clarify --no-display usage with v4l2 | @@ -303,7 +303,8 @@ To start scrcpy using a v4l2 sink:
```bash
scrcpy --v4l2-sink=/dev/videoN
-scrcpy --v4l2-sink=/dev/videoN -N # --no-display to disable mirroring window
+scrcpy --v4l2-sink=/dev/videoN --no-display # disable mirroring window
+scrcpy --v4l2-sink=/dev/videoN -N # short version
```
(replace `N` by the device ID, check with `ls /dev/video*`)
|
zephyr: Drop duplicate IS_BIT_SET()
This gives a warning about a duplicate definition since it is defined
in Zephyr now.
BRANCH=none
TEST=warning is gone | #define NPCX_FWCTRL_FW_SLOT 1
#define SET_BIT(reg, bit) ((reg) |= (0x1 << (bit)))
#define CLEAR_BIT(reg, bit) ((reg) &= (~(0x1 << (bit))))
+
+/* TODO(b:179900857) Clean this up too */
+#undef IS_BIT_SET
#define IS_BIT_SET(reg, bit) (((reg) >> (bit)) & (0x1))
void system_jump_to_booter(void)
|
Update documentation on new build-time requirements (Python3) | @@ -13,11 +13,13 @@ tools:
* Latest released version of LLVM & Clang
* development files for LLVM & Clang + their transitive dependencies
(e.g. libclang-dev, libllvm-dev, zlib1g-dev, libtinfo-dev...)
+ * CMake
* GNU make or ninja
+ * pkg-config
* pthread (should be installed by default)
* Optional: hwloc v1.0 or newer (e.g. libhwloc-dev)
- * pkg-config
- * cmake
+ * Optional: python3 (optional but enabled by default; for support of LLVM BC with SPIR target)
+ * Optional: python3, llvm-spirv and spirv-tools (optional; for SPIR-V support)
Installing requirements for Ubuntu::
@@ -26,7 +28,7 @@ Note: The binary packages from https://apt.llvm.org/ are recommended
the packages included in the distribution. The following assumes
apt.llvm.org is added to your apt repos::
- apt install -y build-essential ocl-icd-libopencl1 cmake git pkg-config libclang-${LLVM_VERSION}-dev clang llvm-${LLVM_VERSION} make ninja-build ocl-icd-libopencl1 ocl-icd-dev ocl-icd-opencl-dev libhwloc-dev zlib1g zlib1g-dev clinfo dialog apt-utils libxml2-dev libclang-cpp${LLVM_VERSION}-dev libclang-cpp${LLVM_VERSION} llvm-${LLVM_VERSION}-dev
+ apt install -y python3-dev libpython3-dev build-essential ocl-icd-libopencl1 cmake git pkg-config libclang-${LLVM_VERSION}-dev clang llvm-${LLVM_VERSION} make ninja-build ocl-icd-libopencl1 ocl-icd-dev ocl-icd-opencl-dev libhwloc-dev zlib1g zlib1g-dev clinfo dialog apt-utils libxml2-dev libclang-cpp${LLVM_VERSION}-dev libclang-cpp${LLVM_VERSION} llvm-${LLVM_VERSION}-dev
Installing requirements for Arch Linux::
|
Remove inf file from fresh FS. | @@ -90,10 +90,6 @@ static const char fresh_main_py[] =
" time.sleep(600)\n"
;
-static const char fresh_openmv_inf[] =
-#include "genhdr/openmv_inf.h"
-;
-
static const char fresh_readme_txt[] =
"This is a Micro Python board\r\n"
"\r\n"
@@ -264,11 +260,6 @@ static void make_flash_fs()
f_write(&fp, fresh_main_py, sizeof(fresh_main_py) - 1 /* don't count null terminator */, &n);
f_close(&fp);
- // create .inf driver file
- f_open(&fp, "openmv.inf", FA_WRITE | FA_CREATE_ALWAYS);
- f_write(&fp, fresh_openmv_inf, sizeof(fresh_openmv_inf) - 1 /* don't count null terminator */, &n);
- f_close(&fp);
-
// create readme file
f_open(&fp, "README.txt", FA_WRITE | FA_CREATE_ALWAYS);
f_write(&fp, fresh_readme_txt, sizeof(fresh_readme_txt) - 1 /* don't count null terminator */, &n);
|
Resolve STRSUB("<N-char string>", N, 0) will not warn "Position N is past the end of the string" | @@ -461,7 +461,7 @@ static void strsubUTF8(char *dest, const char *src, uint32_t pos, uint32_t len)
srcIndex++;
}
- if (!src[srcIndex])
+ if (!src[srcIndex] && len)
warning(WARNING_BUILTIN_ARG, "STRSUB: Position %lu is past the end of the string",
(unsigned long)pos);
|
fixes for DWA uncompress: sanity check unknown data reading, off-by-one error on max suffix string length | @@ -268,8 +268,9 @@ struct DwaCompressor::Classifier
" (truncated rule).");
{
- char suffix[Name::SIZE];
- memset (suffix, 0, Name::SIZE);
+ // maximum length of string plus one byte for terminating NULL
+ char suffix[Name::SIZE+1];
+ memset (suffix, 0, Name::SIZE+1);
Xdr::read<CharPtrIO> (ptr, std::min(size, Name::SIZE-1), suffix);
_suffix = std::string(suffix);
}
@@ -2816,6 +2817,14 @@ DwaCompressor::uncompress
if (IMATH_NAMESPACE::modp (y, cd->ySampling) != 0)
continue;
+ //
+ // sanity check for buffer data lying within range
+ //
+ if (cd->planarUncBufferEnd + dstScanlineSize - _planarUncBuffer[UNKNOWN] > _planarUncBufferSize[UNKNOWN] )
+ {
+ throw Iex::InputExc("DWA data corrupt");
+ }
+
memcpy (rowPtrs[chan][row],
cd->planarUncBufferEnd,
dstScanlineSize);
|
Added comments on other nRF boards | @@ -134,6 +134,10 @@ static void nrf_prerun_board_config(void)
// EXTERNAL TARGET DETECTION
// - only for nRF51-DK and nRF52-DK, so far
+ // - nRF51-Dongle (discontinued) has no external target lines
+ // - nRF51822-mKIT (discontinued), no external target lines
+ // - nRF52840-DK has external/shielf SWD lines and is consistent with nRF51-DK / nRF52-DK
+ // - (nRF52840-Dongle has no interface MCU)
// - need to code shield detection and priority between external and shield-mounted targets
if ( (!bit2 && bit1) || (bit2 && !bit1) ) {
// EXT_VTG (high if external target is powered)
|
[kernel] avoid double free on _numericsMatrix->matrix0 | #include "ioMatrix.hpp" // for read
#include "Tools.hpp" // for toString
#include "bindings_utils.hpp" // for fill
-
+#include "NumericsMatrix.h"
using namespace Siconos;
namespace siconosBindings = boost::numeric::bindings::blas;
using std::cout;
@@ -380,7 +380,15 @@ SimpleMatrix::SimpleMatrix(const std::string &file, bool ascii): SiconosMatrix(1
SimpleMatrix::~SimpleMatrix()
{
if(_num == Siconos::DENSE)
+ {
delete(mat.Dense);
+ if (_numericsMatrix->matrix0)
+ {
+ // _numericsMatrix->matrix0 points to the array contained in the ublas matrix
+ // To avoid double free on this pointer, we set it to NULL before deletion
+ _numericsMatrix->matrix0 =NULL;
+ }
+ }
else if(_num == Siconos::TRIANGULAR)
delete(mat.Triang);
else if(_num == Siconos::SYMMETRIC)
|
apps/mac: avoid need for two ^D when using stdin from a terminal
Fixes | @@ -150,10 +150,11 @@ opthelp:
goto err;
}
- for (;;) {
+ while (BIO_pending(in) || !BIO_eof(in)) {
i = BIO_read(in, (char *)buf, BUFSIZE);
if (i < 0) {
BIO_printf(bio_err, "Read Error in '%s'\n", infile);
+ ERR_print_errors(bio_err);
goto err;
}
if (i == 0)
|
register wallets properly again | @@ -120,6 +120,10 @@ void RegisterWallet(CWallet* pwalletIn) {
g_signals.SetBestChain.connect(boost::bind(&CWallet::SetBestChain, pwalletIn, _1));
g_signals.Inventory.connect(boost::bind(&CWallet::Inventory, pwalletIn, _1));
g_signals.Broadcast.connect(boost::bind(&CWallet::ResendWalletTransactions, pwalletIn, _1));
+ {
+ LOCK(cs_setpwalletRegistered);
+ setpwalletRegistered.insert(pwalletIn);
+ }
}
void UnregisterWallet(CWallet* pwalletIn) {
@@ -128,6 +132,10 @@ void UnregisterWallet(CWallet* pwalletIn) {
g_signals.SetBestChain.disconnect(boost::bind(&CWallet::SetBestChain, pwalletIn, _1));
g_signals.UpdatedTransaction.disconnect(boost::bind(&CWallet::UpdatedTransaction, pwalletIn, _1));
g_signals.EraseTransaction.disconnect(boost::bind(&CWallet::EraseFromWallet, pwalletIn, _1));
+ {
+ LOCK(cs_setpwalletRegistered);
+ setpwalletRegistered.erase(pwalletIn);
+ }
}
|
Fix a read off the end of the input buffer
when building with OPENSSL_SMALL_FOOTPRINT defined. | @@ -174,7 +174,7 @@ void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *_inp, size_t bits)
goto reconsider;
} else
#endif
- if (bits >= 8) {
+ if (bits > 8) {
b = ((inp[0] << inpgap) | (inp[1] >> (8 - inpgap)));
b &= 0xff;
if (bitrem)
@@ -191,7 +191,7 @@ void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *_inp, size_t bits)
}
if (bitrem)
c->data[byteoff] = b << (8 - bitrem);
- } else { /* remaining less than 8 bits */
+ } else { /* remaining less than or equal to 8 bits */
b = (inp[0] << inpgap) & 0xff;
if (bitrem)
|
Add RT_SENSOR_VENDOR_MELEXIS in sensor_cmd.c
* Add RT_SENSOR_VENDOR_MELEXIS in sensor_cmd.c
print vendor information of Melexis in the function sensor() | @@ -360,6 +360,9 @@ static void sensor(int argc, char **argv)
case RT_SENSOR_VENDOR_MAXIM:
rt_kprintf("vendor :Maxim Integrated\n");
break;
+ case RT_SENSOR_VENDOR_MELEXIS:
+ rt_kprintf("vendor :Melexis\n");
+ break;
}
rt_kprintf("model :%s\n", info.model);
switch (info.unit)
|
hostservices: Silence special wakeup assert/release logs
During `opal-prd pm-complex reset` OPAL msglog is filled
with these logs.. which are not useful for debugging. And
Hence lets silence these logs.
Cc: Vaidyanathan Srinivasan
Cc: Gautham R. Shenoy | @@ -561,7 +561,7 @@ int hservice_wakeup(uint32_t i_core, uint32_t i_mode)
cpu = find_cpu_by_pir(i_core);
if (!cpu)
return OPAL_PARAMETER;
- prlog(PR_DEBUG, "HBRT: Special wakeup assert for core 0x%x,"
+ prlog(PR_TRACE, "HBRT: Special wakeup assert for core 0x%x,"
" count=%d\n", i_core, cpu->hbrt_spec_wakeup);
if (cpu->hbrt_spec_wakeup == 0)
rc = dctl_set_special_wakeup(cpu);
@@ -572,7 +572,7 @@ int hservice_wakeup(uint32_t i_core, uint32_t i_mode)
cpu = find_cpu_by_pir(i_core);
if (!cpu)
return OPAL_PARAMETER;
- prlog(PR_DEBUG, "HBRT: Special wakeup release for core"
+ prlog(PR_TRACE, "HBRT: Special wakeup release for core"
" 0x%x, count=%d\n", i_core, cpu->hbrt_spec_wakeup);
if (cpu->hbrt_spec_wakeup == 0) {
prerror("HBRT: Special wakeup clear"
|
Try to use stable standard port for websocket server, fallback to random if port is used | #include "deconz/dbg_trace.h"
#include "websocket_server.h"
+#define MAX_ATTEMPS 50
+#define WS_PORT 20877
+
/*! Constructor.
*/
WebSocketServer::WebSocketServer(QObject *parent) :
@@ -12,17 +15,30 @@ WebSocketServer::WebSocketServer(QObject *parent) :
{
srv = new QWebSocketServer("deconz", QWebSocketServer::NonSecureMode, this);
- if (srv->listen())
+ quint16 p = WS_PORT;
+
+ while (!srv->listen(QHostAddress::AnyIPv4, p))
{
- DBG_Printf(DBG_INFO, "started websocket server at port %u\n", srv->serverPort());
+ if (p == 0)
+ {
+ DBG_Printf(DBG_ERROR, "giveup starting websocket server on port %u. error: %s\n", qPrintable(srv->errorString()));
+ break;
}
+
+ DBG_Printf(DBG_ERROR, "failed to start websocket server on port %u. error: %s\n", qPrintable(srv->errorString()));
+
+ if (p < (WS_PORT + MAX_ATTEMPS))
+ { p++; }
else
- {
- DBG_Printf(DBG_ERROR, "failed to start websocket server %s\n", qPrintable(srv->errorString()));
+ { p = 0; }
}
+ if (srv->isListening())
+ {
+ DBG_Printf(DBG_INFO, "started websocket server at port %u\n", srv->serverPort());
connect(srv, SIGNAL(newConnection()), this, SLOT(onNewConnection()));
}
+}
/*! Returns the websocket server port.
\return the active server port, or 0 if not active
|
install-config-file: Detect binary | @@ -23,6 +23,19 @@ else
exit 1
fi
+
+# different binaries are installed depending on the build options
+if command -v kdb ; then
+ binary=$(command -v kdb)
+elif command -v kdb-static ; then
+ binary=$(command -v kdb-static)
+elif command -v kdb-full ; then
+ binary=$(command -v kdb-full)
+else
+ echo "ERROR: Could not find a kdb binary."
+ exit 29
+fi
+
# use the file name (without path) of <config file> as special path
# in Elektra
specialPathEnd=$(basename $their)
|
recommit zzl | @@ -68,6 +68,6 @@ Blockly.Python.serial_softserial = function () {
Blockly.Python.serial_begin = function () {
Blockly.Python.definitions_['import_microbit_*'] = 'from microbit import *';
var baudrate = this.getFieldValue('baudrate');
- return "uart.init(baudrate=" + baudrate + ")\n";
+ return "uart.init(" + baudrate + ")\n";
};
|
fix(memory leak):
free "ecPrikey" of BoatSignature() in linux-default/src/port_mbedtls/boatplatform_internal.c | @@ -431,6 +431,9 @@ BOAT_RESULT BoatSignature(BoatWalletPriKeyCtx prikeyCtx,
mbedtls_pk_free(&mbedtls_pkCtx);
if (prikeyCtx.prikey_format != BOAT_WALLET_PRIKEY_FORMAT_PKCS){
mbedtls_ecp_keypair_free(ecPrikey);
+ if(ecPrikey != NULL){
+ BoatFree(ecPrikey);
+ }
}
return result;
@@ -988,9 +991,7 @@ static BOAT_RESULT sBoatPort_keyCreate_external_injection_pkcs(const BoatWalletP
// boat_throw(BOAT_ERROR, BoatSignature_exception);
}
- BoatLog(BOAT_LOG_CRITICAL, "mbedtls_ecp_read_key 000 ");
mbedtls_ecp_mul( mbedtls_pk_ec(mbedtls_pkCtx), &mbedtls_pk_ec(mbedtls_pkCtx)->Q, &mbedtls_pk_ec(mbedtls_pkCtx)->d, &mbedtls_pk_ec(mbedtls_pkCtx)->grp.G, mbedtls_ctr_drbg_random, &ctr_drbg );
- BoatLog(BOAT_LOG_CRITICAL, "mbedtls_ecp_read_key 111 ");
mbedtls_ctr_drbg_free(&ctr_drbg);
mbedtls_entropy_free(&entropy);
|
tls: changed the code that gets the remote host address to pull it on
demand so it's not cached | @@ -426,8 +426,8 @@ int flb_tls_session_create(struct flb_tls *tls,
session->ptr = tls->api->session_create(tls, connection->fd);
if (session == NULL) {
- flb_error("[tls] could not create TLS session for %s:%i",
- connection->remote_host, connection->remote_port);
+ flb_error("[tls] could not create TLS session for %s",
+ flb_connection_get_remote_address(connection));
return -1;
}
@@ -467,20 +467,18 @@ int flb_tls_session_create(struct flb_tls *tls,
* is under a coroutine context and it can yield.
*/
if (co == NULL) {
- flb_trace("[io_tls] server handshake connection #%i in process to %s:%i",
+ flb_trace("[io_tls] server handshake connection #%i in process to %s",
connection->fd,
- connection->remote_host,
- connection->remote_port);
+ flb_connection_get_remote_address(connection));
/* Connect timeout */
if (connection->net->connect_timeout > 0 &&
connection->ts_connect_timeout > 0 &&
connection->ts_connect_timeout <= time(NULL)) {
- flb_error("[io_tls] handshake connection #%i to %s:%i timed out after "
+ flb_error("[io_tls] handshake connection #%i to %s timed out after "
"%i seconds",
connection->fd,
- connection->remote_host,
- connection->remote_port,
+ flb_connection_get_remote_address(connection),
connection->net->connect_timeout);
result = -1;
|
bootloader/rust: avoid compiler regression that increases the bin size
For now we just remove the one instance of .unwrap() that is used in
the bootloader, removing most of the bootloader size increase. | @@ -39,7 +39,12 @@ pub extern "C" fn rust_util_validate_name(cstr: CStr, max_len: size_t) -> bool {
pub extern "C" fn rust_util_uint8_to_hex(buf: Bytes, mut out: CStrMut) {
let min_len = buf.len * 2;
out.write(min_len, |out| {
- hex::encode_to_slice(&buf, out).unwrap();
+ // Avoid .unwrap() here until the following compiler regression is fixed:
+ // https://github.com/rust-lang/rust/issues/83925
+ match hex::encode_to_slice(&buf, out) {
+ Ok(()) => {}
+ Err(err) => panic!("{:?}", err),
+ }
});
}
|
Ensure updated metrics can be sorted in the terminal output. | @@ -1812,13 +1812,13 @@ load_sort_win (WINDOW * main_win, GModule module, GSort * sort)
sort->field = SORT_BY_VISITORS;
else if (strcmp ("Data", menu->items[i].name) == 0)
sort->field = SORT_BY_DATA;
- else if (strcmp ("Bandwidth", menu->items[i].name) == 0)
+ else if (strcmp ("Tx. Amount", menu->items[i].name) == 0)
sort->field = SORT_BY_BW;
- else if (strcmp ("Avg. Time Served", menu->items[i].name) == 0)
+ else if (strcmp ("Avg. T.S.", menu->items[i].name) == 0)
sort->field = SORT_BY_AVGTS;
- else if (strcmp ("Cum. Time Served", menu->items[i].name) == 0)
+ else if (strcmp ("Cum. T.S.", menu->items[i].name) == 0)
sort->field = SORT_BY_CUMTS;
- else if (strcmp ("Max. Time Served", menu->items[i].name) == 0)
+ else if (strcmp ("Max. T.S.", menu->items[i].name) == 0)
sort->field = SORT_BY_MAXTS;
else if (strcmp ("Protocol", menu->items[i].name) == 0)
sort->field = SORT_BY_PROT;
|
netkvm/NDIS5: Remove all uses of virtio_set_queue_event_suppression()
The function has no effect and will be removed. | @@ -1106,7 +1106,7 @@ static int PrepareReceiveBuffers(PARANDIS_ADAPTER *pContext)
static NDIS_STATUS FindNetQueues(PARANDIS_ADAPTER *pContext)
{
struct virtqueue *queues[3];
- unsigned i, nvqs = pContext->bHasControlQueue ? 3 : 2;
+ unsigned nvqs = pContext->bHasControlQueue ? 3 : 2;
NTSTATUS status;
// We work with two or three virtqueues, 0 - receive, 1 - send, 2 - control
@@ -1119,13 +1119,6 @@ static NDIS_STATUS FindNetQueues(PARANDIS_ADAPTER *pContext)
return NTStatusToNdisStatus(status);
}
- // set interrupt suppression flags
- for (i = 0; i < nvqs; i++) {
- virtio_set_queue_event_suppression(
- queues[i],
- pContext->bDoPublishIndices);
- }
-
pContext->NetReceiveQueue = queues[0];
pContext->NetSendQueue = queues[1];
if (pContext->bHasControlQueue) {
|
make the denarius.daemon app run as system service | @@ -14,14 +14,11 @@ apps:
daemon:
command: bin/denariusd
plugs: [network, network-bind]
- environment:
- XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:$XDG_DATA_DIRS
+ daemon: forking
denarius:
command: desktop-launch $SNAP/bin/Denarius
plugs: [home, network, network-bind, unity7]
desktop: denarius.desktop
- environment:
- XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:$XDG_DATA_DIRS
parts:
openssl:
|
Subaru: remove GM leftover | @@ -12,7 +12,6 @@ int subaru_cruise_engaged_last = 0;
int subaru_rt_torque_last = 0;
int subaru_desired_torque_last = 0;
uint32_t subaru_ts_last = 0;
-int subaru_supercruise_on = 0;
struct sample_t subaru_torque_driver; // last few driver torques measured
@@ -86,7 +85,7 @@ static int subaru_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
subaru_ts_last = ts;
}
- if (violation || subaru_supercruise_on) {
+ if (violation) {
return false;
}
|
lhash: Avoid 32 bit right shift of a 32 bit value
Fixes | @@ -383,7 +383,8 @@ unsigned long OPENSSL_LH_strhash(const char *c)
v = n | (*c);
n += 0x100;
r = (int)((v >> 2) ^ v) & 0x0f;
- ret = (ret << r) | (ret >> (32 - r));
+ /* cast to uint64_t to avoid 32 bit shift of 32 bit value */
+ ret = (ret << r) | (unsigned long)((uint64_t)ret >> (32 - r));
ret &= 0xFFFFFFFFL;
ret ^= v * v;
c++;
@@ -404,7 +405,8 @@ unsigned long ossl_lh_strcasehash(const char *c)
for (n = 0x100; *c != '\0'; n += 0x100) {
v = n | ossl_tolower(*c);
r = (int)((v >> 2) ^ v) & 0x0f;
- ret = (ret << r) | (ret >> (32 - r));
+ /* cast to uint64_t to avoid 32 bit shift of 32 bit value */
+ ret = (ret << r) | (unsigned long)((uint64_t)ret >> (32 - r));
ret &= 0xFFFFFFFFL;
ret ^= v * v;
c++;
|
mesh: Update seqnum when re-encrypting for friend
Sets the sequence number when re-encrypting messages from the friend to
the lpn.
this is port of | @@ -442,7 +442,8 @@ static int unseg_app_sdu_prepare(struct bt_mesh_friend *frnd,
return 0;
}
- BT_DBG("Re-encrypting friend pdu");
+ BT_DBG("Re-encrypting friend pdu (SeqNum %06x -> %06x)",
+ meta.crypto.seq_num, bt_mesh.seq);
err = unseg_app_sdu_decrypt(frnd, buf, &meta);
if (err) {
@@ -450,6 +451,8 @@ static int unseg_app_sdu_prepare(struct bt_mesh_friend *frnd,
return err;
}
+ meta.crypto.seq_num = bt_mesh.seq;
+
err = unseg_app_sdu_encrypt(frnd, buf, &meta);
if (err) {
BT_WARN("Re-encryption failed! %d", err);
|
[io] add an option to skip the last updateInput | @@ -777,6 +777,7 @@ class MechanicsHdf5Runner_run_options(dict):
d['start_run_iteration_hook']=None
d['end_run_iteration_hook']=None
d['skip_last_update_output']=False
+ d['skip_last_update_input']=False
d['osns_assembly_type']= None
@@ -2213,6 +2214,7 @@ class MechanicsHdf5Runner(siconos.io.mechanics_hdf5.MechanicsHdf5):
else:
info = self.log(s.computeOneStepNSProblem, with_timer)(SICONOS_OSNSP_TS_VELOCITY)
self.log(s.DefaultCheckSolverOutput, with_timer)(info)
+ if not s.skipLastUpdateInput():
self.log(s.updateInput, with_timer)()
self.log(s.updateState, with_timer)()
if not s.skipLastUpdateOutput():
@@ -2775,6 +2777,7 @@ class MechanicsHdf5Runner(siconos.io.mechanics_hdf5.MechanicsHdf5):
simulation.setSkipLastUpdateOutput(run_options.get('skip_last_update_output'))
+ simulation.setSkipLastUpdateInput(run_options.get('skip_last_update_input'))
verbose=run_options.get('verbose')
if verbose:
|
serial-libs/openblas: update version to v0.3.5 | %define pname openblas
Name: %{pname}-%{compiler_family}%{PROJ_DELIM}
-Version: 0.3.0
+Version: 0.3.5
Release: 1%{?dist}
Summary: An optimized BLAS library based on GotoBLAS2
License: BSD-3-Clause
|
tools/ramdump: modify README for summary and subsection
1. Add summary at top of doc
2. Split subsection into build and upload from upload
3. Change subsection titles to "how to" format
4. Fix typo | # How to Use Ramdump
+Here we explain how to enable build support for RAMDUMP upload,
+and how to actually upload and parse it in the event of a crash during runtime.
## Contents
-> [Ramdump Upload Steps](#ramdump-upload-steps)
-> [Ramdump Parsing Steps](#ramdump-parsing-steps)
+> [Build Steps](#how-to-enable-ramdump)
+> [Upload Steps](#how-to-upload-ramdump)
+> [Parsing Steps](#how-to-parse-ramdump)
-## Ramdump Upload Steps
+## How to enable RAMDUMP
Below configuration must be enabled to support ramdump upload
1. Enable crashdump support (CONFIG_BOARD_CRASHDUMP=y)
```
@@ -27,6 +30,7 @@ Debug Options -> Enable Debug Output Features to y
Debug Options -> Enable backtracking using Frame pointer register to y
```
+## How to upload RAMDUMP
Run ramdump tool from host after target crashed.
1. If target got PANIC (asserted), below messages will be promted.
```
@@ -41,7 +45,7 @@ Run ramdump tool from host after target crashed.
cd $TIZENRT_BASEDIR/tools/ramdump/
./ramdump.sh
```
-4. Ramdump Tool recieves the ram contents from target.
+4. Ramdump Tool receives the ram contents from target.
```
Target Handshake successful do_handshake
Target entered to ramdump mode
@@ -52,7 +56,7 @@ Ramdump received successfully
copying ramdump_0x02020000_0x0210c800.bin to $TIZENRT_BASEDIR/build/output/bin
```
-## Ramdump Parsing Steps
+## How to parse RAMDUMP
DumpParser Script privodes two interfaces: CUI and GUI
### DumpParser using CUI
|
don't convert to john or cap if message_pair bit 8 is set | @@ -19,7 +19,6 @@ build:
$(CC) $(CFLAGS) $(CFLAGS1) -o wlanhcxmnc wlanhcxmnc.c
$(CC) $(CFLAGS) $(CFLAGS1) -o whoismac whoismac.c -lcurl
-
install: build
install -D -m 0755 wlandump $(INSTALLDIR)/wlandump
install -D -m 0755 wlanscan $(INSTALLDIR)/wlanscan
|
Base 666: Update return values for en/decoding | @@ -15,7 +15,7 @@ int decode (Key * key, Key * parent)
{
const char * strVal = keyString (key);
- if (keyIsString (key) == 0 || !keyGetMeta (key, "type") || strcmp (keyValue (keyGetMeta (key, "type")), "binary")) return 1;
+ if (keyIsString (key) == 0 || !keyGetMeta (key, "type") || strcmp (keyValue (keyGetMeta (key, "type")), "binary")) return 0;
ELEKTRA_LOG_DEBUG ("Decode binary value");
@@ -48,7 +48,7 @@ int decode (Key * key, Key * parent)
int encode (Key * key, Key * parent)
{
- if (keyIsBinary (key) == 0 || strcmp (keyValue (keyGetMeta (key, "type")), "binary")) return 1;
+ if (keyIsBinary (key) == 0) return 0;
char * base64 = ELEKTRA_PLUGIN_FUNCTION (ELEKTRA_PLUGIN_NAME_C, base64Encode) (keyValue (key), (size_t)keyGetValueSize (key));
if (!base64)
@@ -88,7 +88,7 @@ int elektraBase666Get (Plugin * handle ELEKTRA_UNUSED, KeySet * keySet, Key * pa
int status = 0;
while (status >= 0 && (key = ksNext (keySet)))
{
- status = decode (key, parent);
+ status |= decode (key, parent);
}
return status;
}
@@ -106,7 +106,7 @@ int elektraBase666Set (Plugin * handle ELEKTRA_UNUSED, KeySet * keySet, Key * pa
int status = 0;
while (status >= 0 && (key = ksNext (keySet)))
{
- status = encode (key, parent);
+ status |= encode (key, parent);
}
return status;
}
|
Trying to solve bug in windows node async handles (again). | @@ -4968,8 +4968,6 @@ int64_t node_loader_impl_user_async_handles_count(loader_impl_node node_impl)
return active_handles - node_impl->base_active_handles - node_impl->extra_active_handles.load() + (int64_t)(node_impl->thread_loop->active_reqs.count) + closing;
}
-/* TODO: Remove async handle logging temporally */
-/*
void node_loader_impl_print_handles(loader_impl_node node_impl)
{
printf("Number of active handles: %" PRId64 "\n", node_loader_impl_async_handles_count(node_impl));
@@ -4977,7 +4975,6 @@ void node_loader_impl_print_handles(loader_impl_node node_impl)
uv_print_active_handles(node_impl->thread_loop, stdout);
fflush(stdout);
}
-*/
napi_value node_loader_impl_async_destroy_safe(napi_env env, napi_callback_info info)
{
|
tests: internal: ra: add unit test for lookup order | @@ -533,6 +533,89 @@ void cb_dot_and_slash_key()
msgpack_unpacked_destroy(&result);
}
+static int order_lookup_check(char *buf, size_t size,
+ char *fmt, char *expected_out)
+{
+ size_t off = 0;
+ char *fmt_out;
+ flb_sds_t str;
+ msgpack_unpacked result;
+ msgpack_object map;
+ struct flb_record_accessor *ra;
+
+ /* Check bool is 'true' */
+ fmt = flb_sds_create(fmt);
+ if (!TEST_CHECK(fmt != NULL)) {
+ exit(EXIT_FAILURE);
+ }
+ fmt_out = expected_out;
+
+ ra = flb_ra_create(fmt, FLB_FALSE);
+ TEST_CHECK(ra != NULL);
+ if (!ra) {
+ exit(EXIT_FAILURE);
+ }
+
+ /* Unpack msgpack object */
+ msgpack_unpacked_init(&result);
+ msgpack_unpack_next(&result, buf, size, &off);
+ map = result.data;
+
+ /* Do translation */
+ str = flb_ra_translate(ra, NULL, -1, map, NULL);
+ TEST_CHECK(str != NULL);
+ if (!str) {
+ exit(EXIT_FAILURE);
+ }
+
+ TEST_CHECK(flb_sds_len(str) == strlen(expected_out));
+ if (flb_sds_len(str) != strlen(expected_out)) {
+ printf("received: '%s', expected: '%s'\n", str, fmt_out);
+ }
+
+ TEST_CHECK(memcmp(str, expected_out, strlen(expected_out)) == 0);
+
+ flb_sds_destroy(str);
+ flb_sds_destroy(fmt);
+ flb_ra_destroy(ra);
+ msgpack_unpacked_destroy(&result);
+
+ return 0;
+}
+
+void cb_key_order_lookup()
+{
+ int len;
+ int ret;
+ int type;
+ char *out_buf;
+ size_t out_size;
+ char *json;
+
+ /* Sample JSON message */
+ json = "{\"key\": \"abc\", \"bool\": false, \"bool\": true, "
+ "\"str\": \"bad\", \"str\": \"good\", "
+ "\"num\": 0, \"num\": 1}";
+
+ /* Convert to msgpack */
+ len = strlen(json);
+ ret = flb_pack_json(json, len, &out_buf, &out_size, &type);
+ TEST_CHECK(ret == 0);
+ if (ret == -1) {
+ exit(EXIT_FAILURE);
+ }
+
+ printf("\n-- record --\n");
+ flb_pack_print(out_buf, out_size);
+
+ /* check expected outputs per record accessor pattern */
+ order_lookup_check(out_buf, out_size, "$bool", "true");
+ order_lookup_check(out_buf, out_size, "$str" , "good");
+ order_lookup_check(out_buf, out_size, "$num" , "1");
+
+ flb_free(out_buf);
+}
+
TEST_LIST = {
{ "keys" , cb_keys},
{ "dash_key" , cb_dash_key},
@@ -542,5 +625,6 @@ TEST_LIST = {
{ "dots_subkeys" , cb_dots_subkeys},
{ "array_id" , cb_array_id},
{ "get_kv_pair" , cb_get_kv_pair},
+ { "key_order_lookup", cb_key_order_lookup},
{ NULL }
};
|
fixup! netutil/ifconfig: enable ipv6 autoconfig | @@ -282,8 +282,10 @@ int cmd_ifconfig(int argc, char **argv)
netif = netif_find(intf);
if (netif) {
+#ifdef CONFIG_NET_IPv6_AUTOCONFIG
+ /* enable IPv6 address stateless autoconfiguration */
netif_set_ip6_autoconfig_enabled(netif, 1);
-
+#endif
/* To auto-config linklocal address, netif should have mac address already */
netif_create_ip6_linklocal_address(netif, 1);
ndbg("generated IPV6 linklocal address - %X : %X : %X : %X\n", PP_HTONL(ip_2_ip6(&netif->ip6_addr[0])->addr[0]), PP_HTONL(ip_2_ip6(&netif->ip6_addr[0])->addr[1]), PP_HTONL(ip_2_ip6(&netif->ip6_addr[0])->addr[2]), PP_HTONL(ip_2_ip6(&netif->ip6_addr[0])->addr[3]));
|
pkg/container-collection: Notify subscribers before removing container
This change is particularly useful in the network-graph trace gadget as,
during the deletion notification (detacher), it uses the
LookupContainersByNetns to check how many containers are using a given
network namespace. | @@ -119,9 +119,10 @@ func (cc *ContainerCollection) GetContainer(id string) *Container {
return container
}
-// RemoveContainer removes a container from the collection.
+// RemoveContainer removes a container from the collection, but only after
+// notifying all the subscribers.
func (cc *ContainerCollection) RemoveContainer(id string) {
- v, loaded := cc.containers.LoadAndDelete(id)
+ v, loaded := cc.containers.Load(id)
if !loaded {
return
}
@@ -129,6 +130,12 @@ func (cc *ContainerCollection) RemoveContainer(id string) {
if cc.pubsub != nil {
cc.pubsub.Publish(EventTypeRemoveContainer, v.(*Container))
}
+
+ // Remove the container from the collection after publishing the event as
+ // subscribers might need to use the different collection's lookups during
+ // the notification handler, and they expect the container to still be
+ // present.
+ cc.containers.Delete(id)
}
// AddContainer adds a container to the collection.
|
flounder: sending the right bind/bind-reply message types | @@ -901,7 +901,7 @@ tx_bind_msg p ifn =
[C.Return (C.Variable "FLOUNDER_ERR_TX_BUSY")] [],
C.SBlank,
C.Ex $ C.Call "flounder_stub_ump_control_fill"
- [chanst, ctrladdr, C.Variable $ msg_enum_elem_name ifn "__bind"],
+ [chanst, ctrladdr, C.Variable $ "FL_UMP_BIND" ],
-- C.StmtList
-- [C.Ex $ C.Assignment (msgword n) (fragment_word_to_expr (ump_arch p) ifn "___bind" (words !! n))
-- | n <- [0 .. length(words) - 1], words !! n /= []],
@@ -941,7 +941,7 @@ tx_bind_reply p ifn =
C.If (C.Unary C.Not msgvar)
[C.Return (C.Variable "FLOUNDER_ERR_TX_BUSY")] [],
C.Ex $ C.Call "flounder_stub_ump_control_fill"
- [chanst, ctrladdr, C.Variable $ msg_enum_elem_name ifn "__bind_reply"],
+ [chanst, ctrladdr, C.Variable $ "FL_UMP_BIND_REPLY" ],
-- C.StmtList
-- [C.Ex $ C.Assignment (msgword n) (fragment_word_to_expr (ump_arch p) ifn "___bind" (words !! n))
-- | n <- [0 .. length(words) - 1], words !! n /= []],
|
fix --no-url-call not working; close | @@ -109,11 +109,13 @@ char* gen_parseResponse(char* res, const struct arguments* arguments) {
no_statelookup = 1;
}
secFree(redirect_uri);
+ if (!arguments->noUrlCall) {
char* cmd = oidc_sprintf(URL_OPENER " \"%s\"", _uri);
if (system(cmd) != 0) {
logger(NOTICE, "Cannot open url");
}
secFree(cmd);
+ }
if (no_statelookup) {
exit(EXIT_SUCCESS);
}
|
kernel/binary_manager: Remove unnessasary sched_lock/unlock
It is not nessasary to call sched_lock/unlock here. | #include <string.h>
#include <signal.h>
#include <stdlib.h>
-#include <tinyara/sched.h>
#include <tinyara/binary_manager.h>
#include "binary_manager.h"
@@ -163,8 +162,6 @@ int binary_manager(int argc, char *argv[])
continue;
}
- sched_lock();
-
bmvdbg("Recevied Request msg : cmd = %d\n", request_msg);
switch (request_msg.cmd) {
#ifdef CONFIG_BINMGR_RECOVERY
@@ -191,8 +188,6 @@ int binary_manager(int argc, char *argv[])
default:
break;
}
-
- sched_unlock();
}
binary_manager_exit:
|
Update: Encode.h: Description | #ifndef H_SCALARENCODER
#define H_SCALARENCODER
-//////////////////////////////
-// Scalar and term encoder //
-//////////////////////////////
-//Supports to encode a value in HTM way:
-//https://www.youtube.com/watch?v=V3Yqtpytif0&list=PL3yXMgtrZmDqhsFQzwUC9V8MeeVOQ7eZ9&index=6
+/////////////////////
+// Narsese encoder //
+/////////////////////
+//Supports converting Narsese strings to compound terms
//References//
//-----------//
|
Bump firmware version to 0x262d0500
improve routing, use route recond messages
improve Philips hue motion sensor and dimmer outtakes | @@ -71,7 +71,7 @@ DEFINES += GIT_COMMMIT=\\\"$$GIT_COMMIT\\\" \
# Minimum version of the RaspBee firmware
# which shall be used in order to support all features for this software release (case sensitive)
DEFINES += GW_AUTO_UPDATE_FW_VERSION=0x260b0500
-DEFINES += GW_MIN_RPI_FW_VERSION=0x262b0500
+DEFINES += GW_MIN_RPI_FW_VERSION=0x262d0500
# Minimum version of the deRFusb23E0X firmware
# which shall be used in order to support all features for this software release
|
Prevent unused variable if passed to STUBL | }
/** non-fatal stub implementation of wayland interface method. */
-#define STUBL(x) wlc_log(WLC_LOG_WARN, "%s @ line %d is not implemented", __PRETTY_FUNCTION__, __LINE__)
+#define STUBL(x) { \
+ (void)x; \
+ wlc_log(WLC_LOG_WARN, "%s @ line %d is not implemented", __PRETTY_FUNCTION__, __LINE__); \
+}
/** length macro for statically initialized data. */
#define LENGTH(x) (sizeof(x) / sizeof(x)[0])
|
proc: proc_threadPriority(-1) fix (implicit integer promotion)
JIRA: | @@ -929,7 +929,11 @@ int proc_threadPriority(int priority)
spinlock_ctx_t sc;
int ret;
- if ((priority < -1) || (priority >= sizeof(threads_common.ready) / sizeof(threads_common.ready[0]))) {
+ if (priority < -1) {
+ return -EINVAL;
+ }
+
+ if ((priority >= 0) && (priority >= sizeof(threads_common.ready) / sizeof(threads_common.ready[0]))) {
return -EINVAL;
}
|
Fix CGCatalog filters
Fix CGCatalog's project filters for SBResourceCopy on reference images. | </ClangCompile>
<SBInfoPlistCopy Include="..\..\CGCatalog\Info.plist" />
<SBResourceCopy Include="..\..\CGCatalog\Resources\AddArc.png">
+ <Filter>CGCatalog\Resources</Filter>
+ </SBResourceCopy>
<SBResourceCopy Include="..\..\CGCatalog\Resources\AddArcToPoint.png">
+ <Filter>CGCatalog\Resources</Filter>
+ </SBResourceCopy>
<SBResourceCopy Include="..\..\CGCatalog\Resources\AddCurveToPoint.png">
+ <Filter>CGCatalog\Resources</Filter>
+ </SBResourceCopy>
<SBResourceCopy Include="..\..\CGCatalog\Resources\AddElipseToRect.png">
+ <Filter>CGCatalog\Resources</Filter>
+ </SBResourceCopy>
<SBResourceCopy Include="..\..\CGCatalog\Resources\AddLineToPoint.png">
+ <Filter>CGCatalog\Resources</Filter>
+ </SBResourceCopy>
<SBResourceCopy Include="..\..\CGCatalog\Resources\AddPath.png">
+ <Filter>CGCatalog\Resources</Filter>
+ </SBResourceCopy>
<SBResourceCopy Include="..\..\CGCatalog\Resources\AddQuadCurveToPoint.png">
+ <Filter>CGCatalog\Resources</Filter>
+ </SBResourceCopy>
<SBResourceCopy Include="..\..\CGCatalog\Resources\CloseSubPath.png">
+ <Filter>CGCatalog\Resources</Filter>
+ </SBResourceCopy>
<SBResourceCopy Include="..\..\CGCatalog\Resources\GetBoundingBox.png">
+ <Filter>CGCatalog\Resources</Filter>
+ </SBResourceCopy>
<SBResourceCopy Include="..\..\CGCatalog\Resources\LogoAutodesk.png">
+ <Filter>CGCatalog\Resources</Filter>
+ </SBResourceCopy>
<SBResourceCopy Include="..\..\CGCatalog\Resources\PathAddRect.png">
+ <Filter>CGCatalog\Resources</Filter>
+ </SBResourceCopy>
<SBResourceCopy Include="..\..\CGCatalog\Resources\PathApply.png">
+ <Filter>CGCatalog\Resources</Filter>
+ </SBResourceCopy>
<SBResourceCopy Include="..\..\CGCatalog\Resources\RoundedRect.png">
<Filter>CGCatalog\Resources</Filter>
</SBResourceCopy>
|
libhfuzz/persistent: in case there are arguments to main(), use the last argument as an input file | @@ -82,8 +82,19 @@ int main(int argc, char **argv)
}
if (fcntl(_HF_PERSISTENT_FD, F_GETFD) == -1 && errno == EBADF) {
- LOG_I("Accepting input from stdin\n"
- "Usage for fuzzing: honggfuzz -P [flags] -- %s", argv[0]);
+ int in_fd = STDIN_FILENO;
+ const char *fname = "[STDIN]";
+ if (argc > 1) {
+ fname = argv[argc - 1];
+ if ((in_fd = open(argv[argc - 1], O_RDONLY)) == -1) {
+ PLOG_W("Cannot open '%s' as input, using stdin", argv[argc - 1]);
+ in_fd = STDIN_FILENO;
+ fname = "[STDIN]";
+ }
+ }
+
+ LOG_I("Accepting input from '%s'\n"
+ "Usage for fuzzing: honggfuzz -P [flags] -- %s", fname, argv[0]);
ssize_t len = files_readFromFd(STDIN_FILENO, buf, sizeof(buf));
if (len < 0) {
|
{AH} return None in get_forward_sequence if sequence not defined, fixes | @@ -1835,7 +1835,11 @@ cdef class AlignedSegment:
Reads mapping to the reverse strand will be reverse
complemented.
+
+ Returns None if the record has no query sequence.
"""
+ if self.query_sequence is None:
+ return None
s = force_str(self.query_sequence)
if self.is_reverse:
s = s.translate(maketrans("ACGTacgtNnXx", "TGCAtgcaNnXx"))[::-1]
|
Simplify JsonReaderException logging | @@ -237,7 +237,7 @@ namespace MiningCore.Stratum
case JsonReaderException jsonEx:
// ban clients sending junk
- logger.Error(() => $"[{LogCat}] [{client.ConnectionId}] Connection json error state: {ex.Message}, path: {jsonEx.Path}");
+ logger.Error(() => $"[{LogCat}] [{client.ConnectionId}] Connection json error state: {jsonEx.Message}");
//logger.Info(() => $"[{LogCat}] [{client.ConnectionId}] Banning client for sending junk");
//banManager.Ban(client.RemoteEndpoint.Address, TimeSpan.FromMinutes(30));
break;
|
Fix bgwriter_checkpoint test case
Since we start standby master if WITH_MIRRORS=true. The element number
in gp_segment_configuration changes, and result in change of answer file
Author: Max Yang
Author: Xiaoran Wang | @@ -59,6 +59,7 @@ NOTICE: Success:
NOTICE: Success:
NOTICE: Success:
NOTICE: Success:
+NOTICE: Success:
NOTICE: Success:
gp_inject_fault
-----------------
@@ -69,7 +70,8 @@ NOTICE: Success:
t
t
t
-(7 rows)
+ t
+(8 rows)
-- Start with a clean slate (no dirty buffers).
checkpoint;
@@ -226,6 +228,7 @@ NOTICE: Success:
NOTICE: Success:
NOTICE: Success:
NOTICE: Success:
+NOTICE: Success:
NOTICE: Success:
gp_inject_fault
-----------------
@@ -236,5 +239,6 @@ NOTICE: Success:
t
t
t
-(7 rows)
+ t
+(8 rows)
|
Add default circle ci 2.0 file | -machine:
- xcode:
- version: 9.2.0
-test:
- override:
- # iOS 10.0 platform with iOS 11.2 SDK
- - xcodebuild clean test
- CODE_SIGNING_REQUIRED=NO
- CODE_SIGN_IDENTITY=
- -destination 'platform=iOS Simulator,name=iPhone 5,OS=10.3.1'
- -sdk iphonesimulator11.2
- -scheme "TrustKit"
+version: 2
+jobs:
+ build-and-test:
+ macos:
+ xcode: "10.1"
+ working_directory: /Users/distiller/project
+ environment:
+ FL_OUTPUT_DIR: output
- # iOS 11.2 platform with iOS 11.2 SDK
- - xcodebuild clean test
- CODE_SIGNING_REQUIRED=NO
- CODE_SIGN_IDENTITY=
- -destination 'platform=iOS Simulator,name=iPhone 7,OS=11.2'
- -sdk iphonesimulator11.2
- -scheme "TrustKit"
+ - run:
+ name: Build and run tests
+ command: fastlane scan
+ environment:
+ SCAN_DEVICE: iPhone 8
+ SCAN_SCHEME: WebTests
- # macOS 10.13 platform with macOS 10.13 SDK
- - xcodebuild clean test
- CODE_SIGNING_REQUIRED=NO
- CODE_SIGN_IDENTITY=
- -destination 'platform=OS X'
- -sdk macosx10.13
- -scheme "TrustKit OS X"
-
- # tvOS 11.2 platform with tvOS 11.2 SDK
- - xcodebuild clean test
- CODE_SIGNING_REQUIRED=NO
- CODE_SIGN_IDENTITY=
- -destination 'platform=tvOS Simulator,name=Apple TV,OS=11.2'
- -sdk appletvsimulator11.2
- -scheme "TrustKit tvOS"
+ - store_test_results:
+ path: output/scan
+ - store_artifacts:
+ path: output
+workflows:
+ version: 2
+ build-and-test:
+ jobs:
+ - build-and-test
|
improve histogram loading and display in mcpha.tcl | @@ -365,7 +365,7 @@ namespace eval ::mcpha {
}
blt::vector create [my varname xvec](16385)
- blt::vector create [my varname yvec](16384)
+ blt::vector create [my varname yvec](16385)
# fill one vector for the x axis with 16385 points
[my varname xvec] seq -0.5 16383.5
@@ -1079,7 +1079,13 @@ namespace eval ::mcpha {
tk_messageBox -icon info \
-message "File \"$fname\" read successfully"
my cntr_reset
- [my varname yvec] set $yvec_new
+ set i 0
+ foreach value $yvec_new {
+ if {[string is space $value]} continue
+ if {$i > 16383} break
+ set [my varname yvec]($i) $value
+ incr i
+ }
}
}
@@ -1638,7 +1644,7 @@ namespace eval ::mcpha {
}
blt::vector create [my varname xvec](4097)
- blt::vector create [my varname yvec](4096)
+ blt::vector create [my varname yvec](4097)
# fill one vector for the x axis with 4097 points
[my varname xvec] seq -0.5 4095.5
@@ -1949,7 +1955,13 @@ namespace eval ::mcpha {
} else {
tk_messageBox -icon info \
-message "File \"$fname\" read successfully"
- [my varname yvec] set $yvec_new
+ set i 0
+ foreach value $yvec_new {
+ if {[string is space $value]} continue
+ if {$i > 4095} break
+ set [my varname yvec]($i) $value
+ incr i
+ }
}
}
|
correcting ticker | @@ -37,7 +37,7 @@ static const network_info_t NETWORK_MAPPING[] = {
{.chain_id = 199, .name = "BTTC", .ticker = "BTT"},
{.chain_id = 1030, .name = "Conflux", .ticker = "CFX"},
{.chain_id = 61, .name = "Ethereum Classic", .ticker = "ETC"},
- {.chain_id = 246, .name = "EnergyWebChain", .ticker = "EWC"},
+ {.chain_id = 246, .name = "EnergyWebChain", .ticker = "EWT"},
{.chain_id = 14, .name = "Flare", .ticker = "FLR"},
{.chain_id = 16, .name = "Flare Coston", .ticker = "FLR"},
{.chain_id = 24, .name = "KardiaChain", .ticker = "KAI"},
|
out_file: fix leaks when exiting on exception (CID 185662, 185672) | @@ -227,6 +227,7 @@ static void cb_file_flush(void *data, size_t bytes,
tag_buf = flb_malloc(tag_len + 1);
if (!tag_buf) {
flb_errno();
+ fclose(fp);
FLB_OUTPUT_RETURN(FLB_RETRY);
}
memcpy(tag_buf, tag, tag_len);
@@ -256,6 +257,7 @@ static void cb_file_flush(void *data, size_t bytes,
else {
msgpack_unpacked_destroy(&result);
fclose(fp);
+ flb_free(tag_buf);
FLB_OUTPUT_RETURN(FLB_RETRY);
}
break;
|
Fix minor markdown formatting issue
[ci skip] | @@ -51,7 +51,7 @@ arguments with a plus sign):
| +autoflushl2 | Copy dirty data in the L2 cache to system memory at the end of simulation before writing to file (used with +memdump...) |
| +profile=*filename* | Periodically write the program counters to a file. Use with tools/misc/profile.py |
| +block=*filename* | Read file into virtual block device, which it exposes as a virtual SD/MMC device.<sup>1</sup>
-| +randomize=*\[1|0\]* | Randomize initial register and memory values. Used to verify reset handling. Defaults to on.
+| +randomize=*\[1\|0\]* | Randomize initial register and memory values. Used to verify reset handling. Defaults to on.
| +randseed=*seed* | If randomization is enabled, set the seed for the random number generator.
| +dumpmems | Dump the sizes of all internal FIFOs and SRAMs to standard out and exit. Used by tools/misc/extract_mems.py |
|
docs: Forward-port missing 17.01 release notes | # Release Notes {#release_notes}
* @subpage release_notes_1704
+* @subpage release_notes_17011
* @subpage release_notes_1701
* @subpage release_notes_1609
* @subpage release_notes_1606
@todo Release 17.04 needs release notes.
+
+@page release_notes_17011 Release notes for VPP 17.01.1
+
+This is bug fix release.
+
+For the full list of fixed issues please reffer to:
+- fd.io [JIRA](https://jira.fd.io)
+- git [commit log](https://git.fd.io/vpp/log/?h=stable/1701)
+
@page release_notes_1701 Release notes for VPP 17.01
@note This release was for a while known as 16.12.
-@todo Release 17.01 needs release notes. It will show up here soon...
## Features
+- [Integrated November 2016 DPDK release](http://www.dpdk.org/doc/guides/rel_notes/release_16_11.html)
+
+- Complete rework of Forwarding Information Base (FIB)
+
+- Performance Improvements
+ - Improvements in DPDK input and output nodes
+ - Improvements in L2 path
+ - Improvmeents in IPv4 lookup node
+
+- Feature Arcs Improvements
+ - Consolidation of the code
+ - New feature arcs
+ - device-input
+ - interface-output
+
+- DPDK Cryptodev Support
+ - Software and Hardware Crypto Support
+
+- DPDK HQoS support
+
+- Simple Port Analyzer (SPAN)
+
+- Bidirectional Forwarding Detection
+ - Basic implementation
+
+- IPFIX Improvements
+
+- L2 GRE over IPSec tunnels
+
+- Link Layer Discovery Protocol (LLDP)
+
+- Vhost-user Improvements
+ - Performance Improvements
+ - Multiqueue
+ - Reconnect
+
+- LISP Enhancements
+ - Source/Dest control plane support
+ - L2 over LISP and GRE
+ - Map-Register/Map-Notify/RLOC-probing support
+ - L2 API improvements, overall code hardening
+
+- Plugins:
+ - New: ACL
+ - New: Flow per Packet
+ - Improved: SNAT
+ - Mutlithreading
+ - Flow export
+
+- Doxygen Enhancements
+
+- Luajit API bindings
+
+- API Refactoring
+ - file split
+ - message signatures
+
+- Python and Scapy based unit testing infrastructure
+ - Infrastructure
+ - Various tests
+
+- Packet Generator improvements
+
+- TUN/TAP jumbo frames support
+
+- Other various bug fixes and improvements
+
## Known issues
+For the full list of issues please reffer to fd.io [JIRA](https://jira.fd.io).
+
## Issues fixed
+For the full list of fixed issues please reffer to:
+- fd.io [JIRA](https://jira.fd.io)
+- git [commit log](https://git.fd.io/vpp/log/?h=stable/1701)
+
@page release_notes_1609 Release notes for VPP 16.09
|
fputest: new, better test | #include <math.h>
#include <inttypes.h>
#include <barrelfish/barrelfish.h>
+#include <barrelfish/systime.h>
static const char *progname = NULL;
static int fpu_thread(void *arg)
{
- double save = 0.0, lastsave = 0.0;
+ double save;
+ volatile double lastsave;
int n = (uintptr_t)arg;
int j = 0;
-
+ save = systime_now();
+ lastsave = sin(3.0 * save + 3.0);
for (uint64_t i = 0;; i++) {
- save = sin(save + 0.1) + 0.1;
- // printf("%s(%d): %g\n", progname, n, save);
- double test = sin(lastsave + 0.1) + 0.1;
- if(save != test) { // if (fabs(save - test) > 0.00000001)
+ save = sin(3.0 * save + 3.0);
+ if (save != lastsave) {
printf("ERROR %s(%d): %.15g != %.15g at iteration %" PRIu64 "\n",
- progname, n, save, test, i);
+ progname, n, save, lastsave, i);
abort();
}
- lastsave = save;
-
- if(i % 50000000 == 0) {
+ lastsave = sin(3.0 * lastsave + 3.0);
+ if (i % 10000000 == 0) {
printf("%s(%d): iteration %" PRIu64 "\n", progname, n, i);
j++;
- if(j == 3) {
+ if (j == 6) {
printf("fputest passed successfully!\n");
thread_exit(0);
}
}
}
+ return 0;
}
int main(int argc, char *argv[])
|
Update valgrind.yml
Continue the workflow even when tests fail.
Run every Sunday at midnight. | @@ -3,7 +3,7 @@ name: valgrind OPAE tests
on:
schedule:
- - cron: '8 0 * * *'
+ - cron: '0 7 * * 0'
jobs:
build:
@@ -24,6 +24,7 @@ jobs:
- name: set hugepages
run: sudo sysctl -w vm.nr_hugepages=8
- name: test
+ continue-on-error: true
run: cd ${{ github.workspace }}/.build && ${{ github.workspace }}/scripts/valgrind ${{ github.workspace }}/.build
env:
OPAE_EXPLICIT_INITIALIZE: 1
|
Zero AES key when marking invalid | @@ -326,6 +326,7 @@ boot_enc_mark_keys_invalid(struct enc_key_data *enc_state)
size_t slot;
for (slot = 0; slot < BOOT_NUM_SLOTS; ++slot) {
+ memset(&enc_state[slot].aes, 0, sizeof(enc_state[slot].aes));
enc_state[slot].valid = 0;
}
}
|
increase total heap limit to 1GB | @@ -9,7 +9,7 @@ static size_t allocated_mem = 0;
static std::unordered_map<void*, size_t> allocated_len_map;
void *limited_malloc(size_t size) {
- if (size + allocated_mem > 1 << 24) {
+ if (size + allocated_mem > 1 << 30) {
return nullptr;
}
void* m = malloc(size);
|
system/i2c: Fix fd leak in i2ccmd_reset | #include <nuttx/config.h>
+#include <unistd.h>
+
#include <nuttx/i2c/i2c_master.h>
#include "i2ctool.h"
@@ -60,6 +62,12 @@ int i2ccmd_reset(FAR struct i2ctool_s *i2ctool, int argc, char **argv)
i2ctool_printf(i2ctool, "Failed to send the reset command\n");
}
+ ret = close(fd);
+ if (ret < 0)
+ {
+ i2ctool_printf(i2ctool, "Failed to close i2c device\n");
+ }
+
return ret;
}
|
Make set_enclave_tests_properties consistent with add_enclave_test | @@ -96,10 +96,12 @@ endfunction (enclave_link_libraries)
# Wrapper of `set_tests_properties`
macro (set_enclave_tests_properties NAME PROPERTIES PROP)
+ if (UNIX OR USE_CLANGW OR ADD_WINDOWS_ENCLAVE_TESTS)
set_tests_properties(${NAME} PROPERTIES ${PROP} "${ARGN}")
if (TEST ${NAME}-lvi-cfg)
set_tests_properties(${NAME}-lvi-cfg PROPERTIES ${PROP} "${ARGN}")
endif ()
+ endif()
endmacro (set_enclave_tests_properties)
macro (set_enclave_properties NAME PROPERTIES)
|
vere: make import flow not use base64 encoding | @@ -85,18 +85,11 @@ _fore_inject(u3_auto* car_u, c3_c* pax_c)
static void
_fore_import(u3_auto* car_u, c3_c* pax_c)
{
- // With apologies
u3_noun arc = u3ke_cue(u3m_file(pax_c));
- u3_noun b64 = u3do("crip", u3do("en-base64:mimes:html", arc));
- c3_c * b64_c = u3r_string(b64);
+ u3_noun imp = u3do("cat", u3nt(u3i_word(3), u3i_string("#import_"), arc);
+ u3_noun siz = u3r_met(3, imp));
+ u3_noun dat = u3nt(u3_nul, siz, imp);
- c3_w siz_w = strlen(b64_c) + 120;
- c3_c * bod_c = (c3_c *) c3_malloc(siz_w);
- snprintf(bod_c, siz_w,
- "{\"source\": {\"import-all\": {\"base64-jam\": \"%s\"}}, \
- \"sink\": {\"stdout\": null}}", b64_c);
-
- u3_noun dat = u3nt(u3_nul, u3i_word(strlen(bod_c)), u3i_string(bod_c));
u3_noun req = u3nt(c3n,
u3nc(u3i_string("ipv4"), u3i_word(0x7f000001)),
u3nq(u3i_string("POST"), u3i_string("/"), u3_nul, dat));
|
kernel: add a BINARY_MANAGER dependency in USERMAIN_STACKSIZE
Under APP_BINARY_SEPARATION and BINARY_MANAGER conditionals,
user main task is not launching from os_bringup. so that
USERMAIN_STACKSIZE is not necessary.
This commit makes it disapeared under conditionals above. | @@ -1112,6 +1112,7 @@ config IDLETHREAD_STACKSIZE
config USERMAIN_STACKSIZE
int "Main thread stack size"
default 2048
+ depends on !BINARY_MANAGER
---help---
The size of the stack to allocate for the user initialization thread
that is started as soon as the OS completes its initialization.
|
CMSIS-Core(M): updated documentation.
- Added missing SecureFault to the list of exceptions in __getIPSR() description. | @@ -102,7 +102,8 @@ void __set_CONTROL(uint32_t control);
- = 4 MemManage
- = 5 BusFault
- = 6 UsageFault
- - = 7-10 Reserved
+ - = 7 SecureFault
+ - = 8-10 Reserved
- = 11 SVC
- = 12 Reserved for Debug
- = 13 Reserved
|
no-op instead of crash on spurious :dns binding creation retries | ++ do-create
|= [him=ship for=ship try=@ud]
^+ this
- =/ tar (~(got by pen.nam) him)
+ =/ pending (~(get by pen.nam) him)
+ ?~ pending
+ this
+ =* tar u.pending
=/ =wire
(http-wire try /create/(scot %p him)/for/(scot %p for))
=/ pre=(unit [id=@ta tar=target])
|
Add ATOM_FLAG_GLOBAL | @@ -3912,6 +3912,9 @@ NtAddAtom(
);
#if (PHNT_VERSION >= PHNT_WIN8)
+
+#define ATOM_FLAG_GLOBAL 0x2
+
// rev
NTSYSCALLAPI
NTSTATUS
@@ -3922,6 +3925,7 @@ NtAddAtomEx(
_Out_opt_ PRTL_ATOM Atom,
_In_ ULONG Flags
);
+
#endif
NTSYSCALLAPI
|
[core] perf: buffer_string_append_len()
buffer_string_append_len() short-circuit common case,
but preserve blank-string initialization side-effect
if buffer is empty | @@ -128,6 +128,9 @@ char* buffer_string_prepare_copy(buffer *b, size_t size) {
char* buffer_string_prepare_append(buffer *b, size_t size) {
force_assert(NULL != b);
+ if (b->used && size < b->size - b->used)
+ return b->ptr + b->used - 1;
+
if (buffer_string_is_empty(b)) {
return buffer_string_prepare_copy(b, size);
} else {
|
s32k1xx: reserve MSG_DATA extra space only when needed by config. | #define POOL_SIZE 1
+#if defined(CONFIG_NET_CAN_RAW_TX_DEADLINE) || defined(CONFIG_NET_TIMESTAMP)
#define MSG_DATA sizeof(struct timeval)
+#else
+#define MSG_DATA 0
+#endif
/* CAN bit timing values */
#define CLK_FREQ 80000000
|
Make the project browser work with the new navigation | @@ -272,6 +272,7 @@ public class FileBrowserViewController: UITableViewController, UIDocumentPickerD
editor.document?.editor = nil
editor.save { (_) in
+ editor.document?.close(completionHandler: { (_) in
let document = PyDocument(fileURL: url)
document.open { (_) in
@@ -281,6 +282,7 @@ public class FileBrowserViewController: UITableViewController, UIDocumentPickerD
}
#endif
+ editor.isDocOpened = false
editor.parent?.title = document.fileURL.deletingPathExtension().lastPathComponent
editor.document = document
editor.viewWillAppear(false)
@@ -293,6 +295,7 @@ public class FileBrowserViewController: UITableViewController, UIDocumentPickerD
_ = self.navigationController?.splitViewController?.displayModeButtonItem.target?.perform(action, with: self)
}
}
+ })
}
|
[mod_webdav] webdav_reqbody_type_xml() fixes
webdav_reqbody_type_xml() must check request headers (behavior fix)
protect webdav_reqbody_type_xml() with USE_PROPPATCH (compile fix) | @@ -2319,12 +2319,13 @@ webdav_405_no_db (request_st * const r)
#endif
+#ifdef USE_PROPPATCH
__attribute_pure__
static int
webdav_reqbody_type_xml (request_st * const r)
{
const buffer * const vb =
- http_header_response_get(r, HTTP_HEADER_CONTENT_TYPE,
+ http_header_request_get(r, HTTP_HEADER_CONTENT_TYPE,
CONST_STR_LEN("Content-Type"));
if (!vb) return 0;
@@ -2333,6 +2334,7 @@ webdav_reqbody_type_xml (request_st * const r)
return ((len==15 && 0==memcmp(vb->ptr, "application/xml", 15))
|| (len==8 && 0==memcmp(vb->ptr, "text/xml", 8)));
}
+#endif
static int
|
fix doxygen annotation | @@ -779,7 +779,7 @@ chaos_replystr(sldns_buffer* pkt, char** str, int num, struct edns_data* edns,
* Create CH class trustanchor answer.
* @param pkt: buffer
* @param edns: edns reply information.
- * @param worker: worker with scratch region.
+ * @param w: worker with scratch region.
*/
static void
chaos_trustanchor(sldns_buffer* pkt, struct edns_data* edns, struct worker* w)
|
Use rint directly | @@ -241,7 +241,7 @@ d_m3UnaryOp_f (f32, Ceil, ceilf); d_m3UnaryOp_f (f64, Ceil,
d_m3UnaryOp_f (f32, Floor, floorf); d_m3UnaryOp_f (f64, Floor, floor);
d_m3UnaryOp_f (f32, Trunc, truncf); d_m3UnaryOp_f (f64, Trunc, trunc);
d_m3UnaryOp_f (f32, Sqrt, sqrtf); d_m3UnaryOp_f (f64, Sqrt, sqrt);
-d_m3UnaryOp_f (f32, Nearest, nearest_f32); d_m3UnaryOp_f (f64, Nearest, nearest_f64);
+d_m3UnaryOp_f (f32, Nearest, rintf); d_m3UnaryOp_f (f64, Nearest, rint);
d_m3UnaryOp_f (f32, Negate, -); d_m3UnaryOp_f (f64, Negate, -);
|
[CUDA] Add POCL_DEBUG_PTX to dump IR after transforms | #include "common.h"
#include "pocl.h"
+#include "pocl_runtime_config.h"
#include "pocl-ptx-gen.h"
#include "llvm/Bitcode/ReaderWriter.h"
@@ -80,7 +81,8 @@ int pocl_ptx_gen(const char *bc_filename,
pocl_gen_local_mem_args(module->get());
pocl_insert_ptx_intrinsics(module->get());
pocl_add_kernel_annotations(module->get());
- //(*module)->dump();
+ if (pocl_get_bool_option("POCL_DEBUG_PTX", 0))
+ (*module)->dump();
// TODO: support 32-bit?
llvm::StringRef triple = "nvptx64-nvidia-cuda";
|
Update ls_new API
In radare source coude there was a bad usage of ls_* because of this | #define LS_MERGE_DEPTH 50
SDB_API SdbList *ls_newf(SdbListFree freefn) {
- SdbList *list = R_NEW (SdbList);
- if (!list) {
- return NULL;
- }
- list->head = NULL;
- list->tail = NULL;
- list->free = freefn; // HACK
- list->length = 0;
+ SdbList *list = ls_new ();
+ list->free = freefn;
return list;
}
SDB_API SdbList *ls_new() {
- return ls_newf (free /*XXX HACK*/);
+ SdbList *list = R_NEW0 (SdbList);
+ if (!list) {
+ return NULL;
+ }
+ return list;
}
static void ls_insertion_sort(SdbList *list, SdbListComparator cmp) {
|
Update loop documentation. | A very common and essential operation in all programming is looping. Most
languages support looping of some kind, either with explicit loops or recursion.
-Janet supports both recursion and a primitve `while` loop. While recursion is
+Janet supports both recursion and a primitive `while` loop. While recursion is
useful in many cases, sometimes is more convenient to use a explicit loop to
iterate over a collection like an array.
## An Example - Iterating a Range
-Supose you want to calculate the sum of the first 10 natural numbers
+Suppose you want to calculate the sum of the first 10 natural numbers
0 through 9. There are many ways to carry out this explicit calculation
even with taking shortcuts. A succinct way in janet is
@@ -16,7 +16,7 @@ even with taking shortcuts. A succinct way in janet is
(+ ;(range 10))
```
-We will limit ourselves however to using explicit looping and no funcitions
+We will limit ourselves however to using explicit looping and no functions
like `(range n)` which generate a list of natural numbers for us.
For our first version, we will use only the while macro to iterate, similar
@@ -143,6 +143,32 @@ As before, we can evaluate this loop using only a while loop and the `next` func
(set key (next alphabook key))
```
-For ou
+However, we can do better than this with the loop macro using the `:pairs` or `:keys` verbs.
+```
+(loop [[letter word] :pairs alphabook]
+ (print letter " is for " word))
+```
+
+Using the `:keys` verb and the dot syntax for indexing
+
+```
+(loop [letter :keys alphabook]
+ (print letter " is for " alphabook.letter))
+```
+The symbol `alphabook.letter` is shorthand for `(get alphabook letter)`.
+Note that the dot syntax of `alphabook.letter` is different than in many languages. In C or
+ALGOL like languages, it is more akin to the indexing operator, and would be written `alphabook[letter]`.
+The `.` character is part of the symbol and is recognized by the compiler.
+
+We can also use the core library functions `keys` and `pairs` to get arrays of the keys and
+pairs respectively of the alphabook.
+
+```
+(loop [[letter word] :in (pairs alphabook)]
+ (print letter " is for " word))
+
+(loop [letter :in (keys alphabook)]
+ (print letter " is for " alphabook.letter))
+```
|
Fix Ilumra FoH dual rocker switch vendor prefix check
Related PR:
F | @@ -1528,7 +1528,9 @@ void DeRestPluginPrivate::gpDataIndication(const deCONZ::GpDataIndication &ind)
Sensor sensorNode;
sensorNode.setType("ZGPSwitch");
- if (gpdDeviceId == deCONZ::GpDeviceIdOnOffSwitch && options.byte == 0x81 && ind.payload().size() == 27 && (ind.gpdSrcId() & 0x01700000) == 0x01700000)
+ // https://github.com/dresden-elektronik/deconz-rest-plugin/pull/3285
+ // Illumra Dual Rocker Switch PTM215ZE
+ if (gpdDeviceId == deCONZ::GpDeviceIdOnOffSwitch && options.byte == 0x81 && ind.payload().size() == 27 && (ind.gpdSrcId() & 0x01500000) == 0x01500000)
{
sensorNode.setModelId("FOHSWITCH");
sensorNode.setManufacturer("PhilipsFoH");
|
Fix typo. .
Note: mandatory check (NEED_CHECK) was skipped | @@ -127,7 +127,7 @@ ALLOW .* -> vendor/github.com/prometheus/common
# ZooKeeper client
ALLOW .* -> vendor/github.com/samuel/go-zookeeper
-# Test diffing.
+# Text diffing.
ALLOW .* -> vendor/github.com/pmezard/go-difflib
# statsd client library
|
Fix another EVP_DigestVerify() instance
Following on from the previous commit this fixes another instance where
we need to treat a -ve return from EVP_DigestVerify() as a bad signature. | @@ -459,10 +459,7 @@ MSG_PROCESS_RETURN tls_process_cert_verify(SSL *s, PACKET *pkt)
}
} else {
j = EVP_DigestVerify(mctx, data, len, hdata, hdatalen);
- if (j < 0) {
- SSLerr(SSL_F_TLS_PROCESS_CERT_VERIFY, ERR_R_EVP_LIB);
- goto f_err;
- } else if (j == 0) {
+ if (j <= 0) {
al = SSL_AD_DECRYPT_ERROR;
SSLerr(SSL_F_TLS_PROCESS_CERT_VERIFY, SSL_R_BAD_SIGNATURE);
goto f_err;
|
fix segfault when the host has an addressless interface | @@ -1633,6 +1633,8 @@ int picoquic_getaddrs_v4(struct sockaddr_in *sas, int sas_length)
}
for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
+ /* What if an interface has no IP address? */
+ if (ifa->ifa_addr) {
family = ifa->ifa_addr->sa_family;
if (family == AF_INET) {
struct sockaddr_in *sai = (struct sockaddr_in *) ifa->ifa_addr;
@@ -1641,6 +1643,7 @@ int picoquic_getaddrs_v4(struct sockaddr_in *sas, int sas_length)
}
}
}
+ }
return count;
}
|
fix runtime binding | @@ -30,11 +30,10 @@ typedef m3ret_t (* M3ArgPusher) (d_m3BindingArgList, M3State * i_state);
typedef f64 (* M3ArgPusherFpReturn) (d_m3BindingArgList, M3State * i_state);
-m3ret_t PushArg_module (d_m3BindingArgList, M3State * _state)
+m3ret_t PushArg_runtime (d_m3BindingArgList, M3State * _state)
{
- void ** ptr = (void **) _state->mem;
- IM3Module module = (IM3Module)(*(ptr - 2));
- _i0 = (i64) module;
+ M3MemoryHeader * info = (M3MemoryHeader *) _state->mem - 1;
+ _i0 = (i64) info->runtime;
M3ArgPusher pusher = (M3ArgPusher)(* _state->pc++);
return pusher (d_m3BindingArgs, _state);
}
@@ -294,7 +293,7 @@ M3Result m3_LinkFunction (IM3Module io_module, const char * const i_functionN
else if (type == c_m3Type_f64) * pusher = c_m3Float64Pushers [floatIndex++];
else if (type == c_m3Type_module)
{
- * pusher = PushArg_module;
+ * pusher = PushArg_runtime;
d_m3Assert (i == 0); // can only push to arg0
++intIndex;
}
|
remove extraneous seting of --wqrocm-path | @@ -19,7 +19,7 @@ export AOMPROCM=$AOMP/..
# mygpu will eventually relocate to /opt/rocm/bin, support both cases for now.
if [ -a $AOMP/bin/mygpu ]; then
export AOMP_GPU=`$AOMP/bin/mygpu`
- export EXTRA_OMP_FLAGS=--rocm-path=$AOMP/
+# export EXTRA_OMP_FLAGS=--rocm-path=$AOMP/
else
export AOMP_GPU=`$AOMP/../bin/mygpu`
fi
|
M487 WiFi Demo code support key and certificate provisioning | @@ -180,6 +180,11 @@ int main( void )
configPRINTF( ( "FreeRTOS_IPInit\n" ) );
xTaskCreate( vCheckTask, "Check", mainCHECK_TASK_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
+ /* A simple example to demonstrate key and certificate provisioning in
+ * microcontroller flash using PKCS#11 interface. This should be replaced
+ * by production ready key provisioning mechanism. */
+ vDevModeKeyProvisioning();
+
/* Start the scheduler. Initialization that requires the OS to be running,
* including the WiFi initialization, is performed in the RTOS daemon task
* startup hook. */
|
Fix TINYSPLINE_CSHARP_FRAMEWORK_NAME | @@ -1477,6 +1477,9 @@ if(DEFINED TINYSPLINE_CSHARP_FRAMEWORK_VERSION)
endif()
string(REPLACE "." "" TINYSPLINE_CSHARP_FRAMEWORK_NAME
${TINYSPLINE_CSHARP_FRAMEWORK_VERSION})
+ # Currently, only .NET Framework is supported.
+ set(TINYSPLINE_CSHARP_FRAMEWORK_NAME
+ "net${TINYSPLINE_CSHARP_FRAMEWORK_NAME}")
set(TINYSPLINE_NUGET_FILES "<file \
src=\"${TINYSPLINE_LIB_DIR}/${TINYSPLINE_NUGET_INTERFACE_FILE}\" \
target=\"lib/${TINYSPLINE_CSHARP_FRAMEWORK_NAME}\" />")
|
ble_mesh: stack: Make mesh buf debug option invisible | @@ -269,7 +269,7 @@ if BLE_MESH
advertising bearer.
config BLE_MESH_NET_BUF_POOL_USAGE
- bool "BLE Mesh net buffer pool usage tracking"
+ bool
default y
help
Enable BLE Mesh net buffer pool tracking. This option is used to introduce another
|
hfuzz_cc: add -Wl,-z,muldefs to ldmode | @@ -172,6 +172,7 @@ static int ldMode(int argc, char **argv)
int j = 0;
args[j++] = getClangCC();
+ args[j++] = "-Wl,-z,muldefs";
args[j++] = "-Wl,--whole-archive";
args[j++] = LHFUZZ_A_PATH;
args[j++] = "-Wl,--no-whole-archive";
|
Don't pass along unused parameter | @@ -705,12 +705,11 @@ rpz_data_delete_rr(struct local_zone* z, uint8_t* policydname,
* @param rr_type: RR type of RR to remove
* @param rdata: rdata of RR to remove
* @param rdatalen: length of rdata
- * @param region: RPZ's repsip_set region
* @return: 1 if zone must be removed after RR deletion
*/
static int
rpz_rrset_delete_rr(struct resp_addr* raddr, uint16_t rr_type, uint8_t* rdata,
- size_t rdatalen, struct regional* region)
+ size_t rdatalen)
{
size_t index;
struct packed_rrset_data* d;
@@ -790,7 +789,7 @@ rpz_remove_response_ip_trigger(struct rpz* r, uint8_t* dname, enum rpz_action a,
if(a == RPZ_LOCAL_DATA_ACTION) {
/* remove RR, signal whether RR can be removed */
delete_respip = rpz_rrset_delete_rr(node, rr_type, rdatawl,
- rdatalen, r->respip_set->region);
+ rdatalen);
}
if(delete_respip) {
/* delete + reset parent pointers */
|
removed some unneccessary code | @@ -921,7 +921,6 @@ for(d = 0; d < apstaessidcount; d++)
zeiger->replaycount_sta = zeigerea->replaycount;
memcpy(zeiger->nonce, zeigerno->nonce, 32);
zeiger->authlen = zeigerea->authlen;
- memset(zeiger->eapol, 0, 256);
memcpy(zeiger->eapol, zeigerea->eapol, zeigerea->authlen);
zeiger->essidlen = zeigeressid->essidlen;
memcpy(zeiger->essid, zeigeressid->essid, zeigeressid->essidlen);
@@ -1052,9 +1051,7 @@ for(d = 0; d < apstaessidcount; d++)
zeiger->replaycount_sta = zeigerea->replaycount;
memcpy(zeiger->nonce, zeigerno->nonce, 32);
zeiger->authlen = zeigerea->authlen;
- memset(zeiger->eapol, 0, 256);
memcpy(zeiger->eapol, zeigerea->eapol, zeigerea->authlen);
- memset(zeiger->essid, 0, 32);
zeiger->essidlen = zeigeressid->essidlen;
memcpy(zeiger->essid, zeigeressid->essid, zeigeressid->essidlen);
if((zeigerea->replaycount == MYREPLAYCOUNT) && (zeigerno->replaycount == MYREPLAYCOUNT) && (memcmp(zeigerno->nonce, &mynonce, 32) == 0))
@@ -1092,9 +1089,7 @@ for(d = 0; d < apstaessidcount; d++)
zeiger->replaycount_sta = zeigerea->replaycount;
memcpy(zeiger->nonce, zeigerno->nonce, 32);
zeiger->authlen = zeigerea->authlen;
- memset(zeiger->eapol, 0, 256);
memcpy(zeiger->eapol, zeigerea->eapol, zeigerea->authlen);
- memset(zeiger->essid, 0, 32);
zeiger->essidlen = zeigeressid->essidlen;
memcpy(zeiger->essid, zeigeressid->essid, zeigeressid->essidlen);
if((zeigerea->replaycount == MYREPLAYCOUNT) && (zeigerno->replaycount == MYREPLAYCOUNT) && (memcmp(zeigerno->nonce, &mynonce, 32) == 0))
|
haskell-cabal-sandboxing: don't let the haskell plugin write to stdout | @@ -13,27 +13,27 @@ import Elektra.Plugin
import Foreign.Ptr
elektraHaskellOpen :: Plugin -> Key -> IO PluginStatus
-elektraHaskellOpen p k = putStrLn "haskell elektraHaskellOpen" >> return Success
+elektraHaskellOpen p k = keySetMeta k "/plugins/haskell" "elektraHaskellOpen" >> return Success
hs_elektraHaskellOpen = elektraPluginOpenWith elektraHaskellOpen
elektraHaskellClose :: Plugin -> Key -> IO PluginStatus
-elektraHaskellClose p k = putStrLn "haskell elektraHaskellClose" >> return Success
+elektraHaskellClose p k = keySetMeta k "/plugins/haskell" "elektraHaskellClose" >> return Success
hs_elektraHaskellClose = elektraPluginCloseWith elektraHaskellClose
elektraHaskellGet :: Plugin -> KeySet -> Key -> IO PluginStatus
-elektraHaskellGet p ks k = putStrLn "haskell elektraHaskellGet" >> return NoUpdate
+elektraHaskellGet p ks k = keySetMeta k "/plugins/haskell" "elektraHaskellGet" >> return NoUpdate
hs_elektraHaskellGet = elektraPluginGetWith elektraHaskellGet
elektraHaskellSet :: Plugin -> KeySet -> Key -> IO PluginStatus
-elektraHaskellSet p ks k = putStrLn "haskell elektraHaskellSet" >> return NoUpdate
+elektraHaskellSet p ks k = keySetMeta k "/plugins/haskell" "elektraHaskellSet" >> return NoUpdate
hs_elektraHaskellSet = elektraPluginSetWith elektraHaskellSet
elektraHaskellError :: Plugin -> KeySet -> Key -> IO PluginStatus
-elektraHaskellError p ks k = putStrLn "haskell elektraHaskellError" >> return Success
+elektraHaskellError p ks k = keySetMeta k "/plugins/haskell" "elektraHaskellError" >> return Success
hs_elektraHaskellError = elektraPluginErrorWith elektraHaskellError
elektraHaskellCheckConfig :: Key -> KeySet -> IO PluginStatus
-elektraHaskellCheckConfig k ks = putStrLn "haskell elektraHaskellCheckConfig" >> return Success
+elektraHaskellCheckConfig k ks = keySetMeta k "/plugins/haskell" "elektraHaskellCheckConfig" >> return Success
hs_elektraHaskellCheckConfig = elektraPluginCheckConfigWith elektraHaskellCheckConfig
foreign export ccall hs_elektraHaskellOpen :: Ptr Plugin -> Ptr Key -> IO Int
|
Marvell manifest. | set(
AFR_MANIFEST_SUPPORTED_BOARDS
- "mw320_rd"
+ mw300_rd
+ mw320_rd
CACHE INTERNAL "Supported boards list."
)
set(AFR_MANIFEST_BOARD_DIR "boards")
+set(AFR_MANIFEST_BOARD_DIR_mw300_rd "boards/mw320_rd")
+set(AFR_MANIFEST_BOARD_DIR_mw320_rd "boards/mw320_rd")
|
properly embed test_dnrm2 | @@ -369,6 +369,38 @@ CTEST(dsdot,dsdot_n_1)
}
+#if defined(BUILD_DOUBLE)
+CTEST(dnrm2,dnrm2_inf)
+{
+#ifndef INFINITY
+#define INFINITY HUGE_VAL
+#endif
+ int i;
+ double x[29];
+ blasint incx=1;
+ blasint n=28;
+ double res1=0.0f, res2=INFINITY;
+
+ for (i=0;i<n;i++)x[i]=0.0f;
+ x[10]=-INFINITY;
+ res1=BLASFUNC(dnrm2)(&n, x, &incx);
+ ASSERT_DBL_NEAR_TOL(res2, res1, DOUBLE_EPS);
+
+}
+CTEST(dnrm2,dnrm2_tiny)
+{
+ int i;
+ double x[29];
+ blasint incx=1;
+ blasint n=28;
+ double res1=0.0f, res2=0.0f;
+
+ for (i=0;i<n;i++)x[i]=7.457008414e-310;
+ res1=BLASFUNC(dnrm2)(&n, x, &incx);
+ ASSERT_DBL_NEAR_TOL(res2, res1, DOUBLE_EPS);
+}
+#endif
+
CTEST(rot,drot_inc_0)
{
blasint i=0;
@@ -606,6 +638,7 @@ int main(int argc, const char ** argv){
CTEST_ADD (zdotu,zdotu_n_1);
CTEST_ADD (zdotu,zdotu_offset_1);
CTEST_ADD (dsdot,dsdot_n_1);
+ CTEST_ADD (dnrm2,dnrm2_inf);
CTEST_ADD (dnrm2,dnrm2_tiny);
CTEST_ADD (rot,drot_inc_0);
CTEST_ADD (rot,zdrot_inc_0);
|
board/quackingstick/board.h: Format with clang-format
BRANCH=none
TEST=none | @@ -82,10 +82,7 @@ enum adc_channel {
ADC_CH_COUNT
};
-enum temp_sensor_id {
- TEMP_SENSOR_SYS2,
- TEMP_SENSOR_COUNT
-};
+enum temp_sensor_id { TEMP_SENSOR_SYS2, TEMP_SENSOR_COUNT };
/* Motion sensors */
enum sensor_id {
@@ -94,10 +91,7 @@ enum sensor_id {
SENSOR_COUNT,
};
-enum pwm_channel {
- PWM_CH_DISPLIGHT = 0,
- PWM_CH_COUNT
-};
+enum pwm_channel { PWM_CH_DISPLIGHT = 0, PWM_CH_COUNT };
/* List of possible batteries */
enum battery_type {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.