message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Update Espressif Cmake for PKCS port | @@ -106,13 +106,13 @@ target_include_directories(
)
# PKCS11
-afr_mcu_port(pkcs11)
+afr_mcu_port(pkcs11_implementation)
target_link_libraries(
- AFR::pkcs11::mcu_port
+ AFR::pkcs11_implementation::mcu_port
INTERFACE AFR::pkcs11_mbedtls
)
target_sources(
- AFR::pkcs11::mcu_port
+ AFR::pkcs11_implementation::mcu_port
INTERFACE "${afr_ports_dir}/pkcs11/aws_pkcs11_pal.c"
)
|
Improve the clock Settings for switching to high speed mode in the SDIO framework. | @@ -892,7 +892,7 @@ static rt_int32_t sdio_init_card(struct rt_mmcsd_host *host, rt_uint32_t ocr)
if (card->flags & CARD_FLAG_HIGHSPEED)
{
- mmcsd_set_clock(host, 50000000);
+ mmcsd_set_clock(host, card->host->freq_max > 50000000 ? 50000000 : card->host->freq_max);
}
else
{
|
Enable i2c_scan only when there is I2C peripheral
The slinky app includes i2c_scan, but this causes a build error
on HAL ports which don't include an i2c driver. This change only
includes i2c_scan when some I2C_x switch is enabled. | @@ -26,7 +26,6 @@ pkg.keywords:
pkg.deps:
- test/flash_test
- - test/i2c_scan
- mgmt/imgmgr
- mgmt/newtmgr
- mgmt/newtmgr/transport/nmgr_shell
@@ -40,6 +39,10 @@ pkg.deps:
- sys/stats/full
- boot/split
+pkg.deps.I2C_0: test/i2c_scan
+pkg.deps.I2C_1: test/i2c_scan
+pkg.deps.I2C_2: test/i2c_scan
+
pkg.deps.CONFIG_NFFS:
- fs/nffs
|
Check for null requests | @@ -320,6 +320,9 @@ namespace MiningCore.Stratum
// deserialize request
var request = DeserializeRequest(line);
+ if (request == null)
+ throw new JsonException("Unable to deserialize request");
+
// forward
await onNext(this, request);
}
|
test/motion_common.h: Format with clang-format
BRANCH=none
TEST=none | @@ -30,7 +30,8 @@ extern const unsigned int motion_sensor_count;
void wait_for_valid_sample(void);
void feed_accel_data(const float *array, int *idx,
- int (filler)(const struct motion_sensor_t *s, const float f));
+ int(filler)(const struct motion_sensor_t *s,
+ const float f));
/*
* External data - from
|
Testing: Add link to Debian package | @@ -104,8 +104,8 @@ Above environment is needed for both `kdb run_all` (installed test cases)
and `make run_all` (test cases executed from the build directory).
For `make run_all` following development tools enable even more tests:
-- The script `checkbashisms` is needed to check for bashism (tests/shell/check_bashisms.sh),
- it is part of `devscripts`.
+- The script `checkbashisms` is needed to check for bashism (`tests/shell/check_bashisms.sh`),
+ it is part of [`devscripts`](https://packages.debian.org/jessie/devscripts).
- The [POSIX compatibility test for shell scripts](../tests/shell/check_posix.sh) requires the tool [`shfmt`](https://github.com/mvdan/sh).
- `git`, `clang-format` (version 5 up to version 7), and [cmake-format](https://github.com/cheshirekow/cmake_format) to check formatting.
- `pkg-config` must be available (`check_external.sh` and `check_gen.sh`).
|
INI parser: use first delimiter if everything else fails | @@ -449,8 +449,26 @@ int ini_parse_file (FILE * file, const struct IniConfig * config, void * user)
{
rstrip (start);
name = start;
+ end = strchr (start, delim);
+ if (!end)
+ {
value = NULL;
}
+ else
+ {
+ if (*end == delim) *end = '\0';
+ rstrip (end - 1);
+ value = lskip (end + 1);
+ rstrip (value);
+ if (*value == '"')
+ {
+ *(value++) = '\0';
+ while ((*end != '"') && !isprint (*end) && end > value)
+ --end;
+ if (*end == '"') *end = '\0';
+ }
+ }
+ }
strncpy0 (prev_name, name, sizeof (prev_name));
if (!config->keyHandler (user, section, name, value, 0) && !error) error = lineno;
|
fix(specs/Makefile): generate code only if WDIR is missing | @@ -36,24 +36,17 @@ define \n
$(blank)
endef
-$(OBJDIR)/%.o : $(WDIR)/%.c
- $(CC) -I$(COMMON_DIR) $(CFLAGS) -c -o $@ $< $(LDFLAGS)
-
-all: gen
-
-build: all
- $(MAKE) $(OBJS)
-
-gen: $(CEE_UTILS_DIR) | $(MAIN)
- @ rm -rf $(WDIR)/*/one-specs.h
-
+define generate_source
# Generate source files (specs-code/%/*.c)
$(foreach VAR, $(JSON), ./$(MAIN) \
-c \
-o $(patsubst %, $(WDIR)/%, $(VAR:%.json=%.c)) \
-i $(filter $(APIS), $(subst /, ,$(dir $(VAR)))).h \
$(VAR)$(\n))
+endef
+define generate_header
+ @ rm -rf $(WDIR)/*/one-specs.h
# Generate single header (specs-code/%/one-specs.h)
$(foreach VAR, $(JSON), ./$(MAIN) \
-O \
@@ -75,14 +68,26 @@ gen: $(CEE_UTILS_DIR) | $(MAIN)
-a \
-o $(patsubst %, $(WDIR)/%, $(dir $(VAR))one-specs.h) \
$(VAR)$(\n))
+endef
-$(MAIN): $(MAIN).c $(DEPS) | $(WDIR)
- $(CC) $(CFLAGS) -o $@ $^ -lm
+$(OBJDIR)/%.o : $(WDIR)/%.c
+ $(CC) -I$(COMMON_DIR) $(CFLAGS) -c -o $@ $< $(LDFLAGS)
-$(OBJS): gen | $(OBJDIR)
+all: $(CEE_UTILS_DIR) $(WDIR)
-$(WDIR):
+build: all
+ $(MAKE) $(OBJS)
+
+$(WDIR): | $(MAIN)
mkdir -p $(addprefix $(WDIR)/, $(APIS))
+ $(generate_source)
+ $(generate_header)
+
+$(MAIN): $(MAIN).c $(DEPS)
+ $(CC) $(CFLAGS) -o $@ $^ -lm
+
+$(OBJS): | $(OBJDIR)
+
$(OBJDIR):
mkdir -p $(addprefix $(OBJDIR)/, $(APIS))
@@ -97,4 +102,4 @@ echo:
clean:
rm -rf $(WDIR) $(OBJDIR) $(MAIN)
-.PHONY : all echo clean gen
+.PHONY : all build echo clean
|
Add ImfExportUtil.h to Makefile.am | @@ -17,7 +17,7 @@ libIlmImfUtil_la_SOURCES = \
ImfFlatImageIO.h ImfFlatImageIO.cpp \
ImfDeepImageIO.h ImfDeepImageIO.cpp \
ImfImageDataWindow.h ImfImageDataWindow.cpp \
- ImfImageChannelRenaming.h
+ ImfImageChannelRenaming.h ImfUtilExport.h
libIlmImfUtil_la_LDFLAGS = -version-info @LIBTOOL_VERSION@ \
-no-undefined
|
Fix matlab.lua | -- @file matlab.lua
--
--- define module
-local matlab = matlab or {}
-
-- get matlab versions
-function matlab.versions()
+function versions()
-- see https://www.mathworks.com/products/compiler/matlab-runtime.html
return
@@ -53,7 +50,7 @@ function matlab.versions()
end
-- get matlab versions names
-function matlab.versions_names()
+function versions_names()
return
{
@@ -81,6 +78,3 @@ function matlab.versions_names()
, r2012a = "7.17"
}
end
-
--- return module
-return matlab
|
The dedicated windows tool at APPSDIR/tools/mkkconfig.bat uses , which is not a windows shell variable, and is left uninitialized, but in fact should be the current directory. | @@ -75,6 +75,9 @@ REM GOTO :End
REM )
)
+REM Get the current directory
+SET APPSDIR=%~dp0
+
Echo # > %kconfig%
Echo # For a description of the syntax of this configuration file, >> %kconfig%
Echo # see the file kconfig-language.txt in the NuttX tools repository. >> %kconfig%
@@ -89,10 +92,9 @@ IF %menu% NEQ "" (
DIR /B /A:D >_tmp_.dat
-Echo source "$APPSDIR/builtin/Kconfig" >> %kconfig%
FOR /F "tokens=*" %%s IN (_tmp_.dat) do (
IF EXIST %%s\Kconfig (
- Echo source "$APPSDIR/%%s/Kconfig" >> %kconfig%
+ Echo source "%APPSDIR%/%%s/Kconfig" >> %kconfig%
)
)
DEL _tmp_.dat
|
Fixed edge case for hidden operand scaling (Fixes | @@ -311,45 +311,29 @@ ZyanU8 ZydisGetMachineModeWidth(ZydisMachineMode machine_mode)
*/
ZyanU8 ZydisGetAszFromHint(ZydisAddressSizeHint hint)
{
- switch (hint)
- {
- case ZYDIS_ADDRESS_SIZE_HINT_NONE:
- return 0;
- case ZYDIS_ADDRESS_SIZE_HINT_16:
- return 16;
- case ZYDIS_ADDRESS_SIZE_HINT_32:
- return 32;
- case ZYDIS_ADDRESS_SIZE_HINT_64:
- return 64;
- default:
- ZYAN_UNREACHABLE;
- }
+ ZYAN_ASSERT((ZyanUSize)hint <= ZYDIS_ADDRESS_SIZE_MAX_VALUE);
+ static const ZyanU8 lookup[ZYDIS_ADDRESS_SIZE_MAX_VALUE + 1] = { 0, 16, 32, 64 };
+ return lookup[hint];
}
/**
* Converts `ZydisOperandSizeHint` to operand size expressed in bits.
*
* @param hint Operand size hint.
+ * @param mode_width Default width for desired machine mode.
*
* @return Operand size in bits.
*/
-ZyanU8 ZydisGetOszFromHint(ZydisOperandSizeHint hint)
+ZyanU8 ZydisGetOszFromHint(ZydisOperandSizeHint hint, ZydisWidthFlag mode_width)
{
- switch (hint)
+ ZYAN_ASSERT((ZyanUSize)hint <= ZYDIS_OPERAND_SIZE_MAX_VALUE);
+ ZYAN_ASSERT((ZyanUSize)mode_width <= ZYDIS_WIDTH_MAX_VALUE);
+ if (hint == ZYDIS_OPERAND_SIZE_HINT_NONE)
{
- case ZYDIS_OPERAND_SIZE_HINT_NONE:
- return 0;
- case ZYDIS_OPERAND_SIZE_HINT_8:
- return 8;
- case ZYDIS_OPERAND_SIZE_HINT_16:
- return 16;
- case ZYDIS_OPERAND_SIZE_HINT_32:
- return 32;
- case ZYDIS_OPERAND_SIZE_HINT_64:
- return 64;
- default:
- ZYAN_UNREACHABLE;
+ return (ZyanU8)(mode_width << 4);
}
+
+ return 4 << hint;
}
/**
@@ -2937,10 +2921,11 @@ ZyanStatus ZydisFindMatchingDefinition(const ZydisEncoderRequest *request,
const ZyanU8 definition_count = ZydisGetEncodableInstructions(request->mnemonic, &definition);
ZYAN_ASSERT(definition && definition_count);
const ZydisWidthFlag mode_width = ZydisGetMachineModeWidth(request->machine_mode) >> 4;
- const ZyanBool is_compat = (request->machine_mode == ZYDIS_MACHINE_MODE_LONG_COMPAT_16) ||
+ const ZyanBool is_compat =
+ (request->machine_mode == ZYDIS_MACHINE_MODE_LONG_COMPAT_16) ||
(request->machine_mode == ZYDIS_MACHINE_MODE_LONG_COMPAT_32);
const ZyanU8 default_asz = ZydisGetAszFromHint(request->address_size_hint);
- const ZyanU8 default_osz = ZydisGetOszFromHint(request->operand_size_hint);
+ const ZyanU8 default_osz = ZydisGetOszFromHint(request->operand_size_hint, mode_width);
const ZyanU16 operand_mask = ZydisGetOperandMask(request);
for (ZyanU8 i = 0; i < definition_count; ++i, ++definition)
|
Fix tests/test_gop.sh environmental variable testing | @@ -13,8 +13,8 @@ valgrind_test 264x130 10 $common_args --gop=8 -p1 --owf=4
valgrind_test 264x130 10 $common_args --gop=lp-g4d3t1 -p5 --owf=4
valgrind_test 264x130 10 $common_args --gop=8 -p8 --owf=4 --no-open-gop
# Do more extensive tests in a private gitlab CI runner
-[ ! -z "$GITLAB_CI" ] && valgrind_test 264x130 20 $common_args --gop=8 -p8 --owf=0 --no-open-gop
-[ ! -z "$GITLAB_CI" ] && valgrind_test 264x130 40 $common_args --gop=8 -p32 --owf=4 --no-open-gop
-[ ! -z "$GITLAB_CI" ] && valgrind_test 264x130 70 $common_args --gop=8 -p64 --owf=4 --no-open-gop
-[ ! -z "$GITLAB_CI" ] && valgrind_test 264x130 50 $common_args --gop=8 -p40 --owf=4 --no-open-gop
-[ ! -z "$GITLAB_CI" ] && valgrind_test 264x130 10 $common_args --gop=8 -p8 --owf=0 --no-open-gop --bipred
+[ ! -z ${GITLAB_CI+x} ] && valgrind_test 264x130 20 $common_args --gop=8 -p8 --owf=0 --no-open-gop
+[ ! -z ${GITLAB_CI+x} ] && valgrind_test 264x130 40 $common_args --gop=8 -p32 --owf=4 --no-open-gop
+[ ! -z ${GITLAB_CI+x} ] && valgrind_test 264x130 70 $common_args --gop=8 -p64 --owf=4 --no-open-gop
+[ ! -z ${GITLAB_CI+x} ] && valgrind_test 264x130 50 $common_args --gop=8 -p40 --owf=4 --no-open-gop
+[ ! -z ${GITLAB_CI+x} ] && valgrind_test 264x130 10 $common_args --gop=8 -p8 --owf=0 --no-open-gop --bipred
|
test: accel_cal: add setup/teardown methods
BRANCH=none
TEST=make buildall -j | @@ -125,11 +125,19 @@ void before_test(void)
accel_cal_reset(&cal);
}
+void after_test(void) {}
+
TEST_MAIN()
{
ztest_test_suite(test_accel_cal,
- ztest_unit_test(test_calibrated_correctly_with_kasa),
- ztest_unit_test(test_calibrated_correctly_with_newton),
- ztest_unit_test(test_temperature_gates));
+ ztest_unit_test_setup_teardown(
+ test_calibrated_correctly_with_kasa,
+ before_test, after_test),
+ ztest_unit_test_setup_teardown(
+ test_calibrated_correctly_with_newton,
+ before_test, after_test),
+ ztest_unit_test_setup_teardown(test_temperature_gates,
+ before_test,
+ after_test));
ztest_run_test_suite(test_accel_cal);
}
|
HV: update opcode when decode_two_byte_opcode()
The vie->opcode should be updated when decode_two_byte_opcode(),
otherwise for two bytes opcode emulate(movzx/movsx) will fail. | @@ -1778,6 +1778,7 @@ static int decode_two_byte_opcode(struct instr_emul_vie *vie)
return -1;
}
+ vie->opcode = x;
vie->op = two_byte_opcodes[x];
if (vie->op.op_type == VIE_OP_TYPE_NONE) {
|
ossl_sk_ASN1_UTF8STRING2text(): Minor generalization and refactoring for readability | @@ -413,9 +413,9 @@ unsigned char *ASN1_STRING_data(ASN1_STRING *x)
}
#endif
+/* |max_len| excludes NUL terminator and may be 0 to indicate no restriction */
char *ossl_sk_ASN1_UTF8STRING2text(STACK_OF(ASN1_UTF8STRING) *text,
- const char *sep,
- size_t max_len /* excluding NUL terminator */)
+ const char *sep, size_t max_len)
{
int i;
ASN1_UTF8STRING *current;
@@ -423,26 +423,27 @@ char *ossl_sk_ASN1_UTF8STRING2text(STACK_OF(ASN1_UTF8STRING) *text,
char *result = NULL;
char *p;
- if (!ossl_assert(sep != NULL))
- return NULL;
+ if (sep == NULL)
+ sep = "";
sep_len = strlen(sep);
- for (i = 0; i < sk_ASN1_UTF8STRING_num(text); ++i) {
+ for (i = 0; i < sk_ASN1_UTF8STRING_num(text); i++) {
current = sk_ASN1_UTF8STRING_value(text, i);
if (i > 0)
length += sep_len;
length += ASN1_STRING_length(current);
- if (length > max_len)
+ if (max_len != 0 && length > max_len)
return NULL;
}
if ((result = OPENSSL_malloc(length + 1)) == NULL)
return NULL;
- for (i = 0, p = result; i < sk_ASN1_UTF8STRING_num(text); ++i) {
+ p = result;
+ for (i = 0; i < sk_ASN1_UTF8STRING_num(text); i++) {
current = sk_ASN1_UTF8STRING_value(text, i);
length = ASN1_STRING_length(current);
if (i > 0 && sep_len > 0) {
- strncpy(p, sep, sep_len + 1);
+ strncpy(p, sep, sep_len + 1); /* using + 1 to silence gcc warning */
p += sep_len;
}
strncpy(p, (const char *)ASN1_STRING_get0_data(current), length);
|
Fix incorrect unknown platform response in afu_platform_config | @@ -71,7 +71,7 @@ def getIntendedDevFamily(platform_db):
# Yes -- return the expanded family and the version number
return families[f[0]] + f[1:]
- return "Unknown"
+ return f
#
|
Workaround the case where client keeps sending old connection ID | @@ -1588,8 +1588,16 @@ static int conn_recv_pkt(ngtcp2_conn *conn, uint8_t *pkt, size_t pktlen,
if (hd.flags & NGTCP2_PKT_FLAG_LONG_FORM) {
pkt_num_bits = 32;
- if (hd.type == NGTCP2_PKT_1RTT_PROTECTED_K0) {
+ switch (hd.type) {
+ case NGTCP2_PKT_1RTT_PROTECTED_K0:
encrypted = 1;
+ break;
+ case NGTCP2_PKT_SERVER_CLEARTEXT:
+ if (!conn->server) {
+ /* TODO Client may keep sending old connection ID */
+ conn->conn_id = hd.conn_id;
+ }
+ break;
}
} else {
switch (hd.type) {
|
document limitations of OIDCUnAuthzAction | # "302" redirect to the URL specified in the <argument> parameter
# "auth" redirect the user to the OpenID Connect Provider or Discovery page for authentication (<argument> is unused)
# Useful in Location/Directory/Proxy path contexts that need to do stepup authentication
+# Be aware that this will only work in combination with single Require statements, so using
+# RequireAll, RequireAny and multiple Require statements is not supported.
# When not defined the default "403" is used. However Apache 2.4 will change this to 401
# unless you set "AuthzSendForbiddenOnFailure on"
#OIDCUnAutzAction [401|403|302|auth] [<argument>]
|
Fix clap dependency | @@ -17,6 +17,6 @@ s2n-tls = { version = "=0.0.8", path = "../s2n-tls" }
tokio = { version = "1", features = ["net", "time"] }
[dev-dependencies]
-clap = { version = "3.1", features = ["derive"] }
+clap = { version = "~3.1", features = ["derive"] }
rand = { version = "0.8" }
tokio = { version = "1", features = [ "io-std", "io-util", "macros", "net", "rt-multi-thread", "test-util", "time"] }
|
Force clean build directories in build nodes | @@ -87,7 +87,7 @@ pipeline {
stages {
stage('Clean') {
steps {
- sh 'git clean -fdx'
+ sh 'git clean -ffdx'
}
}
stage('Build R') {
@@ -127,7 +127,7 @@ pipeline {
stages {
stage('Clean') {
steps {
- bat 'git clean -fdx'
+ bat 'git clean -ffdx'
}
}
stage('Build R') {
@@ -167,7 +167,7 @@ pipeline {
stages {
stage('Clean') {
steps {
- sh 'git clean -fdx'
+ sh 'git clean -ffdx'
}
}
stage('Build R') {
|
ci: Update Debian unstable packages
This syncs Debian unstable with Ubuntu 18.04 in order to get the clang
package. It also adds qemu to the Debian install, which makes sense
Debian also has 2.12. | FROM debian:unstable
ENV DEBIAN_FRONTEND noninteractive
-RUN apt-get update -qq
RUN if [ `arch` != "ppc64le" ]; then apt-get update -qq && apt-get install -y gcc-powerpc64le-linux-gnu; fi
-RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget xterm curl device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6
RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
+RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget curl xterm device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6 clang qemu-system-ppc
RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
-RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.0-0/systemsim-p9-1.0-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.0-0-trusty_amd64.deb; fi
+RUN if [ `arch` = "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
COPY . /build/
WORKDIR /build
|
when doing set to selection, if there were previously multiple inputs
and you were selecting a single one of those inputs, it would fail and
remove all the input connections | @@ -105,7 +105,7 @@ createInputGeometryNode(string $transformAttr, string $geometryAttr)
// if a houdiniInputGeometry already exists, reuse it
{
string $connections[] =
- `listConnections -type houdiniInputGeometry -destination true
+ `listConnections -type houdiniInputGeometry -destination true -source false
$geometryAttr`;
if(size($connections))
{
@@ -480,6 +480,31 @@ houdiniEngine_setAssetInput(string $inputAttr, string $objects[])
return 1;
}
+ // if the final input is connected to a merge node that's connected to the asset input
+ // it means we're replacing a merged input with a single input that used to be part of the merge
+ // so we disconnect the one we're going to keep from the target assets merge to keep it safe
+ // and then let clearAssetInput get rid of all the other input
+
+ // Note that the input geometry could be connected to multiple inputs or merges on multiple assets
+ // we only want to disconnect it from the merge on the input we're modifying
+
+ string $outConnections[] = `listConnections -type "houdiniInputMerge" -plugs true $finalInputAttr`;
+ if(size($outConnections) > 0) {
+ for( $outConAttr in $outConnections ) {
+ string $outCon = plugNode($outConAttr);
+ string $assetConnections[] = `listConnections -source false -type "houdiniAsset" -plugs true $outCon`;
+ for($outAssetCon in $assetConnections) {
+ // there should only be one asset connection on the merge
+ // you'd think that you could just compare the original strings
+ // but the attribute names could be in different formats, epecially leaf vs compound hierarchy
+ if(plugNode($outAssetCon) == plugNode($inputAttr) && `attributeName -long $outAssetCon` == `attributeName -long $inputAttr`) {
+ disconnectAttr $finalInputAttr $outConAttr;
+ break;
+ }
+ }
+ }
+ }
+
houdiniEngine_clearAssetInput($inputAttr);
connectAttr $finalInputAttr $inputAttr;
|
sixtop: return right enum value
The function returns a sixp_trans_mode_t,
so use an enum value from that enum. | @@ -343,7 +343,7 @@ sixp_trans_get_mode(sixp_trans_t *trans)
assert(trans != NULL);
if(trans == NULL) {
LOG_ERR("6P-trans: sixp_trans_get_mode() fails because trans is NULL\n");
- return SIXP_TRANS_STATE_UNAVAILABLE;
+ return SIXP_TRANS_MODE_UNAVAILABLE;
}
return trans->mode;
}
|
Update spec file to build SLE | @@ -13,15 +13,29 @@ ExclusiveArch: x86_64
Requires: libipmctl%{?_isa} = %{version}-%{release}
BuildRequires: pkgconfig(libndctl)
BuildRequires: cmake
+
%if 0%{?fedora}
BuildRequires: python2
%endif
-%if 0%{?rhel}
-BuildRequires: python
+
+%if 0%{?rhel} == 8
+BuildRequires: python3
%endif
+
+
BuildRequires: gcc
BuildRequires: gcc-c++
+
+%if 0%{?suse_version}
+BuildRequires: ruby2.5-rubygem-asciidoctor
+%else
+ %if 0%{?rhel} == 8
+BuildRequires: rubygems
+ %else
BuildRequires: asciidoctor
+ %endif
+%endif
+
Obsoletes: ixpdimm-cli < 01.00.00.3000
%description
|
fixe menu name | @@ -784,7 +784,7 @@ avtUintahFileFormat::ReadMetaData(avtDatabaseMetaData *md, int timeState)
#endif
scalar = new avtScalarMetaData();
- scalar->name = "Patch/Rank";
+ scalar->name = "Patch/ProcId";
scalar->meshName = mesh_for_this_var;
scalar->centering = cent;
scalar->hasDataExtents = false;
@@ -1680,7 +1680,7 @@ avtUintahFileFormat::GetVar(int timestate, int domain, const char *varname)
// Patch based data ids and bounds
if( strncmp(varname, "Patch/Id", 8) == 0 ||
- strncmp(varname, "Patch/Rank", 10) == 0 ||
+ strncmp(varname, "Patch/ProcId", 12) == 0 ||
strncmp(varname, "Patch/Bounds/Low", 16) == 0 ||
strncmp(varname, "Patch/Bounds/High", 17) == 0 )
{
|
hslua-core: fix docs for dofile, loadfile.
Files are opened in Lua, not Haskell. | @@ -84,7 +84,7 @@ dostring s = do
{-# INLINABLE dostring #-}
-- | Loads and runs the given file. Note that the filepath is
--- interpreted by Haskell, not Lua. The resulting chunk is named using
+-- interpreted by Lua, not Haskell. The resulting chunk is named using
-- the UTF8 encoded filepath.
dofile :: FilePath -> LuaE e Status
dofile fp = do
@@ -174,8 +174,6 @@ loadbuffer bs (Name name) = liftLua $ \l ->
-- As @'Lua.load'@, this function only loads the chunk; it does not run
-- it.
--
--- Note that the file is opened by Haskell, not Lua.
---
-- See <https://www.lua.org/manual/5.3/manual.html#luaL_loadfile luaL_loadfile>.
loadfile :: FilePath -- ^ filename
-> LuaE e Status
|
Add an EVP demo for CMAC
Fixes openssl#14110 | CFLAGS = $(OPENSSL_INCS_LOCATION) -Wall
LDFLAGS = $(OPENSSL_LIBS_LOCATION) -lssl -lcrypto
-all: gmac poly1305
+all: gmac hmac-sha512 cmac-aes256 poly1305
gmac: gmac.o
hmac-sha512: hmac-sha512.o
+cmac-aes256: cmac-aes256.o
poly1305: poly1305.o
-gmac hmac-sha512 poly1305:
+gmac hmac-sha512 cmac-aes256 poly1305:
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
clean:
- $(RM) gmac hmac-sha512 poly1305 *.o
+ $(RM) gmac hmac-sha512 cmac-aes256 poly1305 *.o
|
YAwn: Update CMake code for old versions of CMake | @@ -34,7 +34,7 @@ if (DEPENDENCY_PHASE)
GRAMMAR_INPUT
"${GRAMMAR_INPUT}")
foreach (line ${GRAMMAR_INPUT})
- string (APPEND GRAMMAR "\"${line}\\n\"\n")
+ set (GRAMMAR "${GRAMMAR}\"${line}\\n\"\n")
endforeach (line ${GRAMMAR_INPUT})
file (WRITE ${SOURCE_FILE_GRAMMAR}
|
Remove email from optional reviewers | @@ -54,7 +54,7 @@ class CheckinBranch {
[string]$completePR = "False";
[string]$pullRequestTitle;
[string]$workitem = "37338822"
- [string]$optionalReviewers = "[email protected];[email protected]"
+ [string]$optionalReviewers = "[email protected]"
[CheckinFile[]]$CheckinFiles;
CheckinBranch($ManifestFile, $BranchToPushTo, $PRTitle) {
|
Added comment to compiler switch and removed commented codes | #include "settings.h"
#include "target_board.h"
-//#define HEX_TO_ASCII(x) ('0' + (x>9 ? x+7 : x))
-
static char hex_to_ascii(uint8_t x)
{
return ('0' + (x>9 ? x+0x27 : x));
- //return ('0' + (x>9 ? x+0x7 : x));
}
// Constant variables
@@ -104,6 +101,7 @@ const char *info_get_unique_id_string_descriptor(void)
return usb_desc_unique_id;
}
+//prevent the compiler to optimize boad and family id
#if (defined(__ICCARM__))
#pragma optimize = none
static void setup_basics(void)
|
[mod_webdav] hide unused funcs depending on build
hide unused funcs depending on build flags | @@ -3455,6 +3455,8 @@ webdav_propfind_dir (webdav_propfind_bufs * const restrict pb)
}
+#if defined(USE_PROPPATCH) || defined(USE_LOCKS)
+
static int
webdav_open_chunk_file_rd (chunk * const c)
{
@@ -3518,7 +3520,6 @@ webdav_mmap_file_chunk (chunk * const c)
}
-#if defined(USE_PROPPATCH) || defined(USE_LOCKS)
__attribute_noinline__
static xmlDoc *
webdav_parse_chunkqueue (request_st * const r,
@@ -3610,6 +3611,7 @@ webdav_parse_chunkqueue (request_st * const r,
xmlFreeParserCtxt(ctxt);
return NULL;
}
+
#endif
|
SOVERSION bump to version 7.11.11 | @@ -73,7 +73,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_
# with backward compatible change and micro version is connected with any internal change of the library.
set(SYSREPO_MAJOR_SOVERSION 7)
set(SYSREPO_MINOR_SOVERSION 11)
-set(SYSREPO_MICRO_SOVERSION 10)
+set(SYSREPO_MICRO_SOVERSION 11)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
travis CHANGE handling coverity certificate | @@ -34,11 +34,14 @@ jobs:
branch_pattern: libyang2
before_install:
# check if something changed from the last coverity build
+ - echo "Last coverity build on revision" `cat $HOME/cache/coveritybuild 2>/dev/null`
+ - echo "Current revision" `git rev-parse HEAD`
- if [ "`git rev-parse HEAD`" = "`cat $HOME/cache/coveritybuild`" ]; then echo "Codebase did not change from previous build."; travis_terminate 0; fi
- - if [ ! -d $HOME/cache ]; then mkdir -p $HOME/cache; fi
+ - if [ ! -d $HOME/cache ]; then echo "Preparing revision cache."; mkdir -p $HOME/cache; fi
- git rev-parse HEAD > $HOME/cache/coveritybuild
+ - cat $HOME/cache/coveritybuild
# get everything for coverity
- # - echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-certificates.crt
+ - echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-certificates.crt
- sudo apt-get update -qq
script:
# do nothing, everything here is done in coverity addon
|
Further fixes in CMakeLists.txt
See | @@ -7,8 +7,8 @@ string(COMPARE EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} PROJECT_IS_
if(PROJECT_IS_TOP_LEVEL)
find_package(Vulkan REQUIRED)
-endif()
include_directories(${Vulkan_INCLUDE_DIR})
+endif()
# VulkanMemoryAllocator contains an sample application which is not built by default
option(VMA_BUILD_SAMPLE "Build VulkanMemoryAllocator sample application" OFF)
@@ -35,12 +35,12 @@ if(VMA_BUILD_SAMPLE)
set(VMA_BUILD_SAMPLE_SHADERS ON)
endif(VMA_BUILD_SAMPLE)
-if(PROJECT_IS_TOP_LEVEL)
- find_package(Doxygen)
-endif()
option(BUILD_DOCUMENTATION "Create and install the HTML based API documentation (requires Doxygen)" OFF)
if(BUILD_DOCUMENTATION)
+ if(PROJECT_IS_TOP_LEVEL)
+ find_package(Doxygen)
+ endif()
if(DOXYGEN_FOUND)
# set input and output files
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile)
|
build all script: account for skipped examples | @@ -88,8 +88,11 @@ else
fi
NUM_SUCCESS=0
+NUM_SKIPPED=0
NUM_FAILED=0
+rm -f failed.log
+rm -f failed-full.log
FAILED=
for platform in $PLATFORMS
@@ -132,14 +135,23 @@ do
# Build the goal
$LOG_INFO "make -C \"$example_dir\" -j TARGET=$platform BOARD=$board $GOAL"
- if make -C "$example_dir" -j TARGET=$platform BOARD=$board $GOAL 2>&1 >build.log
+ if make -C "$example_dir" -j TARGET=$platform BOARD=$board $GOAL >build.log 2>&1
then
$LOG_INFO "..done"
$CAT_DEBUG build.log
+ if [[ `grep Skipping build.log` ]]
+ then
+ NUM_SKIPPED=$(($NUM_SKIPPED + 1))
+ else
NUM_SUCCESS=$(($NUM_SUCCESS + 1))
+ fi
else
$LOG_INFO "Failed to build $example_dir for $platform ($board)"
$CAT_DEBUG build.log
+ echo "TARGET=$platform BOARD=$board $example_dir" >> failed.log
+ echo "TARGET=$platform BOARD=$board $example_dir" >> failed-full.log
+ cat build.log >> failed-full.log
+ echo "=====================" >> failed-full.log
NUM_FAILED=$(($NUM_FAILED + 1))
FAILED="$FAILED; $example_dir for $platform ($board)"
fi
@@ -153,7 +165,8 @@ done
# If building, not cleaning, print so statistics
if [[ "$GOAL" == "all" ]]
then
- $LOG_INFO "Number of examples skipped or built successfully: $NUM_SUCCESS"
+ $LOG_INFO "Number of examples built successfully: $NUM_SUCCESS"
+ $LOG_INFO "Number of examples skipped: $NUM_SKIPPED"
$LOG_INFO "Number of examples that failed to build: $NUM_FAILED"
$LOG_INFO "Failed examples: $FAILED"
fi
|
fix for adding asset to a no-history mesh | @@ -244,7 +244,7 @@ houdiniEngine_addHistory(string $assetNode)
// need to previous input from this asset if it's not the same as the current one
- houdiniEngine_setHistoryAttr($inputAttr, $objects, $components);
+ houdiniEngine_connectHistory($inputAttr, $objects, $components);
// if we can insert into history
// remove output geo, connect input geo's mesh input to inputGeometry
@@ -258,7 +258,7 @@ houdiniEngine_addHistory(string $assetNode)
}
global proc int
-houdiniEngine_setHistoryAttr(string $inputAttr, string $objects[], string $components[])
+houdiniEngine_connectHistory(string $inputAttr, string $objects[], string $components[])
{
// Make Sure we have exactly one valid input object
string $validObjects[];
@@ -309,6 +309,7 @@ houdiniEngine_setHistoryAttr(string $inputAttr, string $objects[], string $compo
return 0;
}
int $upstreamIsAsset = 0;
+ if($upstreamNode != "") {
if(`nodeType $upstreamNode` == "houdiniAsset") {
print "ok, it's a different asset\n";
$upstreamIsAsset = 1;
@@ -349,6 +350,7 @@ houdiniEngine_setHistoryAttr(string $inputAttr, string $objects[], string $compo
// the attrs to connect should be the ones for direct connection of node ids
}
}
+ }
// if there is no upstream history
// then we need a copy of the original mesh, so we sync
|
Fix no-engine
Fix a misplaced "#endif" which was disabling a little too much code. | @@ -101,10 +101,10 @@ const OPTIONS req_options[] = {
{"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"},
{"keygen_engine", OPT_KEYGEN_ENGINE, 's',
"Specify engine to be used for key generation operations"},
+#endif
{"in", OPT_IN, '<', "Input file"},
{"inform", OPT_INFORM, 'F', "Input format - DER or PEM"},
{"verify", OPT_VERIFY, '-', "Verify signature on REQ"},
-#endif
OPT_SECTION("Certificate"),
{"new", OPT_NEW, '-', "New request"},
|
[hip_roblas test] - Fix errors in Makefile. | @@ -7,7 +7,8 @@ TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
OMP_FLAGS = --offload-arch=${AOMP_GPU}
CFLAGS = -x hip -I /opt/rocm/rocblas/include/ --offload-arch=${AOMP_GPU} -std=c++11
-OMPHIP ?= $(AOMP)
+AOMPHIP ?= $(AOMP)
+VERS = $(shell $(AOMP)/bin/aompversion)
ifeq ($(shell expr $(VERS) \>= 12.0), 1)
RPTH = -Wl,-rpath,$(AOMPHIP)/lib
endif
|
Data window tuning | @@ -16,4 +16,4 @@ void SurviveSensorActivations_add(SurviveSensorActivations *self, struct PoserDa
}
// Roughly 31ms at a 48mhz clock rate
-uint32_t SurviveSensorActivations_default_tolerance = 1500000;
\ No newline at end of file
+uint32_t SurviveSensorActivations_default_tolerance = 500000;
\ No newline at end of file
|
actions FEATURE upload to codecov on devel push
Seems pull requests are handled correctly but
pushes to branches not. | @@ -43,6 +43,17 @@ jobs:
make-prepend: "cov-build --dir cov-int",
make-target: ""
}
+ - {
+ name: "Codecov",
+ os: "ubuntu-latest",
+ build-type: "Debug",
+ cc: "gcc",
+ options: "-DENABLE_COVERAGE=ON",
+ packages: "libcmocka-dev lcov",
+ snaps: "",
+ make-prepend: "",
+ make-target: ""
+ }
steps:
- uses: actions/checkout@v2
@@ -116,3 +127,9 @@ jobs:
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
if: ${{ matrix.config.name == 'Coverity' }}
+
+ - name: Upload to Codecov.io
+ shell: bash
+ working-directory: ${{ github.workspace }}/build
+ run: bash <(curl -s https://codecov.io/bash)
+ if: ${{ matrix.config.name == 'Codecov' }}
|
shm mod BUGFIX dependencies are not needed when returning data
For sr_get_*() functions, no dependent modules
are needed as they will only be filtered and
returned, no modification or validation. | @@ -223,10 +223,10 @@ sr_shmmod_modinfo_collect_xpath(struct sr_mod_info_s *mod_info, const char *xpat
continue;
}
- /* find the module in SHM and add it with any dependencies */
+ /* find the module in SHM, we need just its data, no dependencies as we will be only returning these data */
shm_mod = sr_shmmain_find_module(&mod_info->conn->main_shm, mod_info->conn->ext_shm.addr, ly_mod->name, 0);
SR_CHECK_INT_GOTO(!shm_mod, err_info, cleanup);
- if ((err_info = sr_modinfo_add_mod(shm_mod, ly_mod, MOD_INFO_REQ, MOD_INFO_DEP | MOD_INFO_INV_DEP, mod_info))) {
+ if ((err_info = sr_modinfo_add_mod(shm_mod, ly_mod, MOD_INFO_REQ, 0, mod_info))) {
goto cleanup;
}
}
|
stm32/lwip_inc: Update to enable mDNS, TCP listen backlog, faster DHCP. | #include <stdint.h>
+// This protection is not needed, instead we execute all lwIP code at PendSV priority
+#define SYS_ARCH_DECL_PROTECT(lev) do { } while (0)
+#define SYS_ARCH_PROTECT(lev) do { } while (0)
+#define SYS_ARCH_UNPROTECT(lev) do { } while (0)
+
#define NO_SYS 1
#define SYS_LIGHTWEIGHT_PROT 1
#define MEM_ALIGNMENT 4
#define LWIP_IPV6 0
#define LWIP_DHCP 1
#define LWIP_DHCP_CHECK_LINK_UP 1
+#define DHCP_DOES_ARP_CHECK 0 // to speed DHCP up
#define LWIP_DNS 1
+#define LWIP_DNS_SUPPORT_MDNS_QUERIES 1
+#define LWIP_MDNS_RESPONDER 1
#define LWIP_IGMP 1
+#define LWIP_NUM_NETIF_CLIENT_DATA 1 // mDNS responder requires 1
+#define MEMP_NUM_UDP_PCB 5 // mDNS responder requires 1
+
#define SO_REUSE 1
+#define TCP_LISTEN_BACKLOG 1
extern uint32_t rng_get(void);
#define LWIP_RAND() rng_get()
|
testing/uclibcxx_test: Define TESTDIR correctly | include $(APPDIR)/Make.defs
CXXEXT := .cpp
-ORIGS := $(wildcard $(TOPDIR)/libs/libxx/uClibc++/tests/*.cpp)
+
+TESTDIR = $(TOPDIR)/libs/libxx/uClibc++/tests
+ORIGS := $(wildcard $(TESTDIR)/*.cpp)
BLACKSRCS := wchartest.cpp
BLACKSRCS += excepttest.cpp
|
move sleep back | @@ -219,13 +219,13 @@ int epoll_wait(int epfd,
w->timeout = register_timer(milliseconds(timeout), closure(h, epoll_blocked_finish, w));
#ifdef EPOLL_DEBUG
rprintf(" registered timer %p\n", w->timeout);
- rprintf(" sleeping...\n");
#endif
+ }
+
+ rprintf(" sleeping...\n");
w->sleeping = true;
thread_sleep(current);
}
- return 0;
-}
u64 epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)
{
|
fixed test case to be more transparent | @@ -99,6 +99,7 @@ static void compare_massfunc(int model, struct massfunc_data * data)
double a = 1.0;
double logmass = 10;
+ double odelta = 200;
double rho_m = RHO_CRITICAL*cosmo->params.Omega_m*cosmo->params.h*cosmo->params.h;
// compare to benchmark data
@@ -106,7 +107,7 @@ static void compare_massfunc(int model, struct massfunc_data * data)
double mass = pow(10,logmass);
double sigma_j = ccl_sigmaM(cosmo, mass, a, status);
double loginvsigma_j = log10(1./sigma_j);
- double logmassfunc_j = log10(ccl_massfunc(cosmo, mass, a, 200.,status)*mass/(rho_m*log(10.)));
+ double logmassfunc_j = log10(ccl_massfunc(cosmo, mass, a, odelta, status)*mass/(rho_m*log(10.)));
double absolute_tolerance = SIGMA_TOLERANCE*data->massfunc[0][j];
if (fabs(absolute_tolerance)<1e-12) absolute_tolerance = 1e-12;
|
Scripts: Documentation | # nor does it submit to any jurisdiction.
#
#######################################################################
-# Script to generate parameter definition files for GRIB2
-# Read an input TSV file which should contain parameter keys
-# and generate the .def files for them
+# Script to generate parameter definition files for GRIB2.
+# Reads an input TSV (tab-separated-value) file which should contain
+# the following parameter keys as columns:
+# paramId
+# shortName
+# name
+# units
+# discipline
+# parameterCategory
+# parameterNumber
+# # The following are optional keys
+# typeOfFirstFixedSurface
+# typeOfSecondFixedSurface
+# scaledValueOfFirstFixedSurface
+# scaleFactorOfFirstFixedSurface
+# scaledValueOfSecondFixedSurface
+# scaleFactorOfSecondFixedSurface
+# typeOfStatisticalProcessing
+#
+# It outputs the def files: name.def paramId.def shortName.def units.def
+#
#######################################################################
$|=1;
use strict;
|
rust/hex: update doc and unsafe notice | @@ -24,12 +24,11 @@ pub extern "C" fn rust_util_all_ascii(cstr: CStr) -> bool {
/// Convert bytes to hex representation
///
-/// * `buf_ptr` - Must be a valid pointer to an array of bytes
-/// * `buf_len` - Length of buffer, `buf_ptr[buf_len-1]` must be a valid dereference
-/// * `out_ptr` - Must be a valid pointer to an array of bytes that is buf_len*2+1 long
+/// * `buf` - bytes to convert to hex.
+/// * `out` - hex will be written here. out.len must be 2*buf.len+1.
#[no_mangle]
pub extern "C" fn rust_util_uint8_to_hex(buf: Bytes, mut out: CStrMut) {
- // UNSAFE: We promise that we never write non-utf8 valid bytes to the `str`.
+ // UNSAFE: We promise that we null terminate the string.
let out = unsafe { out.as_bytes_mut() };
let out_len = out.len();
hex::encode_to_slice(&buf, &mut out[0..out_len - 1]).unwrap();
|
top bar: sets status on field blur
fixes urbit/landscape#531 | @@ -50,6 +50,9 @@ export function SetStatus(props: any) {
value={_status}
autocomplete='off'
width='100%'
+ onBlur={() => {
+ editStatus();
+ }}
onKeyPress={(evt) => {
if (evt.key === 'Enter') {
editStatus();
|
[examples] correct cmake path for examples | # Set minimum version for cmake
cmake_minimum_required(VERSION 3.0.2)
-set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
# Force out-of-source build
include(OutOfSourcesBuild)
|
Attribute Set Identifier correction
Electrical Measurement cluster | @@ -2076,7 +2076,7 @@ Note: It does not clear or delete previous weekly schedule programming configura
<attribute id="0x0905" name="RMS Voltage" type="u16" access="r" required="o" default="0xFFFF"></attribute>
<attribute id="0x0908" name="RMS Current" type="u16" access="r" required="o" default="0xFFFF"></attribute>
</attribute-set>
- <attribute-set id="0x09" description="AC (Phase C) Measurements">
+ <attribute-set id="0x0a" description="AC (Phase C) Measurements">
<attribute id="0x0a05" name="RMS Voltage" type="u16" access="r" required="o" default="0xFFFF"></attribute>
<attribute id="0x0a08" name="RMS Current" type="u16" access="r" required="o" default="0xFFFF"></attribute>
</attribute-set>
|
Far plane calculation update | @@ -555,27 +555,27 @@ namespace carto {
cglib::ray3<double> ray(pos0, pos1 - pos0);
double t = -1;
- double z = std::pow(2.0f, -_zoom) * zoom0Distance * options.getDrawDistance();
- if (options.getProjectionSurface()->calculateHitPoint(ray, heightMin, t)) {
- if (t >= 0) {
- z = cglib::dot_product(ray(t) - pos0, zProjVector);
- }
- x0 = x; y0 = y;
- } else {
- x1 = x; y1 = y;
- }
-
+ if (options.getProjectionSurface()->calculateHitPoint(ray, heightMin, t) && t > 0) {
+ double z = cglib::dot_product(ray(t) - pos0, zProjVector);
zMin = std::min(zMin, z);
zMax = std::max(zMax, z);
- if (iter < 0 && t >= 0) {
+ if (iter < 0) {
break;
}
+
+ x0 = x; y0 = y;
+ } else {
+ x1 = x; y1 = y;
+ }
}
}
}
- return std::make_pair(std::max(static_cast<float>(zMin), Const::MIN_NEAR) * 0.8f, std::max(static_cast<float>(zMax), Const::MIN_NEAR) * 1.01f);
+ zMin = std::max((double) Const::MIN_NEAR, zMin);
+ zMax = std::max((double) Const::MIN_NEAR, std::min(std::pow(2.0, -_zoom) * zoom0Distance * options.getDrawDistance(), zMax));
+
+ return std::make_pair(static_cast<float>(zMin) * 0.8f, static_cast<float>(zMax) * 1.01f);
}
float ViewState::calculateMinZoom(const Options& options) const {
|
fix docs sampler | @@ -35,8 +35,17 @@ void NCatboostCuda::TQuerywiseSampler::SampleQueries(TGpuAwareRandom& random, co
maxQuerySize,
&sampledWeight);
+ {
+ auto nzElements = TCudaBuffer<ui32, TMapping>::CopyMapping(indices);
+ auto docs = TCudaBuffer<ui32, TMapping>::CopyMapping(indices);
+ docs.Copy(indices);
+
FilterZeroEntries(&sampledWeight,
- &indices);
+ &nzElements);
+
+ indices.Reset(sampledWeight.GetMapping());
+ Gather(indices, docs, nzElements);
+ }
RadixSort(indices);
}
|
replace (char *) with (void __user *) in cma.c | @@ -24,7 +24,7 @@ static long cma_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
if(cmd != CMA_ALLOC) return -ENOTTY;
- rc = copy_from_user(&buffer, (char *)arg, sizeof(buffer));
+ rc = copy_from_user(&buffer, (void __user *)arg, sizeof(buffer));
if(rc) return rc;
cma_free();
@@ -41,7 +41,7 @@ static long cma_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
}
buffer = dma_addr;
- return copy_to_user((char *)arg, &buffer, sizeof(buffer));
+ return copy_to_user((void __user *)arg, &buffer, sizeof(buffer));
}
static int cma_mmap(struct file *file, struct vm_area_struct *vma)
|
Expr: Place function pipes above comparion ops in precedence. | @@ -233,17 +233,17 @@ static uint8_t priority_for_op(lily_expr_op o)
case expr_logical_and:
prio = 2;
break;
- /* Put pipes lower so they scoop up as much as possible. This seems
- right. */
- case expr_func_pipe:
- prio = 3;
- break;
case expr_eq_eq:
case expr_not_eq:
case expr_lt:
case expr_gr:
case expr_lt_eq:
case expr_gr_eq:
+ prio = 3;
+ break;
+ /* Put pipes here so they capture as much as possible for comparison
+ operations. Ex: `a << b |> fn <= something`. */
+ case expr_func_pipe:
prio = 4;
break;
case expr_bitwise_or:
|
Util typetraits.h: compile fix for MSVS 15.7 | #include <type_traits>
#include <stlfwd>
-//NOTE: to be replaced with std::bool_constant in c++17
+#if _LIBCPP_STD_VER >= 17
+template <bool B>
+using TBoolConstant = std::bool_constant<B>;
+#else
template <bool B>
struct TBoolConstant : std::integral_constant<bool, B> {};
+#endif
-//NOTE: to be replaced with std::negation in c++17
+#if _LIBCPP_STD_VER >= 17
+template <class B>
+using TNegation = std::negation<B>;
+#else
template <class B>
struct TNegation : ::TBoolConstant<!bool(B::value)> {};
+#endif
namespace NPrivate {
template <class... Bs>
@@ -39,17 +47,29 @@ namespace NPrivate {
}
}
-//NOTE: to be replaced with std::conjunction in c++17
+#if _LIBCPP_STD_VER >= 17
+template <class... Bs>
+using TConjunction = std::conjunction<Bs...>;
+#else
template <class... Bs>
struct TConjunction : ::TBoolConstant< ::NPrivate::ConjunctionImpl<Bs...>()> {};
+#endif
-//NOTE: to be replaced with std::disjunction in c++17
+#if _LIBCPP_STD_VER >= 17
+template <class... Bs>
+using TDisjunction = std::disjunction<Bs...>;
+#else
template <class... Bs>
struct TDisjunction : ::TBoolConstant< ::NPrivate::DisjunctionImpl<Bs...>()> {};
+#endif
-//NOTE: to be replaced with std::void_t in c++17
+#if _LIBCPP_STD_VER >= 17
+template <class... Bs>
+using TVoidT = std::void_t<Bs...>;
+#else
template <class...>
using TVoidT = void;
+#endif
template <class T>
struct TPodTraits {
|
fix history_list on macos | @@ -48,6 +48,19 @@ tb_int_t xm_readline_history_list(lua_State* lua)
// history list
lua_newtable(lua);
+#ifdef TB_CONFIG_OS_MACOSX
+ for (tb_int_t i = 1; i <= history_length; ++i)
+ {
+ lua_newtable(lua);
+ // field line
+ lua_pushstring(lua, "line");
+ lua_pushstring(lua, history_get(i) -> line);
+ lua_settable(lua, -3);
+
+ // set back
+ lua_rawseti(lua, -2, i);
+ }
+#else
tb_int_t i = 1;
for (HIST_ENTRY **p = history_list(); *p; ++p, ++i)
{
@@ -60,6 +73,7 @@ tb_int_t xm_readline_history_list(lua_State* lua)
// set back
lua_rawseti(lua, -2, i);
}
+#endif
// ok
return 1;
|
Fix GLEDOPTO modelid and manufacturer shown for all endpoints
Issue | @@ -13159,7 +13159,7 @@ void DeRestPlugin::idleTimerFired()
LightNode *lightNode = &d->nodes[d->lightIter];
d->lightIter++;
- if (!lightNode->isAvailable() || !lightNode->lastRx().isValid() || !lightNode->node())
+ if (!lightNode->isAvailable() || !lightNode->lastRx().isValid() || !lightNode->node() || lightNode->state() != LightNode::StateNormal)
{
continue;
}
@@ -13173,8 +13173,10 @@ void DeRestPlugin::idleTimerFired()
}
}
- // workaround for Xiaomi lights and smart plugs with multiple endpoints but only one basic cluster
- if (lightNode->manufacturerCode() == VENDOR_115F && (lightNode->modelId().isEmpty() || lightNode->item(RAttrSwVersion)->toString().isEmpty()))
+ // workaround for lights and smart plugs with multiple endpoints but only one basic cluster
+ if ((lightNode->manufacturerCode() == VENDOR_115F || // Xiaomi
+ (lightNode->address().ext() & macPrefixMask) == tiMacPrefix) // GLEDOPTO
+ && (lightNode->modelId().isEmpty() || lightNode->manufacturer().isEmpty() || lightNode->item(RAttrSwVersion)->toString().isEmpty()))
{
for (const auto &l : d->nodes)
{
@@ -13190,6 +13192,13 @@ void DeRestPlugin::idleTimerFired()
d->queSaveDb(DB_LIGHTS, DB_SHORT_SAVE_DELAY);
}
+ if (lightNode->manufacturer().isEmpty() && !l.manufacturer().isEmpty())
+ {
+ lightNode->setManufacturerName(l.manufacturer());
+ lightNode->setNeedSaveDatabase(true);
+ d->queSaveDb(DB_LIGHTS, DB_SHORT_SAVE_DELAY);
+ }
+
if (lightNode->item(RAttrSwVersion)->toString().isEmpty() && !l.item(RAttrSwVersion)->toString().isEmpty())
{
lightNode->item(RAttrSwVersion)->setValue(l.item(RAttrSwVersion)->toString());
|
external/esp_idf: Initialize timer structure before using
A crash may happens when we call work_cancel() and
pass an uninitialized work_s structure (work_s.worker is not NULL).
Apply this patch to initilize work_s structure after allocated. | @@ -424,7 +424,7 @@ static void IRAM_ATTR timer_setfn_wrapper(void *ptimer, void *pfunction, void *p
ETSTimer *etimer = (ETSTimer *) ptimer;
if (etimer->timer_period != TIMER_INITIALIZED_VAL) {
- memset(ptimer, 0, sizeof(*ptimer));
+ memset(etimer, 0, sizeof(ETSTimer));
etimer->timer_period = TIMER_INITIALIZED_VAL;
}
@@ -435,7 +435,7 @@ static void IRAM_ATTR timer_setfn_wrapper(void *ptimer, void *pfunction, void *p
}
etimer->timer_func = pfunction;
etimer->timer_expire = (uint32_t) parg;
- etimer->timer_next = (struct work_s *)malloc(sizeof(struct work_s));
+ etimer->timer_next = (struct work_s *)zalloc(sizeof(struct work_s));
}
}
|
hark: contain snippet gradient | @@ -94,7 +94,7 @@ const GraphNodeContent = ({ contents, contacts, mod, description, index, remoteC
<Box mb="2" fontWeight="500">
<Text>{header}</Text>
</Box>
- <Box overflow="hidden" maxHeight="400px">
+ <Box overflow="hidden" maxHeight="400px" position="relative">
<Text lineHeight="tall">{snippet}</Text>
<FilterBox
width="100%"
|
king: missing changes in Main, plus setrlimit for fds | @@ -99,6 +99,7 @@ import qualified Data.Set as Set
import qualified Data.Text as T
import qualified Network.HTTP.Client as C
import qualified System.Posix.Signals as Sys
+import qualified System.Posix.Resource as Sys
import qualified System.ProgressBar as PB
import qualified System.Random as Sys
import qualified Urbit.EventLog.LMDB as Log
@@ -460,6 +461,13 @@ pillFrom = \case
noun <- cueBS body & either throwIO pure
fromNounErr noun & either (throwIO . uncurry ParseErr) pure
+multiOnFatal :: HasKingEnv e => e -> IO ()
+multiOnFatal env = runRIO env $ do
+ (view stderrLogFuncL >>=) $ flip runRIO $ logError
+ ("Urbit is shutting down because of a problem with the HTTP server.\n"
+ <> "Please restart it at your leisure.")
+ view killKingActionL >>= atomically
+
newShip :: CLI.New -> CLI.Opts -> RIO KingEnv ()
newShip CLI.New{..} opts = do
{-
@@ -472,7 +480,8 @@ newShip CLI.New{..} opts = do
"run ship" flow, and possibly sequence them from the outside if
that's really needed.
-}
- multi <- multiEyre (MultiEyreConf Nothing Nothing True)
+ env <- ask
+ multi <- multiEyre (multiOnFatal env) (MultiEyreConf Nothing Nothing True)
-- TODO: We hit the same problem as above: we need a host env to boot a ship
-- because it may autostart the ship, so build an inactive port configuration.
@@ -660,6 +669,7 @@ main = do
hSetBuffering stdout NoBuffering
setupSignalHandlers
+ setRLimits
runKingEnv args log $ case args of
CLI.CmdRun ko ships -> runShips ko ships
@@ -693,6 +703,11 @@ main = do
for_ [Sys.sigTERM, Sys.sigINT] $ \sig -> do
Sys.installHandler sig (Sys.Catch onKillSig) Nothing
+ setRLimits = do
+ nofiles <- Sys.getResourceLimit Sys.ResourceOpenFiles
+ Sys.setResourceLimit Sys.ResourceOpenFiles
+ nofiles { Sys.softLimit = Sys.ResourceLimit 10240 }
+
verboseLogging :: CLI.Cmd -> Bool
verboseLogging = \case
CLI.CmdRun ko ships -> any CLI.oVerbose (ships <&> \(_, o, _) -> o)
@@ -716,7 +731,6 @@ main = do
CLI.CmdRun ko _ -> CLI.LogStderr
_ -> CLI.LogStderr
-
{-
Runs a ship but restarts it if it crashes or shuts down on it's own.
@@ -792,7 +806,8 @@ runShips CLI.Host {..} ships = do
-- a king-wide option.
}
- multi <- multiEyre meConf
+ env <- ask
+ multi <- multiEyre (multiOnFatal env) meConf
ports <- buildPortHandler hUseNatPmp
|
fix vector allocation in reel | u3_noun b)
{
u3_noun pro = u3k(u3x_at(u3x_sam_3, b));
- if ( u3_nul == a ) {
- return pro;
- }
- else {
+ if ( u3_nul != a ) {
u3j_site sit_u;
u3_noun i, t = a;
c3_w j_w, len_w = 0, all_w = 89, pre_w = 55;
- u3_noun* vec = u3a_malloc(all_w);
+ u3_noun* vec = u3a_malloc(all_w * sizeof(u3_noun));
// stuff list into an array
do {
// grow vec fib-wise
all_w += pre_w;
pre_w = len_w;
- vec = u3a_realloc(vec, all_w);
+ vec = u3a_realloc(vec, all_w * sizeof(u3_noun));
}
vec[len_w++] = i;
}
}
u3j_gate_lose(&sit_u);
u3a_free(vec);
- return pro;
}
+ return pro;
}
u3_noun
u3wb_reel(u3_noun cor)
|
fix add label to metakey area | @@ -81,7 +81,11 @@ BasicWindow {
}
}
}
-
+ Label {
+ id: metaKeyLabel
+ Layout.topMargin: defaultMargins
+ text: "Metakeys:"
+ }
BasicRectangle {
id: metaArea
|
Adding tol in primalResidual and dualResidual
Adding projection error in setErrorArray | @@ -53,7 +53,7 @@ double getStepLength(const double * const x, const double * const dx, const unsi
* \param rnorm is the relative norm of out = |out|/max{|velocity|, |H x globalVelocity|, |w|}
*/
void primalResidual(const double * velocity, NumericsMatrix * H, const double * globalVelocity, const double * w,
- double * out, double * rnorm);
+ double * out, double * rnorm, const double tol);
/**
@@ -67,7 +67,7 @@ void primalResidual(const double * velocity, NumericsMatrix * H, const double *
* \param rnorm is the relative 2-norm of out = |out| / max{|M x globalVelocity|, |f|, |H' x r|}
*/
void dualResidual(NumericsMatrix * M, const double * globalVelocity, NumericsMatrix * H, const double * reaction, const double * f,
- double * out, double * rnorm);
+ double * out, double * rnorm, const double tol);
/**
@@ -126,7 +126,7 @@ double relGap(NumericsMatrix * M, const double * f, const double * w, const doub
/* Establish an array of calculation errors */
void setErrorArray(double * error, const double pinfeas, const double dinfeas,
- const double dualgap, const double complem, const double complem_p);
+ const double dualgap, const double complem, const double complem_p, const double projerr);
/* Return the 2-norm of the difference between two vectors */
|
RAA489000: Organize header file
Put register definitions in ascending order and note some definitions
are no longer applicable.
BRANCH=None
TEST=make -j buildall | /* Vendor registers */
#define RAA489000_TCPC_SETTING1 0x80
+#define RAA489000_VBUS_CURRENT_TARGET 0x92
+#define RAA489000_VBUS_OCP_UV_THRESHOLD 0x94
#define RAA489000_TYPEC_SETTING1 0xC0
#define RAA489000_PD_PHYSICAL_SETTING1 0xE0
#define RAA489000_PD_PHYSICAL_PARAMETER1 0xE8
-#define RAA489000_VBUS_CURRENT_TARGET 0x92
-#define RAA489000_VBUS_OCP_UV_THRESHOLD 0x94
+/* TCPC_SETTING_1 */
+#define RAA489000_TCPCV1_0_EN BIT(0)
+#define RAA489000_TCPC_PWR_CNTRL BIT(4)
+/* VBUS_CURRENT_TARGET */
#define RAA489000_VBUS_CURRENT_TARGET_VALUE 0x61 /* 3.104A */
+
+/* VBUS_OCP_UV_THRESHOLD */
/* Detect voltage level of overcurrent protection during Sourcing VBUS */
#define RAA489000_OCP_THRESHOLD_VALUE 0x00BE /* 4.75V */
+/* TYPEC_SETTING1 - only older silicon */
/* Enables for reverse current protection */
#define RAA489000_SETTING1_IP2_EN BIT(9)
#define RAA489000_SETTING1_IP1_EN BIT(8)
/* CC debounce enable */
#define RAA489000_SETTING1_CC_DB_EN BIT(0)
-/* TCPC_SETTING_1 */
-#define RAA489000_TCPCV1_0_EN BIT(0)
-#define RAA489000_TCPC_PWR_CNTRL BIT(4)
-
/* PD_PHYSICAL_SETTING_1 */
#define RAA489000_PD_PHY_SETTING1_RECEIVER_EN BIT(9)
#define RAA489000_PD_PHY_SETTING1_SQUELCH_EN BIT(8)
|
free() to cJSON_free() | @@ -1041,7 +1041,7 @@ static void compose_patch(cJSON * const patches, const unsigned char * const ope
encode_string_as_pointer(full_path + path_length + 1, suffix);
cJSON_AddItemToObject(patch, "path", cJSON_CreateString((const char*)full_path));
- free(full_path);
+ cJSON_free(full_path);
}
if (value != NULL)
@@ -1100,7 +1100,7 @@ static void create_patches(cJSON * const patches, const unsigned char * const pa
* if size_t is an alias of unsigned long, or if it is bigger */
if (index > ULONG_MAX)
{
- free(new_path);
+ cJSON_free(new_path);
return;
}
sprintf((char*)new_path, "%s/%lu", path, (unsigned long)index); /* path of the current array element */
@@ -1115,7 +1115,7 @@ static void create_patches(cJSON * const patches, const unsigned char * const pa
* if size_t is an alias of unsigned long, or if it is bigger */
if (index > ULONG_MAX)
{
- free(new_path);
+ cJSON_free(new_path);
return;
}
sprintf((char*)new_path, "%lu", (unsigned long)index);
@@ -1126,7 +1126,7 @@ static void create_patches(cJSON * const patches, const unsigned char * const pa
{
compose_patch(patches, (const unsigned char*)"add", path, (const unsigned char*)"-", to_child);
}
- free(new_path);
+ cJSON_free(new_path);
return;
}
@@ -1168,7 +1168,7 @@ static void create_patches(cJSON * const patches, const unsigned char * const pa
/* create a patch for the element */
create_patches(patches, new_path, from_child, to_child, case_sensitive);
- free(new_path);
+ cJSON_free(new_path);
from_child = from_child->next;
to_child = to_child->next;
|
Add -fno-aligned-allocation to iOS compilation flags for compatibility with iOS 9 | @@ -40,7 +40,7 @@ endif(WIN32)
if(IOS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fobjc-arc -fmodules -fvisibility=hidden")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fobjc-arc -fmodules -stdlib=libc++ -std=c++17 -ftemplate-depth=1024 -fexceptions -frtti -fvisibility=hidden -fvisibility-inlines-hidden")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fobjc-arc -fmodules -stdlib=libc++ -std=c++17 -ftemplate-depth=1024 -fexceptions -frtti -fvisibility=hidden -fvisibility-inlines-hidden -fno-aligned-allocation")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Os")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Os")
set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -ObjC")
|
docs: ntpd -> chrony | @@ -6,7 +6,7 @@ issue the following:
% begin_ohpc_run
% ohpc_validation_comment Enable NTP services on SMS host
\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true,keepspaces]
-[sms](*\#*) systemctl enable ntpd.service
+[sms](*\#*) systemctl enable chronyd.service
[sms](*\#*) echo "server ${ntp_server}" >> /etc/ntp.conf
[sms](*\#*) systemctl restart ntpd
\end{lstlisting}
|
fix two clang compile warnings with src/program.c | @@ -630,7 +630,7 @@ static int get_osl_read_access_position(osl_relation_list_p rl,
osl_relation_list_p tmp = rl;
for (; tmp; tmp = tmp->next) {
- if ( (tmp->elt->type == OSL_TYPE_READ) )
+ if (tmp->elt->type == OSL_TYPE_READ)
num++;
if(tmp->elt == access)
@@ -3432,7 +3432,7 @@ PlutoMatrix *pluto_stmt_get_remapping(const Stmt *stmt, int **divs)
if (remap->val[i][i] <= -1) {
pluto_matrix_negate_row(remap, i);
}
- (*divs)[i] = abs(remap->val[i][i]);
+ (*divs)[i] = llabs(remap->val[i][i]);
}
// pluto_matrix_print(stdout, remap);
|
count zeroed PMKIDs and print result in status | @@ -120,6 +120,7 @@ unsigned long long int pmkidcount;
unsigned long long int pmkidapcount;
unsigned long long int pmkidstacount;
unsigned long long int zeroedpmkcount;
+unsigned long long int zeroedpmkidcount;
pmkidl_t *pmkidliste;
@@ -699,9 +700,13 @@ if(eapolwpa2kv3framecount != 0)
{
printf("EAPOL packets (WPA2 kever 3).....: %llu\n", eapolwpa2kv3framecount);
}
+if(zeroedpmkidcount != 0)
+ {
+ printf("PMKIDs (zeroed and useless)......: %llu\n", zeroedpmkidcount);
+ }
if(pmkidallcount != 0)
{
- printf("PMKIDs (total)...................: %llu\n", pmkidallcount);
+ printf("PMKIDs (not zeroed - total)......: %llu\n", pmkidallcount);
}
if(eapolpmkidwpaakmframecount != 0)
{
@@ -3539,6 +3544,7 @@ if(memcmp(mac_sta, &mac_broadcast, 6) == 0)
}
if(memcmp(pmkid->pmkid, &nullnonce, 16) == 0)
{
+ zeroedpmkidcount++;
return;
}
if(memcmp(&pmkid->pmkid[2], &nullnonce, 4) == 0)
@@ -6505,6 +6511,7 @@ pmkidapcount = 0;
pmkidstacount = 0;
pmkidallcount = 0;
zeroedpmkcount = 0;
+zeroedpmkidcount = 0;
eapolpmkidwpaakmframecount = 0;
eapolpmkidwpa1framecount = 0;
eapolpmkidwpa2framecount = 0;
|
News: Move compatibility section | @@ -65,6 +65,16 @@ The following section lists news about the [modules](https://www.libelektra.org/
The text below summarizes updates to the [C (and C++) based interface](https://www.libelektra.org/libraries/readme) of Elektra.
+### Compatibility
+
+As always, the ABI and API of kdb.h is fully compatible, i.e. programs
+compiled against an older 0.8 version of Elektra will continue to work
+(ABI) and you will be able to recompile programs without errors (API).
+
+- <<TODO>>
+- <<TODO>>
+- <<TODO>>
+
### <<Library1>>
@@ -144,16 +154,6 @@ you up to date with the multi-language support provided by Elektra.
- <<TODO>>
- <<TODO>>
-## Compatibility
-
-As always, the ABI and API of kdb.h is fully compatible, i.e. programs
-compiled against an older 0.8 version of Elektra will continue to work
-(ABI) and you will be able to recompile programs without errors (API).
-
-- <<TODO>>
-- <<TODO>>
-- <<TODO>>
-
## Website
|
added BEACON count (pwnagotchi) | @@ -130,6 +130,7 @@ static long int wdscount;
static long int beaconcount;
static long int beaconhcxcount;
static long int beaconerrorcount;
+static long int pagcount;
static long int proberesponsecount;
static long int proberequestcount;
static long int proberequestdirectedcount;
@@ -363,6 +364,7 @@ wdscount = 0;
beaconcount = 0;
beaconhcxcount = 0;
beaconerrorcount = 0;
+pagcount = 0;
proberesponsecount = 0;
proberequestcount = 0;
proberequestdirectedcount = 0;
@@ -478,6 +480,7 @@ if(skippedpacketcount > 0) printf("skipped packets..........................: %
if(fcsframecount > 0) printf("frames with correct FCS..................: %ld\n", fcsframecount);
if(wdscount > 0) printf("WIRELESS DISTRIBUTION SYSTEM.............: %ld\n", wdscount);
if(beaconcount > 0) printf("BEACON (total)...........................: %ld\n", beaconcount);
+if(pagcount > 0) printf("BEACON (pwnagotchi)......................: %ld\n", pagcount);
if(beaconhcxcount > 0) printf("BEACON (hcxhash2cap).....................: %ld\n", beaconhcxcount);
if(proberequestcount > 0) printf("PROBEREQUEST.............................: %ld\n", proberequestcount);
if(proberequestdirectedcount > 0) printf("PROBEREQUEST (directed)..................: %ld\n", proberequestdirectedcount);
@@ -3051,6 +3054,32 @@ if(fh_nmea != NULL) writegpwpl(macap);
return;
}
/*===========================================================================*/
+static inline bool processpag(uint8_t *macap, int vendorlen, uint8_t *ieptr)
+{
+static int c, p;
+static const uint8_t mac_pwag[6] =
+{
+0xde, 0xad, 0xbe, 0xef, 0xde, 0xad
+};
+
+if(ieptr[1] != 0xff) return false;
+if(vendorlen <= 0x78) return false;
+if(memcmp(&mac_pwag, macap, 6) != 0) return false;
+for(p = 2; p < vendorlen -75 ; p++)
+ {
+ if(memcmp(&ieptr[p], "identity", 8) == 0)
+ {
+ for(c = 0; c < 64; c++)
+ {
+ if(!isxdigit(ieptr[p +11 +c])) return false;
+ }
+ pagcount++;
+ return true;
+ }
+ }
+return false;
+}
+/*===========================================================================*/
static void process80211beacon(uint64_t beacontimestamp, uint8_t *macbc, uint8_t *macap, uint32_t beaconlen, uint8_t *beaconptr)
{
static int apinfolen;
@@ -3066,6 +3095,10 @@ if(memcmp(&mac_broadcast, macbc, 6) != 0)
}
apinfoptr = beaconptr +CAPABILITIESAP_SIZE;
apinfolen = beaconlen -CAPABILITIESAP_SIZE;
+if(apinfoptr[0] == TAG_PAG)
+ {
+ if(processpag(macap, apinfolen, apinfoptr) == true) return;
+ }
if(beaconlen < (int)IETAG_SIZE) return;
if(gettags(apinfolen, apinfoptr, &tags) == false) return;
if(tags.essidlen == 0) return;
|
enable debug clang++ compilation in azure pipelines | @@ -81,6 +81,11 @@ jobs:
CXX: clang++
BuildType: secure-clang
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON
+ Debug++ Clang:
+ CC: clang
+ CXX: clang++
+ BuildType: debug-clang
+ cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_USE_CXX=ON
steps:
- task: CMake@1
inputs:
|
Use ALLOCATE macro for initialisation | @@ -98,7 +98,7 @@ VM *initVM(bool repl, const char *scriptName, int argc, const char *argv[]) {
setupFilenameStack(vm, scriptName);
- vm->frames = GROW_ARRAY(vm, vm->frames, CallFrame, 0, vm->frameCapacity);
+ vm->frames = ALLOCATE(vm, CallFrame, vm->frameCapacity);
vm->initString = copyString(vm, "init", 4);
vm->replVar = copyString(vm, "_", 1);
|
Fix codegen for deprecated goto calls | @@ -407,6 +407,7 @@ class ScriptBuilder {
options: ScriptBuilderOptions;
dependencies: string[];
nextLabel: number;
+ labelLookup: Record<string, string>;
actorIndex: number;
stackPtr: number;
labelStackSize: Dictionary<number>;
@@ -447,6 +448,7 @@ class ScriptBuilder {
};
this.dependencies = [];
this.nextLabel = 1;
+ this.labelLookup = {};
this.actorIndex = options.entity
? getActorIndex(options.entity.id, options.scene)
: 0;
@@ -2939,12 +2941,12 @@ class ScriptBuilder {
this._stackPushConst(256);
this._if(".GTE", ".ARG0", ".ARG1", clampLabel, 1);
this._setConst("ARG0", 255);
- this.labelDefine(clampLabel);
+ this._label(clampLabel);
} else if (operation === ".SUB") {
this._stackPushConst(0);
this._if(".LTE", ".ARG0", ".ARG1", clampLabel, 1);
this._setConst("ARG0", 0);
- this.labelDefine(clampLabel);
+ this._label(clampLabel);
}
}
@@ -2973,12 +2975,12 @@ class ScriptBuilder {
this._stackPushConst(256);
this._if(".GTE", ".ARG0", ".ARG1", clampLabel, 1);
this._setConst("ARG0", 255);
- this.labelDefine(clampLabel);
+ this._label(clampLabel);
} else if (operation === ".SUB") {
this._stackPushConst(0);
this._if(".LTE", ".ARG0", ".ARG1", clampLabel, 1);
this._setConst("ARG0", 0);
- this.labelDefine(clampLabel);
+ this._label(clampLabel);
}
}
@@ -3011,12 +3013,12 @@ class ScriptBuilder {
this._stackPushConst(256);
this._if(".GTE", ".ARG0", ".ARG1", clampLabel, 1);
this._setConst("ARG0", 255);
- this.labelDefine(clampLabel);
+ this._label(clampLabel);
} else if (operation === ".SUB") {
this._stackPushConst(0);
this._if(".LTE", ".ARG0", ".ARG1", clampLabel, 1);
this._setConst("ARG0", 0);
- this.labelDefine(clampLabel);
+ this._label(clampLabel);
}
}
@@ -3470,11 +3472,19 @@ class ScriptBuilder {
};
labelDefine = (name: string) => {
- this._label(name);
+ if (!this.labelLookup[name]) {
+ const label = this.getNextLabel();
+ this.labelLookup[name] = label;
+ }
+ this._label(this.labelLookup[name]);
};
labelGoto = (name: string) => {
- this._jump(name);
+ if (!this.labelLookup[name]) {
+ const label = this.getNextLabel();
+ this.labelLookup[name] = label;
+ }
+ this._jump(this.labelLookup[name]);
};
// --------------------------------------------------------------------------
|
Output usage per a review comment during a demo of versioning. | @@ -3415,6 +3415,16 @@ void
__scope_main(void)
{
printf("Scope Version: " SCOPE_VER "\n");
+
+ char buf[64];
+ if (snprintf(buf, sizeof(buf), "/proc/%d/exe", getpid()) == -1) exit(0);
+ char path[1024] = {0};
+ if (readlink(buf, path, sizeof(path)) == -1) exit(0);
+ printf("\n");
+ printf(" Usage: LD_PRELOAD=%s <command name>\n ", path);
+ printf("\n");
+ printf("\n");
+ printf("\n");
exit(0);
}
|
Remove unneeded libraries from prepareTestImage
These libraries are now included by ops | @@ -26,8 +26,6 @@ func prepareTestImage(finalImage string) {
writeFile(filepath)
c.BaseVolumeSz = "32M"
- c.Files = append(c.Files, "/lib/x86_64-linux-gnu/libnss_dns.so.2")
- c.Files = append(c.Files, "/etc/ssl/certs/ca-certificates.crt")
c.Files = append(c.Files, filepath)
c.Args = append(c.Args, "longargument")
|
rune/libenclave: Fix spelling mistakes in skeleton README.md. | @@ -11,7 +11,7 @@ Refer to [this guide](https://github.com/alibaba/inclavare-containers/tree/maste
```shell
cd "${path_to_inclavare_containers}/rune/libenclave/internal/runtime/pal/skeleton"
make
-cp liberpal-skeletion.so /usr/lib
+cp liberpal-skeleton.so /usr/lib
```
---
|
Only report turn tate < 10 min/turn on web UI. | @@ -154,8 +154,8 @@ function GPSCtrl($rootScope, $scope, $state, $http, $interval) {
$scope.ahrs_gload = situation.AHRSGLoad.toFixed(2);
gMeter.update(situation.AHRSGLoad);
- if (situation.AHRSTurnRate> 0.25) {
- $scope.ahrs_turn_rate = (60/situation.AHRSTurnRate).toFixed(1); // minutes/turn
+ if (situation.AHRSTurnRate> 0.6031) {
+ $scope.ahrs_turn_rate = (6/situation.AHRSTurnRate).toFixed(1); // minutes/turn
} else {
$scope.ahrs_turn_rate = '\u221e';
}
|
Ensure binding numbers are less than 32;
We use u32 masks... | @@ -1121,6 +1121,8 @@ Shader* lovrShaderCreate(ShaderInfo* info) {
lovrThrow("Shader resource count exceeds resourcesPerShader limit (%d)", MAX_RESOURCES_PER_SHADER);
}
+ lovrCheck(resource->binding < 32, "Max resource binding number is %d", 32 - 1);
+
slots[index] = (gpu_slot) {
.number = resource->binding,
.type = resourceTypes[resource->type],
|
Use _NSGetEnviron() on Apple | #include <dirent.h>
#include <sys/types.h>
#include <sys/wait.h>
+#ifdef JANET_APPLE
+#include <crt_externs.h>
+#define environ (*_NSGetEnviron())
+#else
extern char **environ;
+#endif
#ifdef JANET_THREADS
#include <pthread.h>
#endif
|
router_readconfig: don't leak palloc on errors | @@ -1046,12 +1046,14 @@ router_readconfig(router *orig,
if ((buf = ra_malloc(palloc, st.st_size + 1)) == NULL) {
logerr("malloc failed for config file buffer\n");
+ ra_free(palloc);
router_free(ret);
return NULL;
}
if ((cnf = fopen(path, "r")) == NULL) {
logerr("failed to open config file '%s': %s\n", path, strerror(errno));
+ ra_free(palloc);
router_free(ret);
return NULL;
}
@@ -1063,6 +1065,7 @@ router_readconfig(router *orig,
if (router_yylex_init(&lptr) != 0) {
logerr("lex init failed\n");
+ ra_free(palloc);
router_free(ret);
return NULL;
}
@@ -1108,8 +1111,8 @@ router_readconfig(router *orig,
* included config */
ret->parser_err.msg = NULL;
router_yylex_destroy(lptr);
- router_free(ret);
ra_free(palloc);
+ router_free(ret);
return NULL;
}
router_yylex_destroy(lptr);
|
filter keys returned by kdb.get to ensure they are below root of query | @@ -172,20 +172,24 @@ def _remove_namespace_prefix(elektra_path):
#returns tuple of dirs, files of given path (does not include '.', '..')
def ls(os_path):
- #if os_path == "/":
- # return ({"user:", "system:", "spec:", "dir:", "/cascading:"}, [])
-
path = os_path_to_elektra_path(os_path)
+ root = kdb.Key(path)
is_root_level = len(path) > 1 and path.endswith("/") # special case
with _get_kdb_instance() as db:
ks = kdb.KeySet()
- db.get(ks, path)
+ db.get(ks, root)
+
+ #only retain keys that are below the root (kdb.get does not gurantee this property)
+ ks_filtered = kdb.KeySet()
+ for key in ks:
+ if key.isBelowOrSame(root):
+ ks_filtered.append(key)
path_without_namespace = _remove_namespace_prefix(path)
- result_keys_without_namespace = map(_remove_namespace_prefix, ks.unpack_names())
+ result_keys_without_namespace = map(_remove_namespace_prefix, ks_filtered.unpack_names())
below = {name.split(path_without_namespace)[1] for name in result_keys_without_namespace if is_path_prefix(path_without_namespace, name)}
dirs = {name.split("/")[0 if is_root_level else 1] for name in below if "/" in name}
|
doc: add known issue:5157 for building-from-source.rst
build with XML file, "TARGET_DIR=xxx" does not work | @@ -54,7 +54,9 @@ distribution. Refer to the :ref:`building-acrn-in-docker` user guide for
instructions on how to build ACRN using a container.
.. note::
- ACRN uses ``menuconfig``, a python3 text-based user interface (TUI) for configuring hypervisor options and using python's ``kconfiglib`` library.
+ ACRN uses ``menuconfig``, a python3 text-based user interface (TUI)
+ for configuring hypervisor options and using python's ``kconfiglib``
+ library.
Install the necessary tools for the following systems:
@@ -213,7 +215,7 @@ The BOARD specified is used to select a ``defconfig`` under
``RELEASE``) take no effect when generating a defconfig.
To modify the hypervisor configurations, you can either edit ``.config``
-manually, or you can invoke a TUI-based menuconfig--powered by kconfiglib--by
+manually, or you can invoke a TUI-based menuconfig (powered by kconfiglib) by
executing ``make menuconfig``. As an example, the following commands
(assuming that you are at the top level of the acrn-hypervisor directory)
generate a default configuration file for UEFI, allowing you to modify some
@@ -248,7 +250,7 @@ Now you can build all these components at once as follows:
The build results are found in the ``build`` directory. You can specify
a different Output folder by setting the ``O`` ``make`` parameter,
-for example: ``make O=build-nuc BOARD=nuc6cayh``.
+for example: ``make O=build-nuc BOARD=nuc7i7dnb``.
If you only need the hypervisor, use this command:
@@ -277,7 +279,10 @@ of the acrn-hypervisor directory):
information is retrieved from the corresponding ``BOARD_FILE`` and
``SCENARIO_FILE`` XML configuration files. The ``TARGET_DIR`` parameter
specifies what directory is used to store configuration files imported
- from XML files. If the ``TARGED_DIR`` is not specified, the original
+ from XML files. If the ``TARGET_DIR`` is not specified, the original
configuration files of acrn-hypervisor would be overridden.
+ In the 2.1 release, there is a known issue (:acrn-issue:`5157`) that
+ ``TARGET_DIR=xxx`` does not work.
+
Follow the same instructions to boot and test the images you created from your build.
|
[mod_fastcgi] decode chunked is cold code path
decode chunked from FastCGI backend is cold code path | @@ -382,12 +382,11 @@ static void fastcgi_get_packet_body(buffer * const b, handler_ctx * const hctx,
buffer_string_set_length(b, blen + packet->len - packet->padding);
}
+__attribute_cold__
+__attribute_noinline__
static int
mod_fastcgi_chunk_decode_transfer_cqlen (request_st * const r, chunkqueue * const src, const unsigned int len)
{
- if (!r->resp_decode_chunked)
- return http_chunk_transfer_cqlen(r, src, len);
-
if (0 == len) return 0;
/* specialized for mod_fastcgi to decode chunked encoding;
@@ -407,6 +406,14 @@ mod_fastcgi_chunk_decode_transfer_cqlen (request_st * const r, chunkqueue * cons
return 0;
}
+static int
+mod_fastcgi_transfer_cqlen (request_st * const r, chunkqueue * const src, const unsigned int len)
+{
+ return (!r->resp_decode_chunked)
+ ? http_chunk_transfer_cqlen(r, src, len)
+ : mod_fastcgi_chunk_decode_transfer_cqlen(r, src, len);
+}
+
static handler_t fcgi_recv_parse(request_st * const r, struct http_response_opts_t *opts, buffer *b, size_t n) {
handler_ctx *hctx = (handler_ctx *)opts->pdata;
int fin = 0;
@@ -469,7 +476,7 @@ static handler_t fcgi_recv_parse(request_st * const r, struct http_response_opts
hctx->send_content_body = 0;
}
} else if (hctx->send_content_body) {
- if (0 != mod_fastcgi_chunk_decode_transfer_cqlen(r, hctx->rb, packet.len - packet.padding)) {
+ if (0 != mod_fastcgi_transfer_cqlen(r, hctx->rb, packet.len - packet.padding)) {
/* error writing to tempfile;
* truncate response or send 500 if nothing sent yet */
fin = 1;
|
engine: fix wrong HTTP_SERVER macro | @@ -457,7 +457,7 @@ int flb_engine_start(struct flb_config *config)
struct flb_sched *sched;
/* HTTP Server */
-#ifdef FLB_HAVE_HTTP
+#ifdef FLB_HAVE_HTTP_SERVER
if (config->http_server == FLB_TRUE) {
flb_http_server_start(config);
}
|
Added and enabled branch coverage support to pytest | @@ -193,6 +193,7 @@ def pytest_configure(config):
data_file=cov_prefix,
concurrency=['multiprocessing', 'thread'],
auto_data=True,
+ branch=True,
# debug=['pid', 'trace', 'sys', 'config'],
)
config.coverage = cov
|
publish: return JS number revision
fixes fixes | @@ -87,7 +87,7 @@ export function getLatestRevision(node: GraphNode): [number, string, string, Pos
return empty
}
const [title, body] = rev.post.contents as TextContent[];
- return [revNum, title.text, body.text, rev.post];
+ return [revNum.toJSNumber(), title.text, body.text, rev.post];
}
export function getComments(node: GraphNode): GraphNode {
|
actually build webg | -all: hw web hwg
+all: hw web hwg webg
hwg: hwg.go
go build hwg.go
@@ -9,7 +9,10 @@ hw: hw.c
web: web.c
cc web.c -g -o web
+webg: webg.go
+ go build webg.go
+
clean:
- rm hw web hwg
+ rm hw web hwg webg
|
collections: loosen property access in unread marking
Fixes urbit/landscape#999 | @@ -46,8 +46,8 @@ export function LinkBlocks(props: LinkBlocksProps) {
);
useEffect(() => {
- const { unreads } = useHarkState
- .getState().unreads.graph?.[association.resource]?.['/'];
+ const unreads = useHarkState.getState()
+ .unreads.graph?.[association.resource]?.['/']?.unreads || new Set<string>();
Array.from((unreads as Set<string>)).forEach((u) => {
airlock.poke(markEachAsRead(association.resource, '/', u));
});
|
Added png-response | ^- http-event:http
[%start [200 ['content-type' 'text/css']~] [~ oct-css] %.y]
::
+ ++ png-response
+ |= oct-png=octs
+ ^- http-event:http
+ [%start [200 ['content-type' 'image/png']~] [~ oct-png] %.y]
+ ::
+ ++ woff2-response
+ |= oct-woff=octs
+ ^- http-event:http
+ [%start [200 ['content-type' 'font/woff2']~] [~ oct-woff] %.y]
+ ::
++ not-found
^- http-event:http
[%start [404 ~] ~ %.y]
|
schema tree BUGFIX obsolete assert | @@ -723,7 +723,6 @@ lys_set_implemented(struct lys_module *mod, const char **features)
/* implement this module and any other required modules, recursively */
ret = lys_set_implemented_r(mod, features, &unres);
- assert(mod == unres.implementing.objs[0]);
/* the first module being implemented is finished, resolve global unres, consolidate the set */
if (!ret) {
|
mangle: const-ize functions | @@ -64,22 +64,6 @@ static inline size_t mangle_getOffSet(run_t* run) {
return util_rndGet(0, run->dynamicFileSz - 1);
}
-static inline void mangle_Overwrite(
- run_t* run, size_t off, const uint8_t* src, size_t len, bool printable) {
- if (len == 0) {
- return;
- }
- size_t maxToCopy = run->dynamicFileSz - off;
- if (len > maxToCopy) {
- len = maxToCopy;
- }
-
- memmove(&run->dynamicFile[off], src, len);
- if (printable) {
- util_turnToPrintable(&run->dynamicFile[off], len);
- }
-}
-
static inline void mangle_Move(run_t* run, size_t off_from, size_t off_to, size_t len) {
if (off_from >= run->dynamicFileSz) {
return;
@@ -101,6 +85,22 @@ static inline void mangle_Move(run_t* run, size_t off_from, size_t off_to, size_
memmove(&run->dynamicFile[off_to], &run->dynamicFile[off_from], len);
}
+static inline void mangle_Overwrite(
+ run_t* run, size_t off, const uint8_t* src, size_t len, bool printable) {
+ if (len == 0) {
+ return;
+ }
+ size_t maxToCopy = run->dynamicFileSz - off;
+ if (len > maxToCopy) {
+ len = maxToCopy;
+ }
+
+ memmove(&run->dynamicFile[off], src, len);
+ if (printable) {
+ util_turnToPrintable(&run->dynamicFile[off], len);
+ }
+}
+
static inline size_t mangle_Inflate(run_t* run, size_t off, size_t len, bool printable) {
if (run->dynamicFileSz >= run->global->mutate.maxInputSz) {
return 0;
@@ -730,7 +730,7 @@ static void mangle_ASCIINumOverwrite(run_t* run, bool printable) {
char buf[20];
snprintf(buf, sizeof(buf), "%-19" PRId64, (int64_t)util_rnd64());
- mangle_Overwrite(run, off, (uint8_t*)buf, len, printable);
+ mangle_Overwrite(run, off, (const uint8_t*)buf, len, printable);
}
static void mangle_ASCIINumInsert(run_t* run, bool printable) {
@@ -740,7 +740,7 @@ static void mangle_ASCIINumInsert(run_t* run, bool printable) {
char buf[20];
snprintf(buf, sizeof(buf), "%-19" PRId64, (int64_t)util_rnd64());
- mangle_Insert(run, off, (uint8_t*)buf, len, printable);
+ mangle_Insert(run, off, (const uint8_t*)buf, len, printable);
}
static void mangle_SpliceOverwrite(run_t* run, bool printable) {
|
Improve error messages for unknown types; | @@ -141,6 +141,7 @@ void _luax_pushtype(lua_State* L, const char* type, uint64_t hash, void* object)
// Allocate userdata
Proxy* p = (Proxy*) lua_newuserdata(L, sizeof(Proxy));
luaL_getmetatable(L, type);
+ lovrAssert(lua_istable(L, -1), "Unknown type '%s' (maybe its module needs to be required)", type);
lua_setmetatable(L, -2);
lovrRetain(object);
p->object = object;
|
stm32f4: fix PLL clock initialization
Fix setting HSI as main clock source in pre-configuration; it was
missing the PLLState configuration which would result in random
behavior. | @@ -64,14 +64,13 @@ SystemClock_Config(void)
/*
* Configure HSI as PLL source; this avoids an error reconfiguring the
- * PLL when it is already set has the system clock source.
+ * PLL when it is already set as the system clock source.
*/
osc_init.OscillatorType = RCC_OSCILLATORTYPE_HSI;
osc_init.HSIState = RCC_HSI_ON;
osc_init.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
osc_init.PLL.PLLSource = RCC_PLLSOURCE_HSI;
- osc_init.PLL.PLLN = RCC_PLLCFGR_PLLN_0;
- osc_init.PLL.PLLP = RCC_PLLCFGR_PLLP_0;
+ osc_init.PLL.PLLState = RCC_PLL_NONE;
status = HAL_RCC_OscConfig(&osc_init);
if (status != HAL_OK) {
|
VERSION bump to version 1.0.0 | @@ -31,12 +31,23 @@ set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
set(CMAKE_C_FLAGS_PACKAGE "-g -O2 -DNDEBUG")
set(CMAKE_C_FLAGS_DEBUG "-g -O0")
-# set version
-set(LIBNETCONF2_MAJOR_VERSION 0)
-set(LIBNETCONF2_MINOR_VERSION 12)
-set(LIBNETCONF2_MICRO_VERSION 55)
+# Version of the project
+# Generic version of not only the library. Major version is reserved for really big changes of the project,
+# minor version changes with added functionality (new tool, functionality of the tool or library, ...) and
+# micro version is changed with a set of small changes or bugfixes anywhere in the project.
+set(LIBNETCONF2_MAJOR_VERSION 1)
+set(LIBNETCONF2_MINOR_VERSION 0)
+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})
+
+# Version of the library
+# Major version is changed with every backward non-compatible API/ABI change in libyang, minor version changes
+# with backward compatible change and micro version is connected with any internal change of the library.
+set(LIBNETCONF2_MAJOR_SOVERSION 1)
+set(LIBNETCONF2_MINOR_SOVERSION 0)
+set(LIBNETCONF2_MICRO_SOVERSION 0)
+set(LIBNETCONF2_SOVERSION_FULL ${LIBNETCONF2_MAJOR_SOVERSION}.${LIBNETCONF2_MINOR_SOVERSION}.${LIBNETCONF2_MICRO_SOVERSION})
+set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_SOVERSION})
# build options
option(ENABLE_SSH "Enable NETCONF over SSH support (via libssh)" ON)
@@ -106,7 +117,7 @@ else ()
endif()
if (NOT RPM_BUILDER)
- message(WARNING "Missing tools (rpm package) for building rpm package. \nYou won't be able to generate rpm package from source code.\nCompiling libnetconf2 should still works fine.")
+ message(WARNING "Missing tools (rpm package) for building rpm package. \nYou won't be able to generate rpm package from source code.\nCompiling libnetconf2 should still work fine.")
else ()
# target for local build rpm package
string(REPLACE ${PROJECT_SOURCE_DIR} "." EXCLUDE_BUILD_DIR ${PROJECT_BINARY_DIR})
@@ -157,7 +168,7 @@ set(headers
# libnetconf2 target
add_library(netconf2 SHARED ${libsrc})
-set_target_properties(netconf2 PROPERTIES VERSION ${LIBNETCONF2_VERSION} SOVERSION ${LIBNETCONF2_SOVERSION})
+set_target_properties(netconf2 PROPERTIES VERSION ${LIBNETCONF2_VERSION} SOVERSION ${LIBNETCONF2_SOVERSION_FULL})
if((CMAKE_BUILD_TYPE STREQUAL debug) OR (CMAKE_BUILD_TYPE STREQUAL Package))
option(ENABLE_BUILD_TESTS "Build tests" ON)
|
Send Server-Start in a single TCP message
Optimise the sending of the Server-Start command by sending all 48
bytes in a single message.
This improves compatibility with clients which expect the command to
be sent in a single message, and also makes better use of the network
resources. | @@ -331,17 +331,11 @@ _OWPWriteServerStart(
}
/*
- * Write first two blocks of message - not encrypted
+ * Set first two blocks of message - not encrypted
*/
memset(&buf[0],0,15);
*(uint8_t *)&buf[15] = code & 0xff;
memcpy(&buf[16],cntrl->writeIV,16);
- if((len = I2Writeni(cntrl->sockfd,buf,32,intr)) != 32){
- if((len < 0) && *intr && (errno == EINTR)){
- return OWPErrFATAL;
- }
- return OWPErrFATAL;
- }
if(code == OWP_CNTRL_ACCEPT){
/*
@@ -349,26 +343,30 @@ _OWPWriteServerStart(
* func.
*/
tstamp.owptime = uptime;
- _OWPEncodeTimeStamp((uint8_t *)&buf[0],&tstamp);
- memset(&buf[8],0,8);
+ _OWPEncodeTimeStamp((uint8_t *)&buf[32],&tstamp);
+ memset(&buf[40],0,8);
cntrl->state = _OWPStateRequest;
}
else{
/* encryption not valid - reset to clear mode and reject */
cntrl->mode = OWP_MODE_OPEN;
- memset(&buf[0],0,16);
+ memset(&buf[32],0,16);
cntrl->state = _OWPStateInvalid;
}
/*
- * Add this block to HMAC, and then send it.
+ * Add final block to HMAC, and then send all 3 blocks
* No HMAC digest field in this message - so this block gets
* include as part of the text for the next digest sent in the
* 'next' message.
*/
- _OWPSendHMACAdd(cntrl,buf,1);
- if(_OWPSendBlocksIntr(cntrl,(uint8_t *)buf,1,intr) != 1){
+ _OWPSendHMACAdd(cntrl,&buf[32],1);
+
+ if (cntrl->mode & OWP_MODE_DOCIPHER_CNTRL)
+ _OWPEncryptBlocks(cntrl, (uint8_t *)&buf[32], 1, &buf[32]);
+
+ if((len = I2Writeni(cntrl->sockfd,buf,48,intr)) != 48){
if((len < 0) && *intr && (errno == EINTR)){
return OWPErrFATAL;
}
|
board/kinox/led.c: Format with clang-format
BRANCH=none
TEST=none | @@ -242,8 +242,7 @@ static int command_led(int argc, char **argv)
}
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(led, command_led,
- "[debug|red|green|off|alert|crit]",
+DECLARE_CONSOLE_COMMAND(led, command_led, "[debug|red|green|off|alert|crit]",
"Turn on/off LED.");
void led_get_brightness_range(enum ec_led_id led_id, uint8_t *brightness_range)
|
windows sample readme update | @@ -159,9 +159,9 @@ For Windows, the command line examples are based on PowerShell. While Windows d
In this example, it is "2A1B236A3839A2D8070E9A0EE21C9E1488DDBA7E".
It will be used to create the logical device on your Azure IoT Hub.
-4. Download the [Baltimore PEM CA](https://cacerts.digicert.com/BaltimoreCyberTrustRoot.crt.pem) into the directory.
+4. Download the [Baltimore PEM CA](https://cacerts.digicert.com/BaltimoreCyberTrustRoot.crt.pem) into the directory. Note that Windows might try and change the extension to `.cer` instead of `.pem`. Rename the file to a `.pem` extension if it does that.
- You should have it saved as shown bellow:
+ You should have it saved as shown below:
```powershell
C:\azure-sdk-for-c\sdk\samples\iot> ls BaltimoreCyberTrustRoot.crt.pem
|
Fix lovr.graphics.line(nil); | @@ -243,7 +243,9 @@ static uint32_t luax_getvertexcount(lua_State* L, int index) {
return tableType == LUA_TNUMBER ? count / 3 : count;
} else if (type == LUA_TNUMBER) {
return (lua_gettop(L) - index + 1) / 3;
- } else {
+ } else if (type == LUA_TNONE || type == LUA_TNIL) {
+ return 0;
+ } else { // vec3
return lua_gettop(L) - index + 1;
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.