message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Initialize marked_pid_zero_at_time in gp_replication unit test. | @@ -49,6 +49,12 @@ test_GetMirrorStatus_Pid_Zero(void **state)
max_wal_senders = 1;
WalSndCtl = &data;
data.walsnds[0].pid = 0;
+ /*
+ * This would make sure Mirror is reported as DOWN, as grace period
+ * duration is taken into account.
+ */
+ data.walsnds[0].marked_pid_zero_at_time =
+ ((pg_time_t) time(NULL)) - FTS_MARKING_MIRROR_DOWN_GRACE_PERIOD;
expect_lwlock(LW_SHARED);
GetMirrorStatus(&response);
|
rune/libcontainer: Generate Enclave Device /dev/gsgx for graphene-sgx LibOS
Support to automatically mount the /dev/gsgx to enclave container. | @@ -395,7 +395,7 @@ func createEnclaveDevices(devs []*configs.Device, etype string, fn func(dev *con
func genEnclavePathTemplate(etype string) []string {
switch etype {
case configs.EnclaveHwIntelSgx:
- return []string{"/dev/isgx", "/dev/sgx/enclave"}
+ return []string{"/dev/isgx", "/dev/sgx/enclave", "/dev/gsgx"}
default:
return nil
}
@@ -415,6 +415,11 @@ func genEnclaveDeviceTemplate(etype string) []*configs.Device {
Path: "/dev/sgx/enclave",
Major: 10,
},
+ &configs.Device{
+ Type: 'c',
+ Path: "/dev/gsgx",
+ Major: 10,
+ },
}
default:
return nil
|
oc_obt discovery: explicitly check owned/un-owned | @@ -817,14 +817,18 @@ obt_check_owned(oc_client_response_t *data)
{
oc_remove_delayed_callback(data->user_data, free_device);
- bool owned = false;
+ if (data->code >= OC_STATUS_BAD_REQUEST) {
+ return;
+ }
+
+ int owned = -1;
oc_rep_t *rep = data->payload;
while (rep != NULL) {
switch (rep->type) {
case OC_REP_BOOL:
if (oc_string_len(rep->name) == 5 &&
memcmp(oc_string(rep->name), "owned", 5) == 0) {
- owned = rep->value.boolean;
+ owned = (int)rep->value.boolean;
}
break;
default:
@@ -833,9 +837,13 @@ obt_check_owned(oc_client_response_t *data)
rep = rep->next;
}
+ if (owned == -1) {
+ return;
+ }
+
oc_device_t *device = (oc_device_t *)data->user_data;
- if (!owned) {
+ if (owned == 0) {
oc_list_add(oc_cache, device);
} else {
/* Device is owned by somebody else */
|
[ArgoBinding] fix remove observer | @@ -129,7 +129,7 @@ NSString *const kArgoConstString_Dot = @".";
NSObject<ArgoListenerProtocol> *object = (NSObject<ArgoListenerProtocol> *)self;
[object removeListenerWithOBID:token.tokenID];
- for (int i = 1; i < paths.count; i++) {
+ for (int i = 0; i < paths.count; i++) {
NSString *key = paths[i];
object = (id<ArgoListenerProtocol>)[object lua_get:key];
[object removeListenerWithOBID:token.tokenID];
|
DOC:Fix typos in x509v3_config.pod
CLA: trivial | @@ -60,7 +60,7 @@ The following sections describe each supported extension in detail.
This is a multi valued extension which indicates whether a certificate is
a CA certificate. The first (mandatory) name is B<CA> followed by B<TRUE> or
-B<FALSE>. If B<CA> is B<TRUE> then an optional B<pathlen> name followed by an
+B<FALSE>. If B<CA> is B<TRUE> then an optional B<pathlen> name followed by a
non-negative value can be included.
For example:
|
primus: modify fan rpm range
BRANCH=none
TEST=make -j BOARD=primus
TEST=verified by thermal team | @@ -31,15 +31,12 @@ static const struct fan_conf fan_conf_0 = {
};
/*
- * TOOD(b/180681346): need to update for real fan
- *
- * Prototype fan spins at about 7200 RPM at 100% PWM.
- * Set minimum at around 30% PWM.
+ * Set maximum rpm at 4800/ minimum rpm at 1800.
*/
static const struct fan_rpm fan_rpm_0 = {
- .rpm_min = 2200,
- .rpm_start = 2200,
- .rpm_max = 7200,
+ .rpm_min = 1800,
+ .rpm_start = 1800,
+ .rpm_max = 4800,
};
const struct fan_t fans[FAN_CH_COUNT] = {
|
client session BUGFIX do not write to NULL out | @@ -402,7 +402,7 @@ hostkey_not_known:
break;
case SSH_SERVER_ERROR:
- fprintf(out, "SSH error: %s", ssh_get_error(session));
+ ERR("SSH error: %s", ssh_get_error(session));
goto error;
}
|
perf-tools/pdtoolkit:
Revert "remove configure from %install (#624)"
This reverts commit | @@ -61,6 +61,13 @@ make %{?_smp_mflags}
%install
%ohpc_setup_compiler
+./configure -prefix=%buildroot%{install_path} \
+%if "%{compiler_family}" == "intel"
+ -icpc
+%else
+ -GNU
+%endif
+
export DONT_STRIP=1
make %{?_smp_mflags} install
|
remove unwanted argument to sprintf | @@ -22,7 +22,7 @@ func getStartUsage(version string) string {
- Extraction of the filter input to /usr/lib/appscope/scope_filter or /tmp/appscope/scope_filter
- Attach to all existing "allowed" processes defined in the filter file
- Install etc/profile.d/scope.sh script to preload /usr/lib/appscope/%s/libscope.so if it exists
- - Modify the relevant service configurations to preload /usr/lib/appscope/%s/libscope.so or /tmp/appscope/%s/libscope.so`, version, version, version, version, version, version)
+ - Modify the relevant service configurations to preload /usr/lib/appscope/%s/libscope.so or /tmp/appscope/%s/libscope.so`, version, version, version, version, version)
}
// startCmd represents the start command
|
machinarium: update system errno too on error | @@ -30,6 +30,9 @@ static inline void
mm_errno_set(int value)
{
mm_scheduler_current(&mm_self->scheduler)->errno_ = value;
+
+ /* update system errno as well */
+ errno = value;
}
static inline int
|
core: updated the TLS management macros and added instance safe TLS initialization | #include <monkey/mk_info.h>
+#define MK_INIT_INITIALIZE_TLS_UNIVERSAL() \
+ /* mk_utils.c */ \
+ pthread_key_create(&mk_utils_error_key, NULL); \
+ /* mk_lib.c */ \
+ pthread_key_create(&mk_server_fifo_key, NULL);
+
#ifdef MK_HAVE_C_TLS /* Use Compiler Thread Local Storage (TLS) */
/* mk_cache.c */
@@ -47,7 +53,10 @@ extern __thread struct mk_server_timeout *mk_tls_server_timeout;
/* TLS helper macros */
#define MK_TLS_SET(key, val) key=val
#define MK_TLS_GET(key) key
-#define MK_TLS_INIT() do {} while (0)
+#define MK_TLS_INIT(key) do {} while (0)
+#define MK_TLS_DEFINE(type, name) __thread type *name;
+
+#define MK_INIT_INITIALIZE_TLS() do {} while (0)
#else /* Use Posix Thread Keys */
@@ -73,7 +82,10 @@ pthread_key_t mk_tls_server_timeout;
#define MK_TLS_SET(key, val) pthread_setspecific(key, (void *) val)
#define MK_TLS_GET(key) pthread_getspecific(key)
-#define MK_TLS_INIT() \
+#define MK_TLS_INIT(key) pthread_key_create(&key, NULL)
+#define MK_TLS_DEFINE(type, name) pthread_key_t name;
+
+#define MK_INIT_INITIALIZE_TLS() \
/* mk_cache.c */ \
pthread_key_create(&mk_tls_cache_iov_header, NULL); \
pthread_key_create(&mk_tls_cache_header_cl, NULL); \
|
VERSION bump to version 2.0.218 | @@ -61,7 +61,7 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
# set version of the project
set(LIBYANG_MAJOR_VERSION 2)
set(LIBYANG_MINOR_VERSION 0)
-set(LIBYANG_MICRO_VERSION 217)
+set(LIBYANG_MICRO_VERSION 218)
set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION})
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
|
dev-tools/hwloc: remove now-unused chmod that is commented out | @@ -98,9 +98,6 @@ autoreconf --force --install
%install
%{__make} install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
-#Fix wrong permition on file hwloc-assembler-remote => I have reported this to upstream already
-#%{__chmod} 0755 %{buildroot}%{install_path}/bin/hwloc-assembler-remote
-
# We don't ship .la files.
%{__rm} -rf %{buildroot}%{install_path}/lib/libhwloc.la
|
external/stress_tool: remove unused variable
remove unused variable | @@ -111,7 +111,6 @@ void _run_smoke(st_smoke *smoke)
st_tc_result ret;
st_func *unit = smoke->func;
st_stability *stab = smoke->stability;
- st_performance *perf = smoke->performance;
print_smoke_title(smoke);
|
DEV: Basic cluster state, handle APS confirm | @@ -545,6 +545,14 @@ void DEV_BasicClusterStateHandler(Device *device, const Event &event)
d->setState(DEV_GetDeviceDescriptionHandler);
}
}
+ else if (event.what() == REventApsConfirm)
+ {
+ Q_ASSERT(event.deviceKey() == device->key());
+ if (d->readResult.apsReqId == EventApsConfirmId(event) && EventApsConfirmStatus(event) != deCONZ::ApsSuccessStatus)
+ {
+ d->setState(DEV_InitStateHandler);
+ }
+ }
else if (event.what() == RAttrManufacturerName || event.what() == RAttrModelId)
{
DBG_Printf(DBG_INFO, "DEV received %s: 0x%016llX\n", event.what(), device->key());
|
python test_table: update number messages | @@ -44,7 +44,7 @@ def test_table_count():
Test number of available messages to deserialize.
"""
- number_of_messages = 174
+ number_of_messages = 182
assert len(_SBP_TABLE) == number_of_messages
def test_table_unqiue_count():
|
nvmlSuccess default false | @@ -5,7 +5,7 @@ libnvml_loader nvml("libnvidia-ml.so.1");
nvmlReturn_t result;
nvmlDevice_t nvidiaDevice;
-bool nvmlSuccess;
+bool nvmlSuccess = false;
unsigned int nvidiaTemp;
struct nvmlUtilization_st nvidiaUtilization;
|
re-ordered method | @@ -469,6 +469,14 @@ extern u16 windowWidthSft;
*/
void VDP_init();
+/**
+ * \brief
+ * Reset background plane and palette.
+ *
+ * Clear background plans, reset palette to grey / red / green / blue and reset scrolls.
+ */
+void VDP_resetScreen();
+
/**
* \brief
* Get VDP register value.
@@ -869,15 +877,7 @@ void VDP_waitVInt();
/**
* \brief
- * Reset background plane and palette.
- *
- * Clear background plans, reset palette to grey / red / green / blue and reset scrolls.
- */
-void VDP_resetScreen();
-
-/**
- * \brief
- * Return an enhanced V Counter representation
+ * Return an enhanced V Counter representation.
*
* Using direct V counter from VDP may give troubles as the VDP V-Counter rollback during V-Blank period.<br>
* This function aim to make ease the use of V-Counter by adjusting it to a [0-255] range where 0 is the start of VBlank area and 255 the end of active display area.
|
Small typo in manpage of x509(1)
GH: | @@ -703,7 +703,7 @@ Display the "Subject Alternative Name" extension of a certificate:
openssl x509 -in cert.pem -noout -ext subjectAltName
-Display the more extensions of a certificate:
+Display more extensions of a certificate:
openssl x509 -in cert.pem -noout -ext subjectAltName,nsCertType
|
Updates comments in mbedtls_utils.c | /*
- * Convert PEM to DER
- *
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
*/
/**
- * @file pem2der.c.c
- * @brief Certificate conversion from PEM to DER format
+ * @file mbedtls_utils.c
+ * @brief Helper functions originating from mbedTLS.
*/
/* Standard includes. */
|
Don't repeat tests iterscale times | @@ -578,7 +578,10 @@ bool proc_io_buffers(const char* (*codec_func)(wuffs_base__io_buffer*,
}
uint64_t n_bytes = 0;
uint64_t i;
- uint64_t iters = iters_unscaled * iterscale;
+ uint64_t iters = iters_unscaled;
+ if (bench) {
+ iters *= iterscale;
+ }
for (i = 0; i < iters; i++) {
got.meta.wi = 0;
src.meta.ri = gt->src_offset0;
|
[VFS] Use macro to control the aos uart instance
- Add macro AOS_UART for the uart instance, this
macro is uart_0 by default, application could define
in board level to override it. | @@ -578,14 +578,18 @@ int aos_mkdir(const char *path)
return ret;
}
-extern uart_dev_t uart_0;
+#ifndef AOS_UART
+#define AOS_UART uart_0
+#endif
+
+extern uart_dev_t AOS_UART;
int32_t aos_uart_send(void *data, uint32_t size, uint32_t timeout)
{
- return hal_uart_send(&uart_0, data, size, timeout);
+ return hal_uart_send(&AOS_UART, data, size, timeout);
}
int32_t aos_uart_recv(void *data, uint32_t expect_size, uint32_t *recv_size, uint32_t timeout)
{
- return hal_uart_recv_II(&uart_0, data, expect_size, recv_size, timeout);
+ return hal_uart_recv_II(&AOS_UART, data, expect_size, recv_size, timeout);
}
|
Fix header unit path in module mapper | @@ -36,11 +36,10 @@ function _get_module_mapper()
return mapper_file
end
--- add a module or header unit into the mapper
+-- add a module into the mapper
--
-- e.g
-- -fmodule-file=foo=build/.gens/Foo/rules/modules/cache/foo.ifc
--- -fmodule-file=foo=build/.gens/Foo/rules/modules/cache/foo.ifc
--
function _add_module_to_mapper(target, file, module, bmi)
local modulefileflag = get_modulefileflag(target)
@@ -54,6 +53,22 @@ function _add_module_to_mapper(target, file, module, bmi)
f:close()
end
+-- add a header unit into the mapper
+--
+-- e.g
+-- -fmodule-file=build/.gens/Foo/rules/modules/cache/foo.hpp.ifc
+--
+function _add_headerunit_to_mapper(target, file, bmi)
+ local modulefileflag = get_modulefileflag(target)
+ for line in io.lines(file) do
+ if line:startswith(modulefileflag .. bmi) then
+ return
+ end
+ end
+ local f = io.open(file, "a")
+ f:print("%s%s", modulefileflag, bmi)
+ f:close()
+end
-- load module support for the current target
function load(target)
@@ -175,13 +190,13 @@ function generate_stl_headerunits_for_batchcmds(target, batchcmds, headerunits,
for i, headerunit in ipairs(headerunits) do
local bmifile = path.join(stlcachedir, headerunit.name .. get_bmi_extension())
if not os.isfile(bmifile) then
- local args = {modulecachepathflag .. stlcachedir, "-c", "-o", bmifile, "-x", "c++-system-header", headerunit.path}
+ local args = {modulecachepathflag .. stlcachedir, "-c", "-o", bmifile, "-x", "c++-system-header", headerunit.name}
batchcmds:show_progress(opt.progress, "${color.build.object}generating.cxx.headerunit.bmi %s", headerunit.name)
batchcmds:vrunv(compinst:program(), table.join(compinst:compflags({target = target}), args))
-- libc++ have a builtin module mapper
if not target:data_set("cxx.modules.use_libc++") then
- _add_module_to_mapper(target, mapper_file, headerunit.name, bmifile)
+ _add_headerunit_to_mapper(target, mapper_file, bmifile)
end
end
depmtime = math.max(depmtime, os.mtime(bmifile))
@@ -234,7 +249,7 @@ function generate_user_headerunits_for_batchcmds(target, batchcmds, headerunits,
batchcmds:show_progress(opt.progress, "${color.build.object}generating.cxx.headerunit.bmi %s", headerunit.name)
batchcmds:vrunv(compinst:program(), table.join(compinst:compflags({target = target}), args))
batchcmds:add_depfiles(headerunit.path)
- _add_module_to_mapper(target, mapper_file, headerunit.name, bmifile)
+ _add_headerunit_to_mapper(target, mapper_file, bmifile)
depmtime = math.max(depmtime, os.mtime(bmifile))
end
|
Document nvm library is not threadsafe | * The version is formatted as MM.mm.hh.bbbb where MM is the 2-digit major version (00-99), mm is the 2-digit minor version (00-99), hh is the 2-digit hot fix number (00-99), and bbbb is the 4-digit build number (0000-9999).
* The following C macros and interfaces are provided to retrieve the native API version information.
*
+ * @subsection Concurrency
+ * The Management Library is not thread-safe.
+ *
* <table>
* <tr><td>Synopsis</td><td><strong>int nvm_get_major_version</strong>();</td></tr>
* <tr><td>Description</td><td>Retrieve the native API library major version number (00-99).</td></tr>
|
daos: conditional compile daos_pool_connect
A parameter is being removed from daos_pool_connect
in an upcoming version.
This conditionally compiles to work with both versions of daos. | @@ -132,8 +132,13 @@ int daos_connect(
/* Connect to DAOS pool */
if (connect_pool) {
daos_pool_info_t pool_info = {0};
+#if DAOS_API_VERSION_MAJOR < 1
rc = daos_pool_connect(pool_uuid, NULL, NULL, DAOS_PC_RW,
poh, &pool_info, NULL);
+#else
+ rc = daos_pool_connect(pool_uuid, NULL, DAOS_PC_RW,
+ poh, &pool_info, NULL);
+#endif
if (rc != 0) {
MFU_LOG(MFU_LOG_ERR, "Failed to connect to pool");
goto bcast;
|
SOVERSION bump to version 2.24.4 | @@ -66,7 +66,7 @@ set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
set(LIBYANG_MINOR_SOVERSION 24)
-set(LIBYANG_MICRO_SOVERSION 3)
+set(LIBYANG_MICRO_SOVERSION 4)
set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION})
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
|
(cargo-release) version 4.0.3 | [package]
name = "sbp2json"
-version = "4.0.3-unreleased"
+version = "4.0.3"
description = "Rust native implementation of SBP (Swift Binary Protocol) to JSON conversion tools"
authors = ["Swift Navigation <[email protected]>"]
edition = "2018"
@@ -17,7 +17,7 @@ categories = ["parsing"]
keywords = ["encoding", "parsing"]
[dependencies.sbp]
-path = "../sbp" # TODO: replace with published `sbp` crate version
+version = "4.0.3"
features = ["json"]
[dependencies]
|
docs: include libibmad5 for sles/opa | @@ -7,7 +7,7 @@ support using base distro-provided drivers to the compute image.
% ohpc_indent 5
\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true]
# Add OPA support and enable
-[sms](*\#*) (*\chrootinstall*) opa-basic-tools
+[sms](*\#*) (*\chrootinstall*) opa-basic-tools libibmad5
[sms](*\#*) (*\chrootinstall*) libpsm2-2 libpsm2-compat
[sms](*\#*) chroot $CHROOT systemctl enable rdma
\end{lstlisting}
|
migrateGetSocket() cleanup..
I think parameter c is only useful to get client reply.
Besides, other commands' host and port parameters may not be the at index 1 and 2. | @@ -6097,7 +6097,7 @@ migrateCachedSocket* migrateGetSocket(client *c, robj *host, robj *port, long ti
/* Create the socket */
conn = server.tls_cluster ? connCreateTLS() : connCreateSocket();
- if (connBlockingConnect(conn, c->argv[1]->ptr, atoi(c->argv[2]->ptr), timeout)
+ if (connBlockingConnect(conn, host->ptr, atoi(port->ptr), timeout)
!= C_OK) {
addReplyError(c,"-IOERR error or timeout connecting to the client");
connClose(conn);
|
Upgrade setup-java to v3 | @@ -468,7 +468,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- - uses: actions/setup-java@v2
+ - uses: actions/setup-java@v3
with:
distribution: "adopt"
java-version: ${{ matrix.java }}
|
analysis_enc.c: fix a dead store warning
when threading is disabled; fixes:
src/enc/analysis_enc.c:429:15: warning: Value stored to 'split_row'
during its initialization is never read [deadcode.DeadStores]
const int split_row = (9 * last_row + 15) >> 4;
^~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ | @@ -391,12 +391,14 @@ static int DoSegmentsJob(void* arg1, void* arg2) {
return ok;
}
+#ifdef WEBP_USE_THREAD
static void MergeJobs(const SegmentJob* const src, SegmentJob* const dst) {
int i;
for (i = 0; i <= MAX_ALPHA; ++i) dst->alphas[i] += src->alphas[i];
dst->alpha += src->alpha;
dst->uv_alpha += src->uv_alpha;
}
+#endif
// initialize the job struct with some tasks to perform
static void InitSegmentJob(VP8Encoder* const enc, SegmentJob* const job,
@@ -425,10 +427,10 @@ int VP8EncAnalyze(VP8Encoder* const enc) {
(enc->method_ <= 1); // for method 0 - 1, we need preds_[] to be filled.
if (do_segments) {
const int last_row = enc->mb_h_;
- // We give a little more than a half work to the main thread.
- const int split_row = (9 * last_row + 15) >> 4;
const int total_mb = last_row * enc->mb_w_;
#ifdef WEBP_USE_THREAD
+ // We give a little more than a half work to the main thread.
+ const int split_row = (9 * last_row + 15) >> 4;
const int kMinSplitRow = 2; // minimal rows needed for mt to be worth it
const int do_mt = (enc->thread_level_ > 0) && (split_row >= kMinSplitRow);
#else
@@ -438,6 +440,7 @@ int VP8EncAnalyze(VP8Encoder* const enc) {
WebPGetWorkerInterface();
SegmentJob main_job;
if (do_mt) {
+#ifdef WEBP_USE_THREAD
SegmentJob side_job;
// Note the use of '&' instead of '&&' because we must call the functions
// no matter what.
@@ -455,6 +458,7 @@ int VP8EncAnalyze(VP8Encoder* const enc) {
}
worker_interface->End(&side_job.worker);
if (ok) MergeJobs(&side_job, &main_job); // merge results together
+#endif // WEBP_USE_THREAD
} else {
// Even for single-thread case, we use the generic Worker tools.
InitSegmentJob(enc, &main_job, 0, last_row);
|
Change Perf Dashboard to Sheild | @@ -8,9 +8,7 @@ protocol. It is cross platform, written in C and designed to be a general purpos
IETF Drafts: [Transport](https://tools.ietf.org/html/draft-ietf-quic-transport), [TLS](https://tools.ietf.org/html/draft-ietf-quic-tls), [Recovery](https://tools.ietf.org/html/draft-ietf-quic-recovery), [Datagram](https://tools.ietf.org/html/draft-ietf-quic-datagram), [Load Balancing](https://tools.ietf.org/html/draft-ietf-quic-load-balancers), [Version Negotiation](https://tools.ietf.org/html/draft-ietf-quic-version-negotiation)
-[](https://dev.azure.com/ms/msquic/_build/latest?definitionId=347&branchName=main) [](https://dev.azure.com/ms/msquic/_build/latest?definitionId=347&branchName=main) [](https://dev.azure.com/ms/msquic/_build/latest?definitionId=347&branchName=main)  [](https://lgtm.com/projects/g/microsoft/msquic/context:cpp)
-
-See the latest data on our [Performance Dashboard](https://microsoft.github.io/msquic/).
+[](https://dev.azure.com/ms/msquic/_build/latest?definitionId=347&branchName=main) [](https://dev.azure.com/ms/msquic/_build/latest?definitionId=347&branchName=main) [](https://microsoft.github.io/msquic/) [](https://dev.azure.com/ms/msquic/_build/latest?definitionId=347&branchName=main)  [](https://lgtm.com/projects/g/microsoft/msquic/context:cpp)
## Protocol Features
|
fix test register often fail error | @@ -447,10 +447,6 @@ static int32_t _core_http_recv_header(core_http_handle_t *http_handle, uint32_t
if (timenow_ms > http_handle->sysdep->core_sysdep_time()) {
timenow_ms = http_handle->sysdep->core_sysdep_time();
}
- if (http_handle->sysdep->core_sysdep_time() - timenow_ms >= http_handle->recv_timeout_ms) {
- res = STATE_HTTP_HEADER_INVALID;
- break;
- }
if (idx + 2 > line_max_len) {
res = STATE_HTTP_HEADER_BUFFER_TOO_SHORT;
break;
|
json BUGFIX logging info about unexpected character in JSON data
There were several cases when an invalid character was detected and
reported via error return code, but the error message was not logged. | @@ -117,11 +117,10 @@ lyjson_check_next(struct lyjson_ctx *jsonctx)
if ((*jsonctx->in->current == ',') || (*jsonctx->in->current == ']')) {
return LY_SUCCESS;
}
- } else {
- LOGVAL(jsonctx->ctx, LYVE_SYNTAX, "Unexpected character \"%c\" after JSON %s.",
- *jsonctx->in->current, lyjson_token2str(lyjson_ctx_status(jsonctx, 0)));
}
+ LOGVAL(jsonctx->ctx, LYVE_SYNTAX, "Unexpected character \"%c\" after JSON %s.",
+ *jsonctx->in->current, lyjson_token2str(lyjson_ctx_status(jsonctx, 0)));
return LY_EVALID;
}
|
changed logging for fail HE socked creation | @@ -5214,7 +5214,8 @@ neat_connect(struct neat_he_candidate *candidate, uv_poll_cb callback_fx)
socket(candidate->pollable_socket->family,
candidate->pollable_socket->type,
protocol)) < 0) {
- neat_log(ctx, NEAT_LOG_ERROR, "Failed to create he socket");
+ neat_log(ctx, NEAT_LOG_DEBUG, "Failed to create he socket (family:%d, type:%d, prodocol:%d)",
+ candidate->pollable_socket->family, candidate->pollable_socket->type, protocol);
return -1;
}
|
foramt drv_clk | -#include "project.h"
#include "binary.h"
#include "defines.h"
+#include "project.h"
// the clock is already set, we turn pll off and set a new multiplier
-void setclock(void)
-{
+void setclock(void) {
// turn on HSI
RCC->CR |= 1;
// wait for HSI ready
- while((RCC->CR & RCC_CR_HSIRDY) == 0)
- {
+ while ((RCC->CR & RCC_CR_HSIRDY) == 0) {
}
// set clock source HSI
RCC->CFGR &= (0xFFFFFFFC);
// wait for switch
- while( (RCC->CFGR&B00001100) )
- {
-
+ while ((RCC->CFGR & B00001100)) {
}
// turn pll off
RCC->CR &= (uint32_t)0xFEFFFFFF;
- while((RCC->CR & RCC_CR_PLLRDY) != 0)
- {
+ while ((RCC->CR & RCC_CR_PLLRDY) != 0) {
}
//reset pll settings
@@ -41,8 +36,7 @@ void setclock(void)
//PLL on
RCC->CR |= RCC_CR_PLLON;
- while((RCC->CR & RCC_CR_PLLRDY) == 0)
- {
+ while ((RCC->CR & RCC_CR_PLLRDY) == 0) {
}
//set PLL as source
// RCC->CFGR&=(0xFFFFFF|B11111110);
@@ -54,14 +48,12 @@ void setclock(void)
//wait until PLL is the clock
#ifdef ENABLE_OVERCLOCK
// only if overclocked as it is redundant
- while( (RCC->CFGR&B00001100) != B00001000 )
- {
+ while ((RCC->CFGR & B00001100) != B00001000) {
}
#endif
}
-void clk_init(void)
-{
+void clk_init(void) {
// reset clock to default values
// sets clock to 48Mhz
@@ -74,7 +66,4 @@ void clk_init(void)
// set clock to 64Mhz (PLL max multiplier)
setclock();
#endif
-
-
}
-
|
meta-package contributions for centos/x86 | @@ -6,7 +6,6 @@ ohpc-gnu7-io-libs Collection of IO library builds for use with GNU compiler tool
ohpc-gnu7-mpich-parallel-libs Collection of parallel library builds for use with GNU compiler toolchain and the MPICH runtime
ohpc-gnu7-mvapich2-parallel-libs Collection of parallel library builds for use with GNU compiler toolchain and the MVAPICH2 runtime
ohpc-gnu7-openmpi3-parallel-libs Collection of parallel library builds for use with GNU compiler toolchain and the OpenMPI runtime
-ohpc-gnu7-openmpi-parallel-libs Collection of parallel library builds for use with GNU compiler toolchain and the OpenMPI runtime
ohpc-gnu7-parallel-libs Collection of parallel library builds for use with GNU compiler toolchain
ohpc-gnu7-perf-tools Collection of performance tool builds for use with GNU compiler toolchain
ohpc-gnu7-python-libs Collection of python related library builds for use with GNU compiler toolchain
@@ -17,7 +16,6 @@ ohpc-intel-io-libs Collection of IO library builds for use with Intel(R) Paralle
ohpc-intel-mpich-parallel-libs Collection of parallel library builds for use with Intel(R) Parallel Studio XE toolchain and the MPICH runtime
ohpc-intel-mvapich2-parallel-libs Collection of parallel library builds for use with Intel(R) Parallel Studio XE toolchain and the MVAPICH2 runtime
ohpc-intel-openmpi3-parallel-libs Collection of parallel library builds for use with Intel(R) Parallel Studio XE toolchain and the OpenMPI runtime
-ohpc-intel-openmpi-parallel-libs Collection of parallel library builds for use with Intel(R) Parallel Studio XE toolchain and the OpenMPI runtime
ohpc-intel-perf-tools Collection of performance tool builds for use with Intel(R) Parallel Studio XE toolchain
ohpc-intel-python-libs Collection of python related library builds for use with Intel(R) Parallel Studio XE toolchain
ohpc-intel-runtimes Collection of runtimes for use with Intel(R) Parallel Studio XE toolchain
|
increase liboidc-agent to 3 | @@ -24,7 +24,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends},
libmicrohttpd10 (>= 0.9.33) | libmicrohttpd12 (>=0.9.33),
libseccomp2 (>=2.1.1),
libsecret-1-0 (>= 0.18.4),
- liboidc-agent2 (= ${binary:Version})
+ liboidc-agent3 (= ${binary:Version})
Recommends: ssh-askpass | ssh-askpass-gnome
Description: Commandline tool for obtaining OpenID Connect Access tokens on the commandline
This tool consists of four programs:
@@ -33,7 +33,7 @@ Description: Commandline tool for obtaining OpenID Connect Access tokens on the
- oidc-add that loads (and unloads) configuration into the agent
- oidc-token that can be used to get access token on the command line
-Package: liboidc-agent2
+Package: liboidc-agent3
Architecture: any
Section: libs
Depends: ${shlibs:Depends}, ${misc:Depends}
@@ -48,7 +48,7 @@ Description: oidc-agent library
Package: liboidc-agent-dev
Architecture: any
Section: libdevel
-Depends: ${misc:Depends}, liboidc-agent2 (= ${binary:Version})
+Depends: ${misc:Depends}, liboidc-agent3 (= ${binary:Version})
Description: oidc-agent library development files
oidc-agent is a commandline tool for obtaining OpenID Connect Access tokens on
the commandline.
|
Fixed a small spelling mistake
Merges | @@ -93,10 +93,9 @@ A handler will never be called when disabled, while **its source may still be tr
Sources attached to non-shared interrupt do not support this feature.
-Though the framework support this feature, you have to use it *very carefully*. There usually exist 2 ways to stop a interrupt from being triggered: *disable the sourse* or *mask peripheral interrupt status*.
+Though the framework support this feature, you have to use it *very carefully*. There usually exist 2 ways to stop a interrupt from being triggered: *disable the source* or *mask peripheral interrupt status*.
IDF only handles the enabling and disabling of the source itself, leaving status and mask bits to be handled by users. **Status bits should always be masked before the handler responsible for it is disabled,
-or the status should be handled in other enabled interrupt properly**. You may leave some status bits unhandled if you just disable one of all the handlers without mask the status bits, which causes the interrupt being triggered infinitely,
-and finally a system crash.
+or the status should be handled in other enabled interrupt properly**. You may leave some status bits unhandled if you just disable one of all the handlers without masking the status bits, which causes the interrupt to trigger infinitely resulting in a system crash.
API Reference
-------------
|
haskell-build-fixes: cleanup travis cache before storing it | @@ -6,6 +6,13 @@ cache:
$HOME/.cabal
$HOME/elektra-cabal-sandbox
+# don't cache our own libraries generated in the build
+# so they always get rebuilt properly and to avoid init issues
+before_cache:
+ - cd $HOME/elektra-cabal-sandbox
+ - cabal sandbox hc-pkg unregister spectranslator specelektra libfa libelektra-haskell
+ - rm -f .cabal-sandbox/add-source-timestamps
+
#
# Define the build matrix
#
|
Allow examples to restrict their platforms in Makefile | @@ -85,6 +85,35 @@ else
include $(target_makefile)
endif
+# Decide whether to build or to skip this target for this platform
+ifneq ("", "$(PLATFORMS_ONLY)")
+ ifeq ("","$(filter $(TARGET), $(PLATFORMS_ONLY))")
+ PLATFORM_ACTION = skip
+ endif
+endif
+
+ifneq ("", "$(PLATFORMS_EXCLUDE)")
+ ifneq ("","$(filter $(TARGET), $(PLATFORMS_EXCLUDE))")
+ PLATFORM_ACTION = skip
+ endif
+endif
+
+ifneq ($(BOARD),)
+ifneq ("", "$(BOARDS_ONLY)")
+ ifeq ("","$(filter $(BOARD), $(BOARDS_ONLY))")
+ PLATFORM_ACTION = skip
+ endif
+endif
+
+ifneq ("", "$(BOARDS_EXCLUDE)")
+ ifneq ("","$(filter $(BOARD), $(BOARDS_EXCLUDE))")
+ PLATFORM_ACTION = skip
+ endif
+endif
+endif # $(BOARD) not empty
+
+PLATFORM_ACTION ?= build
+
# Configure MAC layer
# The different options
@@ -390,8 +419,15 @@ endif
# the match-anything rule below instead.
%: %.c
+ifeq ($(PLATFORM_ACTION),skip)
+# Skip this target.
+$(CONTIKI_PROJECT):
+ @echo "Skipping $@: not for the '$(TARGET)' platform!"
+else
+# Build this target.
# Match-anything pattern rule to allow the project makefiles to
# abstract from the actual binary name. It needs to contain some
# command in order to be a rule, not just a prerequisite.
%: %.$(TARGET)
@
+endif
|
misc/io: only warn for "incorrect" usage
With options, opening an output for reading or an input for writing is
clearly wrong. But with positional arguments, this can be legitimate,
e.g. when overwriting a file: "bart slice 0 0 a.ra a.ra" is a legitimate
use case. So for now, we just warn about it. | @@ -107,7 +107,7 @@ static void io_register(const char* name, bool out, bool open)
} else {
if (out != iop->out)
- error("%s: Input opened for writing or output opened for reading!\n", name);
+ debug_printf(DP_WARN, "%s: Input opened for writing or output opened for reading (or overwriting file)!\n", name);
iop->open = open;
new = false;
|
fix misbehavior system | @@ -1741,7 +1741,7 @@ void Misbehaving(NodeId pnode, int howmuch)
{
pn->nMisbehavior += howmuch;
int banscore = GetArg("-banscore", 100);
- if (pn->nMisbehavior >= banscore && pn->nMisbehavior - howmuch < banscore)
+ if (pn->nMisbehavior >= banscore)
{
printf("Misbehaving: %s (%d -> %d) BAN THRESHOLD EXCEEDED\n", pn->addrName.c_str(), pn->nMisbehavior-howmuch, pn->nMisbehavior);
pn->fDisconnect = true;
|
pass in all args for rtl build | @@ -29,7 +29,7 @@ copy $LOCAL_VERILATOR_DIR/ $SERVER:$REMOTE_VERILATOR_DIR
# enter the verisim directory and build the specific config on remote server
run "cd $REMOTE_CHIPYARD_DIR && ./scripts/init-submodules-no-riscv-tools.sh"
run "make -C $REMOTE_SIM_DIR clean"
-run "export RISCV=\"$REMOTE_RISCV_DIR\"; make -C $REMOTE_SIM_DIR VERILATOR_INSTALL_DIR=$REMOTE_VERILATOR_DIR JAVA_ARGS=\"-Xmx8G -Xss8M\" SUB_PROJECT=boom CONFIG=$1 TOP=BoomRocketSystem"
+run "export RISCV=\"$REMOTE_RISCV_DIR\"; make -C $REMOTE_SIM_DIR VERILATOR_INSTALL_DIR=$REMOTE_VERILATOR_DIR JAVA_ARGS=\"-Xmx8G -Xss8M\" $@"
run "rm -rf $REMOTE_CHIPYARD_DIR/project"
# copy back the final build
|
No use for strlen() in a loop | @@ -766,6 +766,7 @@ htp__callback_find_(evhtp_callbacks_t * cbs,
unsigned int * start_offset,
unsigned int * end_offset)
{
+ size_t path_len;
#ifndef EVHTP_DISABLE_REGEX
regmatch_t pmatch[28];
#endif
@@ -776,19 +777,16 @@ htp__callback_find_(evhtp_callbacks_t * cbs,
return NULL;
}
+ path_len = strlen(path);
+
TAILQ_FOREACH(callback, cbs, next)
{
switch (callback->type) {
case evhtp_callback_type_hash:
- if (callback->val.path[1] != path[1])
- {
- continue;
- }
-
- if (strcmp(callback->val.path, path) == 0)
+ if (strncmp(callback->val.path, path, path_len) == 0)
{
*start_offset = 0;
- *end_offset = (unsigned int)strlen(path);
+ *end_offset = path_len;
return callback;
}
@@ -810,7 +808,6 @@ htp__callback_find_(evhtp_callbacks_t * cbs,
#endif
case evhtp_callback_type_glob:
{
- size_t path_len = strlen(path);
size_t glob_len = strlen(callback->val.glob);
if (htp__glob_match_(callback->val.glob,
@@ -819,7 +816,7 @@ htp__callback_find_(evhtp_callbacks_t * cbs,
path_len) == 1)
{
*start_offset = 0;
- *end_offset = (unsigned int)path_len;
+ *end_offset = path_len;
return callback;
}
|
[Kernel] Correct the comments of DBG_ENABLE macro. | * header file.
*
* #define DBG_SECTION_NAME "[ MOD]"
- * #define DEBUG_ENABLE // enable debug macro
- * #define DEBUG_LEVEL DBG_INFO
+ * #define DBG_ENABLE // enable debug macro
+ * #define DBG_LEVEL DBG_INFO
* #include <rtdbg.h> // must after of DEBUG_ENABLE or some other options
*
* Then in your C/C++ file, you can use dbg_log macro to print out logs:
* dbg_log(DBG_INFO, "this is a log!\n");
*
* Or if you want to use different color for different kinds log, you can
- * #define DEBUG_COLOR
+ * #define DBG_COLOR
*/
#ifndef RT_DBG_H__
|
Don't build ra-tls from top directory | .PHONY: all install clean uninstall package
export INCLAVARE_CONTAINERS_VERSION := $(shell cat ./VERSION)
-components := rune shim sgx-tools stub_enclave
+components := rune shim sgx-tools
dist_release_components := rune shim
all:
|
it is enough to print signed (latest hcxpcaptool using custom pcapng) or not signed (older hcxpcaptool or third party capture tool or edited by third party thool) | @@ -543,7 +543,7 @@ void printcapstatus(char *pcaptype, char *pcapinname, int version_major, int ver
int p;
static char *hcxsignedinfo = "(signed)";
-static char *hcxunsignedinfo = "(not signed: old version or edited)";
+static char *hcxunsignedinfo = "(not signed)";
static char mintimestring[32];
static char maxtimestring[32];
|
interop: Longer handshake timeout for multiconnect | @@ -51,7 +51,7 @@ if [ "$ROLE" == "client" ]; then
REQUESTS=${REQS[@]:1}
$CLIENT_BIN $CLIENT_ARGS $REQUESTS $CLIENT_PARAMS &>> $LOG
elif [ "$TESTCASE" == "multiconnect" ]; then
- CLIENT_ARGS="$CLIENT_ARGS --timeout=180s"
+ CLIENT_ARGS="$CLIENT_ARGS --timeout=180s --handshake-timeout=180s"
for REQ in $REQUESTS; do
echo "multiconnect REQ: $REQ" >> $LOG
$CLIENT_BIN $CLIENT_ARGS $REQ $CLIENT_PARAMS &>> $LOG
@@ -69,7 +69,7 @@ elif [ "$ROLE" == "server" ]; then
if [ "$TESTCASE" == "retry" ]; then
SERVER_ARGS="$SERVER_ARGS -V"
elif [ "$TESTCASE" == "multiconnect" ]; then
- SERVER_ARGS="$SERVER_ARGS --timeout=180s"
+ SERVER_ARGS="$SERVER_ARGS --timeout=180s --handshake-timeout=180s"
fi
$SERVER_BIN '*' 443 $SERVER_ARGS $SERVER_PARAMS &> $LOG
|
update vulkan-headers to 1.2.158-2 | [wrap-file]
directory = Vulkan-Headers-1.2.158
source_url = https://github.com/KhronosGroup/Vulkan-Headers/archive/v1.2.158.tar.gz
-source_filename = v1.2.158.tar.gz
+source_filename = vulkan-headers-1.2.158.tar.gz
source_hash = 53361271cfe274df8782e1e47bdc9e61b7af432ba30acbfe31723f9df2c257f3
-patch_url = https://wrapdb.mesonbuild.com/v1/projects/vulkan-headers/1.2.158/1/get_zip
-patch_filename = vulkan-headers-1.2.158-1-wrap.zip
-patch_hash = 5c791eaecf0b0a71bd1d854dc77ee131a242e14a108fdebd917ffa03491949d2
+patch_url = https://wrapdb.mesonbuild.com/v2/vulkan-headers_1.2.158-2/get_patch
+patch_filename = vulkan-headers-1.2.158-2-wrap.zip
+patch_hash = 860358cf5e73f458cd1e88f8c38116d123ab421d5ce2e4129ec38eaedd820e17
+
|
GM: using real ignition logic. Creedit to Jamezz | @@ -31,10 +31,11 @@ static void gm_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
addr = to_push->RIR >> 21;
}
- if (addr == 0x135 && bus_number == 0) {
- //Gear selector (used for determining ignition)
- int gear = to_push->RDLR & 0x7;
- gm_ignition_started = gear > 0; //Park = 0. If out of park, we're "on."
+ if (addr == 0x1f1 && bus_number == 0) {
+ //Bit 5 should be ignition "on"
+ //Backup plan is Bit 2 (accessory power)
+ uint32_t ign = (to_push->RDLR) & 0x20;
+ gm_ignition_started = ign > 0;
}
// sample speed, really only care if car is moving or not
|
Whitelist Observe | @@ -65,7 +65,8 @@ static constexpr const char* s_cGlobalObjectsWhitelist[] =
"WeakReference",
"GetMod",
"TweakDB",
- "Override"
+ "Override",
+ "Observe"
};
static constexpr const char* s_cGlobalTablesWhitelist[] =
|
[DOCS] - Replace aomp11 references with aomp13. | @@ -13,9 +13,9 @@ To build AOMP from source you must: 1. Install certain distribution packages, 2.
## Clone and Build AOMP
```
- cd $HOME ; mkdir -p git/aomp11 ; cd git/aomp11
+ cd $HOME ; mkdir -p git/aomp13 ; cd git/aomp13
git clone https://github.com/rocm-developer-tools/aomp
- cd $HOME/git/aomp11/aomp/bin
+ cd $HOME/git/aomp13/aomp/bin
```
<b>Choose a Build Version (Development or Release)</b>
|
new dns seeds | @@ -1318,14 +1318,15 @@ void MapPort()
// The second name should resolve to a list of seed addresses.
static const char *strDNSSeed[][2] = {
- {"seed.denariusexplorer.org", "seed.denariusexplorer.org"},
- {"107.181.154.106", "107.181.154.106"},
- {"chainz.cryptoid.info", "chainz.cryptoid.info"},
- {"hashbag.cc", "hashbag.cc"},
{"dnsseed.hashbag.cc", "dnsseed.hashbag.cc"},
- {"denarius.name", "denarius.name"},
+ {"seed.denarius.host", "seed.denarius.host"},
+ {"seed.denariusexplorer.org", "seed.denariusexplorer.org"},
{"seed.yiimp.eu", "seed.yiimp.eu"},
- {"seed.denarius.host", "seed.denarius.host"}
+ {"chainz.cryptoid.info", "chainz.cryptoid.info"},
+ {"seed1.denarius.io", "seed1.denarius.io"},
+ {"seed2.denarius.io", "seed2.denarius.io"},
+ {"seed3.denarius.io", "seed3.denarius.io"},
+ {"seed4.denarius.io", "seed4.denarius.io"}
};
void ThreadDNSAddressSeed(void* parg)
|
Implement COMPILE_NLG macro in ymake.core.conf
Instead of plugin-based implementation in | @@ -4102,6 +4102,16 @@ macro BUILD_PLNS(Src...) {
.PEERDIR=kernel/relevfml library/sse
}
+### @usage: COMPILE_NLG(Src...)
+###
+### Generate and compile .nlg templates (Jinja2-based) and interface for megamind runtime.
+###
+### Alice-specific macro
+macro COMPILE_NLG(Src...) {
+ PEERDIR(alice/nlg/runtime)
+ RUN_PROGRAM(alice/nlg/bin compile-cpp --import-dir ${CURDIR} --out-dir ${BINDIR} --include-prefix ${rootrel;dirallowed:BINDIR} ${Src} IN ${Src} OUT register.cpp register.h ${suf=.cpp:Src} ${suf=.h:Src})
+}
+
### @usage: NEED_CHECK()
###
### Commits to the project marked with this macro will be blocked by pre-commit check and then will be
|
+fresh-peer:+on-publ-full compiles | ::
=. peers.ames-state (~(put by peers.ames-state) ship %known peer-state)
event-core
+ :: +on-publ-sponsor: handle new or lost sponsor for peer
+ ::
+ :: TODO: handle sponsor loss
::
++ on-publ-sponsor
|= [=ship sponsor=(unit ship)]
^+ event-core
::
=/ =peer-state (got-peer-state ship)
- :: TODO: handle sponsor loss
::
?~ sponsor
~| %lost-sponsor^ship !!
::
=. peers.ames-state (~(put by peers.ames-state) ship %known peer-state)
event-core
+ :: +on-publ-full: handle new pki data for peer(s)
::
++ on-publ-full
|= points=(map ship point)
^+ event-core
::
+ => .(points ~(tap by points))
+ |^ ^+ event-core
+ ?~ points event-core
+ ::
+ =+ [ship point]=i.points
+ ::
+ =. event-core
+ ?~ ship-state=(~(get by peers.ames-state) ship)
+ (fresh-peer ship point)
+ ::
+ ?: ?=([~ %alien *] ship-state)
+ (meet-alien ship point +.u.ship-state)
+ (update-known ship point +.u.ship-state)
+ ::
+ $(points t.points)
+ ::
+ ++ fresh-peer
+ |= [=ship =point]
+ ^+ event-core
+ ::
+ =/ =private-key sec:ex:crypto-core.ames-state
+ =/ =symmetric-key
+ (derive-symmetric-key `@`encryption-key.point private-key)
+ ::
+ =| =peer-state
+ ::
+ =. life.peer-state life.point
+ =. public-key.peer-state `@`encryption-key.point
+ =. symmetric-key.peer-state symmetric-key
+ ::
+ =. peers.ames-state
+ (~(put by peers.ames-state) ship %known peer-state)
+ ::
+ event-core
+ ::
+ ++ meet-alien
+ |= [=ship =point todos=pending-requests]
+ ^+ event-core
+ ::
!!
+ ::
+ ++ update-known
+ |= [=ship =point =peer-state]
+ ^+ event-core
+ ::
+ !!
+ --
--
:: +on-take-turf: relay %turf move from jael to unix
::
|
nimble/ll: Make sure there is no ADI field in AUX SCAN RSP
This fixes LL/DDI/ADV/BV-25-C | @@ -1112,14 +1112,18 @@ ble_ll_adv_aux_calculate(struct ble_ll_adv_sm *advsm,
aux->aux_data_offset = aux_data_offset;
aux->aux_data_len = 0;
aux->payload_len = 0;
+ aux->ext_hdr = 0;
rem_aux_data_len = AUX_DATA_LEN(advsm) - aux_data_offset;
chainable = !(advsm->props & BLE_HCI_LE_SET_EXT_ADV_PROP_CONNECTABLE);
+ hdr_len = BLE_LL_EXT_ADV_HDR_LEN + BLE_LL_EXT_ADV_FLAGS_SIZE;
+
+ if (!(advsm->props & BLE_HCI_LE_SET_EXT_ADV_PROP_SCANNABLE)) {
/* Flags and ADI */
- aux->ext_hdr = (1 << BLE_LL_EXT_ADV_DATA_INFO_BIT);
- hdr_len = BLE_LL_EXT_ADV_HDR_LEN + BLE_LL_EXT_ADV_FLAGS_SIZE +
- BLE_LL_EXT_ADV_DATA_INFO_SIZE;
+ aux->ext_hdr |= (1 << BLE_LL_EXT_ADV_DATA_INFO_BIT);
+ hdr_len += BLE_LL_EXT_ADV_DATA_INFO_SIZE;
+ }
/* AdvA for 1st PDU in chain (i.e. AUX_ADV_IND or AUX_SCAN_RSP) */
if (aux_data_offset == 0) {
|
drivers/seclink: remove redundant " in Kconfig
There is a typo in seclink Kconfig, three " in a line.
This makes the warning as below:
drivers/seclink/Kconfig:18:warning: multi-line strings not supported
This commit removes redundant ". | @@ -15,7 +15,7 @@ if SECURITY_LINK_DRV
source "$FRAMEWORK_DIR/src/seclink/Kconfig"
config SECURITY_LINK_DRV_PROFILE
- bool "Display security driver performance""
+ bool "Display security driver performance"
depends on TIMER
default n
---help---
|
Improvements to the top of the code style config | +# Configuration options for Uncrustify specifying the Mbed TLS code style.
+#
+# Note: The code style represented by this file has not yet been introduced
+# to Mbed TLS.
+#
# Copyright The Mbed TLS Contributors
# SPDX-License-Identifier: Apache-2.0
#
# See the License for the specific language governing permissions and
# limitations under the License.
-# Configuration options for Mbed TLS code style
# Line length options
|
Added sceLibMp4Recorder nids.
Added sceLibMp4Recorder nids. | @@ -3067,6 +3067,23 @@ modules:
unlink: 0x7BBCA340
kernel: false
nid: 0x54
+ SceLibMp4Recorder:
+ nid: 0x4AF7A4D1
+ libraries:
+ SceLibMp4Recorder:
+ functions:
+ sceMp4RecCreateRecorder: 0x21053FDE
+ sceMp4RecAddAudioSample: 0x2C39D932
+ sceMp4RecRecorderInit: 0x4045786D
+ sceMp4RecDeleteRecorder: 0x5EBA2AE2
+ sceMp4RecCsc: 0x7B3184E4
+ sceMp4RecQueryPhysicalMemSize: 0x9A48028F
+ sceMp4RecTerm: 0xB13DAFF3
+ sceMp4RecAddVideoSample: 0xB263D8FB
+ sceMp4RecRecorderEnd: 0xB51FEBAF
+ sceMp4RecInit: 0xE9193B80
+ kernel: false
+ nid: 0x5EE05E0F
SceLibc:
nid: 0x43FBA801
libraries:
|
Fix `TemplateChooserTableViewController` | @@ -12,6 +12,9 @@ import UIKit
class TemplateChooserTableViewController: UITableViewController, UIDocumentPickerDelegate {
/// The function called to create the file. Passed from `UIDocumentBrowserViewController.documentBrowser(_:didRequestDocumentCreationWithHandler:)`.
+ var importHandler: ((URL?, UIDocumentBrowserViewController.ImportMode) -> Void)?
+
+ /// Templates created by user.
var templates: [URL] {
return (try? FileManager.default.contentsOfDirectory(at: FileManager.default.urls(for: .libraryDirectory, in: .allDomainsMask)[0].appendingPathComponent("templates"), includingPropertiesForKeys: nil, options: .skipsHiddenFiles)) ?? []
}
|
stb: Enforce secure boot if called before libstb initialized | @@ -183,6 +183,7 @@ int secureboot_verify(enum resource_id id, void *buf, size_t len)
if (!secure_init) {
prlog(PR_WARNING, "container NOT VERIFIED, resource_id=%d "
"secureboot not yet initialized\n", id);
+ secureboot_enforce();
return -1;
}
|
Remove unsupported boards from CYpress manifest. | set(
AFR_MANIFEST_SUPPORTED_BOARDS
"CY8CKIT_064S0S2_4343W"
- "CY8CPROTO_062_4343W"
- "CY8CKIT_062S2_43012"
- "CY8CKIT_062_WIFI_BT"
CACHE INTERNAL "Supported boards list."
)
@@ -14,8 +11,3 @@ set(AFR_MANIFEST_BOARD_DIR "boards")
set(AFR_MANIFEST_BOARD_DIR_cypress43 "boards/CYW943907AEVAL1F")
set(AFR_MANIFEST_BOARD_DIR_cypress54 "boards/CYW954907AEVAL1F")
set(AFR_MANIFEST_BOARD_DIR_cypress64 "boards/CY8CKIT_064S0S2_4343W")
-set(AFR_MANIFEST_BOARD_DIR_CY8CPROTO_062_4343W "boards/CY8CPROTO_062_4343W")
-set(AFR_MANIFEST_BOARD_DIR_CY8CKIT_062S2_43012 "boards/CY8CKIT_062S2_43012")
-set(AFR_MANIFEST_BOARD_DIR_CY8CKIT_062_WIFI_BT "boards/CY8CKIT_062_WIFI_BT")
-
-
|
Disable code style correction for bignum assembly
The inline assembly defined in bn_mul.h confuses code style parsing,
causing code style correction to fail. Disable code style correction for
the whole section gated by "#if defined(MBEDTLS_HAVE_ASM)" to prevent
this. | #endif /* bits in mbedtls_mpi_uint */
+/* *INDENT-OFF* */
#if defined(MBEDTLS_HAVE_ASM)
-/* *INDENT-OFF* */
#ifndef asm
#define asm __asm
#endif
-/* *INDENT-ON* */
/* armcc5 --gnu defines __GNUC__ but doesn't support GNU's extended asm */
#if defined(__GNUC__) && \
#endif /* MSVC */
#endif /* MBEDTLS_HAVE_ASM */
+/* *INDENT-ON* */
#if !defined(MULADDC_X1_CORE)
#if defined(MBEDTLS_HAVE_UDBL)
|
M487: use macro for mac address length in main.c | #define mainLOGGING_TASK_STACK_SIZE ( configMINIMAL_STACK_SIZE * 5 )
#define mainLOGGING_MESSAGE_QUEUE_LENGTH ( 25 )
-extern uint8_t ucMACAddress[ 6 ];
+#if ( configENABLED_NETWORKS & AWSIOT_NETWORK_TYPE_ETH )
+extern uint8_t ucMACAddress[ ipMAC_ADDRESS_LENGTH_BYTES ];
+#endif
/* The default IP and MAC address used by the demo. The address configuration
* defined here will be used if ipconfigUSE_DHCP is 0, or if ipconfigUSE_DHCP is
|
Change to amend debug output | @@ -3754,8 +3754,9 @@ void DeRestPluginPrivate::checkSensorButtonEvent(Sensor *sensor, const deCONZ::A
if (btnMapClusters.key(ind.clusterId()) != "")
{
- cluster = btnMapClusters.key(ind.clusterId()) + " (" + cluster + ")";
- QMap<QString, quint16> temp = btnMapClusterCommands.value(cluster);
+ QString val = btnMapClusters.key(ind.clusterId());
+ QMap<QString, quint16> temp = btnMapClusterCommands.value(val);
+ cluster = val + " (" + cluster + ")";
if (!temp.empty() && temp.key(zclFrame.commandId()) != "") { cmd = temp.key(zclFrame.commandId()) + " (" + cmd + ")"; }
}
|
VTL: Test against latest version of syslog_rfc5424_parser.
The latest version moved to lark from pyparsing. The developers were
kind enough to verify that their new grammar works with our tests. | @@ -10,4 +10,4 @@ pycodestyle # MIT (Expat license) https://pypi
scapy==2.4.0; python_version >= '2.7' or python_version >= '3.4' # GPL2 https://github.com/secdev/scapy/blob/master/LICENSE
six # MIT
subprocess32 # PSF
-syslog_rfc5424_parser>=0.2.0 # ISC
+syslog_rfc5424_parser>=0.3.0 # ISC
|
sanitizers: if no request for sanitizers was made, allow for symbolization | "wrap_signals=0:print_stats=1"
/* If no sanitzer support was requested, simply make it use abort() on errors */
-#define kSAN_REGULAR "abort_on_error=1:handle_segv=0:handle_sigbus=0:handle_abort=0:handle_sigill=0:handle_sigfpe=0:allocator_may_return_null=1:symbolize=0:detect_leaks=0:disable_coredump=0"
+#define kSAN_REGULAR "abort_on_error=1:handle_segv=0:handle_sigbus=0:handle_abort=0:" \
+ "handle_sigill=0:handle_sigfpe=0:allocator_may_return_null=1:" \
+ "symbolize=1:detect_leaks=0:disable_coredump=0"
/*
* If the program ends with a signal that ASan does not handle (or can not
|
doccords: dprint fix depth calculation
stupid loobeans tripping me up | =+ hoon-type=(~(play ut sut) gen)
=+ arm-prod=(arm-product-docs hoon-type name)
~? >> debug arm-prod
- ^- [what what what]
|^
- :: use arm-prod to determine how many layers to look into the type
+ :: check arm-prod to determine how many layers to look into the type
:: for core docs
- =/ depth=@ (add !=(~ +<.arm-prod) !=(~ +>.arm-prod))
- ^- [what what what]
+ =/ depth=@ ?~ arm-prod 0
+ (add =(~ +<.arm-prod) =(~ +>.arm-prod))
?+ depth [~ ~ ~]
%0 [~ ~ (check-core hoon-type)]
%1 :+ +<.arm-prod
|
test: add platon test case test_005ParametersSet_0001GetNonceFromNetworkSuccess
fix the issue
teambition task id | @@ -281,6 +281,26 @@ START_TEST(test_004ParametersInit_0011TxInitFailureLonghrp)
}
END_TEST
+START_TEST(test_005ParametersSet_0001GetNonceFromNetworkSuccess)
+{
+ BSINT32 rtnVal;
+ BoatPlatONTx tx_ptr;
+
+ BoatIotSdkInit();
+
+ rtnVal = platonWalletPrepare();
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+
+ rtnVal = BoatPlatONTxInit(g_platon_wallet_ptr, &tx_ptr, TEST_IS_SYNC_TX, TEST_GAS_PRICE,
+ TEST_GAS_LIMIT, TEST_RECIPIENT_ADDRESS, hrp);
+ ck_assert(rtnVal == BOAT_SUCCESS);
+
+ rtnVal = BoatEthTxSetNonce(&tx_ptr, BOAT_ETH_NONCE_AUTO);
+ ck_assert(rtnVal == BOAT_SUCCESS);
+ BoatIotSdkDeInit();
+}
+END_TEST
+
Suite *make_parameters_suite(void)
{
/* Create Suite */
@@ -307,5 +327,7 @@ Suite *make_parameters_suite(void)
tcase_add_test(tc_param_api, test_004ParametersInit_0010TxInitFailureNullhrp);
tcase_add_test(tc_param_api, test_004ParametersInit_0011TxInitFailureLonghrp);
+ tcase_add_test(tc_param_api, test_005ParametersSet_0001GetNonceFromNetworkSuccess);
+
return s_param;
}
\ No newline at end of file
|
misc: checkstyle ignore .patch files in trailing whitespace check
Type: fix | @@ -23,7 +23,7 @@ SUFFIX="-${CLANG_FORMAT_VER}"
clang-format${SUFFIX} --version
in=$(mktemp)
-git diff ${GIT_DIFF_ARGS} > ${in}
+git diff ${GIT_DIFF_ARGS} ':!*.patch' > ${in}
line_count=$(sed -n '/^+.*\*INDENT-O[NF][F]\{0,1\}\*/p' ${in} | wc -l)
if [ ${line_count} -gt 0 ] ; then
|
clk: fix regression in clock setting for SPIRAM with 80MHz config
Support for HSPI to output clock for 4M SPIRAM introduced regression
in clock configuration affecting SPIRAM access with 80MHz clock. This
commit fixes the issue. | @@ -297,10 +297,10 @@ void esp_perip_clk_init(void)
//a weird mode where clock to the peripheral is disabled but reset is also disabled, it 'hangs'
//in a state where it outputs a continuous 80MHz signal. Mask its bit here because we should
//not modify that state, regardless of what we calculated earlier.
- if (!spicommon_periph_in_use(HSPI_HOST)) {
+ if (spicommon_periph_in_use(HSPI_HOST)) {
common_perip_clk &= ~DPORT_SPI2_CLK_EN;
}
- if (!spicommon_periph_in_use(VSPI_HOST)) {
+ if (spicommon_periph_in_use(VSPI_HOST)) {
common_perip_clk &= ~DPORT_SPI3_CLK_EN;
}
#endif
|
VERSION bump to version 2.0.219 | @@ -61,7 +61,7 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
# set version of the project
set(LIBYANG_MAJOR_VERSION 2)
set(LIBYANG_MINOR_VERSION 0)
-set(LIBYANG_MICRO_VERSION 218)
+set(LIBYANG_MICRO_VERSION 219)
set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION})
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
|
down-rev to 2.26.1 due to openmp runtime failures | Name: %{pname}-%{compiler_family}-%{mpi_family}%{PROJ_DELIM}
-Version: 2.26.2p1
+Version: 2.26.1
Release: 1%{?dist}
Summary: Tuning and Analysis Utilities Profiling Package
License: Tuning and Analysis Utilities License
|
Fix the checks of EVP_PKEY_pairwise_check | @@ -399,7 +399,7 @@ static int test_fromdata_rsa(void)
if (!TEST_int_gt(EVP_PKEY_check(key_ctx), 0)
|| !TEST_true(EVP_PKEY_public_check(key_ctx))
|| !TEST_true(EVP_PKEY_private_check(key_ctx))
- || !TEST_true(EVP_PKEY_pairwise_check(key_ctx)))
+ || !TEST_int_gt(EVP_PKEY_pairwise_check(key_ctx), 0))
goto err;
/* EVP_PKEY_copy_parameters() should fail for RSA */
@@ -663,7 +663,7 @@ static int test_fromdata_dh_named_group(void)
if (!TEST_int_gt(EVP_PKEY_check(key_ctx), 0)
|| !TEST_true(EVP_PKEY_public_check(key_ctx))
|| !TEST_true(EVP_PKEY_private_check(key_ctx))
- || !TEST_true(EVP_PKEY_pairwise_check(key_ctx)))
+ || !TEST_int_gt(EVP_PKEY_pairwise_check(key_ctx), 0))
goto err;
EVP_PKEY_CTX_free(key_ctx);
key_ctx = NULL;
@@ -844,7 +844,7 @@ static int test_fromdata_dh_fips186_4(void)
if (!TEST_int_gt(EVP_PKEY_check(key_ctx), 0)
|| !TEST_true(EVP_PKEY_public_check(key_ctx))
|| !TEST_true(EVP_PKEY_private_check(key_ctx))
- || !TEST_true(EVP_PKEY_pairwise_check(key_ctx)))
+ || !TEST_int_gt(EVP_PKEY_pairwise_check(key_ctx), 0))
goto err;
EVP_PKEY_CTX_free(key_ctx);
key_ctx = NULL;
@@ -1609,7 +1609,7 @@ static int test_fromdata_dsa_fips186_4(void)
if (!TEST_int_gt(EVP_PKEY_check(key_ctx), 0)
|| !TEST_true(EVP_PKEY_public_check(key_ctx))
|| !TEST_true(EVP_PKEY_private_check(key_ctx))
- || !TEST_true(EVP_PKEY_pairwise_check(key_ctx)))
+ || !TEST_int_gt(EVP_PKEY_pairwise_check(key_ctx), 0))
goto err;
EVP_PKEY_CTX_free(key_ctx);
key_ctx = NULL;
@@ -1663,7 +1663,7 @@ static int test_check_dsa(void)
|| !TEST_int_le(EVP_PKEY_check(ctx), 0)
|| !TEST_false(EVP_PKEY_public_check(ctx))
|| !TEST_false(EVP_PKEY_private_check(ctx))
- || !TEST_false(EVP_PKEY_pairwise_check(ctx)))
+ || !TEST_int_le(EVP_PKEY_pairwise_check(ctx), 0))
goto err;
ret = 1;
|
Start migrating code to use `for x : iterable`.
`in` is too good of a variable name to waste on a loop
iterator specifier. | @@ -944,6 +944,8 @@ forstmt : Tfor optexprln loopcond optexprln block
{$$ = mkloopstmt($1->loc, $2, $3, $4, $5);}
| Tfor expr Tin exprln block
{$$ = mkiterstmt($1->loc, $2, $4, $5);}
+ | Tfor expr Tcolon exprln block
+ {$$ = mkiterstmt($1->loc, $2, $4, $5);}
| Tfor decl Tendln loopcond optexprln block {
//Node *init;
if ($2.nn != 1)
|
Reformat CMake: Report errors of `cd` command | @@ -15,7 +15,10 @@ if [ -z "${CMAKE_FORMAT}" ] || [ "$CMAKE_FORMAT_VERSION" != "0.5.4" ]; then
exit 1
fi
-cd "$SOURCE" || exit 1
+cd "$SOURCE" || {
+ printf >&2 'Unable to change into source directory'
+ exit 1
+}
output=$("${CMAKE_FORMAT}" 2>&1 CMakeLists.txt)
|
add brushed crazybee targets | {
"name": "crazybee_f4",
"configurations": [
+ {
+ "name": "brushed.frsky",
+ "defines": {
+ "BRUSHED_TARGET": "",
+ "RX_FRSKY_D8": ""
+ }
+ },
+ {
+ "name": "brushed.redpine",
+ "defines": {
+ "BRUSHED_TARGET": "",
+ "RX_REDPINE": ""
+ }
+ },
{
"name": "brushless.frsky",
"defines": {
|
Added correct gyro cal for tracker | @@ -208,7 +208,8 @@ int survive_load_htc_config_format(SurviveObject *so, char *ct0conf, int len) {
// From datasheet, can be 250, 500, 1000, 2000 deg/s range over 16 bits
// FLT deg_per_sec = 250;
if (so->gyro_scale)
- scale3d(so->gyro_scale, so->gyro_scale, 3.14159 / 1800.);
+ scale3d(so->gyro_scale, so->gyro_scale, 3.14159 / 3600.);
+
}
char fname[64];
|
increase MAC range to 0x10 and code cleanup | @@ -2107,10 +2107,9 @@ static char pskstring[PSKSTRING_LEN_MAX] = {};
me = macaddr &0xffffff;
fprintf(fhout, "05%6d\n", me);
-
oui = macaddr &0xffffff000000L;
-nic = (macaddr -0x0f) &0xffffffL;
-for(c = 0; c < 0x10; c++) writebssid(fhout, oui +((nic +c) &0xffffffL));
+nic = (macaddr -0x10) &0xffffffL;
+for(c = 0; c <= 0x10; c++) writebssid(fhout, oui +((nic +c) &0xffffffL));
swap = (nic >> 8) & 0xffff;
{
swap = (swap & 0xf000) >> 12 | (swap & 0x0f00) >> 4 | (swap & 0x00f0) << 4 | (swap & 0x000f) << 12;
@@ -2263,7 +2262,6 @@ while(1)
aktread++;
continue;
}
-
if(((linein[32] != ':') && (linein[45] != ':') && (linein[58] != ':')) && ((linein[32] != '*') && (linein[45] != '*') && (linein[58] != '*')))
{
fprintf(stderr, "reading hash line %d failed: %s\n", aktread, linein);
@@ -2327,7 +2325,6 @@ while(1)
aktread++;
continue;
}
-
if((linein[3] != '*') && (linein[6] != '*') && (linein[39] != '*') && (linein[52] != '*') && (linein[65] != '*'))
{
fprintf(stderr, "reading hash line %d failed: %s\n", aktread, linein);
@@ -2503,7 +2500,6 @@ if(macapname != NULL)
macaddr = strtoull(macapname, &macaddrstop, 16);
if((macaddrstop -macapname) != 12) fprintf(stderr, "invalid MAC specified\n");
}
-
memset(&essid, 0, ESSID_LEN_MAX);
essidlen = strlen(essidname);
if(essidname != NULL)
|
Remove handling of KeyboardInterrupt exception
KeyboardInterrupt exception is not handled anymore. It will be
propagated and handled by the caller. | @@ -1041,7 +1041,6 @@ class BPF(object):
fields (task, pid, cpu, flags, timestamp, msg) or None if no
line was read (nonblocking=True)
"""
- try:
while True:
line = self.trace_readline(nonblocking)
if not line and nonblocking: return (None,) * 6
@@ -1063,8 +1062,6 @@ class BPF(object):
sym_end = line.find(b":")
msg = line[sym_end + 2:]
return (task, int(pid), int(cpu), flags, float(ts), msg)
- except KeyboardInterrupt:
- exit()
def trace_readline(self, nonblocking=False):
"""trace_readline(nonblocking=False)
@@ -1080,8 +1077,6 @@ class BPF(object):
line = trace.readline(1024).rstrip()
except IOError:
pass
- except KeyboardInterrupt:
- exit()
return line
def trace_print(self, fmt=None):
@@ -1093,7 +1088,6 @@ class BPF(object):
example: trace_print(fmt="pid {1}, msg = {5}")
"""
- try:
while True:
if fmt:
fields = self.trace_fields(nonblocking=False)
@@ -1103,8 +1097,6 @@ class BPF(object):
line = self.trace_readline(nonblocking=False)
print(line)
sys.stdout.flush()
- except KeyboardInterrupt:
- exit()
@staticmethod
def _sym_cache(pid):
@@ -1194,13 +1186,10 @@ class BPF(object):
Poll from all open perf ring buffers, calling the callback that was
provided when calling open_perf_buffer for each entry.
"""
- try:
readers = (ct.c_void_p * len(self.perf_buffers))()
for i, v in enumerate(self.perf_buffers.values()):
readers[i] = v
lib.perf_reader_poll(len(readers), readers, timeout)
- except KeyboardInterrupt:
- exit()
def kprobe_poll(self, timeout = -1):
"""kprobe_poll(self)
|
Fix state changes failing prematurely under rare conditions | @@ -107,7 +107,7 @@ StateChange::State StateChange::tick(Resource *r, deCONZ::ApsController *apsCtrl
const auto readFunction = DA_GetReadFunction(ddfItem.readParameters);
if (readFunction && ddfItem.isValid())
{
- m_readResult = readFunction(r, item, apsCtrl, ddfItem.parseParameters);
+ m_readResult = readFunction(r, item, apsCtrl, ddfItem.readParameters);
if (m_readResult.isEnqueued)
{
|
exclude cjson and list from this package | @@ -6,7 +6,9 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# USE CJSON
# If set to 0 or 1 it will not use the shipped version, but the one
# installed on the system instead
-#export HAS_CJSON = 0
+USE_CJSON = 1
+USE_LIST = 1
+
export BASEDIR = $(shell pwd)/debian/tmp
export BIN_AFTER_INST_PATH = /usr
|
EVP: fix evp_keymgmt_util_match so that it actually tries cross export the other way if the first attempt fails
Fixes
CLA: trivial | @@ -370,7 +370,7 @@ int evp_keymgmt_util_match(EVP_PKEY *pk1, EVP_PKEY *pk2, int selection)
* but also to determine if we should attempt a cross export
* the other way. There's no point doing it both ways.
*/
- int ok = 1;
+ int ok = 0;
/* Complex case, where the keymgmt differ */
if (keymgmt1 != NULL
|
fcrypt: update README.md
Add an ASCIIcinema Link to the examples section. | @@ -94,6 +94,10 @@ But you can still access `/t/a` with `kdb get`:
kdb get /t/a
+If you are looking for a more interactive example, have a look at the following ASCIIcast at:
+
+[https://asciinema.org/a/136021](https://asciinema.org/a/136021)
+
## Configuration
### Signatures
|
Whitspace and style changes. | @@ -502,7 +502,6 @@ static Janet cfun_string_pretty(int32_t argc, Janet *argv) {
return janet_wrap_buffer(buffer);
}
-
/*
* code adapted from lua/lstrlib.c http://lua.org
*/
@@ -511,7 +510,11 @@ static Janet cfun_string_pretty(int32_t argc, Janet *argv) {
#define FMT_FLAGS "-+ #0"
#define MAX_FORMAT 32
-static const char *scanformat(const char *strfrmt, char *form,char width[3], char precision[3]) {
+static const char *scanformat(
+ const char *strfrmt,
+ char *form,
+ char width[3],
+ char precision[3]) {
const char *p = strfrmt;
memset(width, '\0', 3);
memset(precision, '\0', 3);
@@ -556,7 +559,7 @@ static Janet cfun_string_format(int32_t argc, Janet * argv) {
char width[3], precision[3];
int nb = 0; /* number of bytes in added item */
if (++arg >= argc)
- janet_panic("no enough value for format");
+ janet_panic("not enough values for format");
strfrmt = scanformat(strfrmt, form, width, precision);
switch (*strfrmt++) {
case 'c':
@@ -639,11 +642,6 @@ static Janet cfun_string_format(int32_t argc, Janet * argv) {
return janet_wrap_buffer(b);
}
-
-
-
-
-
static const JanetReg string_cfuns[] = {
{
"string/slice", cfun_string_slice,
|
define WEBP_RESTRICT for MSVC
__restrict is supported:
+ add a comment and simplify the __restrict__ check, clang defines
__GNUC__ | #include "src/dsp/dsp.h"
#include "src/webp/types.h"
-//------------------------------------------------------------------------------
-// restrict
+#ifdef __cplusplus
+extern "C" {
+#endif
-#if defined(__GNUC__) || defined(__clang__)
+//------------------------------------------------------------------------------
+// WEBP_RESTRICT
+
+// Declares a pointer with the restrict type qualifier if available.
+// This allows code to hint to the compiler that only this pointer references a
+// particular object or memory region within the scope of the block in which it
+// is declared. This may allow for improved optimizations due to the lack of
+// pointer aliasing. See also:
+// https://en.cppreference.com/w/c/language/restrict
+#if defined(__GNUC__)
+#define WEBP_RESTRICT __restrict__
+#elif defined(_MSC_VER)
#define WEBP_RESTRICT __restrict
#else
#define WEBP_RESTRICT
#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
//------------------------------------------------------------------------------
// Memory allocation
|
android: adding randomization to camera file name | @@ -14,6 +14,7 @@ import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.ArrayList;
+import java.util.UUID;
import android.annotation.SuppressLint;
import android.app.Activity;
@@ -49,7 +50,7 @@ import com.rho.camera.ICameraSingleton;
public class CameraObject extends CameraBase implements ICamera{
private static final String TAG = CameraObject.class.getSimpleName();
- SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_hhmmss");
+ private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_hhmmss");
private Camera mCamera = null;
private int mCameraUsers;
@@ -189,9 +190,12 @@ public class CameraObject extends CameraBase implements ICamera{
}
}
+ public static String createFileName(){
+ return dateFormat.format(new Date(System.currentTimeMillis())) + "_" + UUID.randomUUID().toString();
+ }
+
private File createImageFile() throws IOException {
- String timeStamp = dateFormat.format(new Date(System.currentTimeMillis()));
- String imageFileName = "JPEG_" + timeStamp + "_";
+ String imageFileName = "JPEG_" + createFileName() + "_";
File storageDir = RhodesActivity.getContext().getExternalFilesDir(Environment.DIRECTORY_PICTURES);
File image = File.createTempFile(imageFileName, ".jpg", storageDir);
return image;
@@ -223,7 +227,7 @@ public class CameraObject extends CameraBase implements ICamera{
String fileDir = storageDir.getAbsolutePath();
String fileName = actualPropertyMap.get(ICameraSingleton.PROPERTY_FILE_NAME);
if (fileName == null || fileName.isEmpty()){
- fileName = "IMG_" + dateFormat.format(new Date(System.currentTimeMillis()));
+ fileName = "IMG_" + createFileName();
}
String filePath = fileDir + "/" + fileName + ".jpg";
|
Use sensor_strerror for sensor_reset error. | @@ -74,7 +74,10 @@ static mp_obj_t py_sensor__init__()
static mp_obj_t py_sensor_reset()
{
- PY_ASSERT_FALSE_MSG(sensor_reset() != 0, "Reset Failed");
+ int ret = sensor_reset();
+ if (ret != 0) {
+ mp_raise_msg(&mp_type_RuntimeError, sensor_strerror(ret));
+ }
#if MICROPY_PY_IMU
// +-10 degree dead-zone around pitch 90/270.
// +-45 degree active-zone around roll 0/90/180/270/360.
|
Updating prerequisite and boost lib name | @@ -129,7 +129,7 @@ The build has been tested on the following compilers:
#### Dependencies
-We strongly recommend to install most of the dependencies using the command `./install_dependencies.sh linux`, and help can be obtained with `./install_dependencies.sh --help`. Please install SQLite3 before running the script.
+We strongly recommend to install most of the dependencies using the command `./install_dependencies.sh linux`, and help can be obtained with `./install_dependencies.sh --help`. Please install SQLite3 and cmake before running the script.
The following dependencies are managed by the installation script:
@@ -146,7 +146,7 @@ A subfolder named `linux_dependencies` will be created, with all the required li
##### Boost
The dependencies are the Boost library core, and its submodules: Boost.filesystem, Boost.iostreams, Boost.program_options, Boost.regex, Boost.log and Boost.system.
-If you are using Ubuntu, the required packages' names will be `libboost-dev`, `libboost-filesystem-dev`, `libboost-iostreams`, `libboost-program-options-dev`, `libboost-regex-dev` and `libboost-log-dev`.
+If you are using Ubuntu, the required packages' names will be `libboost-dev`, `libboost-filesystem-dev`, `libboost-iostreams-dev`, `libboost-program-options-dev`, `libboost-regex-dev` and `libboost-log-dev`.
##### ODB
|
dnstap unbound-dnstap-sock, fixup signal handler exit. | @@ -957,8 +957,8 @@ int sig_quit = 0;
/** signal handler for user quit */
static RETSIGTYPE main_sigh(int sig)
{
- if(!sig_base) return;
verbose(VERB_ALGO, "exit on signal %d\n", sig);
+ if(sig_base)
ub_event_base_loopexit(sig_base);
sig_quit = 1;
}
@@ -996,6 +996,7 @@ setup_and_run(struct config_strlist_head* local_list,
ub_event_base_dispatch(base);
+ sig_base = NULL;
tap_socket_list_delete(maindata->acceptlist);
ub_event_base_free(base);
free(maindata);
|
Last second fix, base should not be in position format. | @@ -16460,9 +16460,9 @@ void draw_properties_entity(entity *entity, int offset_z, int color, s_drawmetho
// XYZ
output_label[DRAW_PROPERTIES_KEY_POS] = "X,Y,Z: ";
output_value[DRAW_PROPERTIES_KEY_POS] = NULL;
- str_size = snprintf(output_value[DRAW_PROPERTIES_KEY_POS], 0, output_format[DRAW_PROPERTIES_KEY_POS], (int)entity->base, (int)entity->position.x, (int)entity->position.y, (int)entity->position.z) + 1;
+ str_size = snprintf(output_value[DRAW_PROPERTIES_KEY_POS], 0, output_format[DRAW_PROPERTIES_KEY_POS], (int)entity->position.x, (int)entity->position.y, (int)entity->position.z) + 1;
output_value[DRAW_PROPERTIES_KEY_POS] = malloc(str_size);
- snprintf(output_value[DRAW_PROPERTIES_KEY_POS], str_size, output_format[DRAW_PROPERTIES_KEY_POS], (int)entity->base, (int)entity->position.x, (int)entity->position.y, (int)entity->position.z);
+ snprintf(output_value[DRAW_PROPERTIES_KEY_POS], str_size, output_format[DRAW_PROPERTIES_KEY_POS], (int)entity->position.x, (int)entity->position.y, (int)entity->position.z);
// HP & MP
output_label[DRAW_PROPERTIES_KEY_STATUS] = "HP, MP: ";
|
cJSON: remove warning about prototype
Some functions of cJSON did not have a prototype. This can sometimes
cause a warning when building. | @@ -177,18 +177,18 @@ cJSON *cJSON_GetObjectItem(cJSON *object, const char *string);
* Defined when cJSON_Parse() returns 0. 0 when cJSON_Parse() succeeds.
*/
-const char *cJSON_GetErrorPtr();
+const char *cJSON_GetErrorPtr(void);
/* These calls create a cJSON item of the appropriate type. */
-cJSON *cJSON_CreateNull();
-cJSON *cJSON_CreateTrue();
-cJSON *cJSON_CreateFalse();
+cJSON *cJSON_CreateNull(void);
+cJSON *cJSON_CreateTrue(void);
+cJSON *cJSON_CreateFalse(void);
cJSON *cJSON_CreateBool(int b);
cJSON *cJSON_CreateNumber(double num);
cJSON *cJSON_CreateString(const char *string);
-cJSON *cJSON_CreateArray();
-cJSON *cJSON_CreateObject();
+cJSON *cJSON_CreateArray(void);
+cJSON *cJSON_CreateObject(void);
/* These utilities create an Array of count items. */
|
Simplify platform CMake file | afr_module()
set(inc_dir "${CMAKE_CURRENT_LIST_DIR}/include")
+set(src_dir "${CMAKE_CURRENT_LIST_DIR}/freertos")
set(test_dir "${CMAKE_CURRENT_LIST_DIR}/test")
afr_module_sources(
@@ -11,30 +12,6 @@ afr_module_sources(
"${inc_dir}/platform/iot_network.h"
"${inc_dir}/platform/iot_threads.h"
"${inc_dir}/types/iot_platform_types.h"
-)
-
-afr_module_include_dirs(
- ${AFR_CURRENT_MODULE}
- PUBLIC
- "${inc_dir}"
- $<TARGET_PROPERTY:AFR::${AFR_CURRENT_MODULE}::mcu_port,INTERFACE_INCLUDE_DIRECTORIES>
-)
-
-afr_module_dependencies(
- ${AFR_CURRENT_MODULE}
- PRIVATE AFR::${AFR_CURRENT_MODULE}::mcu_port
-)
-
-# TODO, link to platform_freertos by default for now, should we remove this?
-afr_mcu_port(platform DEPENDS AFR::platform_freertos)
-
-# Link to this INTERFACE target to use the default implementation based on FreeRTOS.
-afr_module(NAME platform_freertos INTERFACE)
-set(src_dir "${CMAKE_CURRENT_LIST_DIR}/freertos")
-
-afr_module_sources(
- ${AFR_CURRENT_MODULE}
- INTERFACE
"${src_dir}/iot_clock_afr.c"
"${src_dir}/iot_metrics.c"
"${src_dir}/iot_network_afr.c"
@@ -46,12 +23,14 @@ afr_module_sources(
afr_module_include_dirs(
${AFR_CURRENT_MODULE}
- INTERFACE "${src_dir}/include"
+ PUBLIC
+ "${inc_dir}"
+ "${src_dir}/include"
)
afr_module_dependencies(
- platform_freertos
- INTERFACE
+ ${AFR_CURRENT_MODULE}
+ PUBLIC
AFR::common
AFR::secure_sockets
)
|
clarify the context | @@ -71,7 +71,7 @@ void rt_interrupt_enter(void)
RT_OBJECT_HOOK_CALL(rt_interrupt_enter_hook,());
rt_hw_interrupt_enable(level);
- RT_DEBUG_LOG(RT_DEBUG_IRQ, ("irq has come..., irq nest:%d\n",
+ RT_DEBUG_LOG(RT_DEBUG_IRQ, ("irq has come..., irq current nest:%d\n",
rt_interrupt_nest));
}
RTM_EXPORT(rt_interrupt_enter);
@@ -87,7 +87,7 @@ void rt_interrupt_leave(void)
{
rt_base_t level;
- RT_DEBUG_LOG(RT_DEBUG_IRQ, ("irq leave, irq nest:%d\n",
+ RT_DEBUG_LOG(RT_DEBUG_IRQ, ("irq is going to leave, irq current nest:%d\n",
rt_interrupt_nest));
level = rt_hw_interrupt_disable();
|
Corrected allocation size of HTTP response header. | @@ -626,8 +626,9 @@ nxt_h1p_request_header_send(nxt_task_t *task, nxt_http_request_t *r)
status = &unknown_status;
}
- size = status->length + sizeof("\r\n");
- size += sizeof("\r\n"); /* Trailing CRLF. */
+ size = status->length;
+ /* Trailing CRLF at the end of header. */
+ size += sizeof("\r\n") - 1;
http11 = (h1p->parser.version.str[7] != '0');
@@ -635,6 +636,8 @@ nxt_h1p_request_header_send(nxt_task_t *task, nxt_http_request_t *r)
if (http11) {
h1p->chunked = 1;
size += sizeof(chunked) - 1;
+ /* Trailing CRLF will be added by the first chunk header. */
+ size -= sizeof("\r\n") - 1;
} else {
h1p->keepalive = 0;
@@ -686,6 +689,7 @@ nxt_h1p_request_header_send(nxt_task_t *task, nxt_http_request_t *r)
if (h1p->chunked) {
p = nxt_cpymem(p, chunked, sizeof(chunked) - 1);
+ /* Trailing CRLF will be added by the first chunk header. */
} else {
*p++ = '\r'; *p++ = '\n';
|
Dev user server with netconn updated comments | @@ -45,7 +45,7 @@ http_parse_uri(esp_pbuf_p p) {
}
pos_e = esp_pbuf_strfind(p, " ", pos_s + 1);/* Find second " " in request header */
if (pos_e == ESP_SIZET_MAX) { /* If there is no second " " */
- /**
+ /*
* HTTP 0.9 request is "GET /\r\n" without
* space between request URI and CRLF
*/
|
acl-plugin: the second and subsequent ACEs incorrect endianness when custom-dump and in VAT
Add the missing function to convert the entire array of rules in the respective _endian functions,
rather than just the first rule. | vl_print (handle, (char *)s); \
vec_free (s);
+static inline void
+vl_api_acl_rule_t_array_endian(vl_api_acl_rule_t *rules, u32 count)
+{
+ u32 i;
+ for(i=0; i<count; i++) {
+ vl_api_acl_rule_t_endian (&rules[i]);
+ }
+}
+
+static inline void
+vl_api_macip_acl_rule_t_array_endian(vl_api_macip_acl_rule_t *rules, u32 count)
+{
+ u32 i;
+ for(i=0; i<count; i++) {
+ vl_api_macip_acl_rule_t_endian (&rules[i]);
+ }
+}
+
static inline void
vl_api_acl_details_t_endian (vl_api_acl_details_t * a)
{
@@ -33,7 +51,7 @@ vl_api_acl_details_t_endian (vl_api_acl_details_t * a)
a->acl_index = clib_net_to_host_u32 (a->acl_index);
/* a->tag[0..63] = a->tag[0..63] (no-op) */
a->count = clib_net_to_host_u32 (a->count);
- vl_api_acl_rule_t_endian (a->r);
+ vl_api_acl_rule_t_array_endian (a->r, a->count);
}
static inline void
@@ -44,7 +62,7 @@ vl_api_macip_acl_details_t_endian (vl_api_macip_acl_details_t * a)
a->acl_index = clib_net_to_host_u32 (a->acl_index);
/* a->tag[0..63] = a->tag[0..63] (no-op) */
a->count = clib_net_to_host_u32 (a->count);
- vl_api_macip_acl_rule_t_endian (a->r);
+ vl_api_macip_acl_rule_t_array_endian (a->r, a->count);
}
@@ -57,7 +75,7 @@ vl_api_acl_add_replace_t_endian (vl_api_acl_add_replace_t * a)
a->acl_index = clib_net_to_host_u32 (a->acl_index);
/* a->tag[0..63] = a->tag[0..63] (no-op) */
a->count = clib_net_to_host_u32 (a->count);
- vl_api_acl_rule_t_endian (a->r);
+ vl_api_acl_rule_t_array_endian (a->r, a->count);
}
static inline void
@@ -68,7 +86,7 @@ vl_api_macip_acl_add_t_endian (vl_api_macip_acl_add_t * a)
a->context = clib_net_to_host_u32 (a->context);
/* a->tag[0..63] = a->tag[0..63] (no-op) */
a->count = clib_net_to_host_u32 (a->count);
- vl_api_macip_acl_rule_t_endian (a->r);
+ vl_api_macip_acl_rule_t_array_endian (a->r, a->count);
}
static inline u8 *
|
scarlet: Enable button command
We'll need button command for FAFT.
BRANCH=none
TEST=confirm 'button' command is in 'help' command list
Commit-Ready: Philip Chen
Tested-by: Philip Chen | #define CONFIG_FORCE_CONSOLE_RESUME
#define CONFIG_HOST_COMMAND_STATUS
+/* Required for FAFT */
+#define CONFIG_CMD_BUTTON
+
/* By default, set hcdebug to off */
#undef CONFIG_HOSTCMD_DEBUG_MODE
#define CONFIG_HOSTCMD_DEBUG_MODE HCDEBUG_OFF
|
Remove freeze menu check on Win10 | @@ -679,7 +679,7 @@ VOID PhMwpInitializeProcessMenu(
PhDestroyEMenuItem(item);
}
- if (PH_IS_REAL_PROCESS_ID(Processes[0]->ProcessId))
+ if (WindowsVersion >= WINDOWS_11 && PH_IS_REAL_PROCESS_ID(Processes[0]->ProcessId))
{
if (PhIsProcessStateFrozen(Processes[0]->ProcessId))
{
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.