message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Add missing setup-python action. | @@ -212,6 +212,9 @@ jobs:
steps:
- uses: actions/checkout@v2
+ - uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python }}
- name: Download Packages
uses: actions/download-artifact@v2
|
terrador: support TBT/USB4 for C0/C1 port
Enable C0/C1 port
BRANCH=none
TEST=Check TBT and USB4 are working at Gen3 speed. | @@ -54,32 +54,6 @@ static void board_init(void)
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
-__override enum tbt_compat_cable_speed board_get_max_tbt_speed(int port)
-{
- /* Routing length exceeds 205mm prior to connection to re-timer */
- if (port == USBC_PORT_C1)
- return TBT_SS_U32_GEN1_GEN2;
-
- /*
- * Thunderbolt-compatible mode not supported
- *
- * TODO (b/147726366): All the USB-C ports need to support same speed.
- * Need to fix once USB-C feature set is known for Volteer.
- */
- return TBT_SS_RES_0;
-}
-
-__override bool board_is_tbt_usb4_port(int port)
-{
- /*
- * On Proto-1 only Port 1 supports TBT & USB4
- *
- * TODO (b/147732807): All the USB-C ports need to support same
- * features. Need to fix once USB-C feature set is known for Volteer.
- */
- return port == USBC_PORT_C1;
-}
-
/******************************************************************************/
/* I2C port map configuration */
const struct i2c_port_t i2c_ports[] = {
|
put a default value into linked ports at poke avoiding a bad value in case of next module crash. | @@ -80,6 +80,8 @@ uint8_t Detect_PokeBranch(branch_t branch)
LuosHAL_SetPTPDefaultState(branch);
for (volatile unsigned int i = 0; i < TIMERVAL; i++)
;
+ // Save branch as empty by default
+ ctx.detection.branches[branch] = 0xFFFF;
// read the line state
if (LuosHAL_GetPTPState(branch))
{
@@ -91,12 +93,7 @@ uint8_t Detect_PokeBranch(branch_t branch)
ctx.detection.activ_branch = branch;
return 1;
}
- else
- {
// Nobodies reply to our poke
- // Save branch as empty
- ctx.detection.branches[branch] = 0xFFFF;
- }
return 0;
}
/******************************************************************************
|
out_file: fix msgpack decoder prototype | @@ -332,11 +332,12 @@ static void print_metrics_text(struct flb_output_instance *ins,
const void *data, size_t bytes)
{
int ret;
+ size_t off = 0;
cmt_sds_t text;
struct cmt *cmt = NULL;
/* get cmetrics context */
- ret = cmt_decode_msgpack(&cmt, (char *) data, bytes);
+ ret = cmt_decode_msgpack_create(&cmt, (char *) data, bytes, &off);
if (ret != 0) {
flb_plg_error(ins, "could not process metrics payload");
return;
|
BugID:23252751: uAI S2 function, Bug fix: fix scale shift error problem | @@ -42,7 +42,7 @@ struct _odla_Session {
#define KERNEL_SCALE(LAYER_ID) ((const uint32_t *)&((comp->model_quant_scale->scale)[comp->model_quant_scale->head.scale_offset[UAI_KERNRL_SCALE][LAYER_ID]]))
#define BIAS_SCALE(LAYER_ID) ((const uint32_t *)&((comp->model_quant_scale->scale)[comp->model_quant_scale->head.scale_offset[UAI_BIAS_SCALE][LAYER_ID]]))
#define ACT_SCALE(LAYER_ID) (((const uint32_t)((comp->model_quant_scale->scale)[comp->model_quant_scale->head.scale_offset[UAI_ACT_SCALE][LAYER_ID]])))
-#define SCALE_SHIFT(LAYER_ID) ((const uint32_t)((comp->model_quant_scale->scale)[comp->model_quant_scale->head.scale_shift[LAYER_ID]]))
+#define SCALE_SHIFT(LAYER_ID) ((const uint8_t)(comp->model_quant_scale->head.scale_shift[LAYER_ID]))
uai_mem_list_t *uai_odla_init_memlist();
|
[kernel][mutex] tweak a mutex routine to take a const | @@ -47,7 +47,7 @@ static inline status_t mutex_acquire(mutex_t *m) {
}
/* does the current thread hold the mutex? */
-static bool is_mutex_held(mutex_t *m) {
+static bool is_mutex_held(const mutex_t *m) {
return m->holder == get_current_thread();
}
|
scripts: assemble: Fix problem with missing output
Adding an os.unlink() call to remove the outfile results in an exception
being thrown if the file does not exist. Fix this by trapping, and
checking for the specific error we get on a missing file. | @@ -5,6 +5,7 @@ Assemble multiple images into a single image that can be flashed on the device.
"""
import argparse
+import errno
import io
import re
import os.path
@@ -25,7 +26,11 @@ size_re = re.compile(r"^#define FLASH_AREA_([0-9A-Z_]+)_SIZE_0\s+((0x)?[0-9a-f
class Assembly():
def __init__(self, output, bootdir):
self.find_slots(bootdir)
+ try:
os.unlink(output)
+ except OSError as e:
+ if e.errno != errno.ENOENT:
+ raise
self.output = output
def find_slots(self, bootdir):
|
sysdeps/managarm: Transfer creds. for sock. ops | @@ -57,7 +57,7 @@ int sys_bind(int fd, const struct sockaddr *addr_ptr, socklen_t addr_length) {
auto handle = cacheFileTable()[fd];
__ensure(handle);
- HelAction actions[4];
+ HelAction actions[5];
globalQueue.trim();
managarm::fs::CntRequest<MemoryAllocator> req(getAllocator());
@@ -71,13 +71,15 @@ int sys_bind(int fd, const struct sockaddr *addr_ptr, socklen_t addr_length) {
actions[1].flags = kHelItemChain;
actions[1].buffer = ser.data();
actions[1].length = ser.size();
- actions[2].type = kHelActionSendFromBuffer;
+ actions[2].type = kHelActionImbueCredentials;
actions[2].flags = kHelItemChain;
- actions[2].buffer = const_cast<struct sockaddr *>(addr_ptr);
- actions[2].length = addr_length;
- actions[3].type = kHelActionRecvInline;
- actions[3].flags = 0;
- HEL_CHECK(helSubmitAsync(handle, actions, 4,
+ actions[3].type = kHelActionSendFromBuffer;
+ actions[3].flags = kHelItemChain;
+ actions[3].buffer = const_cast<struct sockaddr *>(addr_ptr);
+ actions[3].length = addr_length;
+ actions[4].type = kHelActionRecvInline;
+ actions[4].flags = 0;
+ HEL_CHECK(helSubmitAsync(handle, actions, 5,
globalQueue.getQueue(), 0, 0));
auto element = globalQueue.dequeueSingle();
@@ -101,7 +103,7 @@ int sys_connect(int fd, const struct sockaddr *addr_ptr, socklen_t addr_length)
auto handle = cacheFileTable()[fd];
__ensure(handle);
- HelAction actions[4];
+ HelAction actions[5];
globalQueue.trim();
managarm::fs::CntRequest<MemoryAllocator> req(getAllocator());
@@ -115,13 +117,15 @@ int sys_connect(int fd, const struct sockaddr *addr_ptr, socklen_t addr_length)
actions[1].flags = kHelItemChain;
actions[1].buffer = ser.data();
actions[1].length = ser.size();
- actions[2].type = kHelActionSendFromBuffer;
+ actions[2].type = kHelActionImbueCredentials;
actions[2].flags = kHelItemChain;
- actions[2].buffer = const_cast<struct sockaddr *>(addr_ptr);
- actions[2].length = addr_length;
- actions[3].type = kHelActionRecvInline;
- actions[3].flags = 0;
- HEL_CHECK(helSubmitAsync(handle, actions, 4,
+ actions[3].type = kHelActionSendFromBuffer;
+ actions[3].flags = kHelItemChain;
+ actions[3].buffer = const_cast<struct sockaddr *>(addr_ptr);
+ actions[3].length = addr_length;
+ actions[4].type = kHelActionRecvInline;
+ actions[4].flags = 0;
+ HEL_CHECK(helSubmitAsync(handle, actions, 5,
globalQueue.getQueue(), 0, 0));
auto element = globalQueue.dequeueSingle();
|
fix: platon test don't add transactions_suite in tcase_entry.c
fix the issue
teambition task id: | /* extern suite declaration */
extern Suite *make_wallet_suite(void);
-// extern Suite *make_parameters_suite(void);
-// extern Suite *make_transactions_suite(void);
-// extern Suite *make_contract_suite(void);
+extern Suite *make_parameters_suite(void);
+extern Suite *make_transactions_suite(void);
char platon_private_key_buf[1024];
@@ -71,8 +70,8 @@ int main(int argc, char *argv[])
/* new adding test suite should create in here */
Suite *suite_wallet = make_wallet_suite();
Suite *suite_paramters = make_parameters_suite();
- // Suite *suite_transaction = make_transactions_suite();
- // Suite *suite_contract = make_contract_suite();
+ Suite *suite_transaction = make_transactions_suite();
+
read_key_content(platon_private_key_buf);
/* create srunner and add first suite to it.
@@ -84,8 +83,7 @@ int main(int argc, char *argv[])
/* add other suite to srunner, more test suite should be add in here */
srunner_add_suite(sr, suite_paramters);
- // srunner_add_suite(sr, suite_transaction);
-// srunner_add_suite(sr, suite_contract);
+ srunner_add_suite(sr, suite_transaction);
/* start to run all test case */
srunner_run_all(sr, CK_NORMAL);
|
fix resource ids | },
"jdk11": {
"formula": {
- "sandbox_id": [810391789, 810454054, 810389307],
+ "sandbox_id": [365362175, 365387897, 365361227],
"match": "jdk"
},
"executable": {
|
libhfuzz/memorycmp.c: typo | @@ -18,7 +18,7 @@ const char* const LIBHFUZZ_module_memorycmp = "LIBHFUZZ_module_memorycmp";
#define RET_CALL_CHAIN \
((uintptr_t)__builtin_return_address(0)) ^ ((uintptr_t)__builtin_return_address(1) << 12)
#elif _HF_USE_RET_ADDR == 3
-/* Use mix of three previous returen addresses - unsafe */
+/* Use mix of three previous return addresses - unsafe */
#define RET_CALL_CHAIN \
((uintptr_t)__builtin_return_address(0)) ^ ((uintptr_t)__builtin_return_address(1) << 8) ^ \
((uintptr_t)__builtin_return_address(2) << 16)
|
firdes/prototype: fixing typo in comment | @@ -388,7 +388,7 @@ int liquid_firdes_notch(unsigned int _m,
}
// Design (root-)Nyquist filter from prototype
-// _type : filter type (e.g. LIQUID_FIRFILT_RRRC)
+// _type : filter type (e.g. LIQUID_FIRFILT_RRC)
// _k : samples/symbol
// _m : symbol delay
// _beta : excess bandwidth factor, _beta in [0,1]
|
config: enable log_level through environment variable | @@ -381,8 +381,16 @@ int flb_config_set_property(struct flb_config *config,
while (key != NULL) {
if (prop_key_check(key, k,len) == 0) {
if (!strncasecmp(key, FLB_CONF_STR_LOGLEVEL, 256)) {
+ tmp = flb_env_var_translate(config->env, v);
+ if (tmp) {
+ ret = set_log_level(config, tmp);
+ flb_free(tmp);
+ tmp = NULL;
+ }
+ else {
ret = set_log_level(config, v);
}
+ }
else if (!strncasecmp(key, FLB_CONF_STR_PARSERS_FILE, 32)) {
#ifdef FLB_HAVE_REGEX
tmp = flb_env_var_translate(config->env, v);
|
Fix leak querying AppIds | @@ -143,6 +143,7 @@ BOOLEAN PhAppResolverGetAppIdForProcess(
if (appIdText)
{
*ApplicationUserModelId = PhCreateString(appIdText);
+ RtlFreeHeap(RtlProcessHeap(), 0, appIdText);
return TRUE;
}
@@ -187,6 +188,7 @@ BOOLEAN PhAppResolverGetAppIdForWindow(
if (appIdText)
{
*ApplicationUserModelId = PhCreateString(appIdText);
+ RtlFreeHeap(RtlProcessHeap(), 0, appIdText);
return TRUE;
}
|
in_tail: fix pre_run func prototype and missing instance ref | @@ -130,6 +130,7 @@ static int in_tail_init(struct flb_input_instance *in,
if (!ctx) {
return -1;
}
+ ctx->i_ins = in;
/* Initialize file-system watcher */
ret = flb_tail_fs_init(in, ctx, config);
@@ -174,9 +175,11 @@ static int in_tail_init(struct flb_input_instance *in,
}
/* Pre-run callback / before the event loop */
-static int in_tail_pre_run(void *in_context, struct flb_config *config)
+static int in_tail_pre_run(struct flb_input_instance *i_ins,
+ struct flb_config *config, void *in_context)
{
struct flb_tail_config *ctx = in_context;
+ (void) i_ins;
return tail_signal_manager(ctx);
}
|
CI: remove unused variable
Fixes: (actions REFACTOR split into 2 workflows) | @@ -42,7 +42,6 @@ jobs:
options: "-DENABLE_TESTS=ON",
packages: "libcmocka-dev",
snaps: "",
- make-prepend: "",
make-target: ""
}
- {
@@ -54,7 +53,6 @@ jobs:
options: "-DENABLE_TESTS=ON",
packages: "libcmocka-dev",
snaps: "",
- make-prepend: "",
make-target: ""
}
- {
@@ -66,7 +64,6 @@ jobs:
options: "",
packages: "libcmocka-dev valgrind",
snaps: "",
- make-prepend: "",
make-target: ""
}
- {
@@ -78,7 +75,6 @@ jobs:
options: "",
packages: "libcmocka-dev valgrind",
snaps: "",
- make-prepend: "",
make-target: ""
}
- {
@@ -90,7 +86,6 @@ jobs:
options: "-DCMAKE_C_FLAGS=-fsanitize=address,undefined -DENABLE_TESTS=ON -DENABLE_VALGRIND_TESTS=OFF",
packages: "libcmocka-dev",
snaps: "",
- make-prepend: "",
make-target: ""
}
- {
@@ -102,7 +97,6 @@ jobs:
options: "",
packages: "libcmocka-dev abi-dumper abi-compliance-checker",
snaps: "core universal-ctags",
- make-prepend: "",
make-target: "abi-check"
}
@@ -158,7 +152,7 @@ jobs:
run: |
export LC_ALL=C.UTF-8
export PATH=/snap/bin:${{ github.workspace }}/coverity-tools/bin:$PATH
- ${{ matrix.config.make-prepend }} make ${{ matrix.config.make-target }}
+ make ${{ matrix.config.make-target }}
- name: Test
shell: bash
|
fix define mismatch | @@ -225,7 +225,7 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_definitions (-DNNG_PLATFORM_DARWIN)
# macOS 10.12 and later have getentropy, but the older releases
# have ARC4_RANDOM, and that is sufficient to our needs.
- add_definitions (-DNNG_USE_ARC4_RANDOM)
+ add_definitions (-DNNG_USE_ARC4RANDOM)
# macOS added some of CLOCK_MONOTONIC, but the implementation is
# broken and unreliable, so don't use it.
|
eaa/verdictd: change the bit definition of RATS_TLS_CONF_FLAGS_SERVER
Align to | @@ -98,7 +98,7 @@ pub const RATS_TLS_API_VERSION_DEFAULT: u32 = 1;
pub const RATS_TLS_CONF_FLAGS_GLOBAL_MASK_SHIFT: u32 = 0;
pub const RATS_TLS_CONF_FLAGS_PRIVATE_MASK_SHIFT: u32 = 32;
pub const RATS_TLS_CONF_FLAGS_MUTUAL: u64 = 1;
-pub const RATS_TLS_CONF_FLAGS_SERVER: u64 = 4294967296;
+pub const RATS_TLS_CONF_FLAGS_SERVER: u64 = 2;
pub const RATS_TLS_ERR_NONE: rats_tls_err_t = 0;
pub const RATS_TLS_ERR_UNKNOWN: rats_tls_err_t = 1;
pub const RATS_TLS_ERR_INVALID: rats_tls_err_t = 2;
|
cmake/CPackConfig.cmake: Fixup OSX zip filename | @@ -3,8 +3,9 @@ set (CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set (CPACK_SET_DESTDIR "ON")
if (APPLE)
set(CPACK_GENERATOR "ZIP")
+ set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-macosx-amd64")
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/dist/osx")
- set (CPACK_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/cpack/staging")
+ set (CPACK_INSTALL_PREFIX "")
set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_BINARY_DIR}/dist/osx")
elseif (WIN32)
set(CPACK_GENERATOR "ZIP")
|
Add os/services as default module | @@ -72,7 +72,7 @@ TARGET_BOARD_UPPERCASE := ${strip ${shell echo $(BOARD) | sed y!$(LOWERCASE)!$(U
CFLAGS += -DCONTIKI_BOARD_$(TARGET_BOARD_UPPERCASE)=1
endif
-MODULES += os os/sys os/dev os/lib
+MODULES += os os/sys os/dev os/lib os/services
# Include IPv6, RPL
|
HV: remove multi-return in drhd_find_iter
hv: dmar_parse: remove multi-return in drhd_find_iter
Acked-by: Eddie Dong | @@ -70,17 +70,20 @@ static int32_t
drhd_find_iter(struct acpi_dmar_header *dmar_header, void *arg)
{
struct find_iter_args *args;
+ int32_t ret = 1;
- if (dmar_header->type != ACPI_DMAR_TYPE_HARDWARE_UNIT)
- return 1;
-
+ if (dmar_header->type == ACPI_DMAR_TYPE_HARDWARE_UNIT){
args = arg;
if (args->i == 0U) {
args->res = (struct acpi_dmar_hardware_unit *)dmar_header;
- return 0;
+ ret = 0;
}
+ else{
args->i--;
- return 1;
+ ret = 1;
+ }
+ }
+ return ret;
}
static struct acpi_dmar_hardware_unit *
|
Fix: Allow Ping to succeed on Mediatek if >= 0 pings | @@ -1451,7 +1451,12 @@ WIFIReturnCode_t WIFI_Ping( uint8_t * pucIPAddr,
if( count < 0 )
return eWiFiFailure;
- return count == usCount ? eWiFiSuccess : eWiFiFailure;
+ if( count != usCount )
+ {
+ printf("WIFI_Ping: only %d pings reached out of %d\n", count, usCount);
+ }
+
+ return eWiFiSuccess;
}
/*-----------------------------------------------------------*/
|
Remove useless -D_ENDIAN from MPE/iX-gcc config | @@ -602,7 +602,7 @@ my %targets = (
inherit_from => [ "BASE_unix" ],
CC => "gcc",
CFLAGS => "-O3",
- cppflags => "-D_ENDIAN -DBN_DIV2W -D_POSIX_SOURCE -D_SOCKET_SOURCE",
+ cppflags => "-DBN_DIV2W -D_POSIX_SOURCE -D_SOCKET_SOURCE",
includes => add("/SYSLOG/PUB"),
sys_id => "MPE",
lflags => add("-L/SYSLOG/PUB"),
|
gpcloud: parse ETag case-insensitively + add NextMarker parsing logic
Some cloud providers form ETAG in a different format, for instance,
Yandex Cloud Object Storage sends it in format `Etag: "......"`.
According to the RFC (https://www.w3.org/Protocols/rfc2616/rfc2616.html)
ETag can be in any case. So we should parse the header case-insensitively.
Also add `NextMarker` parsing logic. | @@ -192,6 +192,7 @@ bool S3InterfaceService::parseBucketXML(ListBucketResult *result, xmlParserCtxtP
char *content = NULL;
char *key = NULL;
char *key_size = NULL;
+ char *next_marker = NULL;
cur = rootElement->xmlChildrenNode;
while (cur != NULL) {
@@ -200,6 +201,14 @@ bool S3InterfaceService::parseBucketXML(ListBucketResult *result, xmlParserCtxtP
key = NULL;
}
+ if (!xmlStrcmp(cur->name, (const xmlChar *)"NextMarker")) {
+ content = (char *)xmlNodeGetContent(cur);
+ if (content) {
+ next_marker = strdup(content);
+ xmlFree(content);
+ }
+ }
+
if (!xmlStrcmp(cur->name, (const xmlChar *)"IsTruncated")) {
content = (char *)xmlNodeGetContent(cur);
if (content) {
@@ -262,7 +271,11 @@ bool S3InterfaceService::parseBucketXML(ListBucketResult *result, xmlParserCtxtP
cur = cur->next;
}
+ if (is_truncated && next_marker) {
+ marker = next_marker;
+ } else {
marker = (is_truncated && key) ? key : "";
+ }
if (key) {
xmlFree(key);
@@ -299,6 +312,7 @@ ListBucketResult S3InterfaceService::listBucket(S3Url &s3Url) {
if (!encodedPrefix.empty()) {
querySs << (marker.empty() ? "prefix=" : "&prefix=") << encodedPrefix;
}
+
s3Url.setPrefix("");
string queryStr = querySs.str();
@@ -470,8 +484,17 @@ string S3InterfaceService::uploadPartOfData(S3VectorUInt8 &data, const S3Url &s3
Response resp = this->putResponseWithRetries(urlWithQuery.str(), headers, data);
if (resp.getStatus() == RESPONSE_OK) {
string headers(resp.getRawHeaders().begin(), resp.getRawHeaders().end());
+ string toSearch = "etag: ";
+
+ auto res =
+ std::search(headers.begin(), headers.end(), toSearch.begin(), toSearch.end(),
+ [](char ch1, char ch2) { return std::tolower(ch1) == std::tolower(ch2); });
+
+ if (res == headers.end()) {
+ S3_DIE(S3RuntimeError, "Response does not contain etag in the header");
+ }
- uint64_t etagStartPos = headers.find("ETag: ") + 6;
+ uint64_t etagStartPos = res - headers.begin() + toSearch.length();
string etagToEnd = headers.substr(etagStartPos);
// RFC 2616 states "HTTP/1.1 defines the sequence CR LF as the end-of-line
// marker for all protocol elements except the entity-body"
|
[CHAIN] buf fix for async verifing sign
when bp exist, set validateSignWait to null | @@ -385,6 +385,7 @@ type blockExecutor struct {
func newBlockExecutor(cs *ChainService, bState *state.BlockState, block *types.Block) (*blockExecutor, error) {
var exec TxExecFn
+ var validateSignWait ValidateSignWaitFn
commitOnly := false
@@ -400,19 +401,18 @@ func newBlockExecutor(cs *ChainService, bState *state.BlockState, block *types.B
bState = state.NewBlockState(cs.sdb.OpenNewStateDB(cs.sdb.GetRoot()))
exec = NewTxExecutor(block.BlockNo(), block.GetHeader().GetTimestamp(), contract.ChainService)
- } else {
- logger.Debug().Uint64("block no", block.BlockNo()).Msg("received block from block factory")
- // In this case (bState != nil), the transactions has already been
- // executed by the block factory.
- commitOnly = true
- }
- var validateSignWait ValidateSignWaitFn
if len(block.GetBody().Txs) > 0 {
validateSignWait = func() error {
return cs.validator.WaitVerifyDone()
}
}
+ } else {
+ logger.Debug().Uint64("block no", block.BlockNo()).Msg("received block from block factory")
+ // In this case (bState != nil), the transactions has already been
+ // executed by the block factory.
+ commitOnly = true
+ }
return &blockExecutor{
BlockState: bState,
|
apps iperf: Fix abort when iperf_connect fails
if iperf_connect fails, it crashes in test->reporter_callback functions.
This patch fixes this problem.
And current iperf_client_end() try to send state after close ctrl socket.
This problem is also fixed by this patch. | @@ -342,19 +342,17 @@ int iperf_client_end(struct iperf_test *test)
{
struct iperf_stream *sp;
+ /* show final summary */
+ test->reporter_callback(test);
+
+ iperf_set_send_state(test, IPERF_DONE);
+
/* Close all stream sockets */
SLIST_FOREACH(sp, &test->streams, streams) {
close(sp->socket);
close(test->ctrl_sck);
}
- /* show final summary */
- test->reporter_callback(test);
-
- if (iperf_set_send_state(test, IPERF_DONE) != 0) {
- return -1;
- }
-
return 0;
}
@@ -390,7 +388,8 @@ int iperf_run_client(struct iperf_test *test)
/* Start the client and connect to the server */
if (iperf_connect(test) < 0) {
- return -1;
+ iperf_free_test(test);
+ exit(1);
}
/* Begin calculating CPU utilization */
|
app_update: fix incorrect first byte from esp_ota_get_app_elf_sha256
At -O2 optimization level, GCC seems to optimize out the copying of the
first byte of the checksum, assuming it is zero. This "miscompilation"
happens because the esp_app_desc struct is declared const, but then modified
post-compilation. Casting to volatile disables the optimization.
Closes: | @@ -89,7 +89,10 @@ int IRAM_ATTR esp_ota_get_app_elf_sha256(char* dst, size_t size)
static bool first_call = true;
if (first_call) {
first_call = false;
- const uint8_t* src = esp_app_desc.app_elf_sha256;
+ // At -O2 optimization level, GCC optimizes out the copying of the first byte of the app_elf_sha256,
+ // because it is zero at compile time, and only modified afterwards by esptool.
+ // Casting to volatile disables the optimization.
+ const volatile uint8_t* src = (const volatile uint8_t*)esp_app_desc.app_elf_sha256;
for (size_t i = 0; i < sizeof(s_app_elf_sha256); ++i) {
s_app_elf_sha256[i] = src[i];
}
|
roller: use chain details in endpoint generator | $% [%frequency frequency=@dr]
[%setkey pk=@]
[%endpoint endpoint=@t =net]
- [%network =net]
==
::
+$ action
^- (quip card _state)
?- -.config
%frequency [~ state(frequency frequency.config)]
- %endpoint [~ state(endpoint `endpoint.config)]
::
- %network
+ %endpoint
:- ~
=/ [contract=@ux chain-id=@]
=< [naive chain-id]
%ropsten ropsten-contracts
%local local-contracts
==
- state(contract contract, chain-id chain-id)
+ %_ state
+ contract contract
+ chain-id chain-id
+ endpoint `endpoint.config
+ ==
::
%setkey
?~ pk=(de:base16:mimes:html pk.config)
|
Assert that the request streaming has completed correctly, if we're
going through `cleanup_connection` and `http1_is_persistent` is false | @@ -658,11 +658,9 @@ static void cleanup_connection(struct st_h2o_http1_conn_t *conn)
return;
}
- if (conn->req.proceed_req != NULL) {
- conn->_req_entity_reader = NULL;
- set_timeout(conn, 0, NULL);
- h2o_socket_read_stop(conn->sock);
- }
+ assert(conn->req.proceed_req == NULL);
+ assert(conn->_req_entity_reader == NULL);
+
/* handle next request */
if (conn->_unconsumed_request_size)
h2o_buffer_consume(&conn->sock->input, conn->_unconsumed_request_size);
|
fixed api change in python tests | @@ -120,10 +120,8 @@ def test_swig_cls():
COSMO,
None, None,
1, 1, 1,
- 0, 0, 0,
0,
- [0, 1],
- 5,
+ "none",
status)
assert_raises(
@@ -134,7 +132,6 @@ def test_swig_cls():
2,
status)
-
def test_swig_core():
status = 0
assert_raises(
@@ -315,6 +312,5 @@ def test_swig_power():
3,
status)
-
if __name__ == '__main__':
run_module_suite()
|
Fix coverity issue introduced with IP checksum offload commit | @@ -2458,7 +2458,7 @@ ip4_rewrite_inline (vlib_main_t * vm,
/* Verify checksum. */
ASSERT ((ip0->checksum == ip4_header_checksum (ip0)) ||
- (p0->flags | VNET_BUFFER_F_OFFLOAD_IP_CKSUM));
+ (p0->flags & VNET_BUFFER_F_OFFLOAD_IP_CKSUM));
}
else
{
@@ -2494,7 +2494,7 @@ ip4_rewrite_inline (vlib_main_t * vm,
/* Verify checksum. */
ASSERT ((ip1->checksum == ip4_header_checksum (ip1)) ||
- (p1->flags | VNET_BUFFER_F_OFFLOAD_IP_CKSUM));
+ (p1->flags & VNET_BUFFER_F_OFFLOAD_IP_CKSUM));
}
else
{
@@ -2633,7 +2633,7 @@ ip4_rewrite_inline (vlib_main_t * vm,
ip0->ttl = ttl0;
ASSERT ((ip0->checksum == ip4_header_checksum (ip0)) ||
- (p0->flags | VNET_BUFFER_F_OFFLOAD_IP_CKSUM));
+ (p0->flags & VNET_BUFFER_F_OFFLOAD_IP_CKSUM));
if (PREDICT_FALSE (ttl0 <= 0))
{
|
Network: Fix minor spelling mistake | @@ -109,7 +109,7 @@ int elektraPortInfo (Key * toCheck, Key * parentKey)
strerror (errno));
return -1;
}
- // TODO: Maybe consider errno == TRY_AGAIN seperately and try to reconnect
+ // TODO: Maybe consider errno == TRY_AGAIN separately and try to reconnect
}
|
upgrade to moab 5.4.0 | @@ -26,12 +26,12 @@ function bv_moab_depends_on
function bv_moab_info
{
- export MOAB_VERSION=${MOAB_VERSION:-"5.3.1"}
+ export MOAB_VERSION=${MOAB_VERSION:-"5.4.0"}
export MOAB_FILE=${MOAB_FILE:-"moab-${MOAB_VERSION}.tar.gz"}
export MOAB_URL=${MOAB_URL:-"ftp://ftp.mcs.anl.gov/pub/fathom"}
- export MOAB_BUILD_DIR=${MOAB_BUILD_DIR:-"moab-5.3.1"}
- export MOAB_MD5_CHECKSUM="935d18f8edf7dc3df625d9426a2d59e1"
- export MOAB_SHA256_CHECKSUM="2404fab2d84f87be72b57cfef5ea237bfa444aaca059e66a158f22134956fe54"
+ export MOAB_BUILD_DIR=${MOAB_BUILD_DIR:-"moab-5.4.0"}
+ export MOAB_MD5_CHECKSUM="b3857a791130569701b8fca788c2ed7c"
+ export MOAB_SHA256_CHECKSUM="a30d2a1911fbf214ae0175b0856e0475c0077dc51ea5914c850d631155a72952"
}
function bv_moab_print
|
Refactor: make an easy understanding of small memory allocation. | @@ -703,13 +703,15 @@ static void *do_smmgr_alloc(struct default_engine *engine, const size_t size)
if (sm_anchor.free_slist[targ].head != NULL) {
smid = targ; break;
}
- /* find the 2 times large free slot */
+ /* look for a 2 times larger free slot */
smid = do_smmgr_memid(slen*2, false);
+ if (smid > sm_anchor.free_maxid) {
+ smid = sm_anchor.free_maxid;
+ } else {
for ( ; smid <= sm_anchor.free_maxid; smid++) {
if (sm_anchor.free_slist[smid].head != NULL) break;
}
- if (smid > sm_anchor.free_maxid) {
- smid = sm_anchor.free_maxid;
+ assert(smid <= sm_anchor.free_maxid);
}
} while(0);
|
libc: Remove the reference of _stext/_etext from lib_cxx_initialize.c | @@ -50,13 +50,6 @@ typedef CODE void (*initializer_t)(void);
extern initializer_t _sinit;
extern initializer_t _einit;
-/* _stext and _etext are symbols exported by the linker script that mark the
- * beginning and the end of text.
- */
-
-extern uintptr_t _stext;
-extern uintptr_t _etext;
-
#if defined(CONFIG_ARCH_SIM) && defined(CONFIG_HOST_MACOS)
extern void macho_call_saved_init_funcs(void);
#endif
@@ -93,8 +86,7 @@ void lib_cxx_initialize(void)
#else
initializer_t *initp;
- sinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
- &_sinit, &_einit, &_stext, &_etext);
+ sinfo("_sinit: %p _einit: %p\n", &_sinit, &_einit);
/* Visit each entry in the initialization table */
@@ -103,13 +95,11 @@ void lib_cxx_initialize(void)
initializer_t initializer = *initp;
sinfo("initp: %p initializer: %p\n", initp, initializer);
- /* Make sure that the address is non-NULL and lies in the text
- * region defined by the linker script. Some toolchains may put
+ /* Make sure that the address is non-NULL. Some toolchains may put
* NULL values or counts in the initialization table.
*/
- if ((FAR void *)initializer >= (FAR void *)&_stext &&
- (FAR void *)initializer < (FAR void *)&_etext)
+ if (initializer)
{
sinfo("Calling %p\n", initializer);
initializer();
|
Add version info, thanks | #include "graphics/color.hpp"
#include "engine/running_average.hpp"
#include "engine/menu.hpp"
+#include "engine/version.hpp"
#include "stdarg.h"
using namespace blit;
@@ -636,6 +637,8 @@ void blit_menu_render(uint32_t time) {
int(battery), int((battery - int(battery)) * 10.0f));
screen.text(buf, minimal_font, Point(5, screen_height - 11));
+ screen.text(get_version_string(), minimal_font, Point(screen_width - 5, screen_height - 11), true, TextAlign::top_right);
+
/*
// Raw register values can be displayed with a fixed-width font using std::bitset<8> for debugging
screen.text(
|
[fuzzer] Set proxy timeouts
`connect_timeout` and `first_byte_timeout` need to be explicitly
set to non-zero values.
This patch aligns these values with `io_timeout`, as done in | @@ -356,13 +356,13 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
config.http2.idle_timeout = 10 * 1000;
config.http1.req_timeout = 10 * 1000;
config.proxy.io_timeout = 10 * 1000;
- config.proxy.connect_timeout = 0;
- config.proxy.first_byte_timeout = 0;
+ config.proxy.connect_timeout = config.proxy.io_timeout;
+ config.proxy.first_byte_timeout = config.proxy.io_timeout;
h2o_proxy_config_vars_t proxy_config = {};
proxy_config.io_timeout = 10 * 1000;
- proxy_config.connect_timeout = 0;
- proxy_config.first_byte_timeout = 0;
+ proxy_config.connect_timeout = proxy_config.io_timeout;
+ proxy_config.first_byte_timeout = proxy_config.io_timeout;
hostconf = h2o_config_register_host(&config, h2o_iovec_init(H2O_STRLIT(unix_listener)), 65535);
register_handler(hostconf, "/chunked-test", chunked_test);
h2o_url_parse(unix_listener, strlen(unix_listener), &upstream);
|
nimble/mesh: Increase transaction ID after sending unack message
UNACK messages are not retransmitted so we should increase TID
after sending each message. | @@ -52,8 +52,6 @@ static void gen_onoff_status(struct bt_mesh_model *model,
BT_DBG("state: %d", state);
- transaction_id++;
-
k_sem_give(&cli->op_sync);
}
@@ -84,8 +82,6 @@ static void gen_level_status(struct bt_mesh_model *model,
BT_DBG("level: %d", level);
- transaction_id++;
-
k_sem_give(&cli->op_sync);
}
@@ -181,6 +177,9 @@ int bt_mesh_gen_onoff_set(u16_t net_idx, u16_t addr, u16_t app_idx,
err = cli_wait(&gen_onoff_cli, ¶m, OP_GEN_ONOFF_STATUS);
done:
+ if (err == 0) {
+ transaction_id++;
+ }
os_mbuf_free_chain(msg);
return err;
}
@@ -250,6 +249,9 @@ int bt_mesh_gen_level_set(u16_t net_idx, u16_t addr, u16_t app_idx,
err = cli_wait(&gen_level_cli, ¶m, OP_GEN_LEVEL_STATUS);
done:
+ if (err == 0) {
+ transaction_id++;
+ }
os_mbuf_free_chain(msg);
return err;
}
|
Remove redundant RGB565 mode | @@ -248,7 +248,7 @@ if __name__ == '__main__':
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers(help='Commands', dest='command')
parser_packed = subparsers.add_parser('packed', help='Process an image file into a paletted 32blit sprite')
- parser_raw = subparsers.add_parser('raw', help='Process an image file into a raw (rgba, rgb888, rgb565) 32blit sprite')
+ parser_raw = subparsers.add_parser('raw', help='Process an image file into a raw (rgba, rgb) 32blit sprite')
parser.add_argument('--out', type=str, help='set output filename (default <inputfile>.blit)', default=None)
parser.add_argument('file', type=str, help='input file')
@@ -264,7 +264,7 @@ if __name__ == '__main__':
# * RGBA (full fidelity)
# * RGB888 (discard alpha)
# * RGB565 (discard alpha, convert colours with bitshift: R >> 3, G >> 2 B >> 3)
- parser_raw.add_argument('--format', type=str, choices=('RGBA', 'RGB888', 'RGB565'), help='raw data output format', default='RGBA')
+ parser_raw.add_argument('--format', type=str, choices=('RGBA', 'RGB'), help='raw data output format', default='RGBA')
# A palette file should be a PNG file containing a series of pixels in the desired colours and order of the output palette.
# If it's indexed, 8bpp colour then its palette will be used directly, otherwise the pixel data will be converted automatically.
@@ -285,12 +285,7 @@ if __name__ == '__main__':
r, g, b, a = source_image.getpixel((x, y))
if args.format == 'RGBA':
raw_data.append({'r': r, 'g': g, 'b': b, 'a': a})
- if args.format == 'RGB888':
- raw_data.append({'r': r, 'g': g, 'b': b})
- if args.format == 'RGB565':
- r >>= 3
- g >>= 2
- b >>= 3
+ if args.format == 'RGB':
raw_data.append({'r': r, 'g': g, 'b': b})
raw = build_asset(
|
options/rtdl: Fix a memory deallocation bug in accessDtv | @@ -874,7 +874,7 @@ void *accessDtv(SharedObject *object) {
auto ndtv = frg::construct_n<void *>(getAllocator(), runtimeTlsMap->indices.size());
memset(ndtv, 0, sizeof(void *) * runtimeTlsMap->indices.size());
memcpy(ndtv, tcb_ptr->dtvPointers, sizeof(void *) * tcb_ptr->dtvSize);
- frg::destruct(getAllocator(), tcb_ptr->dtvPointers);
+ frg::destruct_n(getAllocator(), tcb_ptr->dtvPointers, tcb_ptr->dtvSize);
tcb_ptr->dtvSize = runtimeTlsMap->indices.size();
tcb_ptr->dtvPointers = ndtv;
}
|
Don't skip character after having parsed a quoted token
Fix issue | @@ -606,14 +606,6 @@ ldns_rr_new_frm_str_internal(ldns_rr **newrr, const char *str,
}
ldns_rr_push_rdf(new, r);
}
- if (quoted) {
- if (ldns_buffer_available(rd_buf, 1)) {
- ldns_buffer_skip(rd_buf, 1);
- } else {
- done = true;
- }
- }
-
} /* for (done = false, r_cnt = 0; !done && r_cnt < r_max; r_cnt++) */
LDNS_FREE(rd);
LDNS_FREE(xtok);
|
reference: exclude globbing if no fnmatch | file (GLOB SOURCES
*.c)
+
+safe_check_symbol_exists ("fnmatch" "fnmatch.h" HAVE_FNMATCH)
+
+if (HAVE_FNMATCH)
add_lib (globbing SOURCES ${SOURCES} LINK_ELEKTRA elektra-ease)
+else ()
+ message ("Excluding lib-globbing, because fnmatch was not found.")
+endif ()
|
Update memory allocation test with local mocking | @@ -204,8 +204,6 @@ static void test_indef_map_decode(void **_CBOR_UNUSED(_state)) {
}
int main(void) {
- cbor_set_allocs(instrumented_malloc, instrumented_realloc, free);
-
// TODO: string chunks realloc test
const struct CMUnitTest tests[] = {
cmocka_unit_test(test_int_creation),
|
Remove working-directory from task. | @@ -56,13 +56,14 @@ jobs:
run: cmake --build . --target install
- name: Test CMake Installation
- working-directory: ${{runner.workspace}}/test/pkg
shell: bash
run: |
+ mkdir $GITHUB_WORKSPACE/test/pkg/build
+ cd $GITHUB_WORKSPACE/test/pkg/build
if [ "$RUNNER_OS" == "Windows" ]; then
- cmake -DCMAKE_PREFIX_PATH=C:/tinyspline .
+ cmake -DCMAKE_PREFIX_PATH=C:/tinyspline ..
else
- cmake -DCMAKE_PREFIX_PATH=~/tinyspline .
+ cmake -DCMAKE_PREFIX_PATH=~/tinyspline ..
fi
cmake --build .
ctest
|
Refactor save of update state to database | @@ -1929,7 +1929,11 @@ int DeRestPluginPrivate::updateSoftware(const ApiRequest &req, ApiResponse &rsp)
rsp.httpStatus = HttpStatusOk;
QVariantMap rspItem;
QVariantMap rspItemState;
+ if (gwSwUpdateState != swUpdateState.transferring)
+ {
gwSwUpdateState = swUpdateState.transferring;
+ }
+ queSaveDb(DB_CONFIG, DB_SHORT_SAVE_DELAY);
rspItemState["/config/update"] = gwUpdateVersion;
#ifdef ARCH_ARM
rspItemState["/config/swupdate2/state"] = gwSwUpdateState;
@@ -1937,16 +1941,6 @@ int DeRestPluginPrivate::updateSoftware(const ApiRequest &req, ApiResponse &rsp)
rspItem["success"] = rspItemState;
rsp.list.append(rspItem);
- // only supported on Raspberry Pi
-#ifdef ARCH_ARM
- if (gwUpdateVersion != GW_SW_VERSION)
- {
- openDb();
- saveDb();
- closeDb();
- }
-#endif // ARCH_ARM
-
return REQ_READY_SEND;
}
|
add releases notes | @@ -198,6 +198,7 @@ _(Michael Tucek)_
- Added some improvements to the core api documentation _(@muskater)_
- Update and improve the CLion tutorial (doc/tutorials/contributing-clion.md), add screenshots _(@flo91)_
- Improve documentation for storage plugins _(@lawli3t)_
+- Add list of sources mentioning or linking to Elektra _(@JakobWonisch)_
## Tests
|
u3: removes unnecessary zero-initialization in +rip jet | @@ -48,7 +48,7 @@ u3_noun u3qc_rip(u3_atom bloq, u3_atom b) {
c3_w j_w;
u3_atom rip;
u3i_slab sab_u;
- u3i_slab_init(&sab_u, 5, sap_w);
+ u3i_slab_bare(&sab_u, 5, sap_w);
for ( j_w = 0; j_w < sap_w; j_w++ ) {
sab_u.buf_w[j_w] = u3r_word(wut_w + j_w, b);
|
[build.sh] Don't run `pip show` with sudo
Allows for checking if it is already installed to user's home | @@ -75,7 +75,7 @@ dependencies() {
DEPS="{gcc,g++,gcc-multilib,g++-multilib,ninja-build,python3-pip,python3-setuptools,python3-wheel,pkg-config,mesa-common-dev,libx11-dev,libxnvctrl-dev,libdbus-1-dev}"
dep_install
- if [[ $($SU_CMD pip3 show meson; echo $?) == 1 || $($SU_CMD pip3 show mako; echo $?) == 1 ]]; then
+ if [[ $(pip3 show meson; echo $?) == 1 || $(pip3 show mako; echo $?) == 1 ]]; then
$SU_CMD pip3 install 'meson>=0.54' mako
fi
if [[ ! -f /usr/local/bin/glslangValidator ]]; then
@@ -104,8 +104,8 @@ dependencies() {
DEPS="{gcc-c++,gcc-c++-32bit,libpkgconf-devel,ninja,python3-pip,python3-Mako,libX11-devel,glslang-devel,glibc-devel,glibc-devel-32bit,libstdc++-devel,libstdc++-devel-32bit,Mesa-libGL-devel,dbus-1-devel,${PACKMAN_PKGS}}"
dep_install
- if [[ $(sudo pip3 show meson; echo $?) == 1 ]]; then
- sudo pip3 install 'meson>=0.54'
+ if [[ $(pip3 show meson; echo $?) == 1 ]]; then
+ $SU_CMD pip3 install 'meson>=0.54'
fi
;;
"Solus")
|
Use named constant for magic number in test_alloc_set_base() | @@ -8544,17 +8544,19 @@ START_TEST(test_alloc_set_base)
{
const XML_Char *new_base = "/local/file/name.xml";
int i;
+#define MAX_ALLOC_COUNT 5
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < MAX_ALLOC_COUNT; i++) {
allocation_count = i;
if (XML_SetBase(parser, new_base) == XML_STATUS_OK)
break;
}
if (i == 0)
fail("Base set despite failing allocator");
- else if (i == 5)
- fail("Base not set with allocation count 5");
+ else if (i == MAX_ALLOC_COUNT)
+ fail("Base not set with max allocation count");
}
+#undef MAX_ALLOC_COUNT
END_TEST
/* Test buffer extension in the face of a duff reallocator */
|
mime/cupsfilters-ghostscript.convs: Add conversion rule for PCLm output
As Ghostscript is capable of producing PCLm output, add a conversion
rule to convert PDF into PCLm with gstoraster. | application/postscript application/pdf 0 gstopdf
application/vnd.cups-pdf application/vnd.cups-raster 99 gstoraster
application/vnd.cups-pdf image/pwg-raster 99 gstoraster
+application/vnd.cups-pdf application/PCLm 99 gstoraster
application/vnd.cups-postscript application/vnd.cups-raster 175 gstoraster
|
ut_find.c typos | u3_noun pp_yor = u3t(p_yor); // {span nock}
u3_noun ppp_hax = u3h(pp_hax); // span
u3_noun ppp_yor = u3h(pp_yor); // span
- u3_noun qpp_hax = u3h(pp_hax); // nock
- u3_noun qpp_yor = u3h(pp_yor); // nock
+ u3_noun qpp_hax = u3t(pp_hax); // nock
+ u3_noun qpp_yor = u3t(pp_yor); // nock
if ( c3n == u3r_sing(qpp_hax, qpp_yor) ) {
return u3m_error("find-fork-c");
else {
u3_noun pp_mor = u3t(p_mor); // {span nock}
u3_noun ppp_mor = u3h(pp_mor); // span
- u3_noun qpp_mor = u3h(pp_mor); // nock
+ u3_noun qpp_mor = u3t(pp_mor); // nock
u3_noun gen = u3nt(c3__wing, u3k(i_hyp), u3_nul);
u3_noun fex = u3qfu_mint(van, ppp_mor, c3__noun, gen);
u3_noun ret = u3nq(c3n,
|
mesh: Fix Friend node estalished
Since first poll request send by lpn use friend security
credentials, so, friend nodes should be able to decrypt with
friend security, even if they have not yet established a friendship.
This is port of | @@ -621,10 +621,6 @@ bool bt_mesh_net_cred_find(struct bt_mesh_net_rx *rx, struct os_mbuf *in,
for (i = 0; i < ARRAY_SIZE(bt_mesh.frnd); i++) {
struct bt_mesh_friend *frnd = &bt_mesh.frnd[i];
- if (!frnd->established) {
- continue;
- }
-
if (!frnd->subnet) {
continue;
}
|
Tools: compiler warning re unused 'chunks' (netcdf v3) | @@ -3076,6 +3076,7 @@ static int define_netcdf_dimensions(hypercube* h, fieldset* fs, int ncid, datase
stat = nc_def_var_deflate(ncid, var_id, setup.shuffle, 1, setup.deflate);
check_err("nc_def_var_deflate", stat, __LINE__);
#else
+ (void)chunks;
grib_context_log(ctx, GRIB_LOG_ERROR, "Deflate option only supported in NetCDF4");
#endif
}
|
core: wrapped the TLS initialization code with a pthread_once call | #include <monkey/mk_clock.h>
#include <monkey/mk_mimetype.h>
+pthread_once_t mk_server_tls_setup_once = PTHREAD_ONCE_INIT;
+
+static void mk_set_up_tls_keys()
+{
+ MK_TLS_INIT();
+ mk_thread_keys_init();
+}
+
void mk_server_info(struct mk_server *server)
{
struct mk_list *head;
@@ -95,27 +103,14 @@ struct mk_server *mk_server_create()
return NULL;
}
-
/* Library mode: channel manager */
- /* This code causes a memory corruption because it interprets the mk_server structure
- * pointer as a mk_event structure pointer but the mk_server structure doesn't start
- * with a mk_event member, however, so I added an event to that structure to fix the
- * issue, however, I could be wrong so some input on this would be great.
- */
-
memset(&server->lib_ch_event, 0, sizeof(struct mk_event));
ret = mk_event_channel_create(server->lib_evl,
&server->lib_ch_manager[0],
&server->lib_ch_manager[1],
&server->lib_ch_event);
-/*
- ret = mk_event_channel_create(server->lib_evl,
- &server->lib_ch_manager[0],
- &server->lib_ch_manager[1],
- server);
-*/
if (ret != 0) {
mk_event_loop_destroy(server->lib_evl);
@@ -169,6 +164,7 @@ int mk_server_setup(struct mk_server *server)
mk_sched_init(server);
+
/* Clock init that must happen before starting threads */
mk_clock_sequential_init(server);
@@ -183,7 +179,7 @@ int mk_server_setup(struct mk_server *server)
}
/* Init thread keys */
- mk_thread_keys_init();
+ pthread_once(&mk_server_tls_setup_once, mk_set_up_tls_keys);
/* Configuration sanity check */
mk_config_sanity_check(server);
@@ -192,7 +188,6 @@ int mk_server_setup(struct mk_server *server)
mk_plugin_core_process(server);
/* Launch monkey http workers */
- MK_TLS_INIT();
mk_server_launch_workers(server);
return 0;
|
Working CBC encryption in hardware with read access for each block. | @@ -383,18 +383,95 @@ owerror_t aes_cbc_enc_raw(uint8_t* buffer, uint8_t len, uint8_t iv[16]) {
uint8_t nb;
uint8_t* pbuf;
uint8_t* pxor;
+ uint8_t spi_tx_buffer[3];
+ uint8_t spi_rx_buffer[16];
+ uint8_t aes_cmd;
+ uint8_t aes_status;
nb = len >> 4;
pxor = iv;
- for (n = 0; n < nb; n++) {
- pbuf = &buffer[16 * n];
- // may be faster if vector are aligned to 4 bytes (use long instead char in xor)
+ pbuf = buffer;
for (k = 0; k < 16; k++) {
pbuf[k] ^= pxor[k];
}
at86rf231_crypto_opt_ecb(pbuf);
- pxor = pbuf;
+
+ aes_cmd = 0xA0; // AES-CBC encryption start
+ aes_status = 0x00;
+ // first block already done, start actual CBC processing in hardware
+ for (n = 1; n<nb; n++) {
+ pbuf = &buffer[16 * n];
+ spi_tx_buffer[0] = 0x40; // SRAM write
+ spi_tx_buffer[1] = RG_AES_CTRL; // AES_CTRL register
+ spi_tx_buffer[2] = 0x20; // CBC encryption
+
+ spi_txrx(spi_tx_buffer,
+ sizeof(spi_tx_buffer),
+ SPI_BUFFER,
+ (uint8_t*)spi_rx_buffer,
+ sizeof(spi_rx_buffer),
+ SPI_FIRST,
+ SPI_NOTLAST);
+
+ spi_txrx((uint8_t*)pbuf,
+ 16,
+ SPI_BUFFER,
+ (uint8_t*)spi_rx_buffer,
+ sizeof(spi_rx_buffer),
+ SPI_NOTFIRST,
+ SPI_NOTLAST);
+
+ spi_txrx(&aes_cmd,
+ sizeof(aes_cmd),
+ SPI_BUFFER,
+ (uint8_t*)spi_rx_buffer,
+ sizeof(spi_rx_buffer),
+ SPI_NOTFIRST,
+ SPI_LAST);
+
+ // Prepare to read the AES status register
+ spi_tx_buffer[0] = 0x00;
+ spi_tx_buffer[1] = RG_AES_STATUS;
+
+ // Busy wait reading AES status register until it is done or an error occurs
+ do {
+ spi_txrx(spi_tx_buffer,
+ sizeof(spi_tx_buffer),
+ SPI_BUFFER,
+ (uint8_t*)spi_rx_buffer,
+ sizeof(spi_rx_buffer),
+ SPI_FIRST,
+ SPI_LAST);
+ aes_status = spi_rx_buffer[2];
+ } while((aes_status & 0x01) == 0x00);
+
+ if ((aes_status & 0x80) == 0x01) {
+ // an error occured
+ return E_FAIL;
+ }
+
+ spi_tx_buffer[0] = 0x00;
+ spi_tx_buffer[1] = RG_AES_STATE_KEY;
+
+ // send the command to read the ciphertext
+ spi_txrx(spi_tx_buffer,
+ 2,
+ SPI_BUFFER,
+ (uint8_t*)spi_rx_buffer,
+ 16,
+ SPI_FIRST,
+ SPI_NOTLAST);
+
+ // read the actual ciphertext
+ spi_txrx(spi_tx_buffer,
+ 16,
+ SPI_BUFFER,
+ (uint8_t*)pbuf,
+ 16,
+ SPI_NOTFIRST,
+ SPI_LAST);
}
+
return E_SUCCESS;
}
|
Disable read binding table action if no node is selected | #include "de_web_widget.h"
#include "ui_de_web_widget.h"
+QAction *readBindingTableAction = nullptr;
+
/*! Constructor. */
DeRestWidget::DeRestWidget(QWidget *parent, DeRestPlugin *_plugin) :
QDialog(parent),
@@ -85,8 +87,11 @@ DeRestWidget::DeRestWidget(QWidget *parent, DeRestPlugin *_plugin) :
connect(deCONZ::ApsController::instance(), &deCONZ::ApsController::nodeEvent, this, &DeRestWidget::nodeEvent);
// keyboard shortcuts
- auto *readBindingTableAction = new QAction(tr("Read binding table"), this);
+ readBindingTableAction = new QAction(tr("Read binding table"), this);
readBindingTableAction->setShortcut(Qt::CTRL + Qt::Key_B);
+ readBindingTableAction->setProperty("type", "node-action");
+ readBindingTableAction->setProperty("actionid", "read-binding-table");
+ readBindingTableAction->setEnabled(m_selectedNodeAddress.hasExt());
connect(readBindingTableAction, &QAction::triggered, this, &DeRestWidget::readBindingTableTriggered);
addAction(readBindingTableAction);
}
@@ -132,16 +137,15 @@ void DeRestWidget::readBindingTableTriggered()
void DeRestWidget::nodeEvent(const deCONZ::NodeEvent &event)
{
- if (event.node())
- {
- if (event.event() == deCONZ::NodeEvent::NodeSelected)
+ if (event.node() && event.event() == deCONZ::NodeEvent::NodeSelected)
{
m_selectedNodeAddress = event.node()->address();
+ readBindingTableAction->setEnabled(m_selectedNodeAddress.hasExt());
}
- else if (event.event() == deCONZ::NodeEvent::NodeSelected)
+ else if (event.event() == deCONZ::NodeEvent::NodeDeselected)
{
m_selectedNodeAddress = {};
- }
+ readBindingTableAction->setEnabled(false);
}
}
|
ci: Migrate worflow to using latest git-mirror-me-action revision
This has full support for env variables. | @@ -14,9 +14,9 @@ jobs:
name: Yocto Git Mirror
runs-on: [self-hosted, Linux]
steps:
- - uses: agherzan/[email protected]
+ - uses: agherzan/git-mirror-me-action@11f54c7186724daafbe5303b5075954f1a19a63e
env:
- SSH_PRIVATE_KEY: ${{ secrets.YOCTO_META_RASPBERRYPI_SSH_PRIVATE_KEY }}
- SSH_KNOWN_HOSTS: ${{ secrets.YOCTO_META_RASPBERRYPI_SSH_KNOWN_HOSTS }}
- with:
- destination-repository: "[email protected]:meta-raspberrypi"
+ GMM_SSH_PRIVATE_KEY: ${{ secrets.YOCTO_META_RASPBERRYPI_SSH_PRIVATE_KEY }}
+ GMM_SSH_KNOWN_HOSTS: ${{ secrets.YOCTO_META_RASPBERRYPI_SSH_KNOWN_HOSTS }}
+ GMM_DST_REPO: "ssh://[email protected]/meta-raspberrypi"
+ GMM_DEBUG: "1"
|
Add "All" as Option in Issue Template | @@ -17,6 +17,7 @@ body:
label: Affected OS
description: What operating systems are affected by this bug?
options:
+ - label: All
- label: Windows Server 2022
- label: Windows 11
- label: Windows Insider Preview (specify affected build below)
|
Documentation: Improve style of list-like sections | @@ -36,12 +36,12 @@ It's worth noting, resultpath should be empty before attempting a merge, otherwi
As for the options, there are a few basic options:
- -i --interactive which attempts the merge in an interactive way
+- `-i `, `--interactive`: which attempts the merge in an interactive way
- -t --test which tests the proposed merge and informs you about possible
+- `-t`, `--test`: which tests the proposed merge and informs you about possible
conflicts
- -f --force which overwrites any Keys in resultpath
+- `-f`, `--force`: which overwrites any Keys in resultpath
### Strategies ###
@@ -49,17 +49,14 @@ Additionally there is an option to specify a merge strategy, which is very impor
The option for strategy is:
- -s --strategy <name> which is used to specify a strategy to use in case of a conflict
+- `-s <name>`, `--strategy <name>`: which is used to specify a strategy to use in case of a conflict
The current list of strategies are:
- preserve the merge will fail if a conflict is detected
-
- ours the merge will use our version during a conflict
-
- theirs the merge will use their version during a conflict
-
- base the merge will use the base version during a conflict
+- `preserve`: the merge will fail if a conflict is detected
+- `ours`: the merge will use our version during a conflict
+- `theirs`: the merge will use their version during a conflict
+- `base`: the merge will use the base version during a conflict
If no strategy is specified, the merge will default to the preserve strategy as to not risk making the wrong decision.
If any of the other strategies are specified, when a conflict is detected, merge will use the Key specified by the
|
format status print of channellist | @@ -3108,13 +3108,13 @@ for(c = 0; c < 256; c++)
pwrq.u.txpower.flags = IW_TXPOW_DBM;
if(ioctl(fd_socket, SIOCGIWTXPOW, &pwrq) < 0)
{
- fprintf(stdout, " %d\n",testchannel);
+ fprintf(stdout, " %3d\n",testchannel);
}
else
{
if(pwrq.u.txpower.value > 0)
{
- fprintf(stdout, "%d (%d dBm)\n",testchannel, pwrq.u.txpower.value);
+ fprintf(stdout, "%3d (%2d dBm)\n",testchannel, pwrq.u.txpower.value);
}
}
|
sys/config; print error code when set from CLI fails. | @@ -129,7 +129,7 @@ shell_conf_command(int argc, char **argv)
} else {
rc = conf_set_value(name, val);
if (rc) {
- console_printf("Failed to set\n");
+ console_printf("Failed to set, err: %d\n", rc);
goto err;
}
}
|
No need to purge old packages with AOMP, some text cleanup, new link to developers readme | @@ -73,14 +73,8 @@ Software License Agreement.
On Ubuntu 18.04 LTS (bionic beaver), run these commands:
```
wget https://github.com/ROCm-Developer-Tools/aomp/releases/download/rel_0.6-0/aomp_0.6-0_amd64.deb
-sudo dpkg -P hcc2
-sudo dpkg -P libamdgcn
-sudo dpkg -P amdcloc
-sudo dpkg -P mymcpu
sudo dpkg -i aomp_0.6-0_amd64.deb
```
-The "dpkg -P" commands are used to delete previous versions of hcc2, libamdgcn, amdcloc, and mymcpu which may conflict with the installation. If these are not installed it is ok to just let the "dpkg -P" commands fail.
-
The AOMP bin directory (which includes the standard clang and llvm binaries) is not intended to be in your PATH for typical operation.
### RPM Install
@@ -111,7 +105,7 @@ Build and install from sources is possible. However, the source build for AOMP
- It is a bootstrapped build. The built and installed LLVM compiler is used to build library components.
- Additional package dependencies are required that are not required when installing the AOMP package.
-To build AOMP from source on ubuntu 16.04, run these commands.
+To build AOMP from source, run these commands.
```
sudo apt-get install cmake g++-5 g++ pkg-config libpci-dev libnuma-dev libelf-dev libffi-dev
@@ -127,7 +121,7 @@ To build AOMP from source on ubuntu 16.04, run these commands.
./clone_aomp.sh
./build_aomp.sh
```
-Depending on your system, the last two commands and the cuda install could take a very long time.
+Depending on your system, the last two commands and the cuda install could take a very long time. For more information, please refer to the AOMP developers README file located [HERE](bin/README.md).
The source build process above builds the development version of AOMP by checking out the master branch of AOMP. The development version is the next version to be released. It is possible that the development version is broken due to regressions that often occur during development. If you want to build from the sources of a previous release such as 0.6-0, run these commands before running clone_aomp.sh.
```
|
Fixed undeclared function warning (atexit) on non-Windows platforms. | #include "lauxlib.h"
#include "lualib.h"
+#include <stdlib.h>
+
#define PREMAKE_VERSION "5.0.0-dev"
#define PREMAKE_COPYRIGHT "Copyright (C) 2002-2017 Jason Perkins and the Premake Project"
#define PREMAKE_PROJECT_URL "https://github.com/premake/premake-core/wiki"
#if PLATFORM_WINDOWS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#include <stdlib.h>
#else
#include <unistd.h>
#endif
|
msyn() the dynamic file before running fuzzed process in non-persistent mode | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/mman.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/time.h>
@@ -326,6 +327,10 @@ bool subproc_Run(run_t* run) {
arch_prepareParent(run);
+ if (!run->global->persistent && msync(run->dynamicFile, run->dynamicFileSz, MS_SYNC) == -1) {
+ LOG_W("Couldn't msync(dynamicFile, sz=%zu)", run->dynamicFileSz);
+ }
+
if (run->global->persistent && !subproc_persistentSendFileIndicator(run)) {
LOG_W("Could not send file size to the persistent process");
kill(run->persistentPid, SIGKILL);
|
Remove boomerang entity prop. | @@ -2033,7 +2033,6 @@ enum entityproperty_enum
_ep_blockback,
_ep_blockodds,
_ep_blockpain,
- _ep_boomerang,
_ep_boss,
_ep_bounce,
_ep_bound,
@@ -2238,7 +2237,6 @@ static const char *eplist[] =
"blockback",
"blockodds",
"blockpain",
- "boomerang",
"boss",
"bounce",
"bound",
|
Add a test for CVE-2022-4450
Call PEM_read_bio_ex() and expect a failure. There should be no dangling
ptrs and therefore there should be no double free if we free the ptrs on
error. | @@ -96,6 +96,35 @@ static int test_cert_key_cert(void)
return 1;
}
+static int test_empty_payload(void)
+{
+ BIO *b;
+ static char *emptypay =
+ "-----BEGIN CERTIFICATE-----\n"
+ "-\n" /* Base64 EOF character */
+ "-----END CERTIFICATE-----";
+ char *name = NULL, *header = NULL;
+ unsigned char *data = NULL;
+ long len;
+ int ret = 0;
+
+ b = BIO_new_mem_buf(emptypay, strlen(emptypay));
+ if (!TEST_ptr(b))
+ return 0;
+
+ /* Expected to fail because the payload is empty */
+ if (!TEST_false(PEM_read_bio_ex(b, &name, &header, &data, &len, 0)))
+ goto err;
+
+ ret = 1;
+ err:
+ OPENSSL_free(name);
+ OPENSSL_free(header);
+ OPENSSL_free(data);
+ BIO_free(b);
+ return ret;
+}
+
int setup_tests(void)
{
if (!TEST_ptr(pemfile = test_get_argument(0)))
@@ -103,5 +132,6 @@ int setup_tests(void)
ADD_ALL_TESTS(test_b64, OSSL_NELEM(b64_pem_data));
ADD_TEST(test_invalid);
ADD_TEST(test_cert_key_cert);
+ ADD_TEST(test_empty_payload);
return 1;
}
|
gitlab/ci: adding script to upload to codecov.io | @@ -69,6 +69,7 @@ coverage:
- ./bootstrap.sh
- ./configure --enable-coverage
- make -j4 coverage
+ - bash <(curl -s https://codecov.io/bash)
coverage: '/lines: \d+\.\d+%/'
artifacts:
paths: [coverage.out]
|
components/bt: Fix assert without sw coexist enabled | @@ -1112,7 +1112,7 @@ static uint8_t coex_schm_curr_period_get_wrapper(void)
#if CONFIG_SW_COEXIST_ENABLE
return coex_schm_curr_period_get();
#else
- return 0;
+ return 1;
#endif
}
@@ -1130,7 +1130,7 @@ static int coex_wifi_channel_get_wrapper(uint8_t *primary, uint8_t *secondary)
#if CONFIG_SW_COEXIST_ENABLE
return coex_wifi_channel_get(primary, secondary);
#else
- return 0;
+ return -1;
#endif
}
@@ -1139,7 +1139,7 @@ static int coex_register_wifi_channel_change_callback_wrapper(void *cb)
#if CONFIG_SW_COEXIST_ENABLE
return coex_register_wifi_channel_change_callback(cb);
#else
- return 0;
+ return -1;
#endif
}
|
Add quiet option to main client. | (do
- (var *should-repl* :private false)
- (var *no-file* :private true)
- (var *raw-stdin* :private false)
- (var *handleopts* :private true)
- (var *exit-on-error* :private true)
+ (var *should-repl* false)
+ (var *no-file* true)
+ (var *quiet* false)
+ (var *raw-stdin* false)
+ (var *handleopts* true)
+ (var *exit-on-error* true)
# Flag handlers
(def handlers :private
-e Execute a string of janet
-r Enter the repl after running all scripts
-p Keep on executing if there is a top level error (persistent)
+ -q Hide prompt, logo, and repl output (quiet)
-- Stop handling options`)
(os/exit 0)
1)
"s" (fn [&] (set *raw-stdin* true) (set *should-repl* true) 1)
"r" (fn [&] (set *should-repl* true) 1)
"p" (fn [&] (set *exit-on-error* false) 1)
+ "q" (fn [&] (set *quiet* true) 1)
"-" (fn [&] (set *handleopts* false) 1)
"e" (fn [i &]
(set *no-file* false)
(++ i))))
(when (or *should-repl* *no-file*)
- (if *raw-stdin*
- (repl nil (fn [x &] x))
- (do
- (print (string "Janet " janet/version "-" janet/build " Copyright (C) 2017-2018 Calvin Rose"))
- (repl (fn [buf p]
+ (if-not *quiet*
+ (print "Janet " janet/version "-" janet/build " Copyright (C) 2017-2018 Calvin Rose"))
+ (defn noprompt [_] "")
+ (defn getprompt [p]
(def offset (parser/where p))
- (def prompt (string "janet:" offset ":" (parser/state p) "> "))
- (getline prompt buf)))))))
+ (string "janet:" offset ":" (parser/state p) "> "))
+ (def prompter (if *quiet* noprompt getprompt))
+ (defn getstdin [prompt buf]
+ (file/write stdout prompt)
+ (file/flush stdout)
+ (file/read stdin :line buf))
+ (def getter (if *raw-stdin* getstdin getline))
+ (defn getchunk [buf p]
+ (getter (prompter p) buf))
+ (def onsig (if *quiet* (fn [x &] x) nil))
+ (repl getchunk onsig)))
|
bcc_procutils_which: return if snprintf fails or would overflow | @@ -46,8 +46,10 @@ char *bcc_procutils_which(const char *binpath) {
const size_t path_len = next - PATH;
if (path_len) {
- snprintf(buffer, sizeof(buffer), "%.*s/%s",
+ int ret = snprintf(buffer, sizeof(buffer), "%.*s/%s",
(int)path_len, PATH, binpath);
+ if (ret < 0 || ret >= sizeof(buffer))
+ return 0;
if (bcc_elf_is_exe(buffer))
return strdup(buffer);
|
st-util: Add specialized memory map for STM32H7 devices | @@ -504,6 +504,24 @@ static const char* const memory_map_template_F7 =
" <memory type=\"rom\" start=\"0x1fff0000\" length=\"0x20\"/>" // option byte area
"</memory-map>";
+static const char* const memory_map_template_H7 =
+ "<?xml version=\"1.0\"?>"
+ "<!DOCTYPE memory-map PUBLIC \"+//IDN gnu.org//DTD GDB Memory Map V1.0//EN\""
+ " \"http://sourceware.org/gdb/gdb-memory-map.dtd\">"
+ "<memory-map>"
+ " <memory type=\"rom\" start=\"0x00000000\" length=\"0x10000\"/>" // ITCMRAM 64kB
+ " <memory type=\"ram\" start=\"0x20000000\" length=\"0x20000\"/>" // DTCMRAM 128kB
+ " <memory type=\"ram\" start=\"0x24000000\" length=\"0x80000\"/>" // RAM D1 512kB
+ " <memory type=\"ram\" start=\"0x30000000\" length=\"0x48000\"/>" // RAM D2 288kB
+ " <memory type=\"ram\" start=\"0x38000000\" length=\"0x10000\"/>" // RAM D3 64kB
+ " <memory type=\"flash\" start=\"0x08000000\" length=\"0x%x\">"
+ " <property name=\"blocksize\">0x%x</property>"
+ " </memory>"
+ " <memory type=\"ram\" start=\"0x40000000\" length=\"0x1fffffff\"/>" // peripheral regs
+ " <memory type=\"ram\" start=\"0xe0000000\" length=\"0x1fffffff\"/>" // cortex regs
+ " <memory type=\"rom\" start=\"0x1ff00000\" length=\"0x20000\"/>" // bootrom
+ "</memory-map>";
+
static const char* const memory_map_template_F4_DE =
"<?xml version=\"1.0\"?>"
@@ -543,6 +561,10 @@ char* make_memory_map(stlink_t *sl) {
} else if (sl->core_id == STM32F7_CORE_ID) {
snprintf(map, sz, memory_map_template_F7,
(unsigned int)sl->sram_size);
+ } else if (sl->chip_id == STLINK_CHIPID_STM32_H74XXX) {
+ snprintf(map, sz, memory_map_template_H7,
+ (unsigned int)sl->flash_size,
+ (unsigned int)sl->flash_pgsz);
} else if (sl->chip_id == STLINK_CHIPID_STM32_F4_HD) {
strcpy(map, memory_map_template_F4_HD);
} else if (sl->chip_id == STLINK_CHIPID_STM32_F2) {
|
Fix init of wifi last updaded variable | @@ -377,6 +377,9 @@ void DeRestPluginPrivate::initWiFi()
return;
}
+ QDateTime currentDateTime = QDateTime::currentDateTimeUtc();
+ gwWifiLastUpdated = currentDateTime.toTime_t();
+
if (gwWifiState == WifiStateInitMgmt)
{
retry = true;
@@ -446,9 +449,6 @@ void DeRestPluginPrivate::initWiFi()
gwWifiBackupPw = gwWifiPw;
}
- QDateTime currentDateTime = QDateTime::currentDateTimeUtc();
- gwWifiLastUpdated = currentDateTime.toTime_t();
-
queSaveDb(DB_CONFIG, DB_SHORT_SAVE_DELAY);
}
|
Add QLOG format conversion to help description | @@ -201,6 +201,7 @@ void usage_formats()
fprintf(stderr, " -f csv : generate CC csv file\n");
fprintf(stderr, " -f svg : generate svg packet flow diagram.\n");
fprintf(stderr, " requires a template specified by -t\n");
+ fprintf(stderr, " -f qlog : generate IETF QLOG file\n");
}
FILE * open_outfile(const char * cid_name, const char * binlog_name, const char * out_dir, const char * out_ext)
|
attempt to collect CI debug info | @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- ruby-version: ['2.3', '2.6', '2.7', '3.0', '3.2']
+ ruby-version: ['2.3', '2.7', '3.0', '3.2']
os: [ubuntu-latest, macos-latest] # , windows-latest
runs-on: ${{ matrix.os }}
steps:
@@ -34,7 +34,9 @@ jobs:
run: |
echo CFLAGS = $CFLAGS
echo cflags = $cflags
- bundle exec rake install -v -- -v
+ bundle install
+ rake install -v
+# bundle exec rake install
# env VERBOSE=1 bundle exec rspec --format documentation
# - name: Run tests
# run: bundle exec rake
|
hfuzz-cc: no need to inform about lack of arguments | @@ -369,7 +369,6 @@ int main(int argc, char** argv) {
isGCC = true;
}
if (argc <= 1) {
- LOG_I("'%s': No arguments provided", argv[0]);
return execCC(argc, argv);
}
if (argc > (ARGS_MAX - 128)) {
|
make WREN_API_DLLEXPORT required, fixes statically linked versions
_- | WREN_VERSION_PATCH)
#ifndef WREN_API
- #if defined(_MSC_VER) || defined(WREN_API_DLLEXPORT)
+ #if defined(_MSC_VER) && defined(WREN_API_DLLEXPORT)
#define WREN_API __declspec( dllexport )
#else
#define WREN_API
|
HUB75: Remove debug from clock, use only flip's implicit delay | import hub75
-from time import ticks_ms, sleep
+from time import ticks_ms
import math
from machine import RTC
@@ -15,11 +15,8 @@ hue = 0
rtc = RTC()
hub = hub75.Hub75(WIDTH, HEIGHT, stb_invert=False)
-print("hub75: init")
hub.start()
-print("hub75: start")
hub.clear()
-print("hub75: clear")
set_hsv = hub.set_hsv
set_rgb = hub.set_rgb
@@ -79,6 +76,10 @@ def draw_number(x, y, number, fg=None, bg=None, digit_width=8, digit_height=15,
x += digit_spacing
continue
+ if digit == ".":
+ fg(x, y + v_line + v_line + 2)
+ x += digit_spacing
+
try:
parts = DIGITS[ord(digit) - 48]
except IndexError:
@@ -145,4 +146,3 @@ while True:
# hub.set_rgb(ox, oy, 255, 255, 255)
hub.flip()
- sleep(1.0 / 60)
|
Remove unneeded test assert | @@ -1109,7 +1109,6 @@ static BOOL AllowsAdditionalTrustAnchors = YES; // toggle in tests if needed
ignorePinsForUserTrustAnchors:YES
validationResultQueue:dispatch_get_main_queue()
validationResultHandler:^(TSKPinningValidatorResult *x) {}];
- XCTAssertTrue(TestPinningValidator.allowsAdditionalTrustAnchors);
SecTrustRef(^createTestServerTrust)(void) = ^() {
// Create the server trust for this chain
|
aws: util: initialize key buffer to zero | @@ -835,7 +835,7 @@ flb_sds_t flb_get_s3_key(const char *format, time_t time, const char *tag, char
tmp = NULL;
/* A string no longer than S3_KEY_SIZE is created to store the formatted timestamp. */
- key = flb_malloc(S3_KEY_SIZE * sizeof(char));
+ key = flb_calloc(1, S3_KEY_SIZE * sizeof(char));
if (!key) {
goto error;
}
|
examples/usrsocktest: add some delay to wait the daemon task ready | @@ -2053,6 +2053,12 @@ errout_closepipe:
out:
pthread_mutex_unlock(&daemon_mutex);
usrsocktest_dbg("ret: %d\n", ret);
+
+ if (ret == OK)
+ {
+ usleep(100);
+ }
+
return ret;
}
@@ -2329,6 +2335,11 @@ bool usrsocktest_send_delayed_command(const char cmd,
sq_addlast(&delayed_cmd->node, &priv->delayed_cmd_threads);
+ if (ret == OK)
+ {
+ usleep(100);
+ }
+
return true;
}
|
unit-test-app: disable encrypted flash read/write in psram config to fix build failure | @@ -4,3 +4,5 @@ CONFIG_ESP32_SPIRAM_SUPPORT=y
CONFIG_ESP_INT_WDT_TIMEOUT_MS=800
CONFIG_SPIRAM_OCCUPY_NO_HOST=y
CONFIG_ESP32_WIFI_RX_IRAM_OPT=n
+# Disable encrypted flash reads/writes to save IRAM in this build configuration
+CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=n
|
dhserver: Support DHCP clients that don't send the MESSAGETYPE as first option | @@ -240,7 +240,11 @@ static void udp_recv_proc(void *arg, struct udp_pcb *upcb, struct pbuf *p, const
unsigned n = p->len;
if (n > sizeof(dhcp_data)) n = sizeof(dhcp_data);
memcpy(&dhcp_data, p->payload, n);
- switch (dhcp_data.dp_options[2])
+
+ ptr = find_dhcp_option(dhcp_data.dp_options, sizeof(dhcp_data.dp_options), DHCP_MESSAGETYPE);
+ if (ptr == NULL) return;
+
+ switch (ptr[2])
{
case DHCP_DISCOVER:
entry = entry_by_mac(dhcp_data.dp_chaddr);
|
libtcmu: Fix a bug with getting variable type CDB length | @@ -256,7 +256,7 @@ static void tcmu_cdb_debug_info(const struct tcmulib_cmd *cmd)
break;
case 3: /*011b Reserved ? */
if (cmd->cdb[0] == 0x7f) {
- bytes = 7 + cmd->cdb[7];
+ bytes = 8 + cmd->cdb[7];
if (bytes > CDB_FIX_SIZE) {
buf = malloc(CDB_TO_BUF_SIZE(bytes));
if (!buf) {
|
disable VDP during VDP_resetScreen() process (faster operation) | @@ -133,6 +133,10 @@ void VDP_init()
void VDP_resetScreen()
{
u16 i;
+ bool enable = VDP_isEnable();
+
+ // for faster operation
+ VDP_setEnable(FALSE);
// reset video memory (len = 0 is a special value to define 0x10000)
DMA_doVRamFill(0, 0, 0, 1);
@@ -164,8 +168,10 @@ void VDP_resetScreen()
}
// load default font
- if (!VDP_loadFont(&font_default, CPU))
+ if (!VDP_loadFont(&font_default, DMA))
{
+ VDP_setEnable(TRUE);
+
KLog("A fatal error occured (not enough memory to reset VDP) !");
// fatal error --> die here (the font did not get loaded so maybe not really useful to show this message...)
@@ -177,6 +183,10 @@ void VDP_resetScreen()
// stop here
while(TRUE);
}
+
+ // re-enable
+ if (enable)
+ VDP_setEnable(TRUE);
}
@@ -309,6 +319,11 @@ bool VDP_getEnable()
return regValues[0x01] & 0x40;
}
+bool VDP_isEnable()
+{
+ return VDP_getEnable();
+}
+
void VDP_setEnable(bool value)
{
vu16 *pw;
|
Fixed flusing on slip-arch too | #include "uarte-arch.h"
#include "usb.h"
/*---------------------------------------------------------------------------*/
+#if PLAFTORM_SLIP_ARCH_CONF_USB
+#define set_input(fn) usb_set_input(fn)
+#define write_byte(b) usb_write((uint8_t *)&b, sizeof(uint8_t))
+#define flush() usb_flush()
+#else /* PLATFORM_DBG_CONF_USB */
+#define set_input(fn) uarte_set_input(fn)
+#define write_byte(b) uarte_write(b)
+#define flush()
+#endif /* PLATFORM_DBG_CONF_USB */
+#define SLIP_END 0300
+/*---------------------------------------------------------------------------*/
void
slip_arch_writeb(unsigned char c)
{
-#if PLATFORM_DBG_CONF_USB
- usb_write(&c, sizeof(c));
-#else /* PLATFORM_DBG_CONF_USB */
- uarte_write(c);
-#endif /* PLATFORM_DBG_CONF_USB */
+ write_byte(c);
+ if(c == SLIP_END) {
+ flush();
+ }
}
/*---------------------------------------------------------------------------*/
void
slip_arch_init()
{
-#if PLAFTORM_SLIP_ARCH_CONF_USB
- usb_set_input(slip_input_byte);
-#else /* PLAFTORM_SLIP_ARCH_CONF_USB */
- uarte_set_input(slip_input_byte);
-#endif /* PLAFTORM_SLIP_ARCH_CONF_USB */
+ set_input(slip_input_byte);
}
/*---------------------------------------------------------------------------*/
|
changes to check if Linux is 32-bit or 64-bit and use appropriate openocd binary for programming
There are two binaries for 32-bit and 64-bit. When we use "make download",
it should be checked and should be used appropriate binaray automatically. | @@ -34,6 +34,13 @@ output_path=${build_path}/output
bin_path=${output_path}/bin
openocd_path=${tinyara_path}/build/configs/${BOARD_NAME}/openocd
+SYSTEM_TYPE=`getconf LONG_BIT`
+if [ "$SYSTEM_TYPE" = "64" ]; then
+ COMMAND=openocd_linux64
+else
+ COMMAND=openocd_linux32
+fi
+
# Prepare resouces, pack into romfs.img
prepare_resource()
{
@@ -64,6 +71,8 @@ prepare_resource()
# MAIN
main()
{
+ echo "System is $SYSTEM_TYPE bits so that $COMMAND will be used to program"
+
# Process arguments
for arg in $@
do
@@ -72,7 +81,7 @@ main()
echo "ALL :"
# download all binaries using openocd script
pushd ${openocd_path}
- ./openocd_linux64 -f s5jt200_silicon_evt0_fusing_flash_all.cfg
+ ./$COMMAND -f s5jt200_silicon_evt0_fusing_flash_all.cfg
popd
prepare_resource
;;
@@ -86,7 +95,7 @@ main()
echo "FOTA_ALL :"
if [ "${CONFIG_BOARD_FOTA_SUPPORT}" = "y" ]; then
pushd ${openocd_path}
- ./openocd_linux64 -f s5jt200_evt0_flash_all_fota.cfg
+ ./$COMMAND -f s5jt200_evt0_flash_all_fota.cfg
popd
prepare_resource
else
@@ -97,7 +106,7 @@ main()
echo "TINYARA_OTA0 :"
if [ "${CONFIG_BOARD_FOTA_SUPPORT}" = "y" ]; then
pushd ${openocd_path}
- ./openocd_linux64 -f s5jt200_evt0_flash_tinyara_ota0.cfg
+ ./$COMMAND -f s5jt200_evt0_flash_tinyara_ota0.cfg
popd
else
echo "FOTA is not supported, skip download ..."
@@ -107,7 +116,7 @@ main()
echo "TINYARA_OTA1 :"
if [ "${CONFIG_BOARD_FOTA_SUPPORT}" = "y" ]; then
pushd ${openocd_path}
- ./openocd_linux64 -f s5jt200_evt0_flash_tinyara_ota1.cfg
+ ./$COMMAND -f s5jt200_evt0_flash_tinyara_ota1.cfg
popd
else
echo "FOTA is not supported, skip download ..."
|
admin/meta-packages: add slurm.conf to server packages | @@ -272,13 +272,14 @@ Collection of client packages for SLURM
%package -n %{PROJ_NAME}-slurm-server
Summary: OpenHPC server packages for SLURM
Requires: slurm%{PROJ_DELIM}
-Requires: slurm-perlapi%{PROJ_DELIM}
Requires: slurm-devel%{PROJ_DELIM}
-Requires: slurm-slurmdbd%{PROJ_DELIM}
+Requires: slurm-example-configs%{PROJ_DELIM}
+Requires: slurm-perlapi%{PROJ_DELIM}
Requires: slurm-slurmctld%{PROJ_DELIM}
+Requires: slurm-slurmdbd%{PROJ_DELIM}
Requires: munge%{PROJ_DELIM}
-Requires: munge-libs%{PROJ_DELIM}
Requires: munge-devel%{PROJ_DELIM}
+Requires: munge-libs%{PROJ_DELIM}
Requires: pdsh-mod-slurm%{PROJ_DELIM}
%description -n %{PROJ_NAME}-slurm-server
Collection of server packages for SLURM
|
Update: Allow implications to be used with eternal events | @@ -429,7 +429,7 @@ void Cycle_Perform(long currentTime)
RuleTable_Apply(e->term, c->term, e->truth, belief->truth, e->occurrenceTime, stamp, currentTime, priority, c->priority, true);
}
}
- if(is_temporally_related && e->type == EVENT_TYPE_BELIEF)
+ if(is_temporally_related)
{
for(int i=0; i<c->precondition_beliefs[0].itemsAmount; i++)
{
|
Enter mount namespace before trying to open binary | @@ -346,6 +346,8 @@ bool ProcSyms::Module::find_name(const char *symname, uint64_t *addr) {
return 0;
};
+ ProcMountNSGuard g(mount_ns_);
+
if (type_ == ModuleType::PERF_MAP)
bcc_perf_map_foreach_sym(name_.c_str(), cb, &payload);
if (type_ == ModuleType::EXEC || type_ == ModuleType::SO)
@@ -398,6 +400,7 @@ bool ProcSyms::Module::find_addr(uint64_t offset, struct bcc_symbol *sym) {
if (offset < it->start + it->size) {
// Resolve and cache the symbol name if necessary
if (!it->name) {
+ ProcMountNSGuard g(mount_ns_);
std::string sym_name(it->name_idx.str_len + 1, '\0');
if (bcc_elf_symbol_str(name_.c_str(), it->name_idx.section_idx,
it->name_idx.str_table_idx, &sym_name[0], sym_name.size(),
|
[clock] Improve the code comment of the clock.c | @@ -33,9 +33,9 @@ static volatile rt_tick_t rt_tick = 0;
/**@{*/
/**
- * This function will return current tick from operating system startup
+ * @brief This function will return current tick from operating system startup
*
- * @return current tick
+ * @return Return current tick
*/
rt_tick_t rt_tick_get(void)
{
@@ -45,7 +45,9 @@ rt_tick_t rt_tick_get(void)
RTM_EXPORT(rt_tick_get);
/**
- * This function will set current tick
+ * @brief This function will set current tick
+ *
+ * @param tick is the value that you will set.
*/
void rt_tick_set(rt_tick_t tick)
{
@@ -57,8 +59,8 @@ void rt_tick_set(rt_tick_t tick)
}
/**
- * This function will notify kernel there is one tick passed. Normally,
- * this function is invoked by clock ISR.
+ * @brief This function will notify kernel there is one tick passed.
+ * Normally, this function is invoked by clock ISR.
*/
void rt_tick_increase(void)
{
@@ -97,14 +99,14 @@ void rt_tick_increase(void)
}
/**
- * This function will calculate the tick from millisecond.
+ * @brief This function will calculate the tick from millisecond.
*
- * @param ms the specified millisecond
+ * @param ms is the specified millisecond
* - Negative Number wait forever
* - Zero not wait
* - Max 0x7fffffff
*
- * @return the calculated tick
+ * @return Return the calculated tick
*/
rt_tick_t rt_tick_from_millisecond(rt_int32_t ms)
{
@@ -126,9 +128,13 @@ rt_tick_t rt_tick_from_millisecond(rt_int32_t ms)
RTM_EXPORT(rt_tick_from_millisecond);
/**
- * This function will provide the passed millisecond from boot.
+ * @brief This function will return the passed millisecond from boot.
+ *
+ * @note When the value of RT_TICK_PER_SECOND is lower than 1000 or
+ * is not an integral multiple of 1000, this function will not
+ * provide the correct 1ms-based tick.
*
- * @return passed millisecond from boot
+ * @return Return passed millisecond from boot
*/
RT_WEAK rt_tick_t rt_tick_get_millisecond(void)
{
|
[core] short-circuit encoding if nothing to encode
short-circuit encoding strings and use memcpy() if nothing to encode | @@ -600,6 +600,11 @@ void buffer_append_string_encoded(buffer * const restrict b, const char * const
d = (unsigned char*) buffer_extend(b, d_len);
+ if (d_len == s_len) { /*(short-circuit; nothing to encoded)*/
+ memcpy(d, s, s_len);
+ return;
+ }
+
for (ds = (unsigned char *)s, d_len = 0, ndx = 0; ndx < s_len; ds++, ndx++) {
if (map[*ds & 0xFF]) {
switch(encoding) {
@@ -654,6 +659,11 @@ void buffer_append_string_c_escaped(buffer * const restrict b, const char * cons
d = (unsigned char*) buffer_extend(b, d_len);
+ if (d_len == s_len) { /*(short-circuit; nothing to encoded)*/
+ memcpy(d, s, s_len);
+ return;
+ }
+
for (ds = (unsigned char *)s, d_len = 0, ndx = 0; ndx < s_len; ds++, ndx++) {
if ((*ds < 0x20) /* control character */
|| (*ds >= 0x7f)) { /* DEL + non-ASCII characters */
|
install qemu, not sure how it worked before | @@ -20,7 +20,7 @@ jobs:
steps:
- checkout
- run: sudo apt-get update
- - run: sudo apt-get install nasm
+ - run: sudo apt-get install nasm qemu
- run: make
- run: make test-nokvm
- run: cp .circleci/boto ~/.boto
|
Remove old filters files from project | <ClCompile Include="$(MSBuildThisFileDirectory)..\..\lib\decorators\BaseDecorator.cpp">
<Filter>decorators</Filter>
</ClCompile>
- <ClCompile Include="$(MSBuildThisFileDirectory)..\..\lib\filter\EventFilter.cpp">
- <Filter>filter</Filter>
- </ClCompile>
- <ClCompile Include="$(MSBuildThisFileDirectory)..\..\lib\filter\EventFilterRegulator.cpp">
- <Filter>filter</Filter>
- </ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\lib\api\ILogConfiguration.cpp">
<Filter>api</Filter>
</ClCompile>
|
weather: don't double-nest json on-watch
Fixes Because we nest the data in a weather key and save that
in app state, we don't need to nest the data in weather twice over when
giving initial data to new subscribers. | ?. ?=([%all ~] wire) (on-watch:def wire)
=/ jon
%- pairs:enjs:format
- :~ [%weather data]
- [%location s+location]
+ :* ['location' s+location]
+ ::
+ ?. ?=([%o *] data) ~
+ ~(tap by p.data)
==
:_ this
[%give %fact ~ %json !>(jon)]~
|
YAML CPP: Update ASAN blacklist for plugin | -src:.*boost/smart_ptr/detail/.*
+# YAML CPP
+# ========
+# We ignore warnings about member calls on addresses, which do not point to an object of type `_Sp_counted_base`.
+# It looks like this problem is caused by either `yaml-cpp` or `libstdc++`.
+src:.*include/c\+\+/6/bits/shared_ptr_base.h
+
# memory leaks reported by asan due to xerces interfaces, no issue according to valgrind
src:*xerces/*.cpp
src:*xerces/*.hpp
|
Badges and text update | [Installation](https://tech.yandex.com/catboost/doc/dg/concepts/cli-installation-docpage/) |
[Release Notes](https://github.com/catboost/catboost/releases)
-[](https://github.com/catboost/catboost/blob/master/LICENSE)
+[](https://github.com/catboost/catboost/blob/master/LICENSE)
[](https://badge.fury.io/py/catboost)
[](https://anaconda.org/conda-forge/catboost)
+[](https://github.com/catboost/catboost/issues)
+[](https://t.me/catboost_en)
CatBoost is a machine learning method based on [gradient boosting](https://en.wikipedia.org/wiki/Gradient_boosting) over decision trees.
@@ -43,7 +45,7 @@ If you want to evaluate Catboost model in your application read [model api docum
Questions and bug reports
--------------
* For reporting bugs please use the [catboost/bugreport](https://github.com/catboost/catboost/issues) page.
-* Ask your question about CatBoost on [Stack Overflow](https://stackoverflow.com/questions/tagged/catboost).
+* Ask a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/catboost) with the catboost tag, we monitor this for new questions.
* Seek prompt advice at [Telegram group](https://t.me/catboost_en) or Russian-speaking [Telegram chat](https://t.me/catboost_ru)
Help to Make CatBoost Better
|
Remove duplicate boolean
The AOA initialization state is already tracked by aoa_hid_initialized. | @@ -456,8 +456,6 @@ scrcpy(struct scrcpy_options *options) {
acksync = &s->acksync;
- bool aoa_hid_ok = false;
-
ok = sc_aoa_init(&s->aoa, serial, acksync);
if (!ok) {
goto aoa_hid_end;
@@ -474,13 +472,12 @@ scrcpy(struct scrcpy_options *options) {
goto aoa_hid_end;
}
- aoa_hid_ok = true;
kp = &s->keyboard_hid.key_processor;
aoa_hid_initialized = true;
aoa_hid_end:
- if (!aoa_hid_ok) {
+ if (!aoa_hid_initialized) {
LOGE("Failed to enable HID over AOA, "
"fallback to default keyboard injection method "
"(-K/--hid-keyboard ignored)");
|
extmod/modiodevices/Ev3devSensor: get sensor index
This provides the port and sensor indexes in ev3dev sysfs, making it easy to access ev3dev attributes. | @@ -133,6 +133,8 @@ STATIC const mp_obj_type_t iodevices_LUMPDevice_type = {
#include "pbsmbus.h"
+#include <ev3dev_stretch/sysfs.h>
+
#define UART_MAX_LEN (32*1024)
// pybricks.iodevices.AnalogSensor class object
@@ -534,6 +536,8 @@ STATIC const mp_obj_type_t iodevices_UARTDevice_type = {
typedef struct _iodevices_Ev3devSensor_obj_t {
mp_obj_base_t base;
pbdevice_t *pbdev;
+ mp_obj_t sensor_index;
+ mp_obj_t port_index;
} iodevices_Ev3devSensor_obj_t;
// pybricks.iodevices.Ev3devSensor.__init__
@@ -549,6 +553,14 @@ STATIC mp_obj_t iodevices_Ev3devSensor_make_new(const mp_obj_type_t *type, size_
self->pbdev = pbdevice_get_device(port_num, PBIO_IODEV_TYPE_ID_EV3DEV_LEGO_SENSOR);
+ // Get the sysfs index. This is not currently exposed through pbdevice,
+ // so read it again by searching through the sysfs tree.
+ int32_t sensor_index, port_index;
+ pb_assert(sysfs_get_number(port_num, "/sys/class/lego-sensor", &sensor_index));
+ pb_assert(sysfs_get_number(port_num, "/sys/class/lego-port", &port_index));
+ self->sensor_index = mp_obj_new_int(sensor_index);
+ self->port_index = mp_obj_new_int(port_index);
+
return MP_OBJ_FROM_PTR(self);
}
@@ -586,6 +598,8 @@ MP_DEFINE_CONST_FUN_OBJ_KW(iodevices_Ev3devSensor_read_obj, 1, iodevices_Ev3devS
// dir(pybricks.iodevices.Ev3devSensor)
STATIC const mp_rom_map_elem_t iodevices_Ev3devSensor_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&iodevices_Ev3devSensor_read_obj) },
+ { MP_ROM_QSTR(MP_QSTR_sensor_index), MP_ROM_ATTRIBUTE_OFFSET(iodevices_Ev3devSensor_obj_t, sensor_index) },
+ { MP_ROM_QSTR(MP_QSTR_port_index), MP_ROM_ATTRIBUTE_OFFSET(iodevices_Ev3devSensor_obj_t, port_index) },
};
STATIC MP_DEFINE_CONST_DICT(iodevices_Ev3devSensor_locals_dict, iodevices_Ev3devSensor_locals_dict_table);
|
Performance strchr is faster | @@ -405,11 +405,11 @@ static grib_accessor* search_and_cache(grib_handle* h, const char* name,const ch
static grib_accessor* _grib_find_accessor(grib_handle* h, const char* name)
{
grib_accessor* a = NULL;
- char* p = (char*)name;
+ char* p = NULL;
DebugAssert(name);
- while ( *p != '.' && *p != '\0' ) p++;
- if ( *p == '.' ) {
+ p = strchr(name, '.');
+ if ( p ) {
int i=0,len=0;
char name_space[MAX_NAMESPACE_LEN];
char* basename=NULL;
|
maximal packet size limit for cc1200 radio | #ifdef CC1200_CONF_MAX_PAYLOAD_LEN
#define CC1200_MAX_PAYLOAD_LEN CC1200_CONF_MAX_PAYLOAD_LEN
#else
-#define CC1200_MAX_PAYLOAD_LEN 127
+#define CC1200_MAX_PAYLOAD_LEN 125
#endif
+
+#define cc1200_driver_max_payload_len CC1200_MAX_PAYLOAD_LEN
/*---------------------------------------------------------------------------*/
/*
* The RX watchdog is used to check whether the radio is in RX mode at regular
|
Subsets and Splits