message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Fix format of Reboot Required status in BSR | @@ -215,7 +215,7 @@ ShowRegister(
Print(L" [63:35] Rsvd ----------------- = 0x%x\n\n", Bsr.Separated_FIS_1_4.Rsvd1);
} else {
Print(L" [28:27] DR (DRAM Ready(AIT)) --= 0x%x (0:Not trained,Not Loaded; 1:Trained,Not Loaded; 2:Error; 3:Trained,Loaded(Ready))\n", Bsr.Separated_Current_FIS.DR);
- Print(L" [29] RR (Reboot Required)= 0x%x (0:No reset is needed by the DIMM; 1:The DIMMs internal state requires a platform power cycle)\n", Bsr.Separated_Current_FIS.RR);
+ Print(L" [29:29] RR (Reboot Required)= 0x%x (0:No reset is needed by the DIMM; 1:The DIMMs internal state requires a platform power cycle)\n", Bsr.Separated_Current_FIS.RR);
Print(L" [30:63] Rsvd ----------------- = 0x%x\n", Bsr.Separated_Current_FIS.Rsvd);
}
}
|
Remove GPS power save mode. | @@ -325,50 +325,6 @@ func initGPSSerial() bool {
p.Write(makeUBXCFG(0x06, 0x01, 8, []byte{0xF1, 0x03, 0x00, 0x05, 0x00, 0x05, 0x00, 0x00})) // Ublox,3
p.Write(makeUBXCFG(0x06, 0x01, 8, []byte{0xF1, 0x04, 0x00, 0x0A, 0x00, 0x0A, 0x00, 0x00})) // Ublox,4
- // Power save mode.
-
- // UBX-CFG-PM2.
- pm2 := make([]byte, 44)
- pm2[0] = 1 // Version.
-
- // flags.
- pm2[4] = 0
- pm2[5] = 0 // ON/OFF mode.
- pm2[6] = 4 + 8 + 16 // WaitTimeFix+updateRTC+updateEPH.
- pm2[7] = 32 // extintWake.
-
- // updatePeriod.
- pm2[8] = 0
- pm2[9] = 0
- pm2[10] = 0x3A // 15000ms.
- pm2[11] = 0x98
-
- // searchPeriod.
- pm2[12] = 0
- pm2[13] = 0
- pm2[14] = 0x3A // 15000ms.
- pm2[15] = 0x98
-
- // gridOffset.
- pm2[16] = 0
- pm2[17] = 0
- pm2[18] = 0
- pm2[19] = 0
-
- // onTime.
- pm2[20] = 0
- pm2[21] = 15 // 15s.
-
- // minAcqTime.
- pm2[22] = 0
- pm2[23] = 15 // 15s.
-
- p.Write(makeUBXCFG(0x06, 0x3B, 44, pm2))
-
- // UBX-CFG-RXM.
-
- p.Write(makeUBXCFG(0x06, 0x11, 2, []byte{8, 1})) // Enable.
-
// Reconfigure serial port.
cfg := make([]byte, 20)
cfg[0] = 0x01 // portID.
|
Improve bootstrap.ts from ts loader. | @@ -126,11 +126,15 @@ const getTranspileOptions = (moduleName: string, path: string) => {
const getMetacallExportTypes = (
p: ts.Program,
+ paths: string[] = [],
cb: (sourceFile: ts.SourceFile, metacallType: MetacallExports) => void =
() => { },
) => {
const exportTypes: MetacallExports = {};
- const sourceFiles = p.getRootFileNames().map((name) =>
+ const files = paths.length === 0 ?
+ p.getRootFileNames() :
+ paths.map(fileResolveNoThrow).filter(file => p.getRootFileNames().includes(file));
+ const sourceFiles = files.map((name) =>
[name, p.getSourceFile(name)] as const
);
let fileCount = 0;
@@ -195,13 +199,21 @@ const fileResolve = (p: string): string => {
throw Object.assign(Error(`Cannot find module '${p}'`), { code: 'MODULE_NOT_FOUND' });
};
+const fileResolveNoThrow = (p: string): string => {
+ try {
+ return fileResolve(p);
+ } catch (_) {
+ return p;
+ }
+};
+
/** Loads a TypeScript file from disk */
export const load_from_file = safe(function load_from_file(paths: string[]) {
const result: MetacallHandle = {};
const options = getProgramOptions(paths.map(p => fileResolve(p)));
const p = ts.createProgram(options);
// TODO: Handle the emitSkipped?
- const exportTypes = getMetacallExportTypes(p, (sourceFile, exportTypes) => {
+ const exportTypes = getMetacallExportTypes(p, paths, (sourceFile, exportTypes) => {
const { diagnostics /*, emitSkipped */ } = p.emit(sourceFile, (fileName, data) => {
// @ts-ignore
const nodeModulePaths = Module._nodeModulePaths(path.dirname(fileName));
|
Fix unwanted word merge in netgear generator | @@ -121,7 +121,7 @@ static const char *adjectiv[] = { "absurd", "ancient", "antique", "aquatic",
"safe", "salute", "sandy", "sharp", "shiny", "short", "silent", "silky", "silly", "slender", "slow", "slower", "small", "smart", "smiley", "smiling", "smooth", "snug", "soft", "sour", "stealth", "strange", "strong", "sunny", "super", "sweet", "swift",
"tablet", "terrific", "thirsty", "thoughtful", "tiny",
"uneven", "unusual", "urban",
- "vanilla", "vast", "violet"
+ "vanilla", "vast", "violet",
"warm", "watery", "weak", "white", "wide", "wild", "wilde", "windy", "wise", "witty", "wonderful",
"yellow", "young",
"zany" };
|
add interrupt to blink example | #include <aos/aos.h>
#include <hal/soc/soc.h>
-#define BLINK_GPIO 5
+/**
+ * Brief:
+ * This test code shows how to configure gpio and how to use gpio interrupt.
+ *
+ * GPIO status:
+ * GPIO18: output
+ * GPIO4: output
+ * GPIO5: input, pulled up, interrupt from rising edge and falling edge
+ *
+ * Test:
+ * Connect GPIO18 with LED
+ * Connect GPIO4 with GPIO5
+ * Generate pulses on GPIO4, that triggers interrupt on GPIO5 to blink the led.
+ *
+ */
+
+#define GPIO_LED_IO 18
+#define GPIO_TRIGGER_IO 4
+#define GPIO_INPUT_IO 5
+
+gpio_dev_t led;
+gpio_dev_t trigger;
+gpio_dev_t input;
-gpio_dev_t gpio;
+static void gpio_isr_handler(void* arg)
+{
+ uint32_t gpio_num = (uint32_t) arg;
+ uint32_t value = 0;
+ hal_gpio_input_get(&input, &value);
+ hal_gpio_output_toggle(&led);
+ LOG("GPIO[%d] intr, val: %d\n", gpio_num, value);
+}
-static void app_delayed_action(void *arg)
+static void app_trigger_action(void *arg)
{
/* Blink off (output low) */
- hal_gpio_output_low(&gpio);
+ hal_gpio_output_low(&trigger);
aos_msleep(1000);
/* Blink on (output high) */
- hal_gpio_output_high(&gpio);
+ hal_gpio_output_high(&trigger);
aos_msleep(1000);
-
- aos_post_delayed_action(0, app_delayed_action, NULL);
+ aos_post_delayed_action(0, app_trigger_action, NULL);
}
int application_start(int argc, char *argv[])
{
- gpio.port = BLINK_GPIO;
- gpio.config = OUTPUT_PUSH_PULL;
- hal_gpio_init(&gpio);
+ /* gpio port config */
+ led.port = GPIO_LED_IO;
+ /* set as output mode */
+ led.config = OUTPUT_PUSH_PULL;
+ /* configure GPIO with the given settings */
+ hal_gpio_init(&led);
+
+ /* gpio port config */
+ trigger.port = GPIO_TRIGGER_IO;
+ /* set as output mode */
+ trigger.config = OUTPUT_PUSH_PULL;
+ /* configure GPIO with the given settings */
+ hal_gpio_init(&trigger);
+
+ /* input pin config */
+ input.port = GPIO_INPUT_IO;
+ /* set as interrupt mode */
+ input.config = IRQ_MODE;
+ /* configure GPIO with the given settings */
+ hal_gpio_init(&input);
- aos_post_delayed_action(1000, app_delayed_action, NULL);
+ /* gpio interrupt config */
+ hal_gpio_enable_irq(&input, IRQ_TRIGGER_BOTH_EDGES, gpio_isr_handler, (void *) GPIO_INPUT_IO);
+
+ aos_post_delayed_action(1000, app_trigger_action, NULL);
aos_loop_run();
return 0;
}
-
|
input: update scaleMap | @@ -366,16 +366,19 @@ static size_t input_numTests(size_t idx, size_t total) {
if (idx > total) {
LOG_F("idx (%zu) > total (%zu)", idx, total);
}
- size_t percentile = (idx * 100) / total;
- static size_t const scaleMap[101] = {
- [0 ... 90] = 1,
- [91 ... 92] = 2,
- [93 ... 94] = 3,
- [95 ... 96] = 4,
- [97 ... 98] = 5,
- [99 ... 100] = 10,
+ if (idx == 0 || (total - idx) > 5) {
+ return 1;
+ }
+
+ static size_t const scaleMap[] = {
+ [0] = 128,
+ [1] = 32,
+ [2] = 8,
+ [3] = 4,
+ [4] = 2,
+ [5] = 1,
};
- return scaleMap[percentile];
+ return scaleMap[total - idx];
}
#define TAILQ_FOREACH_HF(var, head, field) \
@@ -390,18 +393,22 @@ void input_addDynamicInput(
dynfile->cov[i] = cov[i];
}
dynfile->size = len;
- dynfile->idx = hfuzz->io.dynfileqCnt;
dynfile->tested = 0;
+ dynfile->idx = 0;
memcpy(dynfile->data, data, len);
snprintf(dynfile->path, sizeof(dynfile->path), "%s", path);
MX_SCOPED_RWLOCK_WRITE(&hfuzz->io.dynfileq_mutex);
+ hfuzz->io.dynfileqCnt++;
+ hfuzz->io.dynfileqMaxSz = HF_MAX(hfuzz->io.dynfileqMaxSz, len);
+
if (fuzz_getState(hfuzz) == _HF_STATE_DYNAMIC_MAIN) {
- /* Add it in front with high idx, so it's tested next */
+ dynfile->idx = hfuzz->io.dynfileqCnt;
+ /* Add it with high idx */
TAILQ_INSERT_HEAD(&hfuzz->io.dynfileq, dynfile, pointers);
- hfuzz->io.dynfileqCurrent = TAILQ_FIRST(&hfuzz->io.dynfileq);
} else {
+ dynfile->idx = 0;
/* Sort it by coverage - put better coverage earlier in the list */
struct dynfile_t* iter = NULL;
TAILQ_FOREACH_HF(iter, &hfuzz->io.dynfileq, pointers) {
@@ -414,8 +421,6 @@ void input_addDynamicInput(
TAILQ_INSERT_TAIL(&hfuzz->io.dynfileq, dynfile, pointers);
}
}
- hfuzz->io.dynfileqCnt++;
- hfuzz->io.dynfileqMaxSz = HF_MAX(hfuzz->io.dynfileqMaxSz, len);
if (hfuzz->socketFuzzer.enabled) {
/* Don't add coverage data to files in socketFuzzer mode */
|
fix bug that phy_enter_critical cannot effect on dual-core
Sometimes, libphy.a call phy_enter_critical() to protect accessing
critical sections, such like operating on I2C, but it may not effect
when both the CPU core call it. It may cause accessing I2C blocking
and cannot recover by esp_restart(), until do HW reboot. | @@ -75,14 +75,28 @@ static _lock_t s_modem_sleep_lock;
static int64_t s_phy_rf_en_ts = 0;
#endif
+static DRAM_ATTR portMUX_TYPE s_phy_int_mux = portMUX_INITIALIZER_UNLOCKED;
+
uint32_t IRAM_ATTR phy_enter_critical(void)
{
- return portENTER_CRITICAL_NESTED();
+ if (xPortInIsrContext()) {
+ portENTER_CRITICAL_ISR(&s_phy_int_mux);
+
+ } else {
+ portENTER_CRITICAL(&s_phy_int_mux);
+ }
+ // Interrupt level will be stored in current tcb, so always return zero.
+ return 0;
}
void IRAM_ATTR phy_exit_critical(uint32_t level)
{
- portEXIT_CRITICAL_NESTED(level);
+ // Param level don't need any more, ignore it.
+ if (xPortInIsrContext()) {
+ portEXIT_CRITICAL_ISR(&s_phy_int_mux);
+ } else {
+ portEXIT_CRITICAL(&s_phy_int_mux);
+ }
}
#if CONFIG_IDF_TARGET_ESP32
|
apps_ui.c: Correct handling of empty password from -passin
This is done in analogy to commit | static UI_METHOD *ui_method = NULL;
static const UI_METHOD *ui_fallback_method = NULL;
-
static int ui_open(UI *ui)
{
int (*opener)(UI *ui) = UI_method_get_opener(ui_fallback_method);
@@ -72,7 +71,8 @@ static int ui_write(UI *ui, UI_STRING *uis)
{
const char *password =
((PW_CB_DATA *)UI_get0_user_data(ui))->password;
- if (password && password[0] != '\0')
+
+ if (password != NULL)
return 1;
}
break;
|
Attempt to use pyvenv.cfg hack on Windows. | @@ -2172,7 +2172,7 @@ void wsgi_python_init(apr_pool_t *p)
}
}
-#if defined(WIN32)
+#if defined(WIN32_OBSOLETE_VENV_SETUP)
/*
* Check for Python HOME being overridden. This is only being
* used on Windows for now. For UNIX systems we actually do
@@ -2301,7 +2301,11 @@ void wsgi_python_init(apr_pool_t *p)
#if PY_MAJOR_VERSION >= 3
len = strlen(python_exe)+1;
s = (wchar_t *)apr_palloc(p, len*sizeof(wchar_t));
+#if defined(WIN32) && defined(APR_HAS_UNICODE_FS)
+ wsgi_utf8_to_unicode_path(s, len, python_exe);
+#else
mbstowcs(s, python_exe, len);
+#endif
Py_SetProgramName(s);
#else
@@ -2312,7 +2316,11 @@ void wsgi_python_init(apr_pool_t *p)
#if PY_MAJOR_VERSION >= 3
len = strlen(python_home)+1;
s = (wchar_t *)apr_palloc(p, len*sizeof(wchar_t));
+#if defined(WIN32) && defined(APR_HAS_UNICODE_FS)
+ wsgi_utf8_to_unicode_path(s, len, python_home);
+#else
mbstowcs(s, python_home, len);
+#endif
Py_SetPythonHome(s);
#else
|
fix TreeView React class | import React, { PropTypes } from 'react'
export default class TreeView extends React.Component {
- getInitialState () {
- return { collapsed: this.props.defaultCollapsed }
+ constructor (props) {
+ super(props)
+ this.state = {
+ collapsed: this.props.defaultCollapsed,
+ }
}
handleClick (...args) {
@@ -33,6 +36,7 @@ export default class TreeView extends React.Component {
nodeLabel,
valueField,
children,
+ defaultCollapsed, // eslint-disable-line
...rest
} = this.props
@@ -56,7 +60,7 @@ export default class TreeView extends React.Component {
return (
<div className="tree-view">
<div className="tree-view-item">
- <span className={fullItemClassName} onClick={children && this.handleClick}>
+ <span className={fullItemClassName} onClick={(args) => children && this.handleClick(args)}>
{arrow}
{nodeLabel}
</span>
@@ -78,7 +82,7 @@ TreeView.propTypes = {
nodeLabel: PropTypes.node.isRequired,
className: PropTypes.string,
itemClassName: PropTypes.string,
- valueField: PropTypes.Component,
- children: PropTypes.arrayOf(PropTypes.Component),
+ valueField: PropTypes.element,
+ children: PropTypes.arrayOf(PropTypes.element),
onClick: PropTypes.func,
}
|
[Detection] Increase Network Timeout | @@ -33,7 +33,7 @@ typedef struct __attribute__((__packed__))
};
} node_bootstrap_t;
-#define NETWORK_TIMEOUT 1000 // timeout to detect a failed detection
+#define NETWORK_TIMEOUT 3000 // timeout to detect a failed detection
static error_return_t Robus_MsgHandler(msg_t *input);
static error_return_t Robus_DetectNextNodes(ll_service_t *ll_service);
@@ -376,7 +376,7 @@ static error_return_t Robus_DetectNextNodes(ll_service_t *ll_service)
while (ctx.port.keepLine)
{
Robus_Loop();
- if (LuosHAL_GetSystick() - start_tick > 3000)
+ if (LuosHAL_GetSystick() - start_tick > NETWORK_TIMEOUT)
{
// topology detection is too long, we should abort it and restart
return FAILED;
|
cmake: allow calling get component property in early expansion | +cmake_minimum_required(VERSION 3.5)
include("${BUILD_PROPERTIES_FILE}")
include("${COMPONENT_PROPERTIES_FILE}")
@@ -18,6 +19,38 @@ function(__component_get_property var component_target property)
set(${var} ${${_property}} PARENT_SCOPE)
endfunction()
+#
+# Given a component name or alias, get the corresponding component target.
+#
+function(__component_get_target var name_or_alias)
+ idf_build_get_property(component_targets __COMPONENT_TARGETS)
+
+ # Assume first that the paramters is an alias.
+ string(REPLACE "::" "_" name_or_alias "${name_or_alias}")
+ set(component_target ___${name_or_alias})
+
+ if(component_target IN_LIST component_targets)
+ set(${var} ${component_target} PARENT_SCOPE)
+ set(target ${component_target})
+ else() # assumption is wrong, try to look for it manually
+ unset(target)
+ foreach(component_target ${component_targets})
+ __component_get_property(_component_name ${component_target} COMPONENT_NAME)
+ if(name_or_alias STREQUAL _component_name)
+ set(target ${component_target})
+ break()
+ endif()
+ endforeach()
+ set(${var} ${target} PARENT_SCOPE)
+ endif()
+endfunction()
+
+function(idf_component_get_property var component property)
+ __component_get_target(component_target ${component})
+ __component_get_property(_var ${component_target} ${property})
+ set(${var} ${_var} PARENT_SCOPE)
+endfunction()
+
macro(require_idf_targets)
endmacro()
@@ -105,14 +138,14 @@ __component_set_property(${__component_target} __COMPONENT_REGISTERED ${__compon
if(__component_kconfig)
get_filename_component(__component_kconfig "${__component_kconfig}" ABSOLUTE)
set(__contents
-"${__contents}\n__component_set_property(${__component_target} KCONFIG \"${__component_kconfig}\""
+"${__contents}\n__component_set_property(${__component_target} KCONFIG \"${__component_kconfig}\")"
)
endif()
if(__component_kconfig_projbuild)
get_filename_component(__component_kconfig "${__component_kconfig}" ABSOLUTE)
set(__contents
-"${__contents}\n__component_set_property(${__component_target} KCONFIG_PROJBUILD \"${__component_kconfig_projbuild}\""
+"${__contents}\n__component_set_property(${__component_target} KCONFIG_PROJBUILD \"${__component_kconfig_projbuild}\")"
)
endif()
|
Update README.md
Added to the readme file. See: | @@ -56,6 +56,7 @@ awesome list of [YARA-related stuff](https://github.com/InQuest/awesome-yara).
## Who's using YARA
+* [0x101 Cyber Security](https://0x101-cyber-security.de)
* [ActiveCanopy](https://activecanopy.com/)
* [Adlice](https://www.adlice.com/)
* [AlienVault](https://otx.alienvault.com/)
|
Small fix in Array#sort | @@ -83,7 +83,7 @@ class Array
v_i = self[i]
v_j = self[j]
if block
- next if block.call(v_i, v_j) <= 0
+ next if block.call(v_i, v_j) < 0
else
next if v_i < v_j
end
|
add comment on #if ending | @@ -491,8 +491,8 @@ static bool mi_getenv(const char* name, char* result, size_t result_size) {
return false;
}
}
-#endif
-#endif
+#endif // !MI_USE_ENVIRON
+#endif // !MI_NO_GETENV
static void mi_option_init(mi_option_desc_t* desc) {
// Read option value from the environment
|
layer.conf: add dunfell to compat layer | @@ -9,7 +9,7 @@ BBFILE_COLLECTIONS += "raspberrypi"
BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/"
BBFILE_PRIORITY_raspberrypi = "9"
-LAYERSERIES_COMPAT_raspberrypi = "sumo thud warrior zeus"
+LAYERSERIES_COMPAT_raspberrypi = "sumo thud warrior zeus dunfell"
# Additional license directories.
LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
|
gard: enable building with -DDEBUG for ccan list | @@ -5,7 +5,10 @@ OBJS = version.o gard.o
LIBFLASH_FILES := libflash.c libffs.c ecc.c blocklevel.c file.c
LIBFLASH_OBJS := $(addprefix libflash-, $(LIBFLASH_FILES:.c=.o))
LIBFLASH_SRC := $(addprefix libflash/,$(LIBFLASH_FILES))
-OBJS += $(LIBFLASH_OBJS)
+CCAN_FILES := list.c
+CCAN_OBJS := $(addprefix ccan-list-, $(CCAN_FILES:.c=.o))
+CCAN_SRC := $(addprefix ccan/list/,$(CCAN_FILES))
+OBJS += $(LIBFLASH_OBJS) $(CCAN_OBJS)
OBJS += common-arch_flash.o
EXE = gard
@@ -29,10 +32,14 @@ version.c: .version
$(CC) $(CFLAGS) -c $< -o $@
$(LIBFLASH_SRC): | links
+$(CCAN_SRC): | links
$(LIBFLASH_OBJS): libflash-%.o : libflash/%.c
$(CC) $(CFLAGS) -c $< -o $@
+$(CCAN_OBJS): ccan-list-%.o: ccan/list/%.c
+ $(Q_CC)$(CC) $(CFLAGS) -c $< -o $@
+
$(EXE): $(OBJS)
$(CC) $(LDFLAGS) $(CFLAGS) $^ -o $@
|
Lock metadata mutexes in case they are cleared by inotify thread | @@ -466,8 +466,15 @@ parse_overlay_config(struct overlay_params *params,
#ifdef HAVE_DBUS
if (params->enabled[OVERLAY_PARAM_ENABLED_media_player]) {
+ // lock mutexes for config file change notifier thread
+ {
+ std::lock_guard<std::mutex> lk(main_metadata.mutex);
main_metadata.clear();
+ }
+ {
+ std::lock_guard<std::mutex> lk(generic_mpris.mutex);
generic_mpris.clear();
+ }
if (dbusmgr::dbus_mgr.init(params->media_player_name)) {
if (!get_media_player_metadata(dbusmgr::dbus_mgr, params->media_player_name, main_metadata))
std::cerr << "MANGOHUD: Failed to get initial media player metadata." << std::endl;
|
Add portable fix for the lack of UNREFERENCED_PARAMETER prior to including winnnt.h | #include "Version.hpp"
#include "Enums.hpp"
-#include "ctmacros.hpp"
+#include <tuple>
#include <map>
#include <string>
#include <vector>
@@ -502,9 +502,10 @@ namespace ARIASDK_NS_BEGIN
/// <param name="size">HTTP client implementation-specific data structure size (optional)</param>
virtual void OnHttpStateEvent(HttpStateEvent state, void* data = nullptr, size_t size = 0)
{
- UNREFERENCED_PARAMETER(state);
- UNREFERENCED_PARAMETER(data);
- UNREFERENCED_PARAMETER(size);
+ /* Can't use UNREFERENCED_PARAMETER here on Win32 - we do not necessarily have include winnt.h at this point */
+ std::ignore = state;
+ std::ignore = data;
+ std::ignore = size;
};
};
|
Fix missing encryption levels | @@ -3,7 +3,7 @@ import json
import base64
from pprint import pprint
-epoch = ["ENCRYPTION_INITIAL", "ENCRYPTION_0RTT", "ENCRYPTION_UNKNOWN", "ENCRYPTION_1RTT"]
+epoch = ["ENCRYPTION_INITIAL", "ENCRYPTION_0RTT", "ENCRYPTION_HANDSHAKE", "ENCRYPTION_1RTT"]
def transform(inf, outf, cid):
start = -1
@@ -37,6 +37,7 @@ def transform(inf, outf, cid):
if rframes:
packet = {}
packet["eventType"] = "PACKET_RECEIVED"
+ packet["encryptionLevel"] = epoch[3] # hack
packet["timeUs"] = str((rtime - start) * 1000)
packet["packetNumber"] = str(rpn)
packet["frames"] = rframes
@@ -55,6 +56,7 @@ def transform(inf, outf, cid):
# record new loss
packet = {}
packet["eventType"] = "PACKET_LOST"
+ packet["encryptionLevel"] = epoch[3]
if start == -1: start = trace["time"]
packet["timeUs"] = str((trace["time"] - start) * 1000)
packet["packetNumber"] = str(trace["pn"])
@@ -146,6 +148,7 @@ def transform(inf, outf, cid):
if rframes:
# packet = {}
packet["eventType"] = "PACKET_RECEIVED"
+ packet["encryptionLevel"] = epoch[3] # hack
packet["timeUs"] = str((rtime - start) * 1000)
packet["packetNumber"] = str(rpn)
packet["frames"] = rframes
|
[numerics] add an assert for sparse storage that is not implemented | @@ -69,7 +69,7 @@ int reformulationIntoLocalProblem(GlobalFrictionContactProblem* problem, Frictio
return info;
}
- if (M->storageType == 0)
+ if (M->storageType == NM_DENSE)
{
@@ -145,7 +145,7 @@ int reformulationIntoLocalProblem(GlobalFrictionContactProblem* problem, Frictio
}
- else
+ else if (M->storageType == NM_SPARSE_BLOCK)
{
int n = M->size0;
int m = H->size1;
@@ -313,8 +313,16 @@ int reformulationIntoLocalProblem(GlobalFrictionContactProblem* problem, Frictio
free(Htrans);
free(qtmp);
}
-
-
+ else if (M->storageType == NM_SPARSE)
+ {
+ printf("reformulationIntoLocalProblem :: sparse matrix storage is not implemented\n");
+ exit(EXIT_FAILURE);
+ }
+ else
+ {
+ printf("reformulationIntoLocalProblem :: unknown matrix storage");
+ exit(EXIT_FAILURE);
+ }
return info;
}
int computeGlobalVelocity(GlobalFrictionContactProblem* problem, double * reaction, double * globalVelocity)
@@ -406,9 +414,15 @@ void gfc3d_nsgs_wr(GlobalFrictionContactProblem* problem, double *reaction , do
// Reformulation
FrictionContactProblem* localproblem = (FrictionContactProblem *) malloc(sizeof(FrictionContactProblem));
-
+ if (verbose)
+ {
+ printf("Reformulation info a reduced problem onto local variables ...\n");
+ }
reformulationIntoLocalProblem(problem, localproblem);
-
+ if (verbose)
+ {
+ printf("Call to the fc3d solver ...\n");
+ }
fc3d_nsgs(localproblem, reaction , velocity , info , options->internalSolvers);
computeGlobalVelocity(problem, reaction, globalVelocity);
|
Fix setting ZHAOpenClose sensor state/lastupdated | @@ -3236,12 +3236,12 @@ void DeRestPluginPrivate::updateSensorNode(const deCONZ::NodeEvent &event)
if (item->toBool() != open)
{
item->setValue(open);
- i->setNeedSaveDatabase(true);
- queSaveDb(DB_SENSORS, DB_HUGE_SAVE_DELAY);
- }
Event e(RSensors, item->descriptor().suffix, i->id());
enqueueEvent(e);
}
+ i->setNeedSaveDatabase(true);
+ i->updateStateTimestamp();
+ }
updateSensorEtag(&*i);
}
|
Update change log for 3.3 release | @@ -4,7 +4,42 @@ This page summarizes the major functional and performance changes in each
release of the 3.x series.
All performance data on this page is measured on an Intel Core i5-9600K
-clocked at 4.2 GHz, running astcenc using AVX2 and 6 threads.
+clocked at 4.2 GHz, running `astcenc` using AVX2 and 6 threads.
+
+
+<!-- ---------------------------------------------------------------------- -->
+## 3.3
+
+**Status:** November 2021
+
+The 3.3 release improves image quality for normal maps, and two component
+textures. Normal maps are expected to compress 25% slower than the 3.2
+release, although it should be noted that they are still faster to compress
+in 3.3 than when using the 2.5 series. This release also fixes one reported
+stability issue.
+
+* **General:**
+ * **Feature:** Normal map image quality has been improved.
+ * **Feature:** Two component image quality has been improved, provided
+ that unused components are correctly zero-weighted using e.g. `-cw` on the
+ command line.
+ * **Bug-fix:** Improved stability when trying to compress complex blocks that
+ could not beat even the starting quality threshold. These will now always
+ compress in to a constant color blocks.
+
+<!-- ---------------------------------------------------------------------- -->
+## 3.2
+
+**Status:** August 2021
+
+The 3.2 release is a bugfix release; no significant image quality or
+performance differences are expected.
+
+* **General:**
+ * **Bug-fix:** Improved stability when new contexts were created while other
+ contexts were compressing or decompressing an image.
+ * **Bug-fix:** Improved stability when decompressing blocks with invalid
+ block encodings.
<!-- ---------------------------------------------------------------------- -->
## 3.1
|
rastertops- added handling of empty input | @@ -366,8 +366,8 @@ main(int argc, /* I - Number of command-line arguments */
FILE *input = NULL; /* File pointer to raster document */
int fd, /* File descriptor for raster document */
num_options, /* Number of options */
- count, /* count for writing the postscript */
Canceled = 0, /* variable for job cancellation */
+ empty, /* Is the input empty? */
Page = 0, /* variable for counting the pages */
ret; /* Return value of deflate compression */
ppd_file_t *ppd; /* PPD file */
@@ -444,16 +444,16 @@ main(int argc, /* I - Number of command-line arguments */
* Process pages as needed...
*/
Page = 0;
- count = 0;
+ empty = 1;
while (cupsRasterReadHeader2(ras, &header))
{
/*
* Write the prolog for PS only once
*/
- if (!count)
+ if (empty)
{
- count++;
+ empty = 0;
writeProlog(header.PageSize[0], header.PageSize[1]);
}
@@ -486,7 +486,17 @@ main(int argc, /* I - Number of command-line arguments */
zerr(ret);
writeEndPage();
}
+
+ if (empty)
+ {
+ fprintf(stderr, "DEBUG: Input is empty, outputting empty file.\n");
+ cupsRasterClose(ras);
+ return 0;
+ }
+
writeTrailer(Page);
+ cupsRasterClose(ras);
+
return 0;
}
|
tests: improve ASSERTIFY | @@ -70,7 +70,21 @@ typedef struct test_entry_t {
#define ASSERT_CHOOSER(...) ASSERT_ARG3(__VA_ARGS__, ASSERT_ARG2, ASSERT_ARG1)
#define ASSERT(...) do { ASSERT_CHOOSER(__VA_ARGS__)(__VA_ARGS__) } while(0);
-#define ASSERTIFY(expr) ASSERT((expr).status == 1, (expr).msg)
+#define ASSERTIFY(expr) do { \
+ test_status_t ts; \
+ ts = expr; \
+ if (ts.status != 1) { \
+ fprintf(stderr, \
+ RED " assert fail" RESET \
+ " in " BOLDCYAN "%s " RESET \
+ "on " BOLDMAGENTA "line %d" RESET \
+ " : " BOLDWHITE " ASSERTIFY(%s)\n" RESET, \
+ __FILE__, \
+ __LINE__, \
+ #expr); \
+ return (test_status_t){ts.msg, 0}; \
+ } \
+ } while(0);
#define TEST_OK 1
#define TEST_SUCCESS return (test_status_t){NULL, TEST_OK};
@@ -80,8 +94,7 @@ typedef struct test_entry_t {
test_status_t test_ ## FUN()
#if defined(_WIN32)
-# define srand48(x) srand((int)(x))
-# define drand48() ((float)(rand() / RAND_MAX))
+# define drand48() ((float)(rand() / (RAND_MAX + 1.0)))
# define OK_TEXT "ok:"
# define FAIL_TEXT "fail:"
#else
|
Replace tls12_get_pkey_idx
The functiontls12_get_pkey_idx is only used to see if a certificate index is
enabled: call ssl_cert_is_disabled instead. | @@ -1398,43 +1398,6 @@ TICKET_RETURN tls_decrypt_ticket(SSL *s, const unsigned char *etick,
return ret;
}
-static int tls12_get_pkey_idx(int sig_nid)
-{
- switch (sig_nid) {
-#ifndef OPENSSL_NO_RSA
- case EVP_PKEY_RSA:
- return SSL_PKEY_RSA;
- /*
- * For now return RSA key for PSS. When we support PSS only keys
- * this will need to be updated.
- */
- case EVP_PKEY_RSA_PSS:
- return SSL_PKEY_RSA;
-#endif
-#ifndef OPENSSL_NO_DSA
- case EVP_PKEY_DSA:
- return SSL_PKEY_DSA_SIGN;
-#endif
-#ifndef OPENSSL_NO_EC
- case EVP_PKEY_EC:
- return SSL_PKEY_ECC;
- case EVP_PKEY_ED25519:
- return SSL_PKEY_ED25519;
-#endif
-#ifndef OPENSSL_NO_GOST
- case NID_id_GostR3410_2001:
- return SSL_PKEY_GOST01;
-
- case NID_id_GostR3410_2012_256:
- return SSL_PKEY_GOST12_256;
-
- case NID_id_GostR3410_2012_512:
- return SSL_PKEY_GOST12_512;
-#endif
- }
- return -1;
-}
-
/* Check to see if a signature algorithm is allowed */
static int tls12_sigalg_allowed(SSL *s, int op, const SIGALG_LOOKUP *lu)
{
@@ -1454,7 +1417,7 @@ static int tls12_sigalg_allowed(SSL *s, int op, const SIGALG_LOOKUP *lu)
|| lu->hash_idx == SSL_MD_SHA224_IDX))
return 0;
/* See if public key algorithm allowed */
- if (tls12_get_pkey_idx(lu->sig) == -1)
+ if (ssl_cert_is_disabled(lu->sig_idx))
return 0;
if (lu->hash == NID_undef)
return 1;
@@ -1678,8 +1641,8 @@ int tls1_process_sigalgs(SSL *s)
if (SSL_IS_TLS13(s) && sigptr->sig == EVP_PKEY_RSA)
continue;
/* If not disabled indicate we can explicitly sign */
- if (pvalid[idx] == 0 && tls12_get_pkey_idx(sigptr->sig) != -1)
- pvalid[sigptr->sig_idx] = CERT_PKEY_EXPLICIT_SIGN | CERT_PKEY_SIGN;
+ if (pvalid[idx] == 0 && !ssl_cert_is_disabled(idx))
+ pvalid[idx] = CERT_PKEY_EXPLICIT_SIGN | CERT_PKEY_SIGN;
}
return 1;
}
|
ci(pytest): move to class plugin | @@ -147,18 +147,39 @@ def pytest_addoption(parser: pytest.Parser) -> None:
)
[email protected](tryfirst=True)
-def pytest_sessionstart(session: Session) -> None:
- if session.config.option.target:
- session.config.option.target = session.config.getoption('target').lower()
+_idf_pytest_embedded_key = pytest.StashKey['IdfPytestEmbedded']
+
+
+def pytest_configure(config: Config) -> None:
+ config.stash[_idf_pytest_embedded_key] = IdfPytestEmbedded(
+ target=config.getoption('target'),
+ sdkconfig=config.getoption('sdkconfig'),
+ )
+ config.pluginmanager.register(config.stash[_idf_pytest_embedded_key])
+
+
+def pytest_unconfigure(config: Config) -> None:
+ _pytest_embedded = config.stash.get(_idf_pytest_embedded_key, None)
+ if _pytest_embedded:
+ del config.stash[_idf_pytest_embedded_key]
+ config.pluginmanager.unregister(_pytest_embedded)
+class IdfPytestEmbedded:
+
+ def __init__(self, target: Optional[str] = None, sdkconfig: Optional[str] = None):
+ # CLI options to filter the test cases
+ self.target = target
+ self.sdkconfig = sdkconfig
+
@pytest.hookimpl(tryfirst=True)
-def pytest_collection_modifyitems(config: Config, items: List[Function]) -> None:
- target = config.getoption('target', None) # use the `build` dir
- if not target:
- return
+ def pytest_sessionstart(self, session: Session) -> None:
+ if self.target:
+ self.target = self.target.lower()
+ session.config.option.target = self.target
+ @pytest.hookimpl(tryfirst=True)
+ def pytest_collection_modifyitems(self, items: List[Function]) -> None:
# sort by file path and callspec.config
# implement like this since this is a limitation of pytest, couldn't get fixture values while collecting
# https://github.com/pytest-dev/pytest/discussions/9689
@@ -182,19 +203,19 @@ def pytest_collection_modifyitems(config: Config, items: List[Function]) -> None
item.add_marker(_target)
# filter all the test cases with "--target"
- items[:] = [item for item in items if target in item_marker_names(item)]
+ if self.target:
+ items[:] = [item for item in items if self.target in item_marker_names(item)]
# filter all the test cases with cli option "config"
- if config.getoption('sdkconfig'):
+ if self.sdkconfig:
items[:] = [
item
for item in items
- if _get_param_config(item) == config.getoption('sdkconfig')
+ if _get_param_config(item) == self.sdkconfig
]
-
@pytest.hookimpl(trylast=True)
-def pytest_runtest_teardown(item: Function) -> None:
+ def pytest_runtest_teardown(self, item: Function) -> None:
"""
Format the test case generated junit reports
"""
|
gitlab: make "Related" subsection visible in the minimal template | <!-- Add description of the change here --><!-- Mandatory -->
-<!-- ## Related --><!-- Optional -->
+## Related <!-- Optional -->
<!-- Related Jira issues and Github issues -->
## Release notes <!-- Mandatory -->
|
[stage] Make config concatenation actually work | @@ -11,7 +11,12 @@ private[stage] object UnderscoreDelimitedConfigsAnnotation extends HasShellOptio
override val options = Seq(
new ShellOption[String](
longOption = "legacy-configs",
- toAnnotationSeq = a => Seq(new ConfigsAnnotation(a.split("_"))),
+ toAnnotationSeq = a => {
+ val split = a.split('.')
+ val packageName = split.init.mkString(".")
+ val configs = split.last.split("_")
+ Seq(new ConfigsAnnotation(configs map { config => s"${packageName}.${config}" } ))
+ },
helpText = "A string of underscore-delimited configs (configs have decreasing precendence from left to right).",
shortOption = Some("LC")
)
|
sched: Fix a bug in sched_idle_on_core. | @@ -216,7 +216,7 @@ int sched_idle_on_core(uint32_t mwait_hint, unsigned int core)
}
/* setup the requested idle state */
- ksched_idle_hint(mwait_hint, core);
+ ksched_idle_hint(core, mwait_hint);
/* issue the command to idle the core */
return __sched_run(s, NULL, core);
|
Optimize filter sync register list | @@ -102,8 +102,9 @@ int LMS7002M::TuneRxFilter(float_type rx_lpf_freq_RF)
return ReportError(-1, "MCU error code(%i): %s", status, MCU_BD::MCUStatusMessage(status));
}
//sync registers to cache
- for (int a = 0x010c; a <= 0x0114; a++) this->SPI_read(a, true);
- for (int a = 0x0115; a <= 0x011b; a++) this->SPI_read(a, true);
+ std::vector<uint16_t> regsToSync = {0x0112, 0x0117, 0x011A, 0x0116, 0x0118, 0x0114, 0x0019, 0x0115};
+ for(const auto addr : regsToSync)
+ this->SPI_read(addr, true);
return status;
}
@@ -148,8 +149,9 @@ int LMS7002M::TuneTxFilter(const float_type tx_lpf_freq_RF)
return ReportError(-1, "MCU error code(%i): %s", status, MCU_BD::MCUStatusMessage(status));
}
//sync registers to cache
- for (int a = 0x0105; a <= 0x010b; a++)
- this->SPI_read(a, true);
+ std::vector<uint16_t> regsToSync = {0x0105, 0x0106, 0x0109, 0x010A, 0x010B};
+ for(const auto addr : regsToSync)
+ this->SPI_read(addr, true);
if(tx_lpf_IF <= TxLPF_RF_LimitLowMid/2)
Log(LOG_INFO, "Filter calibrated. Filter order-4th, filter bandwidth set to %g MHz."
|
CI: Include quicklz in the Enterprise GPDB tarball | @@ -116,6 +116,14 @@ function include_zstd() {
popd
}
+function include_quicklz() {
+ pushd ${GREENPLUM_INSTALL_DIR}
+ if [ "${TARGET_OS}" == "centos" ] ; then
+ cp /usr/lib64/libquicklz.so* lib/.
+ fi
+ popd
+}
+
function export_gpdb() {
TARBALL="${GPDB_ARTIFACTS_DIR}/${GPDB_BIN_FILENAME}"
pushd ${GREENPLUM_INSTALL_DIR}
@@ -203,6 +211,7 @@ function _main() {
unittest_check_gpdb
fi
include_zstd
+ include_quicklz
export_gpdb
export_gpdb_extensions
export_gpdb_win32_ccl
|
system: fix brownout ISR triggering assert on single-core configs.
ISR handler was incorrectly calling stall other cpu even on single core systems
Closes | @@ -41,8 +41,14 @@ IRAM_ATTR static void rtc_brownout_isr_handler(void *arg)
* cleared manually.
*/
brownout_hal_intr_clear();
+
// Stop the other core.
- esp_cpu_stall(!esp_cpu_get_core_id());
+#if !CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE
+ const uint32_t core_id = esp_cpu_get_core_id();
+ const uint32_t other_core_id = (core_id == 0) ? 1 : 0;
+ esp_cpu_stall(other_core_id);
+#endif
+
esp_reset_reason_set_hint(ESP_RST_BROWNOUT);
#if CONFIG_SPI_FLASH_BROWNOUT_RESET
if (spi_flash_brownout_need_reset()) {
|
[kernel] same init behavior s in LagrangianDS | @@ -433,9 +433,7 @@ NewtonEulerDS::NewtonEulerDS(SP::SiconosVector Q0, SP::SiconosVector Twist0,
void NewtonEulerDS::_init()
{
_p.resize(3);
- _p[0].reset(new SiconosVector());
_p[1].reset(new SiconosVector(_n)); // Needed in NewtonEulerR
- _p[2].reset(new SiconosVector());
_zeroPlugin();
//assert(0);
|
[numerics] add MPI comm & MUMPS id copy in NM_gemm | @@ -2271,6 +2271,11 @@ NumericsMatrix * NM_multiply(NumericsMatrix* A, NumericsMatrix* B)
NumericsMatrix * C = NM_new();
+ /* should we copy the whole internal data ? */
+ /*NM_internalData_copy(A, C);*/
+ NM_MPI_copy(A, C);
+ NM_MUMPS_copy(A, C);
+
/* At the time of writing, we are able to transform anything into NM_SPARSE,
* hence we use this format whenever possible */
if (A->storageType == NM_SPARSE || B->storageType == NM_SPARSE || C->storageType == NM_SPARSE)
@@ -2367,6 +2372,7 @@ void NM_gemm(const double alpha, NumericsMatrix* A, NumericsMatrix* B,
const double beta, NumericsMatrix* C)
{
size_t storageType;
+
/* At the time of writing, we are able to transform anything into NM_SPARSE,
* hence we use this format whenever possible */
if (A->storageType == NM_SPARSE || B->storageType == NM_SPARSE || C->storageType == NM_SPARSE)
@@ -2468,6 +2474,10 @@ void NM_gemm(const double alpha, NumericsMatrix* A, NumericsMatrix* B,
assert(0 && "NM_gemm unknown storageType");
}
}
+
+ NM_MPI_copy(A, C);
+ NM_MUMPS_copy(A, C);
+
}
NumericsMatrixInternalData* NM_internalData(NumericsMatrix* A)
|
Add all test-* files to .gitignore. | @@ -61,26 +61,7 @@ libyara/yara.pc
.DS_Store
# Files generated by tests
-test-alignment
-test-api
-test-arena
-test-arena-stream
-test-async
-test-atoms
-test-bitmask
-test-elf
-test-exception
-test-rules-pass-1
-test-rules-pass-2
-test-rules-pass-3
-test-rules.yarc
-test-pb
-test-pe
-test-re-split
-test-stack
-test-macho
-test-math
-test-version
+test-*
# Bazel
bazel-*
|
don't auto-parse comments inside markdown | :: either a one-line header or a paragraph
%. [p.u.lub yex]
?- p.cur
- $rule (full ;~(pfix gay hrul)):parse
+ $rule (full ;~(pfix (punt whit) hrul)):parse
$expr expr:parse
$head head:parse
@ para:parse
:: [arbitrary *content*](url)
::
%+ stag %link
- ;~ (glue gay)
+ ;~ (glue (punt whit))
(ifix [sel ser] (cool (cash ser) work))
(ifix [pel per] (cash per))
==
++ para :: paragraph
%+ cook
|=(flow [[%p ~] +<]~)
- ;~(pfix gay down) ::REVIEW does this mean comments work?
+ ;~(pfix (punt whit) down) ::REVIEW does this mean comments work?
::
++ expr :: expression
- ;~(pfix gay (cook drop-top toplevel):(sail &))
+ ;~(pfix (punt whit) (cook drop-top toplevel):(sail &))
::
++ whit :: whitespace
(cold ' ' (plus ;~(pose (just ' ') (just '\0a'))))
|
Hey Travis do you want to run? | @@ -61,7 +61,7 @@ before_script:
- if [ "$CHECK" == "cppcheck" ]; then ./ci/build_cppcheck.sh; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'; fi
script:
- # Now build picoquic examples and test
+ # Now build picoquic examples and run tests
- echo $CC
- echo $CXX
- $CC --version
|
Add test for codelite libdirs | codelite.project.linker(cfg)
test.capture [[
<Linker Required="yes" Options="">
+ <LibraryPath Value="test"/>
+ <LibraryPath Value="test2"/>
</Linker>
]]
end
|
test/evp_test.c: Add check for OPENSSL_strdup
As the potential failure of the OPENSSL_strdup(),
it should be better to check the return value and
return error if fails. | @@ -1256,7 +1256,7 @@ static int mac_test_parse(EVP_TEST *t,
return parse_bin(value, &mdata->salt, &mdata->salt_len);
if (strcmp(keyword, "Algorithm") == 0) {
mdata->alg = OPENSSL_strdup(value);
- if (!mdata->alg)
+ if (mdata->alg == NULL)
return -1;
return 1;
}
@@ -1268,9 +1268,13 @@ static int mac_test_parse(EVP_TEST *t,
return mdata->xof = 1;
if (strcmp(keyword, "NoReinit") == 0)
return mdata->no_reinit = 1;
- if (strcmp(keyword, "Ctrl") == 0)
- return sk_OPENSSL_STRING_push(mdata->controls,
- OPENSSL_strdup(value)) != 0;
+ if (strcmp(keyword, "Ctrl") == 0) {
+ char *data = OPENSSL_strdup(value);
+
+ if (data == NULL)
+ return -1;
+ return sk_OPENSSL_STRING_push(mdata->controls, data) != 0;
+ }
if (strcmp(keyword, "OutputSize") == 0) {
mdata->output_size = atoi(value);
if (mdata->output_size < 0)
|
test: qemu-debian-jessie boot: fix qemu-img
We can just use whatever qemu-img binary that's laying around,
including the distro one. | @@ -36,7 +36,7 @@ D=`mktemp --tmpdir debian-jessie-install.qcow2.XXXXXXXXXX`
# In future we should do full install:
# FIXME: -append "DEBIAN_FRONTEND=text locale=en_US keymap=us hostname=OPALtest domain=unassigned-domain rescue/enable=true"
-$QEMU_PATH/../qemu-img create -f qcow2 $D 128G 2>&1 > $T
+qemu-img create -f qcow2 $D 128G 2>&1 > $T
( cat <<EOF | expect
set timeout 600
|
[scripts] Echo warning when using with deprecated patches | @@ -10,6 +10,11 @@ if [[ ! -f $app ]]; then
exit -1
fi
+echo "This benchmark script and the patches it relies on have not been updated \
+to match the latest hardware changes!"
+echo "Abort"
+exit 1
+
# Create log
mailfile=email_$1
|
Draw studio popup after everything else
Fixes | @@ -1769,8 +1769,6 @@ static void renderStudio()
default: break;
}
- drawPopup();
-
if(getConfig()->noSound)
memset(tic->ram.registers, 0, sizeof tic->ram.registers);
@@ -1911,6 +1909,8 @@ static void studioTick()
}
+ drawPopup();
+
impl.studio.text = '\0';
}
|
Refreshing of wallet balance is updated | @@ -88,8 +88,8 @@ struct connection_pool_data {
uint8_t data_size;
uint8_t block_size;
struct pollfd connection_descriptor;
- struct miner_pool_data *miner; // More than one connection may lead to the same miner, it is needed to track
- int balance_sent; // this behaviour to avoid potential exploit of the service.
+ struct miner_pool_data *miner;
+ xdag_amount_t balance; // allows to track and refresh wallet balance
uint32_t shares_count;
};
@@ -553,7 +553,6 @@ static void calculate_nopaid_shares(struct connection_pool_data *conn_data, stru
}
conn_data->maxdiff[i] = diff;
- conn_data->balance_sent = 0;
// share already counted, but we will update the maxdiff so the most difficult share will be counted.
} else if(diff > conn_data->maxdiff[i]) {
conn_data->maxdiff[i] = diff;
@@ -774,12 +773,15 @@ static int send_data_to_connection(connection_list_element *connection, int *pro
conn_data->shares_count = 0;
fields_count = 2;
memcpy(data, task->task, fields_count * sizeof(struct xdag_field));
- } else if(!conn_data->balance_sent && conn_data->miner && time(0) >= (conn_data->task_time << 6) + 4) {
- conn_data->balance_sent = 1;
+ } else if(conn_data->miner && time(0) >= (conn_data->task_time << 6) + 4) {
+ const xdag_amount_t actual_balance = xdag_get_balance(data[0].data);
+ if(actual_balance != conn_data->balance) {
+ conn_data->balance = actual_balance;
memcpy(data[0].data, conn_data->miner->id.data, sizeof(xdag_hash_t));
- data[0].amount = xdag_get_balance(data[0].data);
+ data[0].amount = actual_balance;
fields_count = 1;
}
+ }
if(fields_count) {
*processed = 1;
|
oc_pstat: set POST response length to zero
Tested-by: IoTivity Jenkins | @@ -511,6 +511,7 @@ post_pstat(oc_request_t *request, oc_interface_mask_t interface, void *data)
int device = request->resource->device;
if (oc_sec_decode_pstat(request->request_payload, false, device)) {
oc_send_response(request, OC_STATUS_CHANGED);
+ request->response->response_buffer->response_length = 0;
oc_sec_dump_pstat(device);
} else {
oc_send_response(request, OC_STATUS_BAD_REQUEST);
|
docu: small improvement | @@ -284,7 +284,7 @@ int keyIsBelowOrSame (const Key * key, const Key * check)
/**
- * Check if the key check is direct below the key key or not.
+ * Check whether the key `check` is directly below the key `key`.
*
@verbatim
Example:
|
riscv/addrenv_shm: Add missing sanity check to up_shmdt()
A missing sanity check, make sure the last level page table actually exists
before trying to clear entries from it. | @@ -159,6 +159,10 @@ int up_shmdt(uintptr_t vaddr, unsigned int npages)
paddr = mmu_pte_to_paddr(mmu_ln_getentry(ptlevel, ptprev, vaddr));
ptlast = riscv_pgvaddr(paddr);
+ if (!ptlast)
+ {
+ return -EFAULT;
+ }
/* Then wipe the reference */
|
Adding brackets at IPv6 address
When we get IPv6 address using inet_ntop,
there are not include [(prefix) and ](suffix).
So added them when we get IPv6 address.
Tested-by: IoTivity Jenkins | @@ -1627,12 +1627,16 @@ oc_dns_lookup(const char *domain, oc_string_t *addr, enum transport_flags flags)
int ret = getaddrinfo(domain, NULL, &hints, &result);
if (ret == 0) {
- char address[INET6_ADDRSTRLEN];
+ char address[INET6_ADDRSTRLEN + 2] = { 0 };
const char *dest = NULL;
if (flags & IPV6) {
struct sockaddr_in6 *s_addr = (struct sockaddr_in6 *)result->ai_addr;
- dest = inet_ntop(AF_INET6, (void *)&s_addr->sin6_addr, address,
+ address[0] = '[';
+ dest = inet_ntop(AF_INET6, (void *)&s_addr->sin6_addr, address + 1,
INET6_ADDRSTRLEN);
+ size_t addr_len = strlen(address);
+ address[addr_len] = ']';
+ address[addr_len + 1] = '\0';
}
#ifdef OC_IPV4
else {
|
Fix trace with unicode for PY3TEST
Fix trace with unicode for PY3TEST
ISSUE:
([arc::pullid] 7bf16ed0-f1a048-df9eab7a-2cddc568) | @@ -14,6 +14,7 @@ import _pytest
import _pytest.mark
import signal
import inspect
+import six
try:
import resource
@@ -699,7 +700,7 @@ class DeselectedTestItem(CustomTestItem):
class TraceReportGenerator(object):
def __init__(self, out_file_path):
- self.File = open(out_file_path, 'w')
+ self.File = open(out_file_path, 'wb')
def on_start_test_class(self, test_item):
pytest.config.ya.set_test_item_node_id(test_item.nodeid)
@@ -762,9 +763,9 @@ class TraceReportGenerator(object):
'name': name
}
data = json.dumps(event, ensure_ascii=False)
- if sys.version_info[0] < 3 and isinstance(data, unicode):
+ if isinstance(data, six.text_type):
data = data.encode("utf8")
- self.File.write(data + '\n')
+ self.File.write(data + b'\n')
self.File.flush()
|
Fix v4l2 AVPacket memory leak on error
Unref v4l2 AVPacket even if writing failed. | @@ -92,11 +92,11 @@ encode_and_write_frame(struct sc_v4l2_sink *vs, const AVFrame *frame) {
// A packet was received
bool ok = write_packet(vs, packet);
+ av_packet_unref(packet);
if (!ok) {
LOGW("Could not send packet to v4l2 sink");
return false;
}
- av_packet_unref(packet);
} else if (ret != AVERROR(EAGAIN)) {
LOGE("Could not receive v4l2 video packet: %d", ret);
return false;
|
fix boundary case for _dictNextPower | @@ -940,7 +940,7 @@ static unsigned long _dictNextPower(unsigned long size)
{
unsigned long i = DICT_HT_INITIAL_SIZE;
- if (size >= LONG_MAX) return LONG_MAX;
+ if (size >= LONG_MAX) return LONG_MAX + 1LU;
while(1) {
if (i >= size)
return i;
|
sds: add type cast | @@ -300,7 +300,7 @@ flb_sds_t flb_sds_cat_utf8 (flb_sds_t *sds, const char *str, int str_len)
cp = 0;
for (b = 0; b < hex_bytes; b++) {
p = (const unsigned char *) str + i + b;
- if (p >= (str + str_len)) {
+ if (p >= (unsigned char *) (str + str_len)) {
break;
}
ret = flb_utf8_decode(&state, &cp, *p);
|
graph-store: backup overwritten graphs to clay | =/ old-graph=(unit marked-graph:store)
(~(get by graphs) resource)
?> (validate-graph graph mark)
+ =/ clay-backup=(list card)
+ ?~ old-graph ~
+ =/ =wire
+ backup+(en-path:res resource)
+ =/ =update:store
+ [%0 now.bowl %add-graph resource p.u.old-graph q.u.old-graph %.y]
+ =/ =cage
+ graph-update+!>(update)
+ =/ =soba:clay
+ [(welp wire /[(scot %da now.bowl)]/graph-update) ins+cage]~
+ [%pass wire %arvo %c %info %home &+soba]~
:_ %_ state
graphs (~(put by graphs) resource [graph mark])
update-logs (~(put by update-logs) resource (gas:orm-log ~ ~))
- archive
- ?~ old-graph
- (~(del by archive) resource)
- (~(put by archive) resource u.old-graph)
+ archive (~(del by archive) resource)
::
validators
?~ mark validators
==
%- zing
:~ (give [/updates /keys ~] [%add-graph resource graph mark overwrite])
+ clay-backup
?~ mark ~
?: (~(has in validators) u.mark) ~
=/ wire /validator/[u.mark]
|
esp32c2: Remove assert check on len for SHA calculation | @@ -24,7 +24,11 @@ bootloader_sha256_handle_t bootloader_sha256_start()
void bootloader_sha256_data(bootloader_sha256_handle_t handle, const void *data, size_t data_len)
{
assert(handle != NULL);
- assert(data_len % 4 == 0);
+ /* C2 secure boot key field consists of 1 byte of curve identifier and 64 bytes of ECDSA public key.
+ * While verifying the signature block, we need to calculate the SHA of this key field which is of 65 bytes.
+ * ets_sha_update handles it cleanly so we can safely remove the check:
+ * assert(data_len % 4) == 0
+ */
ets_sha_update(&ctx, data, data_len, false);
}
|
VERSION bump version to 0.9.0 | @@ -27,8 +27,8 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0")
# set version
set(LIBNETCONF2_MAJOR_VERSION 0)
-set(LIBNETCONF2_MINOR_VERSION 8)
-set(LIBNETCONF2_MICRO_VERSION 61)
+set(LIBNETCONF2_MINOR_VERSION 9)
+set(LIBNETCONF2_MICRO_VERSION 0)
set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
|
sim compiler: add -lm flag. | @@ -34,6 +34,7 @@ compiler.flags.debug: [compiler.flags.base, -O0]
compiler.as.flags: [-x, assembler-with-cpp]
compiler.ld.mapfile: false
compiler.ld.binfile: false
+compiler.ld.flags: -lm
# Linux.
compiler.flags.base.LINUX: >
|
Cellular test change only: fix wrong cast.
When we moved to using uDeviceHandle_t there was a bit of test code under conditional compilation which wasn't updated properly, resulting in a compilation warning; now fixed. | @@ -421,7 +421,7 @@ static void powerSaving3gppCallback(uDeviceHandle_t cellHandle, bool onNotOff,
int32_t periodicWakeupSeconds,
void *pParameter)
{
- if (cellHandle != *((int32_t *) pParameter)) {
+ if (cellHandle != *((uDeviceHandle_t *) pParameter)) {
gCallbackErrorCode = 2;
}
|
test: format code style | @@ -27,7 +27,8 @@ int main(int argc, char **argv)
}
t_color.value = 0xffaa5500;
Graph_FillRect(&g_src, t_color, NULL, false);
- Logger_Info("%-20s%-20s%s\n", "image size\\method", "Graph_Zoom()", "Graph_ZoomBilinear()");
+ Logger_Info("%-20s%-20s%s\n", "image size\\method", "Graph_Zoom()",
+ "Graph_ZoomBilinear()");
for (i = 0; i < sizeof(resx) / sizeof(int); i++) {
resy = resx[i] * 9 / 16;
t0 = LCUI_GetTime();
|
testcase/wifi_manager: WiFi Manager UTC bug fix
Add mutex wait/send signal for scanning function
Test functions to save/get/reset AP info in file system after the connection is successfully finished
Modify return type verification for utc_wifi_manager_save_config_n | @@ -81,6 +81,7 @@ void wifi_scan_ap_done(wifi_manager_scan_info_s **scan_info, wifi_manager_scan_r
*/
if (res == WIFI_SCAN_FAIL) {
printf("WiFi scan failed\n");
+ WIFITEST_SIGNAL;
return;
}
wifi_manager_scan_info_s *wifi_scan_iter = *scan_info;
@@ -90,6 +91,7 @@ void wifi_scan_ap_done(wifi_manager_scan_info_s **scan_info, wifi_manager_scan_r
wifi_scan_iter->channel, wifi_scan_iter->phy_mode);
wifi_scan_iter = wifi_scan_iter->next;
}
+ WIFITEST_SIGNAL;
}
static int wifi_test_signal_init(void)
@@ -357,7 +359,7 @@ static void utc_wifi_manager_save_config_n(void)
wifi_manager_result_e ret = WIFI_MANAGER_FAIL;
ret = wifi_manager_save_config(NULL);
- TC_ASSERT_EQ("utc_wifi_manager_save_config_n", ret, WIFI_MANAGER_FAIL);
+ TC_ASSERT_EQ("utc_wifi_manager_save_config_n", ret, WIFI_MANAGER_INVALID_ARGS);
TC_SUCCESS_RESULT();
}
@@ -462,6 +464,10 @@ int wifi_manager_utc(int argc, FAR char *argv[])
utc_wifi_manager_connect_ap_n(); // try to connect to ap in softap mode
utc_wifi_manager_connect_ap_p(); // change to station mode and try to connect to ap
+ WIFITEST_WAIT;
+
+ sleep(5);
+
utc_wifi_manager_save_config_n();
utc_wifi_manager_get_config_n();
utc_wifi_manager_remove_config_n();
@@ -469,10 +475,6 @@ int wifi_manager_utc(int argc, FAR char *argv[])
utc_wifi_manager_get_config_p();
utc_wifi_manager_remove_config_p();
- WIFITEST_WAIT;
-
- sleep(5);
-
utc_wifi_manager_disconnect_ap_p();
WIFITEST_WAIT;
@@ -485,6 +487,10 @@ int wifi_manager_utc(int argc, FAR char *argv[])
utc_wifi_manager_scan_ap_n(); // Get failed becasue there is no callback hander for scan results
utc_wifi_manager_scan_ap_p(); // Reinitialized wifi manager with the callback hander for scan results
+ WIFITEST_WAIT;
+
+ utc_wifi_manager_deinit_p(); // End of UTC
+
(void)tc_handler(TC_END, "WiFiManager UTC");
return 0;
|
Fix broken formatting
Fixes: | @@ -13,7 +13,7 @@ also simple to reason about.
The branches and their corresponding moons that comprise the stages of the
release pipeline are:
-
+```
----------------------------------------------------------------------------------------------
Branch | Moon | Target audience | Contains
----------------------------------------------------------------------------------------------
@@ -21,6 +21,7 @@ release pipeline are:
`release` | `~marnec-dozzod-marzod` | Early Adopters | Latest `release` branch commit
`release` | `~doznec-dozzod-marzod` | App Developers | Latest release candidate
`master` | `~zod` | Everyone else | Latest release
+```
**WARNING**: If you lack the requisite skills to troubleshoot and fix kernel issues, you should not sync from develop/~binnec. If you're not prepared to breach your ship in response to an issue stemming from an early release, do not use pre-release moons.
|
Fixed recursive reparsers to not dig: over. | |%
::TODO these first few should maybe make their way
:: into the stdlib...
+ ++ re ::> recursive reparsers
+ |* {gar/* sef/_|.(fist)}
+ |= jon/json
+ ^- (unit _gar)
+ =- ~! gar ~! (need -) -
+ ((sef) jon)
+ ::
++ as ::> array as set
|* a/fist
(cu ~(gas in *(set _(need *a))) (ar a))
::
++ dank ::> tank
^- $-(json (unit tank))
+ %+ re *tank |. ~+
%- of :~
leaf+sa
palm+(ot style+(ot mid+sa cap+sa open+sa close+sa ~) lines+(ar dank) ~)
::
++ spec ::> speech
^- $-(json (unit speech))
+ %+ re *speech |. ~+
%- of :~
lin+(ot pat+bo txt+so ~)
url+(su aurf:de-purl:html)
|
sdl/events: fix SDL_JoyBatteryEvent not defined when using SDL2 older than 2.24.0 | @@ -162,6 +162,28 @@ typedef struct DropEvent
#endif
#define SDL_JOYBATTERYUPDATED (1543)
+
+#if !defined(SDL_JoystickPowerLevel)
+typedef enum
+{
+ SDL_JOYSTICK_POWER_UNKNOWN = -1,
+ SDL_JOYSTICK_POWER_EMPTY,
+ SDL_JOYSTICK_POWER_LOW,
+ SDL_JOYSTICK_POWER_MEDIUM,
+ SDL_JOYSTICK_POWER_FULL,
+ SDL_JOYSTICK_POWER_WIRED,
+ SDL_JOYSTICK_POWER_MAX
+} SDL_JoystickPowerLevel;
+#endif
+
+typedef struct SDL_JoyBatteryEvent
+{
+ Uint32 type;
+ Uint32 timestamp;
+ SDL_JoystickID which;
+ SDL_JoystickPowerLevel level;
+} SDL_JoyBatteryEvent;
+
#endif
*/
import "C"
|
Remove savedata.soundbits, savedata.soundrate from sound_start_playback() in PSP menu.c. This fixes compile error but I don't have a PSP to test functionality. | @@ -764,7 +764,7 @@ void menu(char *path)
//getAllPreviews();
packfile_music_read(filelist, dListTotal);
sound_init(12);
- sound_start_playback(savedata.soundbits, savedata.soundrate);
+ sound_start_playback();
pControl = ControlMenu;
drawMenu();
|
Validate parameters to XML_GetInputContext | @@ -2045,6 +2045,8 @@ const char * XMLCALL
XML_GetInputContext(XML_Parser parser, int *offset, int *size)
{
#ifdef XML_CONTEXT_BYTES
+ if (parser == NULL || offset == NULL || size == NULL)
+ return NULL;
if (eventPtr && buffer) {
*offset = (int)(eventPtr - buffer);
*size = (int)(bufferEnd - buffer);
|
bugfix for top level return. | #include "c_hash.h"
-/***** Macros ***************************************************************/
-/*
- Top-level return immediately stops the program (task) and
- doesn't handle its arguments
- */
-#define STOP_IF_TOPLEVEL() \
- do { \
- if( vm->callinfo_tail == NULL ) { \
- vm->flag_preemption = 1; \
- return -1; \
- } \
- } while (0)
-
-
static uint16_t free_vm_bitmap[MAX_VM_COUNT / 16 + 1];
#define CALL_MAXARGS 255
@@ -176,8 +162,8 @@ mrbc_callinfo * mrbc_push_callinfo( struct VM *vm, mrbc_sym method_id, int reg_o
*/
void mrbc_pop_callinfo( struct VM *vm )
{
+ assert( vm->callinfo_tail );
mrbc_callinfo *callinfo = vm->callinfo_tail;
- if( !callinfo ) return;
vm->callinfo_tail = callinfo->prev;
vm->cur_regs = callinfo->cur_regs;
@@ -1386,19 +1372,22 @@ static inline int op_return( mrbc_vm *vm, mrbc_value *regs )
{
FETCH_B();
+ // return without anything if top level.
+ if( vm->callinfo_tail == NULL ) {
+ vm->flag_preemption = 1;
+ return -1;
+ }
+
+ // set return value
mrbc_decref(®s[0]);
regs[0] = regs[a];
regs[a].tt = MRBC_TT_EMPTY;
- assert( vm->exc.tt == MRBC_TT_NIL );
-
- STOP_IF_TOPLEVEL();
-
- mrbc_pop_callinfo(vm);
-
// nregs to release
int nregs = vm->cur_irep->nregs;
+ mrbc_pop_callinfo(vm);
+
// clear stacked arguments
int i;
for( i = 1; i < nregs; i++ ) {
@@ -1453,19 +1442,29 @@ static inline int op_return_blk( mrbc_vm *vm, mrbc_value *regs )
callinfo = vm->callinfo_tail;
} while( callinfo != caller_callinfo );
+ // return without anything if top level.
+ if( callinfo == NULL ) {
+ vm->flag_preemption = 1;
+ return -1;
+ }
+
p_reg = callinfo->cur_regs + callinfo->reg_offset;
} else {
p_reg = ®s[0];
}
+ // return without anything if top level.
+ if( vm->callinfo_tail == NULL ) {
+ vm->flag_preemption = 1;
+ return -1;
+ }
+
// set return value
mrbc_decref( p_reg );
*p_reg = regs[a];
regs[a].tt = MRBC_TT_EMPTY;
- STOP_IF_TOPLEVEL();
-
mrbc_pop_callinfo(vm);
// clear stacked arguments
|
Improved arrows for voice assistant | #define OC_MENU_DISK_IMAGE L" (dmg)"
#define OC_MENU_EXTERNAL L" (external)"
-#define OC_VOICE_OVER_IDLE_TIMEOUT_MS 500 ///< Experimental, less is problematic.
+#define OC_VOICE_OVER_IDLE_TIMEOUT_MS 700 ///< Experimental, less is problematic.
#define OC_VOICE_OVER_SIGNAL_NORMAL_MS 200 ///< From boot.efi, constant.
#define OC_VOICE_OVER_SILENCE_NORMAL_MS 150 ///< From boot.efi, constant.
|
SipHash: make it possible to control the hash size through string controls | @@ -167,6 +167,12 @@ static int pkey_siphash_ctrl_str(EVP_PKEY_CTX *ctx,
{
if (value == NULL)
return 0;
+ if (strcmp(type, "digestsize") == 0) {
+ size_t hash_size = atoi(value);
+
+ return pkey_siphash_ctrl(ctx, EVP_PKEY_CTRL_SET_DIGEST_SIZE, hash_size,
+ NULL);
+ }
if (strcmp(type, "key") == 0)
return EVP_PKEY_CTX_str2ctrl(ctx, EVP_PKEY_CTRL_SET_MAC_KEY, value);
if (strcmp(type, "hexkey") == 0)
|
fix focal-debsource | @@ -754,6 +754,8 @@ focal-debsource: distclean preparedeb
@cat debian/rules.bck \
| sed s/^"export USE_CJSON_SO = 1"/"export USE_CJSON_SO = 0"/ \
> debian/rules
+ @chmod 755 debian/rules
+ dpkg-source -b .
.PHONY: bionic-debsource
bionic-debsource: distclean preparedeb
|
add shared library env for windows | @@ -299,7 +299,9 @@ function _target_addenvs(envs)
if target:is_binary() then
_addenvs(envs, "PATH", target:targetdir())
elseif target:is_shared() then
- if is_host("macosx") then
+ if is_host("windows") then
+ _addenvs(envs, "PATH", target:targetdir())
+ elseif is_host("macosx") then
_addenvs(envs, "LD_LIBRARY_PATH", target:targetdir())
else
_addenvs(envs, "DYLD_LIBRARY_PATH", target:targetdir())
|
HV: add volatile declaration to pointer parameter
Add a volatile declaration to pointer parameter to avoid compiler
to optimize it by using old value saved in register instead of
accessing system memory.
Acked-by: Eddie Dong | @@ -145,7 +145,7 @@ static inline int clz64(unsigned long value)
* (*addr) |= (1UL<<nr);
*/
#define build_bitmap_set(name, lock, nr, addr) \
-static inline void name(int nr, unsigned long *addr) \
+static inline void name(int nr, volatile unsigned long *addr) \
{ \
asm volatile(lock "orq %1,%0" \
: "+m" (*addr) \
@@ -159,7 +159,7 @@ build_bitmap_set(bitmap_set, BUS_LOCK, nr, addr)
* (*addr) &= ~(1UL<<nr);
*/
#define build_bitmap_clear(name, lock, nr, addr) \
-static inline void name(int nr, unsigned long *addr) \
+static inline void name(int nr, volatile unsigned long *addr) \
{ \
asm volatile(lock "andq %1,%0" \
: "+m" (*addr) \
@@ -172,7 +172,7 @@ build_bitmap_clear(bitmap_clear, BUS_LOCK, nr, addr)
/*
* return !!((*addr) & (1UL<<nr));
*/
-static inline bool bitmap_test(int nr, unsigned long *addr)
+static inline bool bitmap_test(int nr, volatile unsigned long *addr)
{
int ret;
@@ -189,7 +189,7 @@ static inline bool bitmap_test(int nr, unsigned long *addr)
* return ret;
*/
#define build_bitmap_testandset(name, lock, nr, addr) \
-static inline bool name(int nr, unsigned long *addr) \
+static inline bool name(int nr, volatile unsigned long *addr) \
{ \
int ret; \
asm volatile(lock "btsq %2,%1\n\tsbbl %0,%0" \
@@ -207,7 +207,7 @@ build_bitmap_testandset(bitmap_test_and_set, BUS_LOCK, nr, addr)
* return ret;
*/
#define build_bitmap_testandclear(name, lock, nr, addr) \
-static inline bool name(int nr, unsigned long *addr) \
+static inline bool name(int nr, volatile unsigned long *addr) \
{ \
int ret; \
asm volatile(lock "btrq %2,%1\n\tsbbl %0,%0" \
|
Fix key identifier passed in AAD of OSCOAP. | @@ -188,8 +188,14 @@ owerror_t openoscoap_protect_message(
requestSeq = &partialIV[AES_CCM_16_64_128_IV_LEN - 2];
requestSeqLen = openoscoap_convert_sequence_number(sequenceNumber, &requestSeq);
+ if (is_request(code)) {
requestKid = context->senderID;
requestKidLen = context->senderIDLen;
+ }
+ else {
+ requestKid = context->recipientID;
+ requestKidLen = context->recipientIDLen;
+ }
if (msg->length > 0 ) { // contains payload, add payload marker
payloadPresent = TRUE;
@@ -294,6 +300,8 @@ owerror_t openoscoap_unprotect_message(
uint8_t nonce[AES_CCM_16_64_128_IV_LEN];
uint8_t partialIV[AES_CCM_16_64_128_IV_LEN];
+ uint8_t *requestKid;
+ uint8_t requestKidLen;
uint8_t* requestSeq;
uint8_t requestSeqLen;
uint8_t aad[AAD_MAX_LEN];
@@ -331,6 +339,12 @@ owerror_t openoscoap_unprotect_message(
);
return E_FAIL;
}
+ requestKid = context->recipientID;
+ requestKidLen = context->recipientIDLen;
+ }
+ else {
+ requestKid = context->senderID;
+ requestKidLen = context->senderIDLen;
}
// convert sequence number to array and strip leading zeros
@@ -344,8 +358,8 @@ owerror_t openoscoap_unprotect_message(
NULL,
0, // do not support Class I options at the moment
AES_CCM_16_64_128,
- context->recipientID,
- context->recipientIDLen,
+ requestKid,
+ requestKidLen,
requestSeq,
requestSeqLen);
|
Update build-gtest.sh | @@ -6,6 +6,8 @@ if [ -f /etc/os-release ]; then
source /etc/os-release
# Use new Google Test on latest Ubuntu 20.04 : old one no longer compiles on 20
if [ "$VERSION_ID" == "20.04" ]; then
+ echo Running on Ubuntu 20.04
+ echo Clone googletest from google/googletest:master ...
rm -rf googletest
git clone https://github.com/google/googletest
fi
|
Turn off norm scaling for acc | @@ -67,7 +67,7 @@ STRUCT_CONFIG_SECTION(SurviveKalmanTracker)
STRUCT_CONFIG_ITEM("kalman-zvu-stationary", "", 1e-4, t->zvu_stationary_var)
STRUCT_CONFIG_ITEM("kalman-zvu-no-light", "", 1e-4, t->zvu_no_light_var)
- STRUCT_CONFIG_ITEM("imu-acc-norm-penalty", "", 1, t->acc_norm_penalty)
+ STRUCT_CONFIG_ITEM("imu-acc-norm-penalty", "", -1, t->acc_norm_penalty)
STRUCT_CONFIG_ITEM("imu-acc-variance", "Variance of accelerometer", 5e-3, t->acc_var)
STRUCT_CONFIG_ITEM("imu-gyro-variance", "Variance of gyroscope", 5e-3, t->gyro_var)
|
Validate that shared page tables are in-sync on task switch
Add missing change to previous commit | @@ -202,16 +202,14 @@ void tasking_goto_task(task_small_t* new_task) {
// Any time that page table is updated, we update all the users of the page table's allocation state bitmaps
vmm_page_directory_t* vmm_kernel = boot_info_get()->vmm_kernel;
vmm_page_directory_t* vmm_preempted = vmm_active_pdir();
- //vmm_validate_shared_tables_in_sync(vmm_preempted, vmm_kernel);
+ vmm_validate_shared_tables_in_sync(vmm_preempted, vmm_kernel);
if (new_task->vmm != vmm_active_pdir()) {
vmm_load_pdir(new_task->vmm, false);
}
-/*
vmm_validate_shared_tables_in_sync(vmm_active_pdir(), vmm_kernel);
vmm_validate_shared_tables_in_sync(vmm_kernel, vmm_active_pdir());
- */
// Synchronize the allocation state with the kernel tables
/*
|
[CUDA] Fix max clock frequency | @@ -137,8 +137,6 @@ pocl_cuda_init (cl_device_id dev, const char *parameters)
cuDeviceGetAttribute ((int *)&dev->max_compute_units,
CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT,
data->device);
- cuDeviceGetAttribute ((int *)&dev->max_clock_frequency,
- CU_DEVICE_ATTRIBUTE_CLOCK_RATE, data->device);
cuDeviceGetAttribute ((int *)&dev->error_correction_support,
CU_DEVICE_ATTRIBUTE_ECC_ENABLED, data->device);
cuDeviceGetAttribute ((int *)&dev->host_unified_memory,
@@ -146,6 +144,9 @@ pocl_cuda_init (cl_device_id dev, const char *parameters)
cuDeviceGetAttribute ((int *)&dev->max_constant_buffer_size,
CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY,
data->device);
+ cuDeviceGetAttribute ((int *)&dev->max_clock_frequency,
+ CU_DEVICE_ATTRIBUTE_CLOCK_RATE, data->device);
+ dev->max_clock_frequency /= 1000;
dev->preferred_wg_size_multiple = 32;
dev->preferred_vector_width_char = 1;
|
iokernel: numa policy fix for no hyperthreads | @@ -210,6 +210,7 @@ static unsigned int numa_choose_core(struct proc *p)
DEFINE_BITMAP(core_subset, NCPU);
/* first try to find a matching active hyperthread */
+ if (!cfg.noht) {
sched_for_each_allowed_core(core, tmp) {
unsigned int sib = sched_siblings[core];
if (cores[core] != sd)
@@ -220,6 +221,7 @@ static unsigned int numa_choose_core(struct proc *p)
return sib;
}
+ }
/* then try to find a core on the preferred socket */
bitmap_and(core_subset, sched_allowed_cores,
|
v2.0.18 landed | -ejdb2 (2.0.18) UNRELEASED; urgency=medium
+ejdb2 (2.0.18) testing; urgency=medium
* Limit one time file allocation step to 2G iowow v1.3.18
* Added Docker image (#249)
* Better qsort_t detection, build ok with `musl`
- -- Anton Adamansky <[email protected]> Wed, 12 Jun 2019 00:49:49 +0700
+ -- Anton Adamansky <[email protected]> Wed, 12 Jun 2019 16:48:57 +0700
ejdb2 (2.0.17) testing; urgency=medium
|
reverted to old long-poll system but with 8 second fixed era length | {$poll p/{i/@uvH t/(list @uvH)}}
{$spur p/spur}
{$subs p/?($put $delt) q/{dock $json wire path}}
- ::{$view p/ixor q/{$~ u/@ud}}
- {$view p/ixor q/{$~ u/@ud} r/(unit @dr)}
+ {$view p/ixor q/{$~ u/@ud}}
+ ::{$view p/ixor q/{$~ u/@ud} r/(unit @dr)}
==
::
++ perk-auth :: parsed auth
(turn dep |=({a/@tas $~} (slav %uv a)))
::
$of
- :^ %view
- ?> ?=({@ $~} but)
- i.but
- ?> ?=({{$poll @} *} quy) :: XX eventsource
+ :+ %view ?>(?=({@ $~} but) i.but)
+ ?> ?=({{$poll @} $~} quy)
+:: :^ %view
+:: ?> ?=({@ $~} but)
+:: i.but
+:: ?> ?=({{$poll @} *} quy) :: XX eventsource
[~ (rash q.i.quy dem)]
- ?: ?=({{$t @} $~} +.quy)
- =/ s (rash q.i.t.quy dem)
- `(yule [0 0 0 s ~])
- ~
+:: ?: ?=({{$t @} $~} +.quy)
+:: =/ s (rash q.i.t.quy dem)
+:: `(yule [0 0 0 s ~])
+:: ~
::
$to
=+ ^- dir/{p/ship q/term r/mark}
::
$view
~| lost-ixor+p.hem
- [%| ((teba poll:(ire-ix p.hem)) u.q.hem r.hem)]
+:: [%| ((teba poll:(ire-ix p.hem)) u.q.hem r.hem)]
+ [%| ((teba poll:(ire-ix p.hem)) u.q.hem)]
==
::
++ process-auth
::
++ pop-duct =^(ned med ~(get to med) abet(hen ned))
++ poll
- |= [a/@u t=(unit @dr)]
- ^+ ..ix
+ |= a/@u ^+ ..ix
+:: |= [a/@u t=(unit @dr)]
+:: ^+ ..ix
=< abet
=. ..poll refresh
?: =(a p.eve)
=. ..poll poll-rest
- =. era
- ?~ t (add ~s30 now)
- (add u.t now)
+ =. era (add ~s8 now)
+:: ?~ t (add ~s30 now)
+:: (add u.t now)
=. lyv (~(put by lyv) hen [%poll ire])
pass-wait(ude [~ hen &])
?: (gth a p.eve) ~|(seq-high+cur=p.eve !!)
|
Add Debian Jessie support in toplevel makefile | @@ -43,6 +43,9 @@ DEB_DEPENDS += lcov chrpath autoconf nasm indent
DEB_DEPENDS += python-all python-dev python-virtualenv python-pip libffi6
ifeq ($(OS_VERSION_ID),14.04)
DEB_DEPENDS += openjdk-8-jdk-headless
+else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8)
+ DEB_DEPENDS += openjdk-8-jdk-headless
+ APT_ARGS = -t jessie-backports
else
DEB_DEPENDS += default-jdk-headless
endif
@@ -147,7 +150,7 @@ $(BR)/.bootstrap.ok:
ifeq ($(findstring y,$(UNATTENDED)),y)
make install-dep
endif
-ifeq ($(OS_ID),ubuntu)
+ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
@MISSING=$$(apt-get install -y -qq -s $(DEB_DEPENDS) | grep "^Inst ") ; \
if [ -n "$$MISSING" ] ; then \
echo "\nPlease install missing packages: \n$$MISSING\n" ; \
@@ -191,20 +194,24 @@ endif
bootstrap: $(BR)/.bootstrap.ok
install-dep:
-ifeq ($(OS_ID),ubuntu)
+ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
ifeq ($(OS_VERSION_ID),14.04)
@sudo -E apt-get $(CONFIRM) $(FORCE) install software-properties-common
@sudo -E add-apt-repository ppa:openjdk-r/ppa $(CONFIRM)
+endif
+ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8)
+ @grep -q jessie-backports /etc/apt/sources.list /etc/apt/sources.list.d/* 2> /dev/null \
+ || ( echo "Please install jessie-backports" ; exit 1 )
endif
@sudo -E apt-get update
- @sudo -E apt-get $(CONFIRM) $(FORCE) install $(DEB_DEPENDS)
+ @sudo -E apt-get $(APT_ARGS) $(CONFIRM) $(FORCE) install $(DEB_DEPENDS)
else ifneq ("$(wildcard /etc/redhat-release)","")
@sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
@sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
@sudo -E yum install $(CONFIRM) --enablerepo=epel $(EPEL_DEPENDS)
@sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs zlib
else
- $(error "This option currently works only on Ubuntu or Centos systems")
+ $(error "This option currently works only on Ubuntu, Debian or Centos systems")
endif
define make
|
usecases: update template formatting | ## Summary
-Title: <Title, e.g. Authenticate>
-Scope: <Scope, e.g. Authentication>
-Level: <Level, e.g. User Goal>
-Actors: <Actors, e.g. Anonymous User>
-Brief: <Short explanation, e.g. User authenticates against the service to gain more privilegues>
+- **Title:** <Title, e.g. Authenticate>
+- **Scope:** <Scope, e.g. Authentication>
+- **Level:** <Level, e.g. User Goal>
+- **Actors:** <Actors, e.g. Anonymous User>
+- **Brief:** <Short explanation, e.g. User authenticates against the service to gain more privileges>
## Scenarios
-Precondition: <What has to be satisfied before the use case can work?, e.g. Not authenticated>
-Main success scenario: <What is the main scenario, i.e. success scenario?, e.g. Is authenticated>
-Alternative scenario: <What is the alternative scenario, i.e. simple error handling?, e.g. Wrong credentials>
-Error scenario: <What is the other alternative scenario, i.e. fatal error handling?, e.g. Authentication block because of too many failed attempts>
-Postcondition: <What has to be valid after the scenario was run?, e.g. Access to more functions>
-Non-functional Constraints:
+- **Precondition:** <What has to be satisfied before the use case can work?, e.g. Not authenticated>
+- **Main success scenario:** <What is the main scenario, i.e. success scenario?, e.g. Is authenticated>
+- **Alternative scenario:** <What is the alternative scenario, i.e. simple error handling?, e.g. Wrong credentials>
+- **Error scenario:** <What is the other alternative scenario, i.e. fatal error handling?, e.g. Authentication block because of too many failed attempts>
+- **Postcondition:** <What has to be valid after the scenario was run?, e.g. Access to more functions>
+- **Non-functional Constraints:**
- <Some non-functional constraint, e.g. Security mechanism>
- <More non-functional constraints>
|
Address deprecated time.clock() | @@ -56,6 +56,7 @@ class BartView(object):
self.im = self.readcfl(self.cflname)
self.im_unsqueeze_shape = np.where( np.array(self.im.shape) > 1 )[0]
self.im = self.im.squeeze()
+ if sys.version_info.major==3 and sys.version_info.minor < 8:
t1 = time.clock()
# Reorder image
|
hw/drivers/lps33thw: Fix CLI build
Broken by another build fix (4a82c33c) so fixing again. Now it should
build fine with and without bus driver... | @@ -123,6 +123,7 @@ lps33thw_shell_cmd(int argc, char **argv)
return lps33thw_shell_help();
}
+#if MYNEWT_VAL(BUS_DRIVER_PRESENT)
if (!g_sensor_itf.si_dev) {
g_sensor_itf.si_dev = os_dev_open(MYNEWT_VAL(LPS33THW_SHELL_NODE_NAME),
0, NULL);
@@ -133,6 +134,7 @@ lps33thw_shell_cmd(int argc, char **argv)
return 0;
}
}
+#endif
/* Read pressure */
if (argc > 1 && strcmp(argv[1], "rp") == 0) {
|
Fix formatting.
Run make format. | @@ -422,8 +422,7 @@ static JanetSlot janetc_call(JanetFopts opts, JanetSlot *slots, JanetSlot fun) {
/* Check for bad arity type if fun is a constant */
switch (janet_type(fun.constant)) {
- case JANET_FUNCTION:
- {
+ case JANET_FUNCTION: {
JanetFunction *f = janet_unwrap_function(fun.constant);
int32_t min = f->def->min_arity;
int32_t max = f->def->max_arity;
|
add some prefix for doc urls to make BOT recognize the preview doc url | @@ -80,10 +80,13 @@ def main():
deploy(version, tarball_path, docs_path, docs_server)
print("Docs URLs:")
+ doc_deploy_type = os.getenv('TYPE')
for vurl in version_urls:
+ language, _, target = vurl.split('/')
+ tag = '{}_{}'.format(language, target)
url = "{}/{}/index.html".format(url_base, vurl) # (index.html needed for the preview server)
url = re.sub(r"([^:])//", r"\1/", url) # get rid of any // that isn't in the https:// part
- print(url)
+ print('[document {}][{}] {}'.format(doc_deploy_type, tag, url))
# note: it would be neater to use symlinks for stable, but because of the directory order
# (language first) it's kind of a pain to do on a remote server, so we just repeat the
@@ -95,7 +98,6 @@ def main():
def deploy(version, tarball_path, docs_path, docs_server):
-
def run_ssh(commands):
""" Log into docs_server and run a sequence of commands using ssh """
print("Running ssh: {}".format(commands))
|
Python: Specify language for code block in ReadMe | @@ -63,6 +63,7 @@ Access to **kdb** can be retrieved using the Python import
An example script that prints some information for each method call would be:
+```py
class ElektraPlugin(object):
def open(self, config, errorKey):
print("Python script method 'open' called")
@@ -83,6 +84,7 @@ An example script that prints some information for each method call would be:
def close(self, errorKey):
print("Python script method 'close' called")
return 0
+```
Further examples can be found in the [python](python/) directory.
|
Ensure thread 0 always has work to do | @@ -68,8 +68,11 @@ int main(){
printf("Thread %d continuing into for loop\n", omp_get_thread_num());
fflush(stdout);
- // on host: nowait is necessary to prevent an implicit barrier with the target region
- #pragma omp for nowait schedule(dynamic)
+ // on host
+ // - nowait is necessary to prevent an implicit barrier with the target region
+ // - static schedule is necessary to ensure thread 0 has to execute some iterations of the for loop
+ // and it does so before the target region above has completed execution
+ #pragma omp for nowait schedule(static)
for(long long i = n1; i < n; i++) {
printf("Tid = %d: doing iteration %lld\n", omp_get_thread_num(), i);
vxv[i] = v1[i]*v2[i];
|
+test-send-rcv-message through %aver and timer cancellation | %- call:alice-core
[~[/alice] *type %buzz ~doznec-doznec /g/talk [%first %post]]
::
- ~& res1=-.res1
+ ::~& res1=-.res1
::
=+ ^- [=lane:alef =blob:alef]
=- ?> ?=([%give %send *] ->)
%- call:bob-core
[~[/bob] *type %hear lane blob]
::
- ~& res2=-.res2
+ ::~& res2=-.res2
::
- ~
+ =. bob-core (+.res2 ~doznec-doznec 0xbeef.dead ~2222.2.4 *sley)
+ ::
+ =/ res3
+ %- take:bob-core
+ [/bone/~nec/1 ~[/bob] ** %g %aver ~]
+ ::
+ ::~& res3=-.res3
+ ::
+ =. alice-core (+.res1 ~nec 0xdead.beef ~2222.2.5 *sley)
+ ::
+ =+ ^- [=lane:alef =blob:alef]
+ =- ?> ?=([%give %send *] ->)
+ [lane blob]:->+>
+ %+ snag 0
+ %+ skim -.res3
+ |= [duct card=*]
+ ^- ?
+ ?=([%give %send *] card)
+ ::
+ =/ res4
+ %- call:alice-core
+ [~[/alice] *type %hear lane blob]
+ ::
+ ~& res4=-.res4
+ ::
+ %+ expect-eq
+ !> :~ :+ ~[/alice] %give [%aver error=~]
+ :+ ~[/alice] %pass
+ [/pump/~doznec-doznec/0 %b %rest ~2222.2.2..00.00.05]
+ ==
+ !> -.res4
--
|
docs: Git fix spelling | @@ -165,5 +165,5 @@ To resolve merge conflicts, edit the files that need to be merged manually. You
## Further resources
-- [GIT Book](https://git-scm.com/book/en/v2)
+- [Git Book](https://git-scm.com/book/en/v2)
- [GitHub Docs](https://docs.github.com/en)
|
Update: narsese_to_english.py: Translation to English also for copulas | @@ -49,8 +49,8 @@ if "noColors" in sys.argv:
narseseToEnglish_noColors()
def narseseToEnglish(line):
- line = line.rstrip().replace("#1","it").replace("$1","it").replace("#2","thing").replace("$2","thing")
COLOR = GREEN
+ line = line.rstrip().replace("(! ", CYAN + "not " + COLOR).replace("#1","it").replace("$1","it").replace("#2","thing").replace("$2","thing")
if line.startswith("performing ") or line.startswith("done with"):
COLOR = CYAN
elif line.startswith("Comment: expected:"):
@@ -78,7 +78,7 @@ def narseseToEnglish(line):
l = re.sub(r"<([^><:]*)\s(<->)\s([^><:]*)>", RED+ STATEMENT_OPENER + GREEN + r"\1" + RED + r" resembles " + GREEN + r"\3" + RED + STATEMENT_CLOSER + COLOR, l)
#Other compound term copulas (not higher order)
l = re.sub(r"\(([^><:]*)\s(\*|&)\s([^><:]*)\)", YELLOW+r"" + GREEN + r"\1" + YELLOW + r" " + GREEN + r"\3" + YELLOW + "" + COLOR, l)
- return COLOR + l.replace(")","").replace("(","").replace("&/","and").replace(" * "," ").replace(" & "," ").replace(" /1","").replace("/2","by") + RESET
+ return COLOR + l.replace(")","").replace("(","").replace("||", MAGENTA + "or" + COLOR).replace("==>", CYAN + "implies" + COLOR).replace("<=>", CYAN + "equals" + COLOR).replace(">","").replace("<","").replace("&/","and").replace(" * "," ").replace(" & "," ").replace(" /1","").replace("/2","by") + RESET
return ""
if __name__ == "__main__":
|
interface: deduplicate InviteSearch results | @@ -395,7 +395,7 @@ export class InviteSearch extends Component<
);
});
- const shipResults = state.searchResults.ships.map((ship) => {
+ const shipResults = Array.from(new Set(state.searchResults.ships)).map((ship) => {
const nicknames = (this.state.contacts.get(ship) || [])
.filter((e) => {
return !(e === '');
|
android sdk 26 -> 29 | @@ -8,13 +8,13 @@ else {
}
android {
- compileSdkVersion 26
+ compileSdkVersion 29
defaultConfig {
if (buildAsApplication) {
applicationId "com.nesbox.tic"
}
minSdkVersion 16
- targetSdkVersion 26
+ targetSdkVersion 29
versionCode 9000
versionName "0.90.00"
externalNativeBuild {
|
Examples: Do not ignore return value of `scanf` | #include <kdb.h>
#include <stdio.h>
+#include <stdlib.h>
typedef enum
{
@@ -21,7 +22,11 @@ int showElektraErrorDialog (Key * parentKey, Key * problemKey)
{
printf ("dialog for %s and %s\n", keyName (parentKey), keyName (problemKey));
int a;
- scanf ("%d", &a);
+ if (scanf ("%d", &a) != 1)
+ {
+ fprintf (stderr, "Unable to convert input to integer number");
+ return EXIT_FAILURE;
+ }
return a;
}
|
raspberrypi0-wifi.conf: Use linux-firmware-raspbian package | @@ -6,7 +6,7 @@ DEFAULTTUNE ?= "arm1176jzfshf"
require conf/machine/include/tune-arm1176jzf-s.inc
include conf/machine/include/rpi-base.inc
-MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-bcm43430"
+MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-raspbian-bcm43430"
SDIMG_KERNELIMAGE ?= "kernel.img"
UBOOT_MACHINE ?= "rpi_0_w_defconfig"
|
doc: remove Travis from release notes | @@ -156,25 +156,19 @@ you up to date with the multi-language support provided by Elektra.
## Infrastructure
-### Cirrus
-
-- <<TODO>>
-- <<TODO>>
-- <<TODO>>
-
-### GitHub Actions
+### Jenkins
- <<TODO>>
- <<TODO>>
- <<TODO>>
-### Jenkins
+### Cirrus
- <<TODO>>
- <<TODO>>
- <<TODO>>
-### Travis
+### GitHub Actions
- <<TODO>>
- <<TODO>>
|
examples/elf: Fix error: unused variable 'desc' [-Werror=unused-variable] | @@ -202,11 +202,13 @@ int main(int argc, FAR char *argv[])
{
#ifdef CONFIG_EXAMPLES_ELF_FSREMOVEABLE
struct stat buf;
+#endif
+#ifdef CONFIG_EXAMPLES_ELF_ROMFS
+ struct boardioc_romdisk_s desc;
#endif
FAR char *args[1];
int ret;
int i;
- struct boardioc_romdisk_s desc;
/* Initialize the memory monitor */
|
Align with version 1.58 on cvsweb.openbsd.org | /*
* ChaCha based random number generator for OpenBSD.
*/
-#define REKEY_BASE (1024*1024) //base 2
+
#include <fcntl.h>
#include <limits.h>
#include <signal.h>
#define BLOCKSZ 64
#define RSBUFSZ (16*BLOCKSZ)
+#define REKEY_BASE (1024*1024) /* NB. should be a power of 2 */
+
/* Marked MAP_INHERIT_ZERO, so zero'd out in fork children. */
static struct {
size_t rs_have; /* valid bytes at end of rs_buf */
@@ -180,6 +182,7 @@ _rs_stir(void)
{
u_char rnd[KEYSZ + IVSZ];
uint32_t rekey_fuzz = 0;
+
if (getentropy(rnd, sizeof rnd) == -1) {
if(errno != ENOSYS ||
fallback_getentropy_urandom(rnd, sizeof rnd) == -1) {
@@ -201,8 +204,9 @@ _rs_stir(void)
rs->rs_have = 0;
memset(rsx->rs_buf, 0, sizeof(rsx->rs_buf));
- /*rs->rs_count = 1600000;*/
- chacha_encrypt_bytes(&rsx->rs_chacha, (uint8_t *)&rekey_fuzz,(uint8_t *)&rekey_fuzz, sizeof(rekey_fuzz));
+ /* rekey interval should not be predictable */
+ chacha_encrypt_bytes(&rsx->rs_chacha, (uint8_t *)&rekey_fuzz,
+ (uint8_t *)&rekey_fuzz, sizeof(rekey_fuzz));
rs->rs_count = REKEY_BASE + (rekey_fuzz % REKEY_BASE);
}
|
Apply fortmatting | @@ -14,7 +14,8 @@ typedef struct {
int log_stdout;
} od_arguments_t;
-static enum { OD_OPT_CONSOLE = 10001, // >= than any utf symbol like -q -l etc
+static enum {
+ OD_OPT_CONSOLE = 10001, // >= than any utf symbol like -q -l etc
OD_OPT_SILENT,
OD_OPT_VERBOSE,
OD_OPT_LOG_STDOUT,
|
dice: dont print %failed logs in tx-effects | ::
/- *dice
/+ naive, *naive-transactions, ethereum, azimuth
+:: verbose bit
+::
+=| verb=?
::
|%
:: orp: ordered points in naive state by parent ship
|= [=diff:naive nas=_nas indices=_indices]
?. ?=([%tx *] diff) [nas indices]
=< [nas indices]
- (apply-raw-tx | chain-t raw-tx.diff nas indices)
+ %- %*(. apply-raw-tx verb |)
+ [| chain-t raw-tx.diff nas indices]
::
++ apply-raw-tx
|= [force=? chain-t=@ =raw-tx:naive nas=^state:naive =indices]
=+ cache=nas
=/ chain-t=@t (ud-to-ascii:naive chain-t)
?. (verify-sig-and-nonce:naive verifier chain-t nas raw-tx)
- ~& >>> [%verify-sig-and-nonce %failed tx.raw-tx]
- [force ~ nas indices]
+ =+ [force ~ nas indices]
+ ?. verb -
+ ~& >>> [verb+verb %verify-sig-and-nonce %failed tx.raw-tx] -
=^ effects-1 points.nas
(increment-nonce:naive nas from.tx.raw-tx)
?~ nex=(receive-tx:naive nas tx.raw-tx)
- ~& >>> [%receive-tx %failed]
- [force ~ ?:(force nas cache) indices]
+ =+ [force ~ ?:(force nas cache) indices]
+ ?. verb -
+ ~& >>> [verb+verb %receive-tx %failed] -
=* new-nas +.u.nex
=/ effects (welp effects-1 -.u.nex)
=^ updates indices
|
Add 02 preffix to transaction | @@ -25,7 +25,7 @@ test("Transfer nanos eip1559", async () => {
await sim.start(sim_options_nanos);
let transport = await sim.getTransport();
- let buffer = Buffer.from("02058000002c8000003c800000000000000000000000f88d0101808207d0871000000000000094cccccccccccccccccccccccccccccccccccccccc80a4693c613900000000000000000000000000000000000000000000000000000000000000fac001a0659425c1533f84bacbc9e119863db012ea8e8d49ec9d0ef208254dd67f0bdfa5a043409e4e89855389fe8fafddd4c58616ff", "hex");
+ let buffer = Buffer.from("058000002c8000003c80000000000000000000000002f88d0101808207d0871000000000000094cccccccccccccccccccccccccccccccccccccccc80a4693c613900000000000000000000000000000000000000000000000000000000000000fac001a0659425c1533f84bacbc9e119863db012ea8e8d49ec9d0ef208254dd67f0bdfa5a043409e4e89855389fe8fafddd4c58616ff", "hex");
// Send transaction
let tx = transport.send(0xe0, 0x04, 0x00, 0x00, buffer);
|
Use PEERDIR instead of INTERNAL_RECURSE at JTEST_FOR().
Note: mandatory check (NEED_CHECK) was skipped | @@ -1672,7 +1672,7 @@ module TESTNG: JAVA_PLACEHOLDER {
### ### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynajava
module JTEST_FOR: JTEST {
SET(MODULE_TYPE JTEST_FOR)
- INTERNAL_RECURSE($UNITTEST_DIR)
+ PEERDIR($UNITTEST_DIR)
SET(REALPRJNAME jtest)
JAVA_TEST()
}
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.