message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
|---|---|
WebPLog2FloorC: clear -Wshadow warning
log -> log_value
|
@@ -112,12 +112,12 @@ static WEBP_INLINE void PutLE32(uint8_t* const data, uint32_t val) {
#define WEBP_NEED_LOG_TABLE_8BIT
extern const uint8_t WebPLogTable8bit[256];
static WEBP_INLINE int WebPLog2FloorC(uint32_t n) {
- int log = 0;
+ int log_value = 0;
while (n >= 256) {
- log += 8;
+ log_value += 8;
n >>= 8;
}
- return log + WebPLogTable8bit[n];
+ return log_value + WebPLogTable8bit[n];
}
// Returns (int)floor(log2(n)). n must be > 0.
|
[core] tolerate dup array config values if match
tolerate duplicated array config values if identical key and value
(still issue warning trace)
|
@@ -99,27 +99,38 @@ static data_unset *configparser_merge_data(data_unset *op1, const data_unset *op
case TYPE_ARRAY: {
array *dst = &((data_array *)op1)->value;
array *src = &((data_array *)op2)->value;
- data_unset *du;
+ const data_unset *du, *ddu;
size_t i;
for (i = 0; i < src->used; i ++) {
du = (data_unset *)src->data[i];
if (du) {
- if (buffer_is_empty(&du->key) || !array_get_element_klen(dst, CONST_BUF_LEN(&du->key))) {
+ if (buffer_is_empty(&du->key)
+ || !(ddu = array_get_element_klen(dst, CONST_BUF_LEN(&du->key)))){
array_insert_unique(dst, du->fn->copy(du));
} else {
fprintf(stderr, "Duplicate array-key '%s'\n", du->key.ptr);
+ if (ddu->type == du->type) {
+ /*(ignore if new key/value pair matches existing key/value)*/
+ if (du->type == TYPE_STRING
+ && buffer_is_equal(&((data_string *)du)->value,
+ &((data_string *)ddu)->value))
+ continue;
+ if (du->type == TYPE_INTEGER
+ && ((data_integer*)du)->value == ((data_integer*)ddu)->value)
+ continue;
+ }
op1->fn->free(op1);
return NULL;
}
}
}
break;
+ }
default:
force_assert(0);
break;
}
- }
return op1;
}
|
Fix err assignment typo
Fixes
|
@@ -438,7 +438,7 @@ func (r *Reader) SeekRange(low int64, high int64) error {
func (r *Reader) seek(offset int64, whence int, limit int64) (int64, error) {
if r.concReader.ready() {
n, err := r.concReader.seek(offset, whence, limit)
- r.err = r.err
+ r.err = err
return n, err
}
|
debian: explicitly install qemu-system-x86
|
@@ -7,7 +7,7 @@ jobs:
steps:
- checkout
- run: sudo apt-get update
- - run: sudo apt-get install nasm qemu ent ruby rustc
+ - run: sudo apt-get install nasm qemu-system-x86 ent ruby rustc
- run: cd .. && git clone git@github.com:nanovms/ops.git
- run: make
- run: curl https://ops.city/get.sh -sSfL | sh
@@ -23,7 +23,7 @@ jobs:
steps:
- checkout
- run: sudo apt-get update
- - run: sudo apt-get install nasm qemu ent ruby rustc
+ - run: sudo apt-get install nasm qemu-system-x86 ent ruby rustc
- run: make
- run: curl https://ops.city/get.sh -sSfL | sh
- run:
|
nimble/ll: Disable vnd assert on BabbleSim
BabbleSim does not understand __BKPT(0) and we can simply assert instead.
|
@@ -513,7 +513,7 @@ syscfg.vals.BLE_LL_CFG_FEAT_LL_EXT_ADV:
# Enable vendor event on assert in standalone build to make failed assertions in
# controller code visible when connected to external host
-syscfg.vals.!BLE_HOST:
+syscfg.vals.'!BLE_HOST && !BABBLESIM':
BLE_LL_HCI_VS_EVENT_ON_ASSERT: 1
syscfg.restrictions:
|
ames: more informative printing
|
=/ =bone bone.shut-packet
::
?: ?=(%& -.meat.shut-packet)
+ =+ ?~ dud ~
+ %. ~
+ (slog leaf+"ames: crashed on fragment" >mote.u.dud< tang.u.dud)
(run-message-sink bone %hear lane shut-packet ?=(~ dud))
:: Just try again on error, printing trace
::
::
=+ ?~ dud ~
%. ~
- (slog leaf+"ames: crashed on message ack" >mote.u.dud< tang.u.dud)
+ (slog leaf+"ames: crashed on ack" >mote.u.dud< tang.u.dud)
(run-message-pump bone %hear [message-num +.meat]:shut-packet)
:: +on-memo: handle request to send message
::
?. ?=([%hear * * ok=%.n] task)
:: fresh boon; give message to client vane
::
- %- (trace msg.veb |.("boon {<her.channel^bone=bone -.task>}"))
+ %- %+ trace msg.veb
+ =/ dat [her.channel bone=bone message-num=message-num -.task]
+ |.("sink boon {<dat>}")
peer-core
:: we previously crashed on this message; notify client vane
::
%- %+ trace msg.veb
- |.("crashed on boon {<her.channel^bone=bone -.task>}")
+ =/ dat [her.channel bone=bone message-num=message-num -.task]
+ |.("crashed on sink boon {<dat>}")
boon-to-lost
:: +boon-to-lost: convert all boons to losts
::
++ on-sink-nack-trace
|= [=message-num message=*]
^+ peer-core
- %- (trace msg.veb |.("nack trace {<her.channel^bone=bone>}"))
+ %- %+ trace msg.veb
+ =/ dat [her.channel bone=bone message-num=message-num]
+ |.("sink naxplanation {<dat>}")
::
=+ ;; =naxplanation message
:: ack nack-trace message (only applied if we don't later crash)
++ on-sink-plea
|= [=message-num message=*]
^+ peer-core
- %- (trace msg.veb |.("plea {<her.channel^bone=bone>}"))
+ %- %+ trace msg.veb
+ =/ dat [her.channel bone=bone message-num=message-num]
+ |.("sink plea {<dat>}")
:: is this the first time we're trying to process this message?
::
?. ?=([%hear * * ok=%.n] task)
|
kyth_to_proto tool 4 jdk11
|
},
"kythe_to_proto": {
"formula": {
- "sandbox_id": [239255977],
+ "sandbox_id": [403346294],
"match": "KYTHETOPROTO"
}
},
|
Fix 'no-ec'
|
@@ -868,6 +868,7 @@ int tls_construct_stoc_ec_pt_formats(SSL *s, WPACKET *pkt, unsigned int context,
}
#endif
+#ifndef OPENSSL_NO_EC
int tls_construct_stoc_supported_groups(SSL *s, WPACKET *pkt,
unsigned int context, X509 *x,
size_t chainidx, int *al)
@@ -923,6 +924,7 @@ int tls_construct_stoc_supported_groups(SSL *s, WPACKET *pkt,
return 1;
}
+#endif
int tls_construct_stoc_session_ticket(SSL *s, WPACKET *pkt,
unsigned int context, X509 *x,
|
minor printout
|
@@ -63,7 +63,7 @@ static void print_init_header(const ScsData *d, const ScsCone *k) {
scs_printf("-");
}
scs_printf(
- "\n\t\tSCS v%s - Splitting Conic Solver\n\t (c) Brendan "
+ "\n\t SCS v%s - Splitting Conic Solver\n\t(c) Brendan "
"O'Donoghue, Stanford University, 2012\n",
SCS(version)());
for (i = 0; i < LINE_LEN; ++i) {
@@ -652,7 +652,7 @@ static void print_footer(const ScsData *d, const ScsCone *k, ScsSolution *sol,
scs_printf(" (x'Px)^(1/2) = %.4e\n", SQRTF(MAX(info->xt_p_x, 0.)));
scs_printf(" c'x = %.4f\n", SCS(dot)(d->c, sol->x, d->n));
} else {
- scs_printf("cone: dist(s, K) = %.4e, dist(y, K*) = %.4e\n",
+ scs_printf("cones: dist(s, K) = %.4e, dist(y, K*) = %.4e\n",
get_pri_cone_dist(sol->s, k, w->cone_work, d->m),
get_dual_cone_dist(sol->y, k, w->cone_work, d->m));
scs_printf("comp slack: s'y/|s||y| = %.4e\n",
|
misc: papi - add __repr__ to FuncWrapper
Eases troubleshooting.
Changes:
<FuncWrapper object at 0x7fa7402de790>
to
<FuncWrapper(func=<want_ip6_ra_events(u16 _vl_msg_id, u32 client_index, u32 context, u8 enable_disable, u32 pid)>)>
Type: refactor
|
@@ -104,6 +104,9 @@ class FuncWrapper(object):
def __call__(self, **kwargs):
return self._func(**kwargs)
+ def __repr__(self):
+ return '<FuncWrapper(func=<%s(%s)>)>' % (self.__name__, self.__doc__)
+
class VPPApiError(Exception):
pass
|
Fix security policy test for S2N_NO_PQ
|
@@ -50,7 +50,7 @@ int main(int argc, char **argv)
EXPECT_EQUAL(security_policy->kem_preferences->kems, pq_kems_r2r1);
#else
EXPECT_FALSE(s2n_pq_kem_is_extension_required(security_policy));
- EXPECT_EQUAL(0, security_policy->kem_preferences->count);
+ EXPECT_EQUAL(0, security_policy->kem_preferences->kem_count);
EXPECT_NULL(security_policy->kem_preferences->kems);
#endif
|
test: fix the stopBpfRecorder mock to not return an error when no PID is found
|
@@ -458,7 +458,7 @@ func TestReconcile(t *testing.T) {
}, nil)
mock.DialBpfRecorderReturns(nil, func() {}, nil)
mock.SyscallsForProfileReturns(nil, bpfrecorder.ErrNotFound)
- mock.StopBpfRecorderReturns(errTest) // will be ignored
+ mock.StopBpfRecorderReturns(nil)
},
assert: func(sut *RecorderReconciler, err error) {
assert.Nil(t, err)
|
Fix for emulator in iPhone SE
|
@@ -249,11 +249,13 @@ body {
@media only screen and (max-device-width: 320px) and (orientation: portrait) {
#controller_dpad {
- left: 10px;
+ left: -5px;
+ bottom: -5px;
}
#controller_a {
right: 5px;
+ bottom: 95px;
}
#controller_b {
@@ -269,7 +271,7 @@ body {
}
}
-@media only screen and (max-width: 500px) and (max-height: 500px) {
+@media only screen and (max-width: 500px) and (max-height: 400px) {
#controller {
display: none;
}
|
Reduce number of fan modes to 10 from 256. Add five second run-up at startup.
|
@@ -21,19 +21,16 @@ const (
defaultTempTarget = 50.
hysteresis = float32(1.)
- /* This puts our PWM frequency at 19.2 MHz / 128 =
- /* 150kHz. Higher frequencies will reduce audible switching
- /* noise but will be less efficient */
- pwmClockDivisor = 128
+ pwmClockDivisor = 100
/* Minimum duty cycle is the point below which the fan does
/* not spin. This depends on both your fan and the switching
/* transistor used. */
- defaultPwmDutyMin = 20
- pwmDutyMax = 256
+ defaultPwmDutyMin = 1
+ pwmDutyMax = 10
// how often to update
- delaySeconds = 2
+ delaySeconds = 30
// GPIO-1/BCM "18"/Pin 12 on a Raspberry PI 3
defaultPin = 1
@@ -50,7 +47,15 @@ var stdlog, errlog *log.Logger
func fanControl(pwmDutyMin int, pin int, tempTarget float32) {
cPin := C.int(pin)
+
C.wiringPiSetup()
+
+ // Power on "test". Allows the user to verify that their fan is working.
+ C.pinMode(cPin, C.OUTPUT)
+ C.digitalWrite(cPin, C.HIGH)
+ time.Sleep(5 * time.Second)
+ C.digitalWrite(cPin, C.LOW)
+
C.pwmSetMode(C.PWM_MODE_BAL)
C.pinMode(cPin, C.PWM_OUTPUT)
C.pwmSetRange(pwmDutyMax)
|
[cmake] use cmake -E touch rather than touch (which may no exist)
|
@@ -86,7 +86,7 @@ macro(doxy2swig_docstrings COMP)
# No doxy2swig but
# generate empty ${COMP}-docstrings.i file (required because of %include in swig files)
add_custom_command(OUTPUT ${SICONOS_SWIG_ROOT_DIR}/${COMP}-docstrings.i
- COMMAND touch
+ COMMAND ${CMAKE_COMMAND} -E touch
ARGS ${SICONOS_SWIG_ROOT_DIR}/${COMP}-docstrings.i
)
add_custom_target(${COMP}_docstrings DEPENDS ${SICONOS_SWIG_ROOT_DIR}/${COMP}-docstrings.i
|
Unbreak compilation when using SCTP_DETAILED_STR_STATS option.
|
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctputil.c 325370 2017-11-03 20:46:12Z tuexen $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctputil.c 326163 2017-11-24 12:18:48Z tuexen $");
#endif
#include <netinet/sctp_os.h>
@@ -5091,14 +5091,14 @@ sctp_release_pr_sctp_chunk(struct sctp_tcb *stcb, struct sctp_tmit_chunk *tp1,
stcb->asoc.abandoned_sent[PR_SCTP_POLICY(tp1->flags)]++;
stcb->asoc.strmout[sid].abandoned_sent[0]++;
#if defined(SCTP_DETAILED_STR_STATS)
- stcb->asoc.strmout[stream].abandoned_sent[PR_SCTP_POLICY(tp1->flags)]++;
+ stcb->asoc.strmout[sid].abandoned_sent[PR_SCTP_POLICY(tp1->flags)]++;
#endif
} else {
stcb->asoc.abandoned_unsent[0]++;
stcb->asoc.abandoned_unsent[PR_SCTP_POLICY(tp1->flags)]++;
stcb->asoc.strmout[sid].abandoned_unsent[0]++;
#if defined(SCTP_DETAILED_STR_STATS)
- stcb->asoc.strmout[stream].abandoned_unsent[PR_SCTP_POLICY(tp1->flags)]++;
+ stcb->asoc.strmout[sid].abandoned_unsent[PR_SCTP_POLICY(tp1->flags)]++;
#endif
}
do {
|
Added -DCMAKE_PREFIX_PATH=\$AOMP/lib/cmake to build_comgr.sh cmake options.
If a user had reference to /opt/rocm in \$PATH, the cmake default path search order would resolve find_path(AMDDeviceLibs) in /opt/rocm/lib/cmake, causing a build failure for AOMP.
|
@@ -78,7 +78,7 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
$SUDO rm -rf $BUILD_AOMP/build/comgr
export LLVM_DIR=$AOMP_INSTALL_DIR
export Clang_DIR=$AOMP_INSTALL_DIR
- MYCMAKEOPTS="-DCMAKE_INSTALL_PREFIX=$INSTALL_COMGR -DCMAKE_BUILD_TYPE=$BUILDTYPE $AOMP_ORIGIN_RPATH -DLLVM_BUILD_MAIN_SRC_DIR=$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/llvm -DLLVM_DIR=$AOMP_INSTALL_DIR -DClang_DIR=$AOMP_INSTALL_DIR -DAMD_COMGR_BUILD_NO_ROCM=ON"
+ MYCMAKEOPTS="-DCMAKE_INSTALL_PREFIX=$INSTALL_COMGR -DCMAKE_BUILD_TYPE=$BUILDTYPE $AOMP_ORIGIN_RPATH -DLLVM_BUILD_MAIN_SRC_DIR=$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/llvm -DLLVM_DIR=$AOMP_INSTALL_DIR -DClang_DIR=$AOMP_INSTALL_DIR -DAMD_COMGR_BUILD_NO_ROCM=ON -DCMAKE_PREFIX_PATH=$AOMP/lib/cmake"
mkdir -p $BUILD_AOMP/build/comgr
cd $BUILD_AOMP/build/comgr
echo " -----Running comgr cmake ---- "
|
Fix scanbuild
|
@@ -661,13 +661,15 @@ nt_dtls_install(neat_ctx *ctx, struct neat_pollable_socket *sock)
struct security_data *private = calloc (1, sizeof (struct security_data));
struct neat_dtls_data *dtls = calloc (1, sizeof( struct neat_dtls_data));
- if (!private) {
- nt_log(ctx, NEAT_LOG_ERROR, "%s - calloc failed", __func__);
- return NEAT_ERROR_SECURITY;
+ if (!private || !dtls) {
+ if (private) {
+ free(private);
+ }
+
+ if (dtls) {
+ free(dtls);
}
- if (!dtls) {
- free(private);
nt_log(ctx, NEAT_LOG_ERROR, "%s - calloc failed", __func__);
return NEAT_ERROR_SECURITY;
}
@@ -789,12 +791,15 @@ copy_dtls_data(struct neat_pollable_socket *newSocket, struct neat_pollable_sock
struct security_data *private = calloc (1, sizeof(struct security_data));
struct neat_dtls_data *dtls = calloc (1, sizeof(struct neat_dtls_data));
- if (!private) {
- return NEAT_ERROR_SECURITY;
+ if (!private || !dtls) {
+ if (private) {
+ free(private);
+ }
+
+ if (dtls) {
+ free(dtls);
}
- if (!dtls) {
- free(private);
return NEAT_ERROR_SECURITY;
}
|
Add a CHANGES entry for EVP_PKEY_public_check() and EVP_KEY_param_check()
These functions now work for more key types than they did in 1.1.1
Fixes
|
@@ -22,7 +22,8 @@ EVP_PKEY_pairwise_check
=head1 DESCRIPTION
EVP_PKEY_param_check() validates the parameters component of the key
-given by B<ctx>.
+given by B<ctx>. This check will always succeed for key types that do not have
+parameters.
EVP_PKEY_param_check_quick() validates the parameters component of the key
given by B<ctx> like EVP_PKEY_param_check() does. However some algorithm
|
Update: Timing in toothbrush example can be shorter
|
<(*,toothbrush,plastic) --> made_of>. :|:
<#1 --> [unscrewing]>! :|:
//expected: ^left executed with args ({SELF} * toothbrush)
-100
+10
//some time later:
<toothbrush --> [pliable]>. :|:
<#1 --> [unscrewing]>! :|:
//expected: ^right executed with args ({SELF} * toothbrush)
//some time later:
+10
<toothbrush --> [hardened]>. :|:
<#1 --> [unscrewing]>! :|:
//expected: ^down executed with args ({SELF} * toothbrush)
|
Ensure samtools commands don't add `@PG` headers
Work around the behaviour change in Samtools 1.10 whereby commands
that output SAM/BAM/CRAM now default to adding their own `@PG` headers.
Use GNU Make functions to probe the usage display for the existence
of a --no-PG option, to work with either <= 1.9 or >= 1.10.
|
@@ -3,6 +3,7 @@ BAM=$(SAM:%.sam=%.bam)
BAI=$(BAM:%.bam=%.bam.bai)
CRAM=ex1.cram ex2.cram ex3.cram
CRAI=$(CRAM:%.cram=%.cram.crai)
+NO_PG:=$(findstring --no-PG,$(shell samtools view))
# ex2.bam - bam file without index
@@ -26,22 +27,22 @@ all: ex1.pileup.gz \
# ex2.sam - as ex1.sam, but with header
ex2.sam.gz: ex1.bam ex1.bam.bai
- samtools view -h ex1.bam | gzip > ex2.sam.gz
+ samtools view $(NO_PG) -h ex1.bam | gzip > ex2.sam.gz
with_md.sam.gz: ex2.bam ex1.fa
- samtools calmd --output-fmt BAM $^ > $@
+ samtools calmd $(NO_PG) --output-fmt BAM $^ > $@
#%.bam: %.sam ex1.fa.fai
-# samtools view -bo $@ -t ex1.fa.fai $<
+# samtools view $(NO_PG) -bo $@ -t ex1.fa.fai $<
uncompressed.bam: ex2.sam
- samtools view -buS $< > $@
+ samtools view $(NO_PG) -buS $< > $@
%.bam: %.sam
- samtools view -bS $< > $@
+ samtools view $(NO_PG) -bS $< > $@
%.cram: %.sam
- samtools view -bC -T ex1.fa $< > $@
+ samtools view $(NO_PG) -bC -T ex1.fa $< > $@
%.cram.crai: %.cram
samtools index $<
@@ -53,7 +54,7 @@ ex1.fa.fai:ex1.fa
samtools faidx ex1.fa
ex1.bam:ex1.sam.gz ex1.fa.fai
- samtools view -bo ex1.bam -t ex1.fa.fai ex1.sam.gz
+ samtools view $(NO_PG) -bo ex1.bam -t ex1.fa.fai ex1.sam.gz
%.bam.bai:%.bam
samtools index $<
@@ -69,11 +70,11 @@ ex1_csi.bam: ex1.bam
samtools index -c ex1_csi.bam
empty.bam: ex2.sam
- grep "^@" $< | samtools view -Sb - > $@
+ grep "^@" $< | samtools view $(NO_PG) -Sb - > $@
example_unmapped_reads_no_sq.bam: example_unmapped_reads_no_sq.sam
touch tmp.list
- samtools view -bo $@ -t tmp.list $<
+ samtools view $(NO_PG) -bo $@ -t tmp.list $<
rm -f tmp.list
example_bai.bam: ex1.bam
|
changed makefile to specify app name
|
@@ -6,6 +6,9 @@ TOCK_USERLAND_BASE_DIR = ../..
# Which files to compile.
C_SRCS := $(wildcard *.c)
+# Change name of generated app
+PACKAGE_NAME = udp-button-press
+
APP_HEAP_SIZE := 2048
# Include userland master makefile. Contains rules and flags for actually
|
[ulog] Optimize code to improve readability.
|
@@ -191,7 +191,7 @@ static void output_unlock(void)
return;
/* If the scheduler is started and in thread context */
- if (rt_thread_self() && (rt_interrupt_get_nest() == 0))
+ if (rt_interrupt_get_nest() == 0 && rt_thread_self() != RT_NULL)
{
rt_sem_release(&ulog.output_locker);
}
@@ -209,7 +209,7 @@ static void output_lock(void)
return;
/* If the scheduler is started and in thread context */
- if (rt_thread_self() && (rt_interrupt_get_nest() == 0))
+ if (rt_interrupt_get_nest() == 0 && rt_thread_self() != RT_NULL)
{
rt_sem_take(&ulog.output_locker, RT_WAITING_FOREVER);
}
|
BugID:19120134:Add logics for http parser
|
#include "http_api.h"
bool httpc_running = false;
-HTTPC_METHOD_TYPE_T method;
+int method;
httpc_handle_t httpc_handle = 0;
char server_name[32] = "http://httpie.org/";
-static int httpc_recv_fun(httpc_handle_t httpc, uint8_t *body_buf, uint16_t body_len, int8_t err)
+static int httpc_recv_fun(httpc_handle_t httpc, uint8_t *buf, int32_t buf_size,
+ int32_t data_len, bool is_final)
{
- LOG("http session %x recv %d bytes data,err %d \n", httpc, body_len, err);
+ LOG("http session %x, buf size %d bytes, recv %d bytes data, is_final %d\n",
+ httpc, buf_size, data_len, is_final);
return 0;
}
@@ -33,8 +35,8 @@ static void httpc_delayed_action(void *arg)
LOG("http session %x method %d at %d\n", httpc_handle, method, (uint32_t)aos_now_ms());
switch (method) {
- case GET:
- httpc_send_request(httpc_handle, GET, NULL, NULL, 0);
+ case HTTP_GET:
+ httpc_send_request(httpc_handle, HTTP_GET, NULL, NULL, 0);
break;
default:
break;
@@ -44,6 +46,8 @@ exit:
aos_post_delayed_action(100, httpc_delayed_action, (void *)(long)method);
}
+#define RSP_BUF_SIZE 2000
+uint8_t rsp_buf[RSP_BUF_SIZE];
static void httpc_cmd_handle(char *buf, int blen, int argc, char **argv)
{
const char *type = argc > 1? argv[1]: "";
@@ -65,6 +69,8 @@ static void httpc_cmd_handle(char *buf, int blen, int argc, char **argv)
settings.socket = fd;
settings.recv_fn = httpc_recv_fun;
settings.server_name = server_name;
+ settings.rsp_buf = rsp_buf;
+ settings.rsp_buf_size = RSP_BUF_SIZE;
httpc_handle = httpc_init(&settings);
if (httpc_handle == 0) {
LOG("http session init fail\n");
@@ -73,7 +79,7 @@ static void httpc_cmd_handle(char *buf, int blen, int argc, char **argv)
}
if (strncmp(type, "GET", strlen("GET")) == 0) {
- method = GET;
+ method = HTTP_GET;
httpc_running = true;
}
}
|
Added splunk transpose test
|
@@ -92,6 +92,7 @@ class SplunkDirectIndexingTest(Test):
sock.send(f"This is my test event {i}! \n".encode('utf-8'))
self.__assert_same_number_of_events(service, events_num, index_name)
+ self.__assert_transposed_results(service, index_name)
return passed(), None
@@ -102,7 +103,6 @@ class SplunkDirectIndexingTest(Test):
logging.info(f"Searching splunk for events. Query: {search_query}")
search_results = service.jobs.oneshot(search_query)
- # Get the results and display them using the ResultsReader
reader = results.ResultsReader(search_results)
actual_events_num = reader.next()['count']
logging.info(f"Found {actual_events_num} events in index {index_name}")
@@ -110,6 +110,13 @@ class SplunkDirectIndexingTest(Test):
assert expected_events_num == int(
actual_events_num), f"Expected to see {expected_events_num} in index, but got only {actual_events_num}"
+ def __assert_transposed_results(self, service, index_name):
+ search_results = service.jobs.oneshot(f"search index={index_name} | head 10 | transpose")
+
+ reader = results.ResultsReader(search_results)
+ for result in reader:
+ assert result.get("column") is not None, f"Attribute 'column' not found in a row {result}"
+
class SplunkKVStoreTest(Test):
|
deprecate engines in provider code
|
* https://www.openssl.org/source/license.html
*/
+/* We need to use some engine deprecated APIs */
+#define OPENSSL_SUPPRESS_DEPRECATED
+
#include <openssl/evp.h>
#include <openssl/core_names.h>
#include <openssl/err.h>
|
[cmake] remove needless arguments from xconfig macro
They were never set or read.
github:
|
@@ -295,10 +295,8 @@ check_c_source_compiles("
" HAVE_STRUCT_TM_GMTOFF)
## refactor me
-macro(XCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
+macro(XCONFIG _package _link_FLAGS _cflags)
# reset the variables at the beginning
- set(${_include_DIR})
- set(${_link_DIR})
set(${_link_FLAGS})
set(${_cflags})
@@ -320,7 +318,7 @@ macro(XCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
else()
message(STATUS "found ${_package}: no")
endif()
-endmacro(XCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
+endmacro()
if(WITH_XATTR)
check_include_files("sys/types.h;sys/xattr.h" HAVE_SYS_XATTR_H)
@@ -339,7 +337,7 @@ else()
endif()
if(WITH_MYSQL)
- xconfig(mysql_config MYSQL_INCDIR MYSQL_LIBDIR MYSQL_LDFLAGS MYSQL_CFLAGS)
+ xconfig(mysql_config MYSQL_LDFLAGS MYSQL_CFLAGS)
set(CMAKE_REQUIRED_INCLUDES /usr/include/mysql)
check_include_files(mysql.h HAVE_MYSQL_H)
@@ -532,7 +530,7 @@ if(WITH_PCRE2)
set(PCRE_CFLAGS "${PCRE2_CFLAGS}")
else()
## if we have pcre2-config, use it
- xconfig(pcre2-config PCRE_INCDIR PCRE_LIBDIR PCRE_LDFLAGS PCRE_CFLAGS)
+ xconfig(pcre2-config PCRE_LDFLAGS PCRE_CFLAGS)
endif()
if(PCRE_LDFLAGS OR PCRE_CFLAGS)
message(STATUS "found pcre2 at: LDFLAGS: ${PCRE_LDFLAGS} CFLAGS: ${PCRE_CFLAGS}")
@@ -581,7 +579,7 @@ if(WITH_PCRE2)
endif()
elseif(WITH_PCRE)
## if we have pcre-config, use it
- xconfig(pcre-config PCRE_INCDIR PCRE_LIBDIR PCRE_LDFLAGS PCRE_CFLAGS)
+ xconfig(pcre-config PCRE_LDFLAGS PCRE_CFLAGS)
if(PCRE_LDFLAGS OR PCRE_CFLAGS)
message(STATUS "found pcre at: LDFLAGS: ${PCRE_LDFLAGS} CFLAGS: ${PCRE_CFLAGS}")
@@ -644,7 +642,7 @@ endif()
if(WITH_XML)
- xconfig(xml2-config XML2_INCDIR XML2_LIBDIR XML2_LDFLAGS XML2_CFLAGS)
+ xconfig(xml2-config XML2_LDFLAGS XML2_CFLAGS)
if(XML2_LDFLAGS OR XML2_CFLAGS)
message(STATUS "found xml2 at: LDFLAGS: ${XML2_LDFLAGS} CFLAGS: ${XML2_CFLAGS}")
|
Adjust A53 SGEMM parameters to reflect move to 8x8 kernel
|
@@ -195,8 +195,13 @@ if (DEFINED CORE AND CMAKE_CROSSCOMPILING AND NOT (${HOST_OS} STREQUAL "WINDOWSS
"#define HAVE_VFP\n"
"#define HAVE_NEON\n"
"#define ARMV8\n")
+if ("${TCORE}" STREQUAL "CORTEXA57")
set(SGEMM_UNROLL_M 16)
set(SGEMM_UNROLL_N 4)
+else
+ set(SGEMM_UNROLL_M 8)
+ set(SGEMM_UNROLL_N 8)
+endif
set(DGEMM_UNROLL_M 8)
set(DGEMM_UNROLL_N 4)
set(CGEMM_UNROLL_M 8)
|
BugID:21997086:[hal]del kv when set value len = 0 to enalbe dynamic register test
|
@@ -26,40 +26,68 @@ static const char *demo_iv = "f165u329c054k637";
int HAL_SetProductKey(char *product_key)
{
- int len = strlen(product_key);
+ int len;
+ if(product_key == NULL) {
+ return -1;
+ }
+ memset(_product_key, 0x0, IOTX_PRODUCT_KEY_LEN + 1);
+ len = strlen(product_key);
if (len > IOTX_PRODUCT_KEY_LEN) {
return -1;
+ } else if (len == 0) {
+ aos_kv_del(DEVINFO_PK);
+ return 0;
}
- memset(_product_key, 0x0, IOTX_PRODUCT_KEY_LEN + 1);
+
strncpy(_product_key, product_key, len);
aos_kv_set(DEVINFO_PK, product_key, len, 1);
+
return len;
}
int HAL_SetDeviceName(char *device_name)
{
- int len = strlen(device_name);
- if (len > IOTX_DEVICE_NAME_LEN) {
+ int len;
+ if(device_name == NULL) {
return -1;
}
+
memset(_device_name, 0x0, IOTX_DEVICE_NAME_LEN + 1);
+ len = strlen(device_name);
+ if (len > IOTX_DEVICE_NAME_LEN) {
+ return -1;
+ } else if (len == 0) {
+ aos_kv_del(DEVINFO_DN);
+ return 0;
+ }
+
strncpy(_device_name, device_name, len);
aos_kv_set(DEVINFO_DN, device_name, len, 1);
+
return len;
}
int HAL_SetProductSecret(char *product_secret)
{
int res;
- int len = strlen(product_secret);
+ int len;
- if (len > IOTX_PRODUCT_SECRET_LEN) {
+ if(product_secret == NULL) {
return -1;
}
+
memset(_product_secret, 0x0, IOTX_PRODUCT_SECRET_LEN + 1);
+ len = strlen(product_secret);
+ if (len > IOTX_PRODUCT_SECRET_LEN) {
+ return -1;
+ } else if (len == 0) {
+ aos_kv_del(DEVINFO_PS);
+ return 0;
+ }
+
strncpy(_product_secret, product_secret, len);
do {
@@ -76,7 +104,6 @@ int HAL_SetProductSecret(char *product_secret)
break;
}
aos_kv_set(DEVINFO_PS, dec_secret, len, 1);
-
} while(0);
return len;
@@ -84,13 +111,23 @@ int HAL_SetProductSecret(char *product_secret)
int HAL_SetDeviceSecret(char *device_secret)
{
- int res;
- int len = strlen(device_secret);
+ int res, len;
+ if(device_secret == NULL) {
+ return -1;
+ }
+
+ memset(_device_secret, 0x0, IOTX_DEVICE_SECRET_LEN + 1);
+ len = strlen(device_secret);
+ if (len > IOTX_DEVICE_SECRET_LEN) {
+ return -1;
+ } else if (len == 0) {
+ aos_kv_del(DEVINFO_DS);
+ return 0;
+ }
if (len > IOTX_DEVICE_SECRET_LEN) {
return -1;
}
- memset(_device_secret, 0x0, IOTX_DEVICE_SECRET_LEN + 1);
strncpy(_device_secret, device_secret, len);
do {
|
nimble/phy: Fix setting correct GPIO PORT
Pin is already masked in this place, so pin > 31 will always result in
0. Therefore check for already known port.
|
@@ -1235,7 +1235,7 @@ ble_phy_dbg_time_setup_gpiote(int index, int pin)
(GPIOTE_CONFIG_MODE_Task << GPIOTE_CONFIG_MODE_Pos) |
((pin & 0x1F) << GPIOTE_CONFIG_PSEL_Pos) |
#if NRF52840_XXAA
- ((pin > 31) << GPIOTE_CONFIG_PORT_Pos);
+ ((port == NRF_P1) << GPIOTE_CONFIG_PORT_Pos);
#else
0;
#endif
|
Do not join lru and slab maintainer threads if they do not exist
If no_modern option was supplied then these threads did not run
but memcached still attempted to join them, which resulted in a
segfault.
resolve
|
@@ -226,12 +226,16 @@ void stop_threads(void) {
stop_item_crawler_thread(CRAWLER_WAIT);
if (settings.verbose > 0)
fprintf(stderr, "stopped lru crawler\n");
+ if (settings.lru_maintainer_thread) {
stop_lru_maintainer_thread();
if (settings.verbose > 0)
fprintf(stderr, "stopped maintainer\n");
+ }
+ if (settings.slab_reassign) {
stop_slab_maintenance_thread();
if (settings.verbose > 0)
fprintf(stderr, "stopped slab mover\n");
+ }
logger_stop();
if (settings.verbose > 0)
fprintf(stderr, "stopped logger thread\n");
|
Java: adding Content-Type response header for static files.
|
@@ -313,6 +313,7 @@ public class Context implements ServletContext, InitParams
} else {
response.setContentLengthLong(f.length());
+ response.setContentType(getMimeType(f.getName()));
InputStream is = new FileInputStream(f);
byte[] buffer = new byte[response.getBufferSize()];
|
add stm32g4 cat3 (dual flash bank) devices.
|
@@ -554,6 +554,20 @@ static const struct stlink_chipid_params devices[] = {
.bootrom_base = 0x1fff0000,
.bootrom_size = 0x7000 // 28K (table 2)
},
+ {
+ // STM32G471/473/474/483/484 (from RM0440)
+ .chip_id = STLINK_CHIPID_STM32_G4_CAT3,
+ .description = "G4 Category-3",
+ .flash_type = STLINK_FLASH_TYPE_G4,
+ .flash_size_reg = 0x1FFF75E0, // Section 47.2
+ .flash_pagesize = 0x800, // 2K (sec 3.3.1)
+ // SRAM1 is 80k at 0x20000000
+ // SRAM2 is 16k at 0x20014000
+ // SRAM3/CCM is 32k at 0x10000000, aliased at 0x20018000
+ .sram_size = 0x18000, // 128K (sec 2.4)
+ .bootrom_base = 0x1fff0000,
+ .bootrom_size = 0x7000 // 28K (table 2)
+ },
{
// STM32WB55 (from RM0434)
.chip_id = STLINK_CHIPID_STM32_WB55,
|
build/configs/imxrt1020-evk : Enable Task Manager in loadable defconfig
For supporting task manager by default in loadable, enable its config in defconfig.
|
@@ -557,6 +557,11 @@ CONFIG_SIG_SIGCHLD=4
CONFIG_SIG_SIGBM_STATE=15
CONFIG_SIG_SIGCONDTIMEDOUT=16
CONFIG_SIG_SIGWORK=17
+CONFIG_SIG_SIGTM_UNICAST=18
+CONFIG_SIG_SIGTM_PAUSE=19
+CONFIG_SIG_SIGTM_RESUME=20
+CONFIG_SIG_SIGTM_BROADCAST=21
+CONFIG_SIG_SIGTM_TERMINATION=23
CONFIG_SIG_MESSAGING_UNICAST=25
#
@@ -1171,6 +1176,7 @@ CONFIG_DEBUG_NET=y
#
# CONFIG_DEBUG_IOTBUS is not set
# CONFIG_DEBUG_MESSAGING_IPC is not set
+# CONFIG_DEBUG_TASK_MANAGER is not set
#
# OS Function Debug Options
@@ -1362,6 +1368,7 @@ CONFIG_MPUTEST_APP_ADDR=0x80200100
# CONFIG_EXAMPLES_SMART_TEST is not set
# CONFIG_EXAMPLES_ST_THINGS is not set
# CONFIG_EXAMPLES_SYSCALL_PERFORMANCE is not set
+# CONFIG_EXAMPLES_TASK_MANAGER_SAMPLE is not set
CONFIG_EXAMPLES_TESTCASE=y
# CONFIG_DISABLE_MANUAL_TESTCASE is not set
# CONFIG_EXAMPLES_TESTCASE_DRIVERS is not set
@@ -1467,6 +1474,8 @@ CONFIG_SYSIO_UTC_ADC=y
CONFIG_SYSIO_UTC_GPIO1_NUM=5
CONFIG_SYSIO_UTC_GPIO2_NUM=9
# CONFIG_EXAMPLES_TESTCASE_SYSTEMIO_ITC is not set
+CONFIG_EXAMPLES_TESTCASE_TASK_MANAGER_UTC=y
+# CONFIG_EXAMPLES_TESTCASE_TASK_MANAGER_ITC is not set
CONFIG_EXAMPLES_TESTCASE_WIFI_MANAGER_UTC=y
#
@@ -1600,7 +1609,11 @@ CONFIG_BINMGR_UPDATE=y
#
# Task manager
#
-# CONFIG_TASK_MANAGER is not set
+CONFIG_TASK_MANAGER=y
+CONFIG_TASK_MANAGER_MAX_TASKS=32
+CONFIG_TASK_MANAGER_MAX_MSG=32
+# CONFIG_TASK_MANAGER_USER_SPECIFIC_BROADCAST is not set
+CONFIG_TASK_MANAGER_UNICAST_REPLY_TIMEOUT=0
#
# Event Loop Framework
|
hw/mcu/da1469x: Fix CMAC sleep enable
We should only enable sleep in CMAC when XTAL32K is settled.
|
#include <string.h>
#include "os/os.h"
#include "mcu/cmsis_nvic.h"
+#include "mcu/da1469x_lpclk.h"
#include "mcu/da1469x_cmac.h"
#include "mcu/da1469x_hal.h"
#include "mcu/da1469x_pdc.h"
@@ -160,6 +161,15 @@ done:
os_trace_isr_exit();
}
+static void
+da1469x_cmac_lpclk_cb(void)
+{
+ struct cmac_config_dynamic *cmac_config_dyn;
+
+ cmac_config_dyn = CMAC_SYM_CONFIG_DYN;
+ cmac_config_dyn->enable_sleep = true;
+}
+
void
da1469x_cmac_mbox_write(const uint8_t *buf, size_t len)
{
@@ -267,7 +277,7 @@ da1469x_cmac_init(void)
cmac_config->synth_tcs_length = 0;
cmac_config->rfcu_tcs_length = 0;
cmac_config->default_tx_power = 4;
- cmac_config_dyn->enable_sleep = true;
+ cmac_config_dyn->enable_sleep = false;
/* Release CMAC from reset */
CRG_TOP->CLK_RADIO_REG &= ~CRG_TOP_CLK_RADIO_REG_CMAC_SYNCH_RESET_Msk;
@@ -288,4 +298,6 @@ da1469x_cmac_init(void)
NVIC_EnableIRQ(CMAC2SYS_IRQn);
da1469x_cmac_pdc_signal();
+
+ da1469x_lpclk_register_cmac_cb(da1469x_cmac_lpclk_cb);
}
|
OcCryptoLib: Silence compiler warnings
closes acidanthera/bugtracker#638
|
@@ -313,7 +313,7 @@ BigNumRightShiftWordsAndBits (
//
//ASSERT (NumWords > 0);
- for (Index = NumWords; Index < NumWordsA - 1; ++Index) {
+ for (Index = NumWords; Index < (UINTN) (NumWordsA - 1); ++Index) {
Result[Index - NumWords] = (A[Index] >> NumBits) | (A[Index + 1] << (OC_BN_WORD_NUM_BITS - NumBits));
}
//
|
Build: openjpeg 2.4.0
|
# granted to it by virtue of its status as an intergovernmental organisation nor
# does it submit to any jurisdiction.
-# - Try to find the OpenJPEG includes and library (version 1.5.x, 2.1.x, 2.2.x, 2.3.x)
+# - Try to find the OpenJPEG includes and library (version 1.5.x, 2.1.x, 2.2.x, 2.3.x, 2.4.x)
# This module defines
#
# OPENJPEG_FOUND - System has OpenJPEG
# Note: OpenJPEG has a version-specific subdirectory in the include
# e.g. include/openjpeg-2.0 or include/openjpeg-2.1.
-# Only version 1.5.x and 2.[123].x are supported.
+# Only version 1.5.x and 2.[1234].x are supported.
# The library name is different for 1.x (libopenjpeg) and 2.x (libopenjp2).
-set( _suff include include/openjpeg include/openjpeg-1.5 include/openjpeg-2.1 include/openjpeg-2.2 include/openjpeg-2.3)
+set( _suff include include/openjpeg include/openjpeg-1.5 include/openjpeg-2.1
+ include/openjpeg-2.2 include/openjpeg-2.3 include/openjpeg-2.4 )
find_path( OPENJPEG_INCLUDE_DIR openjpeg.h
PATHS ${OPENJPEG_PATH} ENV OPENJPEG_PATH
${OPENJPEG_DIR} ENV OPENJPEG_DIR
|
libhfuzz/instrument: avoid situation in which two instrumented by honggfuzz modules (libraries, binaries) call into each other's memcmp
|
@@ -67,7 +67,15 @@ static int _memcmp(const void* m1, const void* m2, size_t n) {
int (*libc_memcmp)(const void* s1, const void* s2, size_t n) = _memcmp;
-static void* getsym(const char* sym) {
+static void* getsym(const char* fname, const char* sym) {
+ if (fname) {
+ void* dlh = dlopen(fname, RTLD_LAZY);
+ if (!dlh) {
+ return NULL;
+ }
+ return dlsym(dlh, sym);
+ }
+
#if defined(RTLD_NEXT)
return dlsym(RTLD_NEXT, sym);
#else /* defined(RTLD_NEXT) */
@@ -80,11 +88,27 @@ static void* getsym(const char* sym) {
}
extern int __wrap_memcmp(const void* s1, const void* s2, size_t n) __attribute__((weak));
+extern int __sanitizer_weak_hook_memcmp(const void* s1, const void* s2, size_t n)
+ __attribute__((weak));
static void initializeLibcFunctions(void) {
- libc_memcmp = (int (*)(const void* s1, const void* s2, size_t n))getsym("memcmp");
+ /*
+ * Look for the original "memcmp" function.
+ *
+ * First, in standard C libraries, because if an instrumented shared library is loaded, it can
+ * overshadow the libc's symbol. Next, among the already loaded symbols.
+ */
+ libc_memcmp = (int (*)(const void* s1, const void* s2, size_t n))getsym("libc.so.6", "memcmp");
+ if (!libc_memcmp) {
+ libc_memcmp =
+ (int (*)(const void* s1, const void* s2, size_t n))getsym("libc.so", "memcmp");
+ }
+ if (!libc_memcmp) {
+ libc_memcmp = (int (*)(const void* s1, const void* s2, size_t n))getsym(NULL, "memcmp");
+ }
- LOG_D("libc_memcmp=%p, (_memcmp=%p, memcmp=%p, __wrap_memcmp=%p)", libc_memcmp, _memcmp, memcmp,
- __wrap_memcmp);
+ LOG_D("libc_memcmp=%p, (_memcmp=%p, memcmp=%p, __wrap_memcmp=%p, "
+ "__sanitizer_weak_hook_memcmp=%p)",
+ libc_memcmp, _memcmp, memcmp, __wrap_memcmp, __sanitizer_weak_hook_memcmp);
if (!libc_memcmp) {
LOG_W("dlsym(memcmp) failed: %s", dlerror());
@@ -94,6 +118,10 @@ static void initializeLibcFunctions(void) {
LOG_W("dlsym(memcmp)==__wrap_memcmp: %p==%p", libc_memcmp, __wrap_memcmp);
libc_memcmp = _memcmp;
}
+ if (libc_memcmp == __sanitizer_weak_hook_memcmp) {
+ LOG_W("dlsym(memcmp)==__sanitizer_weak_hook_memcmp: %p==%p", libc_memcmp, __wrap_memcmp);
+ libc_memcmp = _memcmp;
+ }
}
static void* initializeTryMapHugeTLB(int fd, size_t sz) {
|
Add HTTP header in aws_iot_ota_http.c
|
/* OTA includes. */
#include "aws_iot_ota_agent.h"
#include "aws_iot_ota_agent_internal.h"
+#include "aws_iot_ota_http.h"
/* Logging includes. */
#ifdef IOT_LOG_LEVEL_GLOBAL
|
config_tools: add vcat support for configurator
add vcat support
|
<template>
<div>
- <Slider v-model="hexField" :merge="-1" :max="max" :tooltips="false"/>
+ <Slider v-model="hexField" :max="max" :tooltips="false" :options="sliderOptions"/>
</div>
</template>
<script>
import Slider from '@vueform/slider'
+function count(source, target) {
+ return (source.match(new RegExp(target, 'g')) || []).length;
+}
+
export default {
name: "HexBlockRangeSelector",
components: {
Slider,
},
computed: {
+ sliderOptions() {
+ let options = {}
+ if (this.isVcat) {
+ options['behaviour'] = 'drag-fixed'
+ }
+ return options
+ },
hexField: {
get() {
- let strBin = parseInt(this.modelValue).toString(2)
- let rangeStart = 0;
- for (let i = strBin.length - 1; i >= 0; i--) {
- if (strBin[i] === '0') {
- rangeStart++
+ let str_bin = Number.parseInt(this.modelValue).toString(2);
+ let block_length = str_bin.length;
+ let block_enabled_length = count(str_bin, "1");
+
+ let start = 0
+ let end = 0
+
+ if (block_length > this.max) {
+ if (block_enabled_length >= this.max) {
+ str_bin = "1".repeat(this.max);
+ } else {
+ str_bin = "0".repeat(this.max - block_enabled_length) + "1".repeat(block_enabled_length);
+ }
} else {
- break
+ if (block_length < this.max) {
+ str_bin = "0".repeat(this.max - block_length) + str_bin;
}
}
- let rangeEnd = strBin.length;
- return [this.max - rangeEnd, this.max - rangeStart]
+
+ start = str_bin.indexOf("1") !== -1 ? str_bin.indexOf("1") : 0;
+ end = start + count(str_bin, "1");
+
+ // noinspection UnnecessaryLocalVariableJS
+ let result = [start, end]
+ return result
+
},
set(value) {
if (value[0] - value[1] === 0) {
this.hexField = this.lastVal;
return;
}
- this.lastVal = value;
- let result = ""
- for (let i = 0; i < this.max; i++) {
- let tmp = null;
- if (i < value[0]) {
- tmp = '0'
- } else if (i < value[1]) {
- tmp = '1'
- } else if (i >= value[1]) {
- tmp = '0'
- } else {
- debugger
- throw new Error('???')
- }
- result += tmp;
- }
- console.log(result)
- result = '0x' + (parseInt(result, 2).toString(16))
+ this.lastVal = this.hexField
+ let result = '0'.repeat(value[0]) + '1'.repeat(value[1] - value[0]) + '0'.repeat(this.max - value[1])
+ result = (parseInt(result, 2).toString(16))
+ let zeroPadding = '0'.repeat(Number.parseInt('1'.repeat(this.max), 2).toString(16).length - result.length)
+ result = '0x' + zeroPadding + result
console.log(result)
this.$emit("update:modelValue", result);
}
@@ -59,6 +72,9 @@ export default {
return {lastVal: [0, 1]}
},
props: {
+ isVcat: {
+ type: Boolean
+ },
modelValue: {
type: String
},
|
Better formatting for ++range and ++place definitions.
|
::TODO separate stream for just msgs? what about just configs? presences?
:: yes!
== ::
- ::TODO more newlines
-++ range (unit {hed/place tal/(unit place)}) ::< inclusive msg range
-++ place $%({$da @da} {$ud @ud}) ::< @ud/@da for range
+++ range ::> inclusive msg range
+ %- unit ::< ~ means everything
+ $: hed/place ::< start of range
+ tal/(unit place) ::< opt end of range
+ == ::
+++ place ::> range indicators
+ $% {$da @da} ::< date
+ {$ud @ud} ::< message number
+ == ::
++ prize ::> query result
$% {$reader prize-reader} ::< /reader
{$friend cis/(set circle)} ::< /friend
|
Update changelog entry
Remove internal details. Add the condition of the bug.
|
Bugfix
- * Fix a build bug : when parallel out-of-box build with cmake, it raise file
- not found error. That's due to same target is included in different sub-
- makefiles. And cmake will call the targets in different forked `make`
- process. As a result, the dependancy will be broken. This fix remove the
- targets in sub-makefiles and create a global target for it.
+ * Fix a race condition in out-of-source builds with CMake when generated data
+ files are already present. Fixes #5374
|
Add migration script for MOVE_TO using connected values rather than MOVE_TO_VALUE
|
@@ -314,13 +314,38 @@ export const migrateFrom120To200Event = event => {
}
}
}
+ if(event.args && event.command === "EVENT_ACTOR_MOVE_TO_VALUE") {
+ return {
+ ...event,
+ command: "EVENT_ACTOR_MOVE_TO",
+ args: {
+ actorId: event.args.actorId,
+ x: {
+ type: "variable",
+ value: event.args.vectorX,
+ },
+ y: {
+ type: "variable",
+ value: event.args.vectorY,
+ },
+ useCollisions: false,
+ verticalFirst: false,
+ }
+ };
+ }
return event;
};
const migrateFrom120To200Events = data => {
return {
...data,
- scenes: mapScenesEvents(data.scenes, migrateFrom120To200Event)
+ scenes: mapScenesEvents(data.scenes, migrateFrom120To200Event),
+ customEvents: data.customEvents.map((customEvent) => {
+ return {
+ ...customEvent,
+ script: mapEvents(customEvent.script, migrateFrom120To200Event)
+ }
+ })
};
};
|
[chainmaker][#436]modify test result check sequence
|
@@ -76,21 +76,17 @@ START_TEST(test_001CreateWallet_0001CreateOneTimeWalletSuccess)
/* 1. execute unit test */
rtnVal = BoatWalletCreate(BOAT_PROTOCOL_CHAINMAKER, NULL, &wallet_config, sizeof(BoatHlchainmakerWalletConfig));
- /* 2. verify test result */
- /* 2-1. verify the return value */
ck_assert_int_eq(rtnVal, 0);
+ ck_assert(g_boat_iot_sdk_context.wallet_list[0].is_used == true);
+ g_chaninmaker_wallet_ptr = BoatGetWalletByIndex(rtnVal);
+ ck_assert(g_chaninmaker_wallet_ptr != NULL);
+ ck_assert(check_chainmaker_wallet(g_chaninmaker_wallet_ptr) == BOAT_SUCCESS);
/* 1. execute unit test */
rtnVal = BoatWalletCreate(BOAT_PROTOCOL_CHAINMAKER, NULL, &wallet_config, sizeof(BoatHlchainmakerWalletConfig));
- /* 2. verify test result */
- /* 2-1. verify the return value */
ck_assert_int_eq(rtnVal, 1);
-
- /* 2-2. verify the global variables that be affected */
- ck_assert(g_boat_iot_sdk_context.wallet_list[0].is_used == true);
ck_assert(g_boat_iot_sdk_context.wallet_list[1].is_used == true);
-
g_chaninmaker_wallet_ptr = BoatGetWalletByIndex(rtnVal);
ck_assert(g_chaninmaker_wallet_ptr != NULL);
ck_assert(check_chainmaker_wallet(g_chaninmaker_wallet_ptr) == BOAT_SUCCESS);
|
Update: NAR_language.py: allow S V and O to be arbitrary flipped in the grammar to learn
|
@@ -99,11 +99,21 @@ def getNounRelNoun(words):
for i, word in enumerate(words):
RELATION = resolveViaChoice(word, i, RELATION, isRelation=True)
if RELATION is None:
- return
- for j, word in enumerate(words[:RELATION[1]]):
- SUBJECT = resolveViaChoice(word, j, SUBJECT, isRelation=False)
- for k, word in enumerate(words[RELATION[1]:]):
- OBJECT = resolveViaChoice(word, k, OBJECT, isRelation=False)
+ return (None, None, None)
+ words.pop(RELATION[1])
+ for j, word in enumerate(words):
+ VALUE = resolveViaChoice(word, j, (None, -1, (0.5,0.0)), isRelation=False)
+ if Truth_Expectation(VALUE[2]) > Truth_Expectation(SUBJECT[2]):
+ OBJECT = SUBJECT
+ SUBJECT = VALUE
+ elif Truth_Expectation(VALUE[2]) > Truth_Expectation(OBJECT[2]):
+ OBJECT = VALUE
+ #flip S and O if S is after O (SO permutation is handled separately)
+ if SUBJECT[1] > OBJECT[1]:
+ temp = SUBJECT
+ SUBJECT = OBJECT
+ OBJECT = SUBJECT
+ print(">>>",SUBJECT[0], RELATION[0], OBJECT[0])
return (SUBJECT[0], RELATION[0], OBJECT[0])
def produceSentenceNarsese(words):
@@ -153,7 +163,8 @@ def correlate():
for y in [SUBJECT, RELATION, OBJECT]:
AddBelief(f"<({x} * {y}) --> R>")
S,R,O = getNounRelNoun(words)
- if S == OBJECT and O == SUBJECT:
+ print(S, R, O, SUBJECT, RELATION, OBJECT)
+ if S is not None and R is not None and O is not None and S == OBJECT and O == SUBJECT:
print("Grammatical flip detected", S, R, O, SUBJECT, RELATION, OBJECT)
AddBelief(f"<{RELATION} --> [flipped]>")
|
removing "reset method"
|
/* CHECKME overlap */
/* Derek Kwan 2016
-
OVERALL: old average~ was a chunked avg, this is now a moving avg
-
========================
rewrite average_absolutesum, average_rmssum, average_bipolarsum for addition, subtraction
-
rewrite perform, a lot of things in the struct to move from a chunked average to moving average
-
to parsing of input signal outside of average_ methods and inside perform method
-
getting rid of x_clock
-
- write average_zerobuf, average_reset (hidden method to clear buffer and reset everything)
-
+ write average_zerobuf, average_reset
changing float outlet to signal outlet
-
changed new method to accept list rather that defsym and deffloat
-
NOTE: I've written the bufrd so that it only uses [0, npoints) which makes overwriting the sample that drops
off the moving average easier, but this won't work if you want to resize the buffer and not clear it
-
- also, averages are over npoints always, even if there are less than npoints accumulated so far
-
-
-*/
+ also, averages are over npoints always, even if there are less than npoints accumulated so far */
#include <stdlib.h>
#include <math.h>
@@ -70,7 +57,6 @@ static void average_zerobuf(t_average *x){
}
static void average_reset(t_average * x){
-
//clear buffer and reset everything to 0
x->x_count = 0;
x->x_accum = 0;
@@ -80,11 +66,8 @@ static void average_reset(t_average * x){
static void average_sz(t_average *x, unsigned int newsz){
//helper function to deal with allocation issues if needed
-
-
int alloc = x->x_alloc;
unsigned int cursz = x->x_sz; //current size
-
//requested size
if(newsz < 0){
newsz = 0;
@@ -111,7 +94,6 @@ static void average_sz(t_average *x, unsigned int newsz){
}
-
static double average_bipolarsum(double input, double accum, int add)
{
if(add){
@@ -166,7 +148,6 @@ static void average_float(t_average *x, t_float f)
if(i >= x->x_max){
i = x->x_max;
};
-
x->x_npoints = i;
average_reset(x);
}
@@ -324,6 +305,5 @@ void average_tilde_setup(void)
class_addmethod(average_class, (t_method)average_bipolar, gensym("bipolar"), 0);
class_addmethod(average_class, (t_method)average_absolute, gensym("absolute"), 0);
class_addmethod(average_class, (t_method)average_rms, gensym("rms"), 0);
- class_addmethod(average_class, (t_method)average_reset, gensym("reset"), 0);
class_addfloat(average_class, (t_method)average_float);
}
|
Refactoring: in preparation for
|
@@ -85,7 +85,7 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
int i = 0;
grib_values* values = NULL;
grib_iterator* iter = NULL;
- char* format = NULL;
+ char* format_values = NULL;
char* default_format = "%.10e";
int print_keys = grib_options_on("p:");
long numberOfPoints = 0;
@@ -128,9 +128,9 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
}
if (grib_options_on("F:"))
- format = grib_options_get_option("F:");
+ format_values = grib_options_get_option("F:");
else
- format = default_format;
+ format_values = default_format;
if ((err = grib_get_long(h, "numberOfPoints", &numberOfPoints)) != GRIB_SUCCESS) {
fprintf(dump_file, "ERROR: unable to get number of points\n");
@@ -217,7 +217,7 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
if (is_missing_val)
fprintf(dump_file, "%s", missing_string);
else
- fprintf(dump_file, format, data_values[i]);
+ fprintf(dump_file, format_values, data_values[i]);
if (print_keys)
print_key_values(values, options->print_keys_count);
@@ -238,7 +238,7 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
if (!is_missing_val) {
if (iter)
fprintf(dump_file, "%9.3f%9.3f ", lats[i], lons[i]);
- fprintf(dump_file, format, data_values[i]);
+ fprintf(dump_file, format_values, data_values[i]);
if (print_keys)
print_key_values(values, options->print_keys_count);
fprintf(dump_file, "\n");
|
pbio/trajectory: Walk position trajectories in full.
|
@@ -106,7 +106,10 @@ static void walk_trajectory(pbio_trajectory_t *trj) {
// Start and end angles in millidegrees.
static const pbio_angle_t angles[] = {
{.rotations = 0, .millidegrees = 0 },
- {.rotations = 0, .millidegrees = 30 * 1000 },
+ {.rotations = 0, .millidegrees = 1 * MDEG_PER_DEG },
+ {.rotations = 0, .millidegrees = 30 * MDEG_PER_DEG },
+ {.rotations = 0, .millidegrees = 360 * MDEG_PER_DEG },
+ {.rotations = -4, .millidegrees = 0},
{.rotations = -123, .millidegrees = 456 },
{.rotations = INT32_MAX / 4, .millidegrees = INT32_MAX / 4 },
};
@@ -295,6 +298,9 @@ static void test_position_trajectory(void *env) {
pbio_trajectory_get_reference(&trj, command.time_start, &ref);
get_position_command(i, &command);
tt_want(pbio_math_sign_not_opposite(ref.speed, command.speed_start));
+
+ // Walk the whole trajectory.
+ walk_trajectory(&trj);
}
}
|
Declaration of function changed in 'sane can ids'.
can loopback called the function with the old parameters.
|
@@ -709,11 +709,8 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, int hardwired) {
break;
case 0xe5: // Set CAN loopback (for testing)
can_loopback = (setup->b.wValue.w > 0);
- can_init(CAN1, 0);
- can_init(CAN2, 0);
- #ifdef CAN3
- can_init(CAN3, 0);
- #endif
+ for(i=0; i < CAN_MAX; i++)
+ can_init(i, 0);
break;
case 0xf0: // k-line wValue pulse on uart2
if (setup->b.wValue.w == 1) {
|
omnibox: add maybe operators
|
@@ -102,7 +102,7 @@ export default function index(contacts, associations, apps, currentGroup, groups
}).map((e) => {
// iterate through each app's metadata object
Object.keys(associations[e])
- .filter((association) => !associations[e][association].metadata.hidden)
+ .filter((association) => !associations?.[e]?.[association]?.metadata?.hidden)
.map((association) => {
const each = associations[e][association];
let title = each.resource;
|
Remove obsolete nbtree "get root" comment.
Remove a very old Berkeley era comment that doesn't seem to have
anything to do with the current locking considerations within
_bt_getroot().
Discussion:
|
@@ -266,9 +266,7 @@ _bt_update_meta_cleanup_info(Relation rel, TransactionId oldestBtpoXact,
*
* Since the root page can move around the btree file, we have to read
* its location from the metadata page, and then read the root page
- * itself. If no root page exists yet, we have to create one. The
- * standard class of race conditions exists here; I think I covered
- * them all in the intricate dance of lock requests below.
+ * itself. If no root page exists yet, we have to create one.
*
* The access type parameter (BT_READ or BT_WRITE) controls whether
* a new root page will be created or not. If access = BT_READ,
|
awm deduplicates mouse driver events
|
@@ -47,6 +47,14 @@ typedef struct user_window {
bool has_done_first_draw;
} user_window_t;
+typedef struct incremental_mouse_state {
+ int8_t state;
+ int32_t rel_x;
+ int32_t rel_y;
+ int32_t rel_z;
+ uint32_t combined_msg_count;
+} incremental_mouse_state_t;
+
#define WINDOW_BORDER_MARGIN 0
#define WINDOW_TITLE_BAR_HEIGHT 30
#define WINDOW_TITLE_BAR_VISIBLE_HEIGHT (WINDOW_TITLE_BAR_HEIGHT - 2)
@@ -437,7 +445,7 @@ static void mouse_dispatch_events(uint8_t status_byte, Point mouse_point, int32_
_handle_mouse_moved(mouse_state, mouse_point, delta_x, delta_y, delta_z);
}
-static void handle_mouse_event(amc_message_t* mouse_event) {
+static bool handle_mouse_event(amc_message_t* mouse_event, incremental_mouse_state_t* incremental_update) {
int8_t state = mouse_event->body[0];
int8_t rel_x = mouse_event->body[1];
int8_t rel_y = mouse_event->body[2];
@@ -452,7 +460,13 @@ static void handle_mouse_event(amc_message_t* mouse_event) {
mouse_pos.x = min(_screen.resolution.width - 20, mouse_pos.x);
mouse_pos.y = min(_screen.resolution.height - 20, mouse_pos.y);
- mouse_dispatch_events(state, mouse_pos, rel_x, rel_y, rel_z);
+ bool updated_state_byte = state == incremental_update->state;
+ incremental_update->state = state;
+ incremental_update->rel_x += rel_x;
+ incremental_update->rel_y += rel_y;
+ incremental_update->rel_z += rel_z;
+ incremental_update->combined_msg_count += 1;
+ return !updated_state_byte;
}
static void _draw_cursor(void) {
@@ -889,6 +903,9 @@ int main(int argc, char** argv) {
while (true) {
// Wait for a system event or window event
amc_message_t* msg;
+ incremental_mouse_state_t incremental_mouse_update = {0};
+ memset(&incremental_mouse_update, 0, sizeof(incremental_mouse_state_t));
+ incremental_mouse_update.combined_msg_count = 0;
do {
// Wait until we've unblocked with at least one message available
amc_message_await_any(&msg);
@@ -910,7 +927,23 @@ int main(int argc, char** argv) {
}
else if (!strcmp(source_service, "com.axle.mouse_driver")) {
// Update the mouse position based on the data packet
- handle_mouse_event(msg);
+ bool changed_state = handle_mouse_event(msg, &incremental_mouse_update);
+ if (changed_state) {
+ /*
+ if (incremental_mouse_update.combined_msg_count) {
+ printf("Dispatch mouse, deduplicated %d\n", incremental_mouse_update.combined_msg_count);
+ }
+ */
+ mouse_dispatch_events(
+ incremental_mouse_update.state,
+ mouse_pos,
+ incremental_mouse_update.rel_x,
+ incremental_mouse_update.rel_y,
+ incremental_mouse_update.rel_z
+ );
+ memset(&incremental_mouse_update, 0, sizeof(incremental_mouse_state_t));
+ incremental_mouse_update.combined_msg_count = 0;
+ }
}
else {
// TODO(PT): If a window sends REDRAW_READY, we can put it onto a "ready to redraw" list
|
Fix endianness issues in ELF module.
See
|
@@ -478,11 +478,13 @@ static const char* str_table_entry(
yr_set_integer(yr_##bo##16toh(elf->type), elf_obj, "type"); \
yr_set_integer(yr_##bo##16toh(elf->machine), elf_obj, "machine"); \
yr_set_integer(yr_##bo##bits##toh(elf->sh_offset), elf_obj, "sh_offset"); \
- yr_set_integer(yr_##bo##16toh(elf->sh_entry_size), elf_obj, "sh_entry_size"); \
+ yr_set_integer( \
+ yr_##bo##16toh(elf->sh_entry_size), elf_obj, "sh_entry_size"); \
yr_set_integer( \
yr_##bo##16toh(elf->sh_entry_count), elf_obj, "number_of_sections"); \
yr_set_integer(yr_##bo##bits##toh(elf->ph_offset), elf_obj, "ph_offset"); \
- yr_set_integer(yr_##bo##16toh(elf->ph_entry_size), elf_obj, "ph_entry_size"); \
+ yr_set_integer( \
+ yr_##bo##16toh(elf->ph_entry_size), elf_obj, "ph_entry_size"); \
yr_set_integer( \
yr_##bo##16toh(elf->ph_entry_count), elf_obj, "number_of_segments"); \
\
@@ -650,8 +652,7 @@ static const char* str_table_entry(
yr_set_integer( \
yr_##bo##bits##toh(sym->size), elf_obj, "symtab[%i].size", j); \
\
- int other = yr_##bo##bits##toh(sym->other); \
- (*symbol)->visibility = other & 0x3; \
+ (*symbol)->visibility = sym->other & 0x3; \
\
symbol = &((*symbol)->next); \
} \
@@ -729,8 +730,7 @@ static const char* str_table_entry(
"dynsym[%i].size", \
m); \
\
- int other = yr_##bo##bits##toh(dynsym->other); \
- (*symbol)->visibility = other & 0x3; \
+ (*symbol)->visibility = dynsym->other & 0x3; \
\
symbol = &((*symbol)->next); \
} \
|
Clear already parsed HUD elements when using legacy layout
|
@@ -526,6 +526,7 @@ void HudElements::sort_elements(std::pair<std::string, std::string> option){
void HudElements::legacy_elements(){
string value = "NULL";
+ ordered_functions.clear();
ordered_functions.push_back({time, value});
ordered_functions.push_back({version, value});
ordered_functions.push_back({gpu_stats, value});
|
try to fix assembler errors on z13
|
@@ -44,6 +44,7 @@ matrix:
arch: s390x
before_script:
- COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=Z13 NUM_THREADS=32"
+ - apt-get install --only-upgrade binutils
env:
# for matrix annotation only
- TARGET_BOX=IBMZ_LINUX
@@ -56,6 +57,7 @@ matrix:
compiler: clang
before_script:
- COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=Z13 NUM_THREADS=32"
+ - apt-get install --only-upgrade binutils
env:
# for matrix annotation only
- TARGET_BOX=IBMZ_LINUX
|
commander: remove C DeviceInfo
Ported to Rust.
|
#if APP_ETH == 1
#include "commander/commander_eth.h"
#endif
-#include "commander/commander_states.h"
#if PRODUCT_BITBOX_BASE == 1
#include "rust/rust.h"
#endif
#include <flags.h>
#include <hardfault.h>
#include <keystore.h>
-#include <memory/memory.h>
#include <random.h>
#include <screen.h>
#include <sd.h>
#include <util.h>
#include <version.h>
-#ifndef TESTING
-#include <securechip/securechip.h>
-#else
+#ifdef TESTING
#include <test_commander.h>
#endif
@@ -100,23 +96,6 @@ static void _api_process_random(RandomNumberResponse* response)
memcpy(&response->number, number, sizeof(number));
}
-static commander_error_t _api_get_info(DeviceInfoResponse* device_info)
-{
- char get_name[MEMORY_DEVICE_NAME_MAX_LEN];
- memory_get_device_name(get_name);
- snprintf(device_info->name, sizeof(device_info->name), "%s", get_name);
- snprintf(
- device_info->version, sizeof(device_info->version), "%s", DIGITAL_BITBOX_VERSION_SHORT);
- device_info->initialized = commander_states_state() == COMMANDER_STATES_INITIALIZED;
- device_info->mnemonic_passphrase_enabled = memory_is_mnemonic_passphrase_enabled();
-#ifndef TESTING
- if (!securechip_monotonic_increments_remaining(&device_info->monotonic_increments_remaining)) {
- return COMMANDER_ERR_GENERIC;
- }
-#endif
- return COMMANDER_OK;
-}
-
static commander_error_t _api_list_backups(ListBackupsResponse* response)
{
if (!workflow_list_backups(response)) {
@@ -183,9 +162,6 @@ static commander_error_t _api_process(const Request* request, Response* response
response->which_response = Response_random_number_tag;
_api_process_random(&(response->response.random_number));
return COMMANDER_OK;
- case Request_device_info_tag:
- response->which_response = Response_device_info_tag;
- return _api_get_info(&(response->response.device_info));
#if APP_BTC == 1 || APP_LTC == 1
case Request_btc_pub_tag:
response->which_response = Response_pub_tag;
|
arvo: restores previous +load compilation
|
=/ lod
(slap (slot 7 gat) [%limb %load])
|= =heir
- |. ;;(^ q:(slam lod !>(heir)))
+ |. ~> %slog.[1 'arvo: +load next']
+ ;;(^ q:(slam lod !>(heir)))
::
:: hyp: hoon core type
:: hoc: hoon core
::
=/ voc .*(hoc [%7 +.rav %0 7])
::
- :: extract the upgrade gate +load at axis +4
+ :: extract the upgrade gate +load
::
- =/ lod .*(voc [%0 4])
+ =/ lod
+ :: vip: type of the arvo.hoon core
+ :: fol: formula for the +load gate
+ ::
+ =/ vip -:(slum cop [-.rav '+>'])
+ =/ fol +:(slum cop [vip 'load'])
+ :: produce the upgrade gate
+ ::
+ .*(voc fol)
::
|= =heir
- |. ;;(^ (slum lod heir))
+ |. ~> %slog.[1 'arvo: +load next']
+ ;;(^ (slum lod heir))
::
++ viol :: vane tools
|= but=type
|
default inti for irun/ncsim is without initx
|
-aet) AET=1;;
-noaet) AET=0;;
-init0) SIM_INIT='-ncinitialize 0';;
+ -init1) SIM_INIT='-ncinitialize 1';;
-initx) SIM_INIT='-ncinitialize x';;
-h) echo "Usage: $0 -cdemx"
echo " -app "pgm" : single program (arguments can be passed with -arg)"
export LD_LIBRARY_PATH=$PSLSE_ROOT/afu_driver/src:$DENALI/verilog # to find libvpi.so and libdenpli.so
fi
if [ "$SIMDIR" == "ies" ];then
- if [ "$SIM_INIT" == "" ];then SIM_INIT='-ncinitialize x';fi # default init value for ncsim
+# if [ "$SIM_INIT" == "" ];then SIM_INIT='-ncinitialize x';fi # default init value for ncsim
# SIM_ARG='-gui' # interactive, stop @cyc0
# SIM_ARG='-gui -tcl' # interactive with simvision
# SIM_ARG='-gui -run -tcl' # non_interactive, with simvision
|
Prevent null pointer in SolrIndexerQueryResponse
|
@@ -43,18 +43,26 @@ public class SolrIndexerQueryResponse implements IndexerQueryResponse {
this.rawResponse = response;
final JSONObject responseObj = (JSONObject) rawResponse.get("response");
final JSONObject responseHeader = (JSONObject) rawResponse.get("responseHeader");
+ if (responseObj != null && responseObj.get("numFound") != null) {
numFound = Long.parseLong(responseObj.get("numFound").toString());
+ } else {
+ numFound = 0;
+ }
+ if (responseHeader != null && responseHeader.get("QTime") != null) {
qTime = Integer.parseInt(responseHeader.get("QTime").toString());
+ } else {
+ qTime = -1;
+ }
// Get docs
- if (responseObj.get("docs") == null) {
+ if (responseObj == null || responseObj.get("docs") == null) {
resultsObj = new JSONArray();
} else {
resultsObj = (JSONArray) responseObj.get("docs");
}
// Get facetFields
- listFacetFields = new HashMap<String, IndexerFacetField>();
+ listFacetFields = new HashMap<>();
if (rawResponse.get("facet_counts") != null) {
final JSONObject facetCounts = (JSONObject) rawResponse.get("facet_counts");
final JSONObject facetFields = (JSONObject) facetCounts.get("facet_fields");
@@ -66,7 +74,7 @@ public class SolrIndexerQueryResponse implements IndexerQueryResponse {
}
// Get stats infos
- listFieldStatsInfo = new HashMap<String, IndexerFieldStatsInfo>();
+ listFieldStatsInfo = new HashMap<>();
if (rawResponse.get("stats") != null) {
final JSONObject stats = (JSONObject) rawResponse.get("stats");
final JSONObject statsFields = (JSONObject) stats.get("stats_fields");
|
schema compile BUGFIX (another) buffer overflow when generating path for logger
Fixes
|
@@ -182,7 +182,7 @@ remove_nodelevel:
for (; ctx->path[ctx->path_len] != '/' ; --ctx->path_len);
if (ctx->path_len == 0) {
/* top-level (last segment) */
- ++ctx->path_len;
+ ctx->path_len = 1;
}
}
/* set new terminating NULL-byte */
@@ -209,9 +209,14 @@ remove_nodelevel:
} else {
len = snprintf(&ctx->path[ctx->path_len], LYSC_CTX_BUFSIZE - ctx->path_len, "='%s'}", name);
}
+ if (len >= LYSC_CTX_BUFSIZE - ctx->path_len) {
+ /* output truncated */
+ ctx->path_len = LYSC_CTX_BUFSIZE - 1;
+ } else {
ctx->path_len += len;
}
}
+}
/**
* @brief Duplicate the compiled pattern structure.
|
Fixed output buffer size
|
@@ -510,7 +510,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
grib_context_log(a->context, GRIB_LOG_DEBUG,"CCSDS pack_double: packing %s, %d values", a->name, n_vals);
- buflen += 10240;
+ /*ECC-1431: GRIB2: CCSDS encoding failure AEC_STREAM_ERROR*/
+ buflen = buflen * 67.0/64 + 257;
buf = (unsigned char*)grib_context_buffer_malloc_clear(a->context, buflen);
if (!buf) {
|
HLS Sponge : adding header file
|
@@ -26,7 +26,8 @@ extern "C" {
#define CHECKSUM_ACTION_TYPE 0x10141001
#define RELEASE_LEVEL 0x00000020
-#define NB_ROUNDS 100000
+// For simulation use smaller numbers like 8 for both
+#define NB_ROUNDS 65536
#define NB_TEST_RUNS 65536
typedef enum {
|
virtio: remove unused code
Type: refactor
|
@@ -1320,10 +1320,6 @@ virtio_pci_delete_if (vlib_main_t * vm, virtio_if_t * vif)
vec_free (vif->txq_vrings);
vec_free (vif->cxq_vring);
- if (vif->fd != -1)
- vif->fd = -1;
- if (vif->tap_fd != -1)
- vif->tap_fd = -1;
clib_error_free (vif->error);
memset (vif, 0, sizeof (*vif));
pool_put (vim->interfaces, vif);
|
soprano: remove unused args from so_fewrite_ssl_request()
|
@@ -60,7 +60,7 @@ so_fewrite_cancel(so_stream_t *buf, uint32_t pid, uint32_t key)
}
static inline int
-so_fewrite_ssl_request(so_stream_t *buf, uint32_t pid, uint32_t key)
+so_fewrite_ssl_request(so_stream_t *buf)
{
int size = sizeof(uint32_t) + /* len */
sizeof(uint32_t); /* special */
|
omxplayer: Bump to latest revision
Also, add a deprecation note as per the project's status:
|
@@ -9,9 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=00a27da7ac0f9bcd17320ec29ef4bbf6"
DEPENDS = "alsa-lib libpcre virtual/egl boost freetype dbus openssl libssh virtual/libomxil coreutils-native curl-native userland"
-PR = "r5"
+PR = "r6"
-SRCREV_default = "f543a0d0e707ab56415f17b0ca6d397394ee8b63"
+SRCREV_default = "1f1d0ccd65d3a1caa86dc79d2863a8f067c8e3f8"
# omxplayer builds its own copy of ffmpeg from source instead of using the
# system's ffmpeg library. This isn't ideal but it's ok for now. We do however
@@ -83,6 +83,8 @@ export INCLUDES = "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " -D_
export DIST = "${D}"
do_compile() {
+ bbwarn "omxplayer is being deprecated and resources are directed at improving vlc."
+
# Needed for compiler test in ffmpeg's configure
mkdir -p tmp
|
Fix a typo breaking the link to Imath repository in readme
|
@@ -63,7 +63,7 @@ Platform](https://vfxplatform.com).
With the release of OpenEXR 3, the Imath library formerly distributed
via the IlmBase component of OpenEXR is now an independent library
-dependency, available for download from https:://github.com/AcademySoftwareFoundation/Imath.
+dependency, available for download from https://github.com/AcademySoftwareFoundation/Imath.
You can choose to build OpenEXR against an external installation of
Imath, or the default CMake configuration will download and build it
automatically during the OpenEXR build process. Note that the half
|
fix fedora oidc-prompt -fPIE -fpie issue
|
@@ -127,6 +127,7 @@ CXX := $(CXX)
CFLAGS := $(CFLAGS) -g -std=c99 -I$(SRCDIR) -I$(LIBDIR) -Wall -Wextra -fno-common
CPPFLAGS := $(CPPFLAGS) -g -I$(SRCDIR) -I$(LIBDIR)
CPPFLAGS += -std=c++11
+CPPFLAGS += -fPIC
ifndef MAC_OS
ifndef ANY_MSYS
CPPFLAGS += $(shell pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0) -lstdc++
@@ -160,8 +161,8 @@ ifdef MSYS
LFLAGS = $(LMINGW) $(LSODIUM) $(LARGP)
PROMPT_LFLAGS = $(LFLAGS)
else
-LFLAGS := $(LDFLAGS) $(LSODIUM) -fno-common -Wl,-z,now
-PROMPT_LFLAGS = $(LFLAGS) $(CPPFLAGS)
+LFLAGS := $(LDFLAGS) $(LSODIUM) -fno-common
+PROMPT_LFLAGS = -fPIE $(LFLAGS) $(CPPFLAGS)
ifeq ($(USE_ARGP_SO),1)
LFLAGS += $(LARGP)
PROMPT_LFLAGS += $(LARGP)
|
virtio-input : fix : missing key when inputing combination keys
When HidQueue's ExecutionLevel= WdfExecutionLevelPassive and WdfIoQueueRetrieveNextRequest is called in IRQL=
DISPATCH ,so WdfRequestForwardToIoQueue(in hid.c EvtIoDeviceControl)can not be called timely for inserting request to HIdQueue.
|
@@ -104,7 +104,6 @@ VIOInputEvtDeviceAdd(
WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&Attributes, INPUT_DEVICE);
Attributes.SynchronizationScope = WdfSynchronizationScopeDevice;
- Attributes.ExecutionLevel = WdfExecutionLevelPassive;
status = WdfDeviceCreate(&DeviceInit, &Attributes, &hDevice);
if (!NT_SUCCESS(status))
{
|
Fix old documentation link in `lv_conf_template.h`
|
@@ -330,7 +330,7 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i
/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel.
* The symbols are available via `LV_SYMBOL_...` defines
- * More info about fonts: https://docs.lvgl.com/#Fonts
+ * More info about fonts: https://docs.lvgl.io/v7/en/html/overview/font.html
* To create a new font go to: https://lvgl.com/ttf-font-to-c-array
*/
|
Add a few missing api version documentation
A few api method/struct documentation did not have the
entry describing in which version it was introduced.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal
|
@@ -612,7 +612,7 @@ Possible values:
- JERRY_PROMISE_STATE_FULFILLED - Promise is in "Fulfilled" state.
- JERRY_PROMISE_STATE_REJECTED - Promise is in "Rejected" state.
-*New in version [NEXT VERSION]*.
+*New in version 2.2*.
**See also**
@@ -3282,7 +3282,7 @@ jerry_get_promise_result (const jerry_value_t promise);
- A TypeError is returned if the input argument was not a Promise object or
the Promise support was not built into the library.
-*New in version [NEXT VERSION]*.
+*New in version 2.2*.
**Example**
@@ -3348,7 +3348,7 @@ jerry_get_promise_state (const jerry_value_t promise);
- `JERRY_PROMISE_STATE_NONE` is returned if the input argument was not a promise object or
the Promise support was not built into the library.
-*New in version [NEXT VERSION]*.
+*New in version 2.2*.
**Example**
@@ -4871,6 +4871,8 @@ jerry_has_internal_property (const jerry_value_t obj_val,
- true, if the property exists
- false, otherwise
+*New in version 2.2*.
+
**Example**
[doctest]: # ()
@@ -5014,6 +5016,8 @@ jerry_delete_internal_property (const jerry_value_t obj_val,
- true, if property was deleted successfully
- false, otherwise
+*New in version 2.2*.
+
**Example**
```c
@@ -5174,6 +5178,8 @@ jerry_get_internal_property (const jerry_value_t obj_val,
- undefined value, if the, if the internal does not property exists
- thrown error, otherwise
+*New in version 2.2*.
+
**Example**
[doctest]: # ()
@@ -5351,6 +5357,8 @@ jerry_set_internal_property (const jerry_value_t obj_val,
- true, if success
- thrown error, otherwise
+*New in version 2.2*.
+
**Example**
[doctest]: # ()
@@ -7584,6 +7592,8 @@ jerry_get_resource_name (jerry_value_t value);
- resource name of the function object, if the given value is a function object
- "<anonymous>", otherwise
+*New in version 2.2*.
+
**Example**
[doctest]: # (name="02.API-REFERENCE-jsresourcename.c")
@@ -8034,6 +8044,8 @@ jerry_is_arraybuffer_detachable (const jerry_value_t value);
- boolean value if success
- Error otherwise
+*New in version 2.2*.
+
**Example**
```c
@@ -8075,6 +8087,8 @@ jerry_detach_arraybuffer (const jerry_value_t value);
- null value if success
- Error otherwise
+*New in version 2.2*.
+
**Example**
```c
|
add github.com/intel/govmm
|
@@ -359,6 +359,9 @@ ALLOW .* -> vendor/go.etcd.io/bbolt
# CONTRIB-1616 Gountries provides structured countries data
ALLOW .* -> vendor/github.com/pariz/gountries
+# CONTRIB-1630- Go binding for qemu/qmp runtime
+ALLOW .* -> vendor/github.com/intel/govmm/qemu
+
#
# Temporary exceptions.
#
|
psa_crypto.c, test_suite_psa_crypto.function: fix style
|
@@ -6784,11 +6784,11 @@ void derive_key_type( int alg_arg,
PSA_ASSERT( psa_import_key( &base_attributes, key_data->x, key_data->len,
&base_key ) );
- if( !mbedtls_test_psa_setup_key_derivation_wrap(
+ if( mbedtls_test_psa_setup_key_derivation_wrap(
&operation, base_key, alg,
input1->x, input1->len,
input2->x, input2->len,
- PSA_KEY_DERIVATION_UNLIMITED_CAPACITY ) )
+ PSA_KEY_DERIVATION_UNLIMITED_CAPACITY ) == 0 )
goto exit;
psa_set_key_usage_flags( &derived_attributes, PSA_KEY_USAGE_EXPORT );
|
vppapigen: generate define for module_semver
Generate a semver define for API modules in the VPP side C generator.
E.g in map.api_types.h
\#define VL_API_MAP_API_VERSION_MAJOR 4
\#define VL_API_MAP_API_VERSION_MINOR 2
\#define VL_API_MAP_API_VERSION_PATCH 1
Type: improvement
|
@@ -525,6 +525,13 @@ def generate_include_types(s, module, stream):
write('#ifndef included_{module}_api_types_h\n'.format(module=module))
write('#define included_{module}_api_types_h\n'.format(module=module))
+ if 'version' in s['Option']:
+ v = s['Option']['version']
+ (major, minor, patch) = v.split('.')
+ write('#define VL_API_{m}_API_VERSION_MAJOR {v}\n'.format(m=module.upper(), v=major))
+ write('#define VL_API_{m}_API_VERSION_MINOR {v}\n'.format(m=module.upper(), v=minor))
+ write('#define VL_API_{m}_API_VERSION_PATCH {v}\n'.format(m=module.upper(), v=patch))
+
if len(s['Import']):
write('/* Imported API files */\n')
for i in s['Import']:
|
Minor comment-fixes in cc13xx/cc26xx WD
|
@@ -103,7 +103,7 @@ lock_config(uint32_t status)
}
/*---------------------------------------------------------------------------*/
/**
- * \brief Initialises the CC26xx WDT
+ * \brief Initialises the CC13xx/CC26xx WDT
*
* Simply locks the config so that future calls will lock properly.
* The WDT is not started yet. To start it, watchdog_start() must be called.
@@ -115,7 +115,7 @@ watchdog_init(void)
}
/*---------------------------------------------------------------------------*/
/**
- * \brief Starts the CC26xx WDT
+ * \brief Starts the CC13xx/CC26xx WDT
*/
void
watchdog_start(void)
@@ -130,7 +130,7 @@ watchdog_start(void)
}
/*---------------------------------------------------------------------------*/
/**
- * \brief Refreshes the CC26xx WDT
+ * \brief Refreshes the CC13xx/CC26xx WDT
*/
void
watchdog_periodic(void)
|
I corrected a typo in one of the web pages.
|
<td>Mac OS X 10.13 - Intel 64 bit<br />
Darwin 10.13, Darwin Kernel Version 17.7.0, clang-900.39.2, MPICH<br />
<i>(Includes parallel VisIt with self-contained MPICH MPI, Uintah. Works on Mac OS X 10.13 and later.)</i></td>
- <td><a href="http://portal.nersc.gov/project/visit/releases/2.13.3/VisIt-2.13.3-10.12.dmg">Download</a></td>
+ <td><a href="http://portal.nersc.gov/project/visit/releases/2.13.3/VisIt-2.13.3-10.13.dmg">Download</a></td>
</tr>
<tr>
<td>Linux - x86_64 64 bit<br />
|
add torque cmd on monitor example
|
@@ -43,6 +43,7 @@ void setup()
Serial.println("ping (ID)");
Serial.println("id (ID) (NEW_ID)");
Serial.println("baud (ID) (NEW_BAUD)");
+ Serial.println("torque (ID) (VALUE)");
Serial.println("joint (ID) (GOAL_POSITION)");
Serial.println("wheel (ID) (GOAL_VELOCITY)");
Serial.println("write (ID) (ADDRESS_NAME) (VALUE)");
@@ -116,6 +117,16 @@ void loop()
else
Serial.println("Failed");
}
+ else if (cmd[0] == "torque")
+ {
+ uint8_t id = cmd[1].toInt();
+ uint8_t onoff = cmd[2].toInt();
+
+ if (dxl_wb.itemWrite(id, "Torque_Enable", onoff))
+ Serial.println("Succeed to torque command!!");
+ else
+ Serial.println("Failed");
+ }
else if (cmd[0] == "joint")
{
uint8_t id = cmd[1].toInt();
|
tweak citation.cff
|
@@ -13,6 +13,8 @@ title: "SCS: Spltting Conic Solver"
version: 3.0.0
date-released: 2021
url: "https://github.com/cvxgrp/scs"
+
+# Original SCS paper:
preferred-citation:
type: article
authors:
@@ -26,10 +28,12 @@ preferred-citation:
given-names: "Stephen"
journal: "Journal of Optimization Theory and Applications"
month: 6
- start: 1042
- end: 1068
+ start: 1042 # Start pages
+ end: 1068 # End pages
title: "Conic Optimization via Operator Splitting and Homogeneous Self-Dual Embedding"
issue: 3
volume: 169
year: 2016
+ doi: 10.1007/s10957-016-0892-3
+ url: https://dx.doi.org/10.1007/s10957-016-0892-3
|
ble_mesh: Remove unused macro FRIEND_BUF_SIZE
|
#ifdef CONFIG_BLE_MESH_FRIEND
-#define FRIEND_BUF_SIZE (BLE_MESH_ADV_DATA_SIZE - BLE_MESH_NET_HDR_LEN)
-
/* We reserve one extra buffer for each friendship, since we need to be able
* to resend the last sent PDU, which sits separately outside of the queue.
*/
|
CHANGELOG: add Cardano
|
@@ -7,6 +7,7 @@ customers cannot upgrade their bootloader, its changes are recorded separately.
## Firmware
### [Unreleased]
+- Multi edition: add Cardano support.
- Allow recovery words that convert to a zero seed, such as the 12 words `abandon abandon .... about`.
- RestoreBackup: ported to Rust. Will now return UserAbortError on user abort instead of GenericError.
- Show "Transaction confirmed"/"Transaction canceled" messages when signing Ethereum transactions
|
BugID:19882985: Align task stack depth of rda5981x with other's module, use default AOS_START_STACK
|
@@ -61,7 +61,7 @@ static void sys_init(void)
void sys_start(void)
{
aos_init();
- krhino_task_dyn_create(&g_aos_init, "aos-init", 0, AOS_DEFAULT_APP_PRI, 0, AOS_START_STACK*4, (task_entry_t)sys_init, 1);
+ krhino_task_dyn_create(&g_aos_init, "aos-init", 0, AOS_DEFAULT_APP_PRI, 0, AOS_START_STACK, (task_entry_t)sys_init, 1);
aos_start();
}
|
config-tools: add validate_scenario_schema
add validate_scenario_schema to validate_scenario_setting and update the
excption handling.
|
@@ -91,7 +91,7 @@ def get_scenario_item_values(board_info, scenario_info):
return scenario_item_values
-def validate_scenario_setting(board_info, scenario_info):
+def validate_scenario_schema(scenario_info):
"""
Validate settings in scenario xml if there is scenario schema
:param xsd_doc: scenario schema
@@ -99,18 +99,43 @@ def validate_scenario_setting(board_info, scenario_info):
"""
try:
import xmlschema
+ except ImportError:
+ return
- # XMLSchema does not process XInclude. Use lxml to expand the schema which is feed to XMLSchema as a string.
- xsd_doc = SCENARIO_SCHEMA_FILE
+ """
+ XMLSchema does not process XInclude.
+ Use lxml to expand the schema which is feed to XMLSchema as a string.
+ """
+ xsd_doc = etree.parse(common.SCENARIO_SCHEMA_FILE)
xsd_doc.xinclude()
my_schema = xmlschema.XMLSchema11(etree.tostring(xsd_doc, encoding="unicode"))
it = my_schema.iter_errors(scenario_info)
for idx, validation_error in enumerate(it, start=1):
- print(f'[{idx}] path: {validation_error.path} | reason: {validation_error.reason}')
- print(validation_error)
- except:
- pass
+ key = ""
+ if not validation_error:
+ continue
+ else:
+ path = str(validation_error.path).split("/")
+ cnt = 0
+ for p in path:
+ if '[' in p:
+ idx = int(p.split("[")[1].split("]")[0]) - 1
+ p = p.split("[")[0] + ":id=" + str(idx)
+ path[cnt] = p
+ cnt = cnt + 1
+ key =','.join(path[2:])
+ element = "'" + path[-1] + "' "
+ reason = validation_error.reason + ": last call: " + str(validation_error.obj)
+ scenario_cfg_lib.ERR_LIST[key] = element + reason
+
+
+
+def validate_scenario_setting(board_info, scenario_info):
+ hv_cfg_lib.ERR_LIST = {}
+ scenario_cfg_lib.ERR_LIST = {}
+
+ validate_scenario_schema(scenario_info)
"""
Validate settings in scenario xml
@@ -118,8 +143,6 @@ def validate_scenario_setting(board_info, scenario_info):
:param scenario_info: scenario file
:return: return a dictionary that contains errors
"""
- hv_cfg_lib.ERR_LIST = {}
- scenario_cfg_lib.ERR_LIST = {}
common.BOARD_INFO_FILE = board_info
common.SCENARIO_INFO_FILE = scenario_info
|
npl/riot: reduce default msys bufsize to minimum
|
#endif
#ifndef MYNEWT_VAL_MSYS_1_BLOCK_COUNT
-#define MYNEWT_VAL_MSYS_1_BLOCK_COUNT (12)
+#define MYNEWT_VAL_MSYS_1_BLOCK_COUNT (5)
#endif
#ifndef MYNEWT_VAL_MSYS_1_BLOCK_SIZE
-#define MYNEWT_VAL_MSYS_1_BLOCK_SIZE (292)
+#define MYNEWT_VAL_MSYS_1_BLOCK_SIZE (88)
#endif
#ifndef MYNEWT_VAL_MSYS_2_BLOCK_COUNT
|
fix(behaviors): Remove `behavior_hold_tap_data`
Related to discussion during development of tap-dance behavior:
This PR suggests to remove the `struct behavior_hold_tap_data` because is not used to store data for each hold tap.
|
@@ -674,9 +674,6 @@ static int behavior_hold_tap_init(const struct device *dev) {
return 0;
}
-struct behavior_hold_tap_data {};
-static struct behavior_hold_tap_data behavior_hold_tap_data;
-
#define KP_INST(n) \
static struct behavior_hold_tap_config behavior_hold_tap_config_##n = { \
.tapping_term_ms = DT_INST_PROP(n, tapping_term_ms), \
@@ -688,9 +685,9 @@ static struct behavior_hold_tap_data behavior_hold_tap_data;
.hold_trigger_key_positions = DT_INST_PROP(n, hold_trigger_key_positions), \
.hold_trigger_key_positions_len = DT_INST_PROP_LEN(n, hold_trigger_key_positions), \
}; \
- DEVICE_DT_INST_DEFINE(n, behavior_hold_tap_init, NULL, &behavior_hold_tap_data, \
- &behavior_hold_tap_config_##n, APPLICATION, \
- CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_hold_tap_driver_api);
+ DEVICE_DT_INST_DEFINE(n, behavior_hold_tap_init, NULL, NULL, &behavior_hold_tap_config_##n, \
+ APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \
+ &behavior_hold_tap_driver_api);
DT_INST_FOREACH_STATUS_OKAY(KP_INST)
|
Fix vsync tearing on fade
|
@@ -77,6 +77,9 @@ void game_loop()
joy = joypad();
+ // Handle Fade
+ FadeUpdate();
+
// Handle stage switch
if (stage_type != stage_next_type && !IsFading())
{
@@ -99,9 +102,6 @@ void game_loop()
SceneUpdate();
}
- // Handle Fade
- FadeUpdate();
-
prev_joy = joy;
time++;
|
Fix Schema Admin link
|
@@ -55,6 +55,7 @@ init_collection_name() {
sed -i -e "s~@MAINCOLLECTION@~${1}~g" /opt/datafari/tomcat/webapps/Datafari/admin/ajax/js/queryElevator.js
sed -i -e "s~@MAINCOLLECTION@~${1}~g" /opt/datafari/tomcat/webapps/Datafari/js/AjaxFranceLabs/modules/QueryElevator.module.js
sed -i -e "s~@MAINCOLLECTION@~${1}~g" /opt/datafari/tomcat/webapps/Datafari/admin/ajax/SchemaAnalysis.html
+ sed -i -e "s~@MAINCOLLECTION@~${1}~g" /opt/datafari/tomcat/webapps/Datafari/admin/ajax/SchemaAdmin.html
}
|
dns: packed dns_header_s and dns_question_s
|
/* The DNS message header */
-struct dns_header_s
+begin_packed_struct struct dns_header_s
{
uint16_t id;
uint8_t flags1;
@@ -147,15 +147,15 @@ struct dns_header_s
uint16_t numanswers;
uint16_t numauthrr;
uint16_t numextrarr;
-};
+} end_packed_struct;
/* The DNS question message structure */
-struct dns_question_s
+begin_packed_struct struct dns_question_s
{
uint16_t type;
uint16_t class;
-};
+} end_packed_struct;
/* The DNS answer message structure */
|
fix strange lease count
|
@@ -303,12 +303,12 @@ static void try_connect(h2o_socketpool_connect_request_t *req)
req->selected_target = req->pool->balancer->callbacks->select_(req->pool->balancer, &req->pool->targets, req->lb.tried);
assert(!req->lb.tried[req->selected_target]);
req->lb.tried[req->selected_target] = 1;
- __sync_add_and_fetch(&req->pool->targets.entries[req->selected_target]->_shared.leased_count, 1);
} else {
req->selected_target = 0;
}
}
target = req->pool->targets.entries[req->selected_target];
+ __sync_add_and_fetch(&req->pool->targets.entries[req->selected_target]->_shared.leased_count, 1);
switch (target->type) {
case H2O_SOCKETPOOL_TYPE_NAMED:
|
update changelog for 0.7.1, first round
|
@@ -4,6 +4,24 @@ title: Changelog
# Changelog
+## AppScope 0.7.1
+
+2021-07-20 - Maintenance Pre-Release
+
+This pre-release addresses the following issues:
+
+- **Improvement**: [#350] In `docker-build`, add support for:
+ - Overriding the `build` command, for example `make docker-build CMD="make coreall"`.
+ - Passing `-u $(id -u):$(id -g)` to Docker so that the current user owns build results.
+ - Using `.dockerignore` to omit unnecessary and potentially large items like `**/core`, `website/`, `test/testContainers`.
+- **Improvement**: [#304](https://github.com/criblio/appscope/issues/304) Add support for configuring an `authToken` to pass to LogStream as a header, using `scope run -a ${authToken}` in the CLI, or the `cribl` section of `scope.yml`.
+- **Improvement**:[#368](https://github.com/criblio/appscope/issues/368) Add the new `-n` or `--nobreaker` option for configuring LogStream breaker behavior from AppScope.
+- **Fix**: [#388](https://github.com/criblio/appscope/issues/388) Ensure that all dimension names contain underscores rather than dots.
+- **Fix**: [#364](https://github.com/criblio/appscope/issues/364) Console data is now received reliably when using TLS in both low latency (all local) and relatively high latency environments (LogStream cloud).
+- **Fix**: [#309](https://github.com/criblio/appscope/issues/309) The `scope flows` command now works when `stdin` is a pipe.
+
+# Changelog
+
## AppScope 0.7
2021-07-02 - Maintenance Pre-Release
|
Sysinfo: Fix fullscreen padding
|
@@ -576,13 +576,15 @@ VOID PhSipOnCommand(
GetMonitorInfo(MonitorFromWindow(PhSipWindow, MONITOR_DEFAULTTOPRIMARY), &info)
)
{
+ ULONG padding = CurrentParameters.WindowPadding / 2;
PhSetWindowStyle(PhSipWindow, WS_OVERLAPPEDWINDOW, 0);
SetWindowPos(
PhSipWindow,
- HWND_TOP,
- info.rcMonitor.left, info.rcMonitor.top,
- info.rcMonitor.right - info.rcMonitor.left,
- info.rcMonitor.bottom - info.rcMonitor.top,
+ HWND_TOPMOST,
+ info.rcMonitor.left - padding,
+ info.rcMonitor.top - padding,
+ (info.rcMonitor.right - info.rcMonitor.left) + padding * 2,
+ (info.rcMonitor.bottom - info.rcMonitor.top) + padding * 2,
SWP_NOOWNERZORDER | SWP_FRAMECHANGED
);
}
|
board_inspector: return from method call invocation on DefReturn
The current implementation of the AML interpreter continues interpreting a
method after meeting a DefReturn object, which is incorrect. This patch
fixes this issue by raising a dedicated exception on return and catching
that exception on the caller side.
|
@@ -7,6 +7,11 @@ from .context import *
from .datatypes import *
from .tree import Tree, Interpreter
+class MethodReturn(Exception):
+ """ A pseudo exception to return from a method"""
+ def __init__(self):
+ pass
+
class ConcreteInterpreter(Interpreter):
class Argument(Object):
def __init__(self, frame, index):
@@ -188,7 +193,10 @@ class ConcreteInterpreter(Interpreter):
# Evaluate the statements of the callee
self.stack.append(self.StackFrame(realpath, args))
logging.debug(f"Calling {realpath} with args {args}")
+ try:
self.interpret(value.body)
+ except MethodReturn:
+ pass
frame = self.stack.pop()
self.context.pop_scope()
@@ -335,6 +343,7 @@ class ConcreteInterpreter(Interpreter):
if isinstance(obj, (self.Argument, self.LocalVariable)):
obj = obj.get_obj()
self.stack[-1].return_value = obj
+ raise MethodReturn()
return None
def DefSignal(self, tree):
|
* jbi_consumer minors
|
@@ -23,6 +23,17 @@ start: {
}
if (rc == IWKV_ERROR_NOTFOUND) {
rc = 0;
+ if (ctx->midx.idx) {
+ iwlog_error("Orphaned index entry."
+ "\n\tCollection db: %" PRIu32
+ "\n\tIndex db: %" PRIu32
+ "\n\tEntry id: %" PRId64, ctx->jbc->dbid, ctx->midx.idx->dbid, id);
+ } else {
+ iwlog_error("Orphaned index entry."
+ "\n\tCollection db: %" PRIu32
+ "\n\tEntry id: %" PRId64, ctx->jbc->dbid, id);
+ }
+ goto finish;
}
RCGO(rc, finish);
if (vsz > ctx->jblbufsz) {
|
[snitch] Set number of outstanding loads
|
@@ -45,7 +45,7 @@ package snitch_pkg;
} inst_req_t;
localparam int NumFPOutstandingLoads = 4;
- localparam int NumIntOutstandingLoads = 1;
+ localparam int NumIntOutstandingLoads = 4;
// Number of instructions the sequencer can hold
localparam int FPUSequencerInstr = 16;
// SSRs
|
Add document BoAT Blockchain IoT Module Technology and Application
|
@@ -40,6 +40,9 @@ For project status update, please visit [BoAT Project Status Update Reports](htt
### Whitepaper
Please see [BoAT Blockchain IoT Module Product White Paper](./docs/en-us/BoAT_Blockchain_IoT_Module_Product_White_Paper_EN.pdf).
+### Blockchain Module Technology and Application
+Please see [BoAT Blockchain IoT Module Technology and Application](./docs/en-us/BoAT_Blockchain_IoT_Module_Technology_and_Application_en.pdf).
+
## Quick Start
### Dependencies
|
Coverity warning in http server
Remove duplicate error check
|
@@ -148,12 +148,6 @@ api_http_static_enable (vat_main_t * vam)
return -99;
}
- if (www_root == 0)
- {
- errmsg ("Must specify www-root");
- return -99;
- }
-
if (uri == 0)
uri = format (0, "tcp://0.0.0.0/80%c", 0);
|
zephyr: Detect unsorted config_allowed
When the file is not sorted the check fails, but this is not obvious.
Add an explicit message.
BRANCH=none
TEST=make buildall -j32
|
@@ -30,6 +30,11 @@ usage() {
exit 1
}
+die() {
+ echo >&2 "$1"
+ exit 2
+}
+
[ $# -ge 3 ] || usage
config="$1"
@@ -52,7 +57,8 @@ sed -n 's/^\(CONFIG_[A-Za-z0-9_]*\).*/\1/p' "${config}" | sort | uniq \
>"${new_configs}"
# Find any not mentioned in the allowed file
-comm -23 "${new_configs}" "${allow}" > "${suspects}"
+comm -23 --check-order "${new_configs}" "${allow}" > "${suspects}" || \
+ die "${allow} must be sorted"
# Find all the Kconfig options so far defined
find "${srctree}" -type f -name "Kconfig*" -exec cat {} \; | sed -n -e \
|
Remove QUIC_ prefix in SSLKEYLOG
|
@@ -770,8 +770,8 @@ static int picoquic_update_traffic_key_callback(ptls_update_traffic_key_t * self
if (ctx->log_event != NULL) {
char hexbuf[PTLS_MAX_DIGEST_SIZE * 2 + 1];
static const char *log_labels[2][4] = {
- {NULL, "QUIC_CLIENT_EARLY_TRAFFIC_SECRET", "QUIC_CLIENT_HANDSHAKE_TRAFFIC_SECRET", "QUIC_CLIENT_TRAFFIC_SECRET_0"},
- {NULL, NULL, "QUIC_SERVER_HANDSHAKE_TRAFFIC_SECRET", "QUIC_SERVER_TRAFFIC_SECRET_0"}};
+ {NULL, "CLIENT_EARLY_TRAFFIC_SECRET", "CLIENT_HANDSHAKE_TRAFFIC_SECRET", "CLIENT_TRAFFIC_SECRET_0"},
+ {NULL, NULL, "SERVER_HANDSHAKE_TRAFFIC_SECRET", "SERVER_TRAFFIC_SECRET_0"}};
const char *secret_label = log_labels[ptls_is_server(tls) == is_enc][epoch];
ptls_hexdump(hexbuf, secret, cipher->hash->digest_size);
ctx->log_event->cb(ctx->log_event, tls, secret_label, "%s", hexbuf);
|
meta: fix refleak in mget
updates some comments as well.
|
@@ -4365,10 +4365,6 @@ static void process_mget_command(conn *c, token_t *tokens, const size_t ntokens)
it->it_flags |= ITEM_TOKEN_SENT;
}
- // TODO: Benchmark unlocking here vs later. _get_extstore() could be
- // intensive so probably better to unlock here after we're done
- // fiddling with the item header.
-
*p = '\r';
*(p+1) = '\n';
*(p+2) = '\0';
@@ -4410,6 +4406,7 @@ static void process_mget_command(conn *c, token_t *tokens, const size_t ntokens)
resp->item = it;
}
} else {
+ // Failed to set up extstore fetch.
if (of.locked) {
do_item_remove(it);
} else {
@@ -4424,11 +4421,7 @@ static void process_mget_command(conn *c, token_t *tokens, const size_t ntokens)
}
if (of.locked) {
- // Delayed bump so we could get fetched/last access time/etc.
- // TODO: before segmented LRU, last-access time would only update
- // every 60 seconds. Currently it doesn't update at all if an item is
- // marked as ACTIVE. I believe this is a bug... in segmented mode
- // there's no reason to avoid bumping la on every access.
+ // Delayed bump so we could get fetched/last access time pre-update.
if (!of.no_update && it != NULL) {
do_item_bump(c, it, hv);
}
@@ -4466,9 +4459,12 @@ static void process_mget_command(conn *c, token_t *tokens, const size_t ntokens)
}
return;
error:
- if (it && of.locked) {
+ if (it) {
+ do_item_remove(it);
+ if (of.locked) {
item_unlock(hv);
}
+ }
out_errstring(c, errstr);
}
|
libhfcommon: use TEMP_FAILURE_RETRY with some restartable funcs
|
@@ -206,13 +206,13 @@ void util_closeStdio(bool close_stdin, bool close_stdout, bool close_stderr) {
}
if (close_stdin) {
- dup2(fd, STDIN_FILENO);
+ TEMP_FAILURE_RETRY(dup2(fd, STDIN_FILENO));
}
if (close_stdout) {
- dup2(fd, STDOUT_FILENO);
+ TEMP_FAILURE_RETRY(dup2(fd, STDOUT_FILENO));
}
if (close_stderr) {
- dup2(fd, STDERR_FILENO);
+ TEMP_FAILURE_RETRY(dup2(fd, STDERR_FILENO));
}
if (fd > STDERR_FILENO) {
|
frsky_d8: remove debug logging
|
@@ -209,7 +209,6 @@ static uint8_t frsky_d8_handle_packet() {
}
if ((timer_micros() - last_packet_received_time) > FRSKY_SYNC_DELAY_MAX) {
- quic_debugf("FRSKY_D8: update %d", frame_index);
frame_index++;
protocol_state = FRSKY_STATE_UPDATE;
}
|
NODE: v1.0.0-rc0
|
{
"name": "mongodb-client-encryption",
- "version": "0.3.1",
+ "version": "1.0.0-rc0",
"description": "Official client encryption module for the MongoDB Node.js driver",
"main": "index.js",
"directories": {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.