message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Fix bug in get_aligned_pairs
I noticed that in pysam 0.15.1, there is a bug with the get_aligned_pairs function when matches_only=True and with_seq=True. Basically, the read position gets advanced, but the reference position does not. This fixes that bug, and I believe it won't involve changing any other portions of the code. | @@ -1952,6 +1952,8 @@ cdef class AlignedSegment:
else:
for i from pos <= i < pos + l:
result.append((None, i))
+ else:
+ r_idx += l
pos += l
elif op == BAM_CHARD_CLIP:
|
Ensure we fail with a decode error alert if the server sends and empty Cert | @@ -1688,7 +1688,8 @@ MSG_PROCESS_RETURN tls_process_server_certificate(SSL *s, PACKET *pkt)
if ((SSL_IS_TLS13(s) && !PACKET_get_1(pkt, &context))
|| context != 0
|| !PACKET_get_net_3(pkt, &cert_list_len)
- || PACKET_remaining(pkt) != cert_list_len) {
+ || PACKET_remaining(pkt) != cert_list_len
+ || PACKET_remaining(pkt) == 0) {
al = SSL_AD_DECODE_ERROR;
SSLerr(SSL_F_TLS_PROCESS_SERVER_CERTIFICATE, SSL_R_LENGTH_MISMATCH);
goto f_err;
|
Test extra zero after alpn | @@ -2786,6 +2786,23 @@ int demo_alpn_test()
}
}
+ /* Try the list of correct values with extra zero */
+ for (int i = 0; ret == 0 && alpn_good_list[i] != NULL; i++) {
+ char buf[256];
+ picoquic_alpn_enum x;
+ size_t len = strlen(alpn_good_list[i]);
+
+ memset(buf, 0, sizeof(buf));
+ memcpy(buf, alpn_good_list[i], len);
+ x = picoquic_parse_alpn_nz(buf, len+1);
+ if (x != picoquic_alpn_undef) {
+ DBG_PRINTF("For ALPN = \"%s\\0...\", got proto %d instead of %d",
+ alpn_good_list[i], x, picoquic_alpn_undef);
+ ret = -1;
+ break;
+ }
+ }
+
/* Same test, but with large buffer */
for (int i = 0; ret == 0 && alpn_good_list[i] != NULL; i++) {
char buf[256];
|
pybricks/common/LightGrid: display negative numbers
Display a faint dot in the center to indicate a negative number.
Now you can display the numbers -99 to 99. | @@ -162,15 +162,14 @@ STATIC mp_obj_t common_LightGrid_number(size_t n_args, const mp_obj_t *pos_args,
composite[i] = pb_digits_5x2[value / 10][i] << 3 | pb_digits_5x2[value % 10][i];
}
- // Display one dot to indicate negative
- // FIXME: Display faintly to distinguish from digits
- if (negative) {
- composite[3] |= 0b00100;
- }
-
// Display the result
light_grid_set_rows_binary(self, composite);
+ // Display one faint dot in the middle to indicate negative
+ if (negative) {
+ set_pixel_brightness(self, 2, 2, 50);
+ }
+
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(common_LightGrid_number_obj, 1, common_LightGrid_number);
|
SOVERSION bump to version 7.13.5 | @@ -73,7 +73,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_
# with backward compatible change and micro version is connected with any internal change of the library.
set(SYSREPO_MAJOR_SOVERSION 7)
set(SYSREPO_MINOR_SOVERSION 13)
-set(SYSREPO_MICRO_SOVERSION 4)
+set(SYSREPO_MICRO_SOVERSION 5)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
[core] fdevent_poll_poll avoid potential race
fdevent_poll_poll avoid potential race with pollfds list being extended | @@ -788,15 +788,14 @@ fdevent_poll_event_set (fdevents *ev, fdnode *fdn, int events)
static int
fdevent_poll_poll (fdevents *ev, int timeout_ms)
{
- struct pollfd * const restrict pfds = ev->pollfds;
+ const int n = poll(ev->pollfds, ev->used, timeout_ms);
fdnode ** const fdarray = ev->fdarray;
- const int n = poll(pfds, ev->used, timeout_ms);
- for (int i = 0, m = 0; m < n; ++i) {
- if (0 == pfds[i].revents) continue;
+ for (int i = 0, m = 0; m < n; ++i, ++m) {
+ struct pollfd * const restrict pfds = ev->pollfds;
+ while (0 == pfds[i].revents) ++i;
fdnode *fdn = fdarray[pfds[i].fd];
if (0 == ((uintptr_t)fdn & 0x3))
(*fdn->handler)(fdn->ctx, pfds[i].revents);
- ++m;
}
return n;
}
|
Test styling fixes. | @@ -5000,8 +5000,8 @@ def test_dist_train_yetirank():
pool='querywise',
train='repeat_same_query_8_times',
test='repeat_same_query_8_times',
- cd='train.cd'),
- output_file_switch='--test-err-log'))]
+ cd='train.cd'
+ ), output_file_switch='--test-err-log'))]
def test_no_target():
|
tools: fix NULL pointer dereference in configure.c | @@ -800,7 +800,7 @@ static void enumerate_configs(void)
static void check_configdir(void)
{
- if (verify_optiondir(g_configpath))
+ if (g_configpath && verify_optiondir(g_configpath))
{
/* Get the path to the custom board scripts directory */
|
Added doxygen for TSCH frame pending bit functions | @@ -101,9 +101,18 @@ int tsch_packet_update_eb(uint8_t *buf, int buf_size, uint8_t tsch_sync_ie_offse
int tsch_packet_parse_eb(const uint8_t *buf, int buf_size,
frame802154_t *frame, struct ieee802154_ies *ies,
uint8_t *hdrlen, int frame_without_mic);
-/* Set frame pending bit in a packet (whose header was already build) */
+/**
+ * \brief Set frame pending bit in a packet (whose header was already build)
+ * \param buf The buffer where the packet resides
+ * \param buf_size The buffer size
+ */
void tsch_packet_set_frame_pending(uint8_t *buf, int buf_size);
-/* Get frame pending bit from a packet */
+/**
+ * \brief Get frame pending bit from a packet
+ * \param buf The buffer where the packet resides
+ * \param buf_size The buffer size
+ * \return The value of the frame pending bit, 1 or 0
+ */
int tsch_packet_get_frame_pending(uint8_t *buf, int buf_size);
#endif /* __TSCH_PACKET_H__ */
|
remove _getpid_r() | @@ -79,12 +79,6 @@ _fstat_r(struct _reent *ptr, int fd, struct stat *pstat)
return -1;
}
-int
-_getpid_r(struct _reent *ptr)
-{
- return 0;
-}
-
int
_isatty_r(struct _reent *ptr, int fd)
{
@@ -335,7 +329,10 @@ int flock(int fd, int operation)
}
/*
-These functions will be implemented and replaced by the 'common/time.c' file
+These functions are implemented and replaced by the 'common/time.c' file
int _gettimeofday_r(struct _reent *ptr, struct timeval *__tp, void *__tzp);
_CLOCK_T_ _times_r(struct _reent *ptr, struct tms *ptms);
+
+These functions are implemented and replaced by the "common/unistd.c" file
+int _getpid_r(struct _reent *ptr);
*/
|
man: Updated man pages | @@ -197,6 +197,9 @@ passwd \fIpasswd/\fR for passwd files
specload \fIspecload/\fR calls an external application to request its specification, depends on quickdump \fIquickdump/\fR
.
.IP "\(bu" 4
+toml \fItoml/\fR reads and writes data using a parser generated by Flex \fIhttps://github\.com/westes/flex\fR and Bison \fIhttps://www\.gnu\.org/software/bison\fR
+.
+.IP "\(bu" 4
yamlcpp \fIyamlcpp/\fR reads and writes data in the YAML \fIhttp://www\.yaml\.org\fR format using yaml\-cpp \fIhttps://github\.com/jbeder/yaml\-cpp\fR
.
.IP "\(bu" 4
|
minor dev fix | @@ -1918,7 +1918,7 @@ ACVP_RESULT acvp_set_cacerts(ACVP_CTX *ctx, char *ca_file)
/*
* Enable peer verification when CA certs are provided.
*/
- ctx->verify_peer = 0;
+ ctx->verify_peer = 1;
return ACVP_SUCCESS;
}
|
Change compiler detection to use cpp macros | @@ -123,22 +123,16 @@ fi
cc_id=
cc_vers=
lld_detected=0
-if cc_vers_string=$("$cc_exe" --version 2> /dev/null); then
- if clang_vers_string=$(echo "$cc_vers_string" | grep clang | head -n1) && ! [[ -z $clang_vers_string ]]; then
+if cc_vers=$(echo -e '#ifndef __clang__\n#error Not found\n#endif\n__clang_major__.__clang_minor__.__clang_patchlevel__' | "$cc_exe" -E -xc - 2>/dev/null | tail -n 1 | tr -d '\040'); then
cc_id=clang
- # clang -dumpversion always pretends to be gcc 4.2.1
- # shellcheck disable=SC2001
- cc_vers=$(echo "$clang_vers_string" | sed 's/.*version \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/')
if [[ $os != mac ]]; then
if command -v "lld" >/dev/null 2>&1; then
lld_detected=1
fi
fi
- # Only gcc has -dumpfullversion
- elif cc_vers=$("$cc_exe" -dumpfullversion 2> /dev/null); then
+elif cc_vers=$(echo -e '#ifndef __GNUC__\n#error Not found\n#endif\n__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__' | "$cc_exe" -E -xc - 2>/dev/null | tail -n 1 | tr -d '\040'); then
cc_id=gcc
fi
-fi
if [[ -z $cc_id ]]; then
warn "Failed to detect compiler type"
|
s2n_prf_key_expansion was being called multiple times incase of session resumption and was causing memory leaks, removing the key expansion call from cipher change spec functions | @@ -47,10 +47,6 @@ int s2n_server_ccs_recv(struct s2n_connection *conn)
/* Flush any partial alert messages that were pending */
GUARD(s2n_stuffer_wipe(&conn->alert_in));
- if (IS_RESUMPTION_HANDSHAKE(conn->handshake.handshake_type)) {
- GUARD(s2n_prf_key_expansion(conn));
- }
-
return 0;
}
@@ -58,9 +54,5 @@ int s2n_server_ccs_send(struct s2n_connection *conn)
{
GUARD(s2n_stuffer_write_uint8(&conn->handshake.io, CHANGE_CIPHER_SPEC_TYPE));
- if (IS_RESUMPTION_HANDSHAKE(conn->handshake.handshake_type)) {
- GUARD(s2n_prf_key_expansion(conn));
- }
-
return 0;
}
|
fix a possible failure in t/50reverse-proxy-early-response.t | @@ -5,7 +5,7 @@ BEGIN { $ENV{HTTP2_DEBUG} = 'debug' }
use Net::EmptyPort qw(check_port empty_port);
use Scope::Guard;
use Test::More;
-use Time::HiRes;
+use Time::HiRes qw(sleep);
use IO::Socket::INET;
use Protocol::HTTP2::Constants qw(:frame_types :errors :settings :flags :states :limits :endpoints);
use t::Util;
@@ -70,11 +70,12 @@ EOS
my $client = H1Client->new($server);
$client->send_headers('POST', '/', ['transfer-encoding' => 'chunked']) or die $!;
$client->send_data("1\r\na\r\n") or die $!;
+ sleep 0.01;
my $output = $client->read(1000);
- Time::HiRes::sleep(0.1);
+ sleep 0.01;
for (1..10) {
$client->send_data("400\r\n" . 'a' x 1024 . "\r\n", 1000) or last;
- Time::HiRes::sleep(0.01);
+ sleep 0.01;
}
like $output, qr{HTTP/1.1 200 }is;
sleep 1;
@@ -421,12 +422,18 @@ sub read {
$buf;
}
+# This code is originated from socketpool.c
+# Find for the comment "test if the connection is still alive".
sub is_alive {
my ($self) = @_;
return undef unless $self->{sock};
my $buf;
+ #local $! = 0;
my $ret = $self->{sock}->recv($buf, 1, MSG_PEEK);
- return $ret || ($! == EAGAIN || $! == EWOULDBLOCK);
+ return (
+ (defined($ret) && length($buf) > 0)
+ || ($! == EAGAIN || $! == EWOULDBLOCK)
+ );
}
sub close {
|
f405: ensure CCMRAM is enabled | @@ -259,6 +259,7 @@ void SystemInit() {
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
#endif
+ __HAL_RCC_CCMDATARAMEN_CLK_ENABLE();
__HAL_FLASH_PREFETCH_BUFFER_ENABLE();
__HAL_FLASH_INSTRUCTION_CACHE_ENABLE();
__HAL_FLASH_DATA_CACHE_ENABLE();
|
Add "expected integer but found float test" | @@ -90,8 +90,19 @@ describe("Titan coder", function()
"expected float but found integer",
nil, true))
]])
- end)
+ run_coder([[
+ function f(x: integer): integer
+ return x
+ end
+ ]], [[
+ local ok, err = pcall(test.f, 3.14)
+ assert(string.find(err,
+ "wrong type for argument x at line 1, " ..
+ "expected integer but found float",
+ nil, true))
+ ]])
+ end)
describe("Expressions:", function()
|
statusbar: fix flexing on dev stream mobile | @@ -107,7 +107,7 @@ const StatusBar = (props) => {
width="auto"
alignY="top"
alignX="right"
- flexShrink={0}
+ flexShrink={'0'}
options={
<Col
mt='6'
|
BugID:23251508: DNS: added compile-time check for some defines to fit into an u8_t (bug
commit
Author: goldsimon
Date: Wed Dec 7 09:09:45 2016 +0100 | @@ -132,6 +132,13 @@ static u16_t dns_txid;
#error DNS_MAX_TTL must be a positive 32-bit value
#endif
+#if DNS_TABLE_SIZE > 255
+#error DNS_TABLE_SIZE must fit into an u8_t
+#endif
+#if DNS_MAX_SERVERS > 255
+#error DNS_MAX_SERVERS must fit into an u8_t
+#endif
+
/* The number of parallel requests (i.e. calls to dns_gethostbyname
* that cannot be answered from the DNS table.
* This is set to the table size by default.
@@ -139,6 +146,10 @@ static u16_t dns_txid;
#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0)
#ifndef DNS_MAX_REQUESTS
#define DNS_MAX_REQUESTS DNS_TABLE_SIZE
+#else
+#if DNS_MAX_REQUESTS > 255
+#error DNS_MAX_REQUESTS must fit into an u8_t
+#endif
#endif
#else
/* In this configuration, both arrays have to have the same size and are used
@@ -150,6 +161,10 @@ static u16_t dns_txid;
#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0)
#ifndef DNS_MAX_SOURCE_PORTS
#define DNS_MAX_SOURCE_PORTS DNS_MAX_REQUESTS
+#else
+#if DNS_MAX_SOURCE_PORTS > 255
+#error DNS_MAX_SOURCE_PORTS must fit into an u8_t
+#endif
#endif
#else
#ifdef DNS_MAX_SOURCE_PORTS
|
Build firrtl first so we dont get that weird error | @@ -11,7 +11,10 @@ lookup_scala_srcs = $(shell find $(1)/ -iname "*.scala" 2> /dev/null)
libs: $(rocketchip_stamp) $(extra_stamps)
-$(rocketchip_stamp): $(call lookup_scala_srcs, $(ROCKETCHIP_DIR))
+FIRRTL_JAR ?= $(ROCKETCHIP_DIR)/firrtl/utils/bin/firrtl.jar
+FIRRTL ?= java -Xmx2G -Xss8M -XX:MaxPermSize=256M -cp $(FIRRTL_JAR) firrtl.Driver
+
+$(rocketchip_stamp): $(call lookup_scala_srcs, $(ROCKETCHIP_DIR)) $(FIRRTL_JAR)
cd $(ROCKETCHIP_DIR) && $(SBT) pack
mkdir -p $(lib_dir)
cp $(ROCKETCHIP_DIR)/target/pack/lib/*.jar $(lib_dir)
@@ -22,11 +25,10 @@ $(rocketchip_stamp): $(call lookup_scala_srcs, $(ROCKETCHIP_DIR))
$(base_dir)/Makefrag.pkgs: $(base_dir)/generate-pkg-mk.sh
bash $(base_dir)/generate-pkg-mk.sh $(EXTRA_PACKAGES) > $@
-FIRRTL_JAR ?= $(ROCKETCHIP_DIR)/firrtl/utils/bin/firrtl.jar
-FIRRTL ?= java -Xmx2G -Xss8M -XX:MaxPermSize=256M -cp $(FIRRTL_JAR) firrtl.Driver
-
$(FIRRTL_JAR): $(call lookup_scala_srcs, $(ROCKETCHIP_DIR)/firrtl/src/main/scala)
$(MAKE) -C $(ROCKETCHIP_DIR)/firrtl SBT="$(SBT)" root_dir=$(ROCKETCHIP_DIR)/firrtl build-scala
+ mkdir -p $(ROCKETCHIP_DIR)/lib
+ cp -p $(FIRRTL_JAR) $(ROCKETCHIP_DIR)/lib
build_dir=$(sim_dir)/generated-src
|
brk: free based on physical address | @@ -1615,23 +1615,19 @@ static sysreturn brk(void *addr)
assert(adjust_process_heap(p, irange(p->heap_base, u64_from_pointer(x))));
if (old_end > new_end) {
u64 len = old_end - new_end;
+ u64 phys = physical_from_virtual(pointer_from_u64(new_end));
write_barrier();
unmap(new_end, len);
- // XXX making this available now leads to crash in node gotest
-// id_heap_set_area(heap_physical(kh), new_end, len, true, false);
+ id_heap_set_area(heap_physical(kh), phys, len, true, false);
}
} else if (p->brk < x) {
- // I guess assuming we're aligned
u64 alloc = new_end - old_end;
assert(alloc > 0);
assert(adjust_process_heap(p, irange(p->heap_base, u64_from_pointer(p->brk) + alloc)));
u64 phys = allocate_u64((heap)heap_physical(kh), alloc);
if (phys == INVALID_PHYSICAL)
goto fail;
- /* XXX no exec configurable? */
- pageflags flags = pageflags_writable(pageflags_noexec(pageflags_user(pageflags_memory())));
- map(u64_from_pointer(p->brk), phys, alloc, flags);
- // people shouldn't depend on this
+ map(u64_from_pointer(p->brk), phys, alloc, pageflags_writable(pageflags_default_user()));
zero(p->brk, alloc);
p->brk += alloc;
}
|
Fix gauge end arc segment not being rendered | @@ -540,12 +540,12 @@ void lv_linemeter_draw_scale(lv_obj_t * lmeter, const lv_area_t * clip_area, uin
lv_draw_mask_remove_id(mask_out_id);
#endif
- if(part == LV_LINEMETER_PART_MAIN && level + 1 < ext->line_cnt - 1) {
+ if(part == LV_LINEMETER_PART_MAIN && level < ext->line_cnt - 1) {
lv_style_int_t border_width = lv_obj_get_style_scale_border_width(lmeter, part);
lv_style_int_t end_border_width = lv_obj_get_style_scale_end_border_width(lmeter, part);
if(border_width || end_border_width) {
- int16_t end_angle = ((level + 1) * ext->scale_angle) / (ext->line_cnt - 1) + angle_ofs;
+ int16_t end_angle = ((level) * ext->scale_angle) / (ext->line_cnt - 1) + angle_ofs;
lv_draw_line_dsc_t arc_dsc;
lv_draw_line_dsc_init(&arc_dsc);
lv_obj_init_draw_line_dsc(lmeter, part, &arc_dsc);
|
Only one read in disagreement with CR3 in pbmc5k-Lane1. | @@ -50,7 +50,7 @@ void SoloFeature::collapseUMI_CR(uint32 iCB, uint32 *umiArray)
unordered_map<uint32, uint32> umiMaxGeneCount;//for each umi, max counts of reads per gene
- unordered_map <uint32, unordered_map<uint32,uint32>> umiGeneHash;
+ unordered_map <uint32, unordered_map<uint32,uint32>> umiGeneHash, umiGeneHash0;
//UMI //Gene //Count
unordered_map <uint32,uint32> geneCounts;
@@ -88,11 +88,9 @@ void SoloFeature::collapseUMI_CR(uint32 iCB, uint32 *umiArray)
uint32 nU0=(iR1+umiArrayStride)/umiArrayStride;
uint32 nU1=nU0;//2 types of 1MM collapsing
+ if (pSolo.umiFiltering.MultiGeneUMI) {
for (uint64 iu=0; iu<nU0*umiArrayStride; iu+=umiArrayStride) {
- if ( umiMaxGeneCount.count(umiArray[iu+0]) == 0 ) {
- umiMaxGeneCount[umiArray[iu+0]] = umiArray[iu+1];
- } else {
- umiMaxGeneCount[umiArray[iu+0]] = max(umiMaxGeneCount[umiArray[iu+0]], umiArray[iu+1]);
+ umiGeneHash0[umiArray[iu+0]][gID[iG]]+=umiArray[iu+1];//this sums read counts over UMIs that were collapsed
};
};
@@ -131,7 +129,9 @@ void SoloFeature::collapseUMI_CR(uint32 iCB, uint32 *umiArray)
};
if (pSolo.umiFiltering.MultiGeneUMI) {
+
for (auto &iu: umiGeneHash) {
+
uint32 maxu=0, maxg=-1;
for (auto &ig : iu.second) {
if (ig.second>maxu) {
@@ -141,8 +141,18 @@ void SoloFeature::collapseUMI_CR(uint32 iCB, uint32 *umiArray)
maxg=-1;
};
};
- if ( maxg+1!=0 && maxu>=umiMaxGeneCount[iu.first] )
+ if ( maxg+1==0 )
+ continue; //this umi is not counted for any gene
+
+ for (auto &ig : umiGeneHash0[iu.first]) {//check that this umi/gene had also top count for uncorrected umis
+ if (ig.second>umiGeneHash0[iu.first][maxg]) {
+ maxg=-1;
+ break;
+ };
+ };
+ if ( maxg+1!=0 )
geneCounts[maxg]++;
+
};
for (auto &ig: geneCounts) {
|
debian/acrn-doc.doc-base: Fix typo | @@ -3,7 +3,7 @@ Section: System/Administration
Title: ACRN HTML documentation
Abstract: ACRN interfaces, howtos and much more
ACRN upstream provides much of its documentation in HTML form.
- This entry referes to the top-level index of the ACRN HTML docs.
+ This entry refers to the top-level index of the ACRN HTML docs.
Format: HTML
Index: /usr/share/doc/acrn/html/index.html
|
menu mouse fix for inactive items | @@ -309,7 +309,7 @@ static void drawMenu(Menu* menu, s32 x, s32 y)
y + TextMargin + ItemHeight * (i - menu->pos) - menu->anim.pos, width, TIC_FONT_HEIGHT};
bool down = false;
- if(animIdle(menu) && checkMousePos(&rect))
+ if(animIdle(menu) && checkMousePos(&rect) && (it->handler || it->option))
{
setCursor(tic_cursor_hand);
|
hw/bsp/pinetime: Setup I2C
Enable the I2C port 1 for the Pinetime. Maximum speed of 400 KHz is set
since connected I2C slave devices are >= 400 KHz. | @@ -62,6 +62,8 @@ syscfg.vals:
SPI_0_MASTER_PIN_MISO: 4 # P0.04: SPI-MISO
# I2C port 1 connected to CST816S touch controller, BMA421 accelerometer, HRS3300 heart rate sensor
+ I2C_1: 1
+ I2C_1_FREQ_KHZ: 400 # BMA421=1000 HRS3300=800 CST816S=400
I2C_1_PIN_SCL: 7 # P0.07: BMA421-SCL, HRS3300-SCL, TP-SCLOUT
I2C_1_PIN_SDA: 6 # P0.06: BMA421-SDA, HRS3300-SDA, TP-SDAI/O
|
Fix canceling query with TLS-requiring connections | @@ -113,6 +113,11 @@ od_tls_frontend_accept(od_client_t *client,
od_debug(logger, "tls", client, NULL, "ok");
return 0;
}
+
+ /* Client sends cancel request without encryption */
+ if (client->startup.is_cancel)
+ return 0;
+
switch (config->tls_mode) {
case OD_CONFIG_TLS_DISABLE:
case OD_CONFIG_TLS_ALLOW:
|
cmake: don't run linux command on macos | @@ -113,6 +113,7 @@ if (UNIX)
execute_process (COMMAND uname -m OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE)
string (STRIP "${CPACK_PACKAGE_ARCHITECTURE}" CPACK_PACKAGE_ARCHITECTURE)
+ if (NOT APPLE)
# Try to find distro name and distro-specific arch
execute_process (COMMAND bash "-c" "grep \"^NAME=\" /etc/os-release | awk -F= {' print $2'} | sed 's/\"//g'"
OUTPUT_VARIABLE OS_NAME)
@@ -123,6 +124,7 @@ if (UNIX)
string (STRIP "${OS_NAME}" OS_NAME)
string (STRIP "${OS_VERSION_ID}" OS_VERSION_ID)
string (STRIP "${OS_PRETTY_NAME}" OS_PRETTY_NAME)
+ endif (NOT APPLE)
set (OS_DISTRIB "${OS_NAME}${OS_VERSION_ID}")
if (NOT OS_DISTRIB)
set (OS_DISTRIB "unix")
|
tools/pyboard.py: Support executing .mpy files directly.
This patch allows executing .mpy files (including native ones) directly on
a target, eg a board over a serial connection. So there's no need to copy
the file to its filesystem to test it.
For example:
$ mpy-cross foo.py
$ pyboard.py foo.mpy | @@ -484,6 +484,33 @@ def filesystem_command(pyb, args):
pyb.close()
sys.exit(1)
+_injected_import_hook_code = """\
+import uos, uio
+class _FS:
+ class File(uio.IOBase):
+ def __init__(self):
+ self.off = 0
+ def ioctl(self, request, arg):
+ return 0
+ def readinto(self, buf):
+ buf[:] = memoryview(_injected_buf)[self.off:self.off + len(buf)]
+ self.off += len(buf)
+ return len(buf)
+ mount = umount = chdir = lambda *args: None
+ def stat(self, path):
+ if path == '_injected.mpy':
+ return tuple(0 for _ in range(10))
+ else:
+ raise OSError(-2) # ENOENT
+ def open(self, path, mode):
+ return self.File()
+uos.mount(_FS(), '/_')
+uos.chdir('/_')
+from _injected import *
+uos.umount('/_')
+del _injected_buf, _FS
+"""
+
def main():
import argparse
cmd_parser = argparse.ArgumentParser(description='Run scripts on the pyboard.')
@@ -544,6 +571,9 @@ def main():
for filename in args.files:
with open(filename, 'rb') as f:
pyfile = f.read()
+ if filename.endswith('.mpy') and pyfile[0] == ord('M'):
+ pyb.exec_('_injected_buf=' + repr(pyfile))
+ pyfile = _injected_import_hook_code
execbuffer(pyfile)
# exiting raw-REPL just drops to friendly-REPL mode
|
Fix IP fragment-id and offset issue in LB-GRE4 | @@ -277,6 +277,8 @@ lb_node_fn (vlib_main_t * vm,
ip40->dst_address = lbm->ass[asindex0].address.ip4;
ip40->ip_version_and_header_length = 0x45;
ip40->ttl = 128;
+ ip40->fragment_id = 0;
+ ip40->flags_and_fragment_offset = 0;
ip40->length = clib_host_to_net_u16(len0 + sizeof(gre_header_t) + sizeof(ip4_header_t));
ip40->protocol = IP_PROTOCOL_GRE;
ip40->checksum = ip4_header_checksum (ip40);
|
Build: Use `execute_process` for file removal | @@ -49,7 +49,9 @@ string (REGEX REPLACE "\n" ";" files "${files}")
foreach (file ${files})
message (STATUS "Uninstalling $ENV{DESTDIR}${file}")
if (IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
- exec_program ("${CMAKE_COMMAND}" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" OUTPUT_VARIABLE rm_out RETURN_VALUE rm_retval)
+ execute_process (COMMAND "${CMAKE_COMMAND}" -E remove "$ENV{DESTDIR}${file}"
+ OUTPUT_VARIABLE rm_out
+ RESULT_VARIABLE rm_retval)
if (NOT "${rm_retval}" STREQUAL 0)
message (FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
endif (NOT "${rm_retval}" STREQUAL 0)
@@ -67,8 +69,9 @@ function (remove_directories directories)
set (dir "$ENV{DESTDIR}${directory}")
if (EXISTS "${dir}")
message (STATUS "Uninstalling directory ${dir}")
- exec_program (
- "${CMAKE_COMMAND}" ARGS "-E remove_directory \"${dir}\"" OUTPUT_VARIABLE rm_out RETURN_VALUE rm_retval)
+ execute_process (COMMAND "${CMAKE_COMMAND}" -E remove_directory "${dir}"
+ OUTPUT_VARIABLE rm_out
+ RESULT_VARIABLE rm_retval)
if (NOT "${rm_retval}" STREQUAL 0)
message (FATAL_ERROR "Problem when removing ${dir}")
|
AFR : NimBLE - Add support of slave connection interval range in advertisement data | @@ -607,6 +607,17 @@ BTStatus_t prvBTSetAdvData( uint8_t ucAdapterIf,
fields.mfg_data_len = usManufacturerLen;
}
+
+ if( ( pxParams->ulMinInterval != 0 ) && ( pxParams->ulMaxInterval != 0 ) )
+ {
+ uint8_t slave_itvl_range[ 4 ];
+ slave_itvl_range[ 0 ] = ( pxParams->ulMinInterval ) & 0xFF;
+ slave_itvl_range[ 1 ] = ( pxParams->ulMinInterval >> 8 ) & 0xFF;
+ slave_itvl_range[ 2 ] = ( pxParams->ulMaxInterval ) & 0xFF;
+ slave_itvl_range[ 3 ] = ( pxParams->ulMaxInterval >> 8 ) & 0xFF;
+ fields.slave_itvl_range = slave_itvl_range;
+ }
+
if( usServiceDataLen && pcServiceData )
{
fields.svc_data_uuid128 = ( uint8_t * ) pcServiceData;
|
Remove deprecated -c option
The short option -c is deprecated since v1.11. Only the long version
(--crop) remains. | @@ -799,7 +799,7 @@ scrcpy_parse_args(struct scrcpy_cli_args *args, int argc, char *argv[]) {
optind = 0; // reset to start from the first argument in tests
int c;
- while ((c = getopt_long(argc, argv, "b:c:fF:hKm:nNp:r:s:StTvV:w",
+ while ((c = getopt_long(argc, argv, "b:fF:hKm:nNp:r:s:StTvV:w",
long_options, NULL)) != -1) {
switch (c) {
case 'b':
@@ -807,9 +807,6 @@ scrcpy_parse_args(struct scrcpy_cli_args *args, int argc, char *argv[]) {
return false;
}
break;
- case 'c':
- LOGW("Deprecated option -c. Use --crop instead.");
- // fall through
case OPT_CROP:
opts->crop = optarg;
break;
|
TSCH: remove pending rx packet from ringbuf only after processing it | @@ -420,15 +420,15 @@ tsch_rx_process_pending()
packetbuf_set_attr(PACKETBUF_ATTR_CHANNEL, current_input->channel);
}
- /* Remove input from ringbuf */
- ringbufindex_get(&input_ringbuf);
-
if(is_data) {
/* Pass to upper layers */
packet_input();
} else if(is_eb) {
eb_input(current_input);
}
+
+ /* Remove input from ringbuf */
+ ringbufindex_get(&input_ringbuf);
}
}
|
Updated command line help usage. | @@ -158,7 +158,7 @@ cmd_help (void)
printf ("\nGoAccess - %s\n\n", GO_VERSION);
printf (
"Usage: "
- "goaccess [ options ... ] -f log_file [-c][-M][-H][-q][-d][...]\n"
+ "goaccess [filename] [ options ... ] [-c][-M][-H][-q][-d][...]\n"
"The following options can also be supplied to the command:\n\n"
/* Log & Date Format Options */
|
memif: fix "remove barriers" commit
Type: fix | @@ -315,8 +315,8 @@ memif_interface_tx_zc_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
u16 head, tail;
retry:
- slot = tail = __atomic_load_n (&ring->tail, __ATOMIC_ACQUIRE);
- head = ring->head;
+ tail = __atomic_load_n (&ring->tail, __ATOMIC_ACQUIRE);
+ slot = head = ring->head;
n_free = tail - mq->last_tail;
if (n_free >= 16)
|
ci: build apps only on shiny server | needs:
- job: fast_template_app
artifacts: false
+ tags:
+ - build
+ # build only on shiny servers since shiny storage server is at the same location
+ - shiny
artifacts:
paths:
- "**/build*/size.json"
|
memif: Fix underflow
Type: fix | @@ -557,7 +557,7 @@ memif_device_input_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
vlib_get_buffers (vm, ptd->buffers, buffer_ptrs, n_buffers);
- for (i = 0; i < n_pkts - 8; i++)
+ for (i = 0; i + 8 < n_pkts; i++)
{
clib_prefetch_load (desc_data[i + 8]);
clib_prefetch_store (buffer_ptrs[i + 8]->data);
@@ -574,7 +574,7 @@ memif_device_input_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
u32 n_pkts = vec_len (ptd->copy_ops);
co = ptd->copy_ops;
- for (i = 0; i < n_pkts - 8; i++)
+ for (i = 0; i + 8 < n_pkts; i++)
{
clib_prefetch_load (co[i + 8].data);
b = vlib_get_buffer (vm, ptd->buffers[co[i].buffer_vec_index]);
|
Fix to install crypto headers with CMake + wolfSSL
Follow-up to
Fixes: | @@ -210,6 +210,7 @@ endif()
if(ENABLE_WOLFSSL AND WOLFSSL_FOUND)
set(WOLFSSL_INCLUDE_DIRS ${WOLFSSL_INCLUDE_DIR})
set(HAVE_WOLFSSL TRUE)
+ set(HAVE_CRYPTO TRUE)
else()
set(HAVE_WOLFSSL FALSE)
set(WOLFSSL_INCLUDE_DIRS "")
|
pybricks.common.IMU: return data as vectors
Acceleration and gyro data can be manipulated as vectors.
Later on it will also be possible to select the axis of choice as an argument to avoid data allocation in the loop. | #include <lsm6ds3tr_c_reg.h>
#include <pybricks/common.h>
+#include <pybricks/geometry.h>
#include <pybricks/util_pb/pb_imu.h>
@@ -24,13 +25,7 @@ STATIC mp_obj_t common_IMU_acceleration(mp_obj_t self_in) {
float_t values[3];
pb_imu_accel_read(self->imu_dev, values);
- mp_obj_t objs[3] = {
- mp_obj_new_float_from_f(values[0]),
- mp_obj_new_float_from_f(values[1]),
- mp_obj_new_float_from_f(values[2]),
- };
-
- return mp_obj_new_tuple(3, objs);
+ return pb_type_Matrix_make_vector(3, values, false);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(common_IMU_acceleration_obj, common_IMU_acceleration);
@@ -40,12 +35,7 @@ STATIC mp_obj_t common_IMU_gyro(mp_obj_t self_in) {
float_t values[3];
pb_imu_gyro_read(self->imu_dev, values);
- mp_obj_t objs[3] = {
- mp_obj_new_float_from_f(values[0]),
- mp_obj_new_float_from_f(values[1]),
- mp_obj_new_float_from_f(values[2]),
- };
- return mp_obj_new_tuple(3, objs);
+ return pb_type_Matrix_make_vector(3, values, false);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(common_IMU_gyro_obj, common_IMU_gyro);
|
apps: hello: simplify hello world example
'hello world' is an example for showing minimum binary footprint. As
sleep() goes with signaling and scheduling functions which are a little
bit heavy, using it in this example increases the footprint and is
inappropriate. | #include <tinyara/config.h>
#include <stdio.h>
-#include <unistd.h>
/****************************************************************************
* hello_main
****************************************************************************/
-#define PRINT_INTERVAL_SECS 20
-
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char *argv[])
#else
int hello_main(int argc, char *argv[])
#endif
{
- int i;
-
- printf("This Hello World msg will be printed third every 20 seconds\n");
- for (i = 0; i < 3; i++) {
printf("Hello, World!!\n");
- sleep(PRINT_INTERVAL_SECS);
- }
-
return 0;
}
|
Add MBEDTLS_CHECK_RETURN description to mbedtls_config. | */
//#define MBEDTLS_DEPRECATED_REMOVED
+/** \def MBEDTLS_CHECK_RETURN
+ *
+ * This macro appearing at the beginning of the declaration of a function
+ * indicates that its return value should be checked.
+ *
+ * Default implementation resides in platform_util.h.
+ * You can override default implementation by defining your own.
+ * Custom implementation can be empty, which will disable checking
+ * of functions' return values.
+ */
+//#define MBEDTLS_CHECK_RETURN
+
/* \} name SECTION: System support */
/**
|
Feat:Unified printing function | @@ -866,12 +866,12 @@ void http_netctrl_stop(void)
stat = qapi_DSS_Stop_Data_Call(http_dss_handle);
if (QAPI_OK == stat)
{
- odm_ght_printf(debug_uart_context_D.uart_handle,"Stop data call success\n");
+ BoatLog(BOAT_LOG_CRITICAL,"Stop data call success\n");
}
stat = qapi_DSS_Rel_Data_Srvc_Hndl(http_dss_handle);
if (QAPI_OK != stat)
{
- odm_ght_printf(debug_uart_context_D.uart_handle,"Release data service handle failed:%d\n", stat);
+ BoatLog(BOAT_LOG_CRITICAL,"Release data service handle failed:%d\n", stat);
}
http_dss_handle = NULL;
}
|
fix statement about lifetime | @@ -64,7 +64,7 @@ void announces_debug( int fd ) {
}
if( value->lifetime == LONG_MAX ) {
- dprintf( fd, " lifetime: infinite\n" );
+ dprintf( fd, " lifetime: entire runtime\n" );
} else {
dprintf( fd, " lifetime: %ld min left\n", (value->lifetime - now) / 60 );
}
@@ -116,7 +116,11 @@ struct value_t *announces_add( const char query[], int port, time_t lifetime ) {
new->refresh = now - 1; // Send first announcement as soon as possible
new->lifetime = lifetime;
- log_debug( "Add announcement %s (port %hu) for %lu minutes", str_id( id ), port, (lifetime - now) / 60 );
+ if( lifetime == LONG_MAX ) {
+ log_debug( "Add announcement %s:%hu for entire runtime", str_id( id ), port );
+ } else {
+ log_debug( "Add announcement %s:%hu for %lu minutes", str_id( id ), port, (lifetime - now) / 60 );
+ }
// Prepend to list
new->next = g_values;
|
Disable builds for MacOS in Travis CI.
Apparently Travis CI is charging for MacOS X builds, even if you are already paying for a concurrency based plan. This seems to be breaking our builds. See: | @@ -84,12 +84,12 @@ matrix:
bazel test @jansson//... //tests/...
# Build for OS X
- - os: osx
- osx_image: xcode7.3
- - os: osx
- osx_image: xcode8.3
- - os: osx
- osx_image: xcode9.2
+ # - os: osx
+ # osx_image: xcode7.3
+ # - os: osx
+ # osx_image: xcode8.3
+ # - os: osx
+ # osx_image: xcode9.2
before_script: ./bootstrap.sh
|
Ramp up to version to 1.0.1 | BrotliEncoderVersion methods. */
/* Semantic version, calculated as (MAJOR << 24) | (MINOR << 12) | PATCH */
-#define BROTLI_VERSION 0x1000000
+#define BROTLI_VERSION 0x1000001
#endif /* BROTLI_COMMON_VERSION_H_ */
|
Remove deprecated OVR | @@ -1068,7 +1068,6 @@ static void callMRubyTick(tic_mem* tic)
{
tic_core* machine = (tic_core*)tic;
const char* TicFunc = TIC_FN;
- const char* OvrFunc = OVR_FN;
mrb_state* mrb = ((mrbVm*)machine->currentVM)->mrb;
@@ -1078,15 +1077,6 @@ static void callMRubyTick(tic_mem* tic)
{
mrb_funcall(mrb, mrb_top_self(mrb), TicFunc, 0);
catcherr(machine);
-
- if (mrb_respond_to(mrb, mrb_top_self(mrb), mrb_intern_cstr(mrb, OvrFunc)))
- {
- OVR(machine)
- {
- mrb_funcall(mrb, mrb_top_self(mrb), OvrFunc, 0);
- catcherr(machine);
- }
- }
}
else
{
|
Switch order of restoring globals and createdb.
Globals should be restored first, as createdb relies on roles being present | @@ -307,14 +307,14 @@ class RestoreDatabase(Operation):
self._restore_stats()
return
- if self.context.drop_db:
- self._multitry_createdb()
-
if self.context.restore_global:
self._restore_global(self.context)
if self.context.restore_global == "only":
return
+ if self.context.drop_db:
+ self._multitry_createdb()
+
"""
For full restore with table filter or for the first recurssion of the incremental restore
we first restore the schema, expand the parent partition table name's in the restore table
|
Fix uncrustify config path | @@ -155,7 +155,7 @@ def patch_uncrustify(changed_files):
patch = ''
for file in changed_files:
format_call = (
- 'uncrustify -q -c .uncrustify.cfg -f {}'.format(file)
+ 'uncrustify -q -c tools/uncrustify.cfg -f {}'.format(file)
+ '| git --no-pager diff --color=always --no-index -- "{}" - '.format(file)
+ '| tail -n+3'
)
|
OcMachoLib: Fix typo in name comparison. | @@ -287,7 +287,7 @@ MachoGetSectionByName64 (
Result = AsciiStrnCmp (
SectionWalker->SectionName,
SectionName,
- ARRAY_SIZE (SectionWalker->SegmentName)
+ ARRAY_SIZE (SectionWalker->SectionName)
);
if (Result == 0) {
//
|
buffer: bug fix vlib_buffer_free_inline
buffer_pool_index, in case of buffer_pool_index change,
should free buffers in queue before setting buffer_pool_index again | @@ -767,18 +767,19 @@ vlib_buffer_free_inline (vlib_main_t * vm, u32 * buffers, u32 n_buffers,
if (PREDICT_FALSE (buffer_pool_index != b[0]->buffer_pool_index))
{
- buffer_pool_index = b[0]->buffer_pool_index;
-#if defined(CLIB_HAVE_VEC128) && !__aarch64__
- bpi_vec.buffer_pool_index = buffer_pool_index;
-#endif
- bp = vlib_get_buffer_pool (vm, buffer_pool_index);
- vlib_buffer_copy_template (&bt, &bp->buffer_template);
if (n_queue)
{
vlib_buffer_pool_put (vm, buffer_pool_index, queue, n_queue);
n_queue = 0;
}
+
+ buffer_pool_index = b[0]->buffer_pool_index;
+#if defined(CLIB_HAVE_VEC128) && !__aarch64__
+ bpi_vec.buffer_pool_index = buffer_pool_index;
+#endif
+ bp = vlib_get_buffer_pool (vm, buffer_pool_index);
+ vlib_buffer_copy_template (&bt, &bp->buffer_template);
}
vlib_buffer_validate (vm, b[0]);
|
stm32/dma: Fix duplicate typedef of struct, it's typedef'd in dma.h. | @@ -52,7 +52,7 @@ typedef enum {
dma_id_15,
} dma_id_t;
-typedef struct _dma_descr_t {
+struct _dma_descr_t {
#if defined(STM32F4) || defined(STM32F7) || defined(STM32H7)
DMA_Stream_TypeDef *instance;
#elif defined(STM32L4)
@@ -64,7 +64,7 @@ typedef struct _dma_descr_t {
uint32_t transfer_direction; // periph to memory or vice-versa
dma_id_t id;
const DMA_InitTypeDef *init;
-} dma_descr_t;
+};
// Default parameters to dma_init() shared by spi and i2c; Channel and Direction
// vary depending on the peripheral instance so they get passed separately
|
fix negative count passed to cfun_array_new_filled | @@ -137,6 +137,7 @@ JANET_CORE_FN(cfun_array_new_filled,
"Creates a new array of `count` elements, all set to `value`, which defaults to nil. Returns the new array.") {
janet_arity(argc, 1, 2);
int32_t count = janet_getinteger(argv, 0);
+ if (count < 0) janet_panic("expected positive integer");
Janet x = (argc == 2) ? argv[1] : janet_wrap_nil();
JanetArray *array = janet_array(count);
for (int32_t i = 0; i < count; i++) {
|
Fixed a typos when calling PQgetisnull | @@ -1349,7 +1349,7 @@ GetTotalTupleCountFromSegments(Relation parentrel,
if (PQgetisnull(pgresult, j, 0) == 1)
elog(ERROR, "unexpected NULL in tupcount in results[%d]: %s",
i, sqlstmt.data);
- if (PQgetisnull(pgresult, j, 0) == 1)
+ if (PQgetisnull(pgresult, j, 1) == 1)
elog(ERROR, "unexpected NULL in segno in results[%d]: %s",
i, sqlstmt.data);
|
Fixed jshint warning 'a leading decimal point can be confused with a dot'. | @@ -700,7 +700,7 @@ function BarChart(dualYaxis) {
xScale.domain(data.map(function (d) {
return d[0];
}))
- .rangeBands([0, innerW()], .1);
+ .rangeBands([0, innerW()], 0.1);
// Update the y-scale.
yScale0.domain([0, d3.max(data, function (d) {
|
javascript: Enable support for frozen bytecode via FROZEN_MPY_DIR. | @@ -25,6 +25,13 @@ LDFLAGS = -m32 -Wl,[email protected],--cref -Wl,--gc-sections
CFLAGS += -O0 -DNDEBUG
CFLAGS += -fdata-sections -ffunction-sections
+ifneq ($(FROZEN_MPY_DIR),)
+# To use frozen bytecode, put your .py files in a subdirectory (eg frozen/) and
+# then invoke make with FROZEN_MPY_DIR=frozen (be sure to build from scratch).
+CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool
+CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
+endif
+
SRC_LIB = $(addprefix lib/,\
utils/interrupt_char.c \
utils/stdout_helpers.c \
|
Expand ConnectionOpen docs. | @@ -47,7 +47,13 @@ The function returns a [QUIC_STATUS](QUIC_STATUS.md). The app may use `QUIC_FAIL
# Remarks
-**TODO**
+`ConnectionOpen` is used to create a connection in the client application. In server applications, [ListenerOpen](ListenerOpen.md) and [ListenerStart](ListenerStart.md) must be called to listen for incoming connection attempts, and the server side Connection is created in the `QUIC_LISTENER_EVENT_NEW_CONNECTION` event.
+
+'ConnectionOpen' only allocates the resources for the connection, it does not start the connection. To start the connect, the application must call [ConnectionStart](ConnectionStart.md).
+
+Once `ConnectionOpen` completes successfully, the application may create streams, and queue data for sending. This is when 0-RTT streams and data **MUST** be created and queued. See [StreamOpen](StreamOpen.md), and [StreamStart](StreamStart.md).
+
+Once the connection has been shutdown, it must be cleaned up with a call to [ConnectionClose](ConnectionClose.md).
# See Also
|
Use flipped tile coordinates for tile mask tests | @@ -52,7 +52,7 @@ namespace carto {
// Check tilemasks - perhaps we can ignore server query alltogether
for (const TileMask& tileMask : _tileMasks) {
- bool inside = tileMask.tileMask->getTileStatus(mapTile) == PackageTileStatus::PACKAGE_TILE_STATUS_FULL;
+ bool inside = tileMask.tileMask->getTileStatus(mapTile.getFlipped()) == PackageTileStatus::PACKAGE_TILE_STATUS_FULL;
if (tileMask.inclusive == inside) {
Log::Infof("CartoOnlineTileDataSource::loadTile: Using tilemask tile %d/%d/%d", mapTile.getZoom(), mapTile.getX(), mapTile.getY());
return std::make_shared<TileData>(tileMask.tileData);
|
tools/idf.py: replace the "run" method of Task with the magic "__call__" method
Merges | @@ -200,7 +200,7 @@ def init_cli(verbose_output=None):
self.action_args = action_args
self.aliases = aliases
- def run(self, context, global_args, action_args=None):
+ def __call__(self, context, global_args, action_args=None):
if action_args is None:
action_args = self.action_args
@@ -611,7 +611,7 @@ def init_cli(verbose_output=None):
name_with_aliases += " (aliases: %s)" % ", ".join(task.aliases)
print("Executing action: %s" % name_with_aliases)
- task.run(ctx, global_args, task.action_args)
+ task(ctx, global_args, task.action_args)
self._print_closing_message(global_args, tasks_to_run.keys())
|
fix(gif) replace printf statement with LVGL logging | @@ -79,7 +79,7 @@ static gd_GIF * gif_open(gd_GIF * gif_base)
/* Header */
f_gif_read(gif_base, sigver, 3);
if (memcmp(sigver, "GIF", 3) != 0) {
- fprintf(stderr, "invalid signature\n");
+ LV_LOG_WARN("invalid signature\n");
goto fail;
}
/* Version */
|
guybrush: Set temp_fan_off value
Set a conservative value for temp_fan_off. This was previously 0, which
keeps the fan always on.
BRANCH=guybrush
TEST=Build | @@ -479,8 +479,7 @@ struct ec_thermal_config thermal_params[TEMP_SENSOR_COUNT] = {
.temp_host_release = {
[EC_TEMP_THRESH_HIGH] = C_TO_K(80),
},
- /* TODO: Setting fan off to 0 so it's allways on */
- .temp_fan_off = C_TO_K(0),
+ .temp_fan_off = C_TO_K(25),
.temp_fan_max = C_TO_K(70),
},
[TEMP_SENSOR_CHARGER] = {
|
Add information about TCP available data for manual read | @@ -165,6 +165,10 @@ typedef struct esp_conn_t {
size_t buff_len; /*!< Total length of buffer */
size_t buff_ptr; /*!< Current write pointer of buffer */
+#if ESP_CFG_CONN_MANUAL_TCP_RECEIVE || __DOXYGEN__
+ size_t tcp_available_data; /*!< Number of bytes ready to read from ESP device on TCP connection */
+#endif /* ESP_CFG_CONN_MANUAL_TCP_RECEIVE || __DOXYGEN__ */
+
union {
struct {
uint8_t active:1; /*!< Status whether connection is active */
|
pybricks.parameters.Color: fix __repr__
When printing the class name itself, this was printing garbage because it was reading non-existent HSV data. | @@ -141,6 +141,14 @@ static mp_obj_t pb_type_Color_make_new_helper(mp_int_t h, mp_int_t s, mp_int_t v
}
void pb_type_Color_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
+
+ // If we're the class itself, use default type printer
+ if (MP_OBJ_TO_PTR(self_in) == &pb_type_Color_obj) {
+ mp_type_type.print(print, self_in, kind);
+ return;
+ }
+
+ // Print hsv representation that can be evaluated
pb_type_Color_obj_t *self = MP_OBJ_TO_PTR(self_in);
mp_printf(print, "Color(h=%u, s=%u, v=%u", self->hsv.h, self->hsv.s, self->hsv.v);
if (self->name != mp_const_none) {
|
out_http: code style adjustments | @@ -210,7 +210,7 @@ static int http_gelf(struct flb_out_http *ctx,
const char *tag, int tag_len)
{
flb_sds_t s;
- flb_sds_t tmp;
+ flb_sds_t tmp = NULL;
msgpack_unpacked result;
size_t off = 0;
size_t size = 0;
@@ -245,10 +245,7 @@ static int http_gelf(struct flb_out_http *ctx,
map = root.via.array.ptr[1];
tmp = flb_msgpack_to_gelf(&s, &map, &tm, &(ctx->gelf_fields));
- if (tmp != NULL) {
- s = tmp;
- }
- else {
+ if (!tmp) {
flb_error("[out_http] error encoding to GELF");
flb_sds_destroy(s);
msgpack_unpacked_destroy(&result);
@@ -257,15 +254,13 @@ static int http_gelf(struct flb_out_http *ctx,
/* Append new line */
tmp = flb_sds_cat(s, "\n", 1);
- if (tmp != NULL) {
- s = tmp;
- }
- else {
+ if (!tmp) {
flb_error("[out_http] error concatenating records");
flb_sds_destroy(s);
msgpack_unpacked_destroy(&result);
return FLB_RETRY;
}
+ s = tmp;
}
ret = http_post(ctx, s, flb_sds_len(s), tag, tag_len);
|
Add ibm-db 3.0.1. | +- includes:
+ # Valgrind PEERDIR and ADDINCL are added only in --valgrind builds,
+ # but we should resolve headers anyway.
+ - valgrind/callgrind.h
+ - valgrind/memcheck.h
+ - valgrind/valgrind.h
+ # DB2_ODBC_CLI
+ - sqlcli1.h
+
# We have lots of ADDINCLs to contrib/libs/libiconv all around the repo
# so we need to add it to sysincl for consistent resolving.
# We can go the other way here and remove iconv.h from all sysincl configs
- includes:
- iconv.h: contrib/libs/libiconv/iconv.h
-# Valgrind PEERDIR and ADDINCL are added only in --valgrind builds,
-# but we should resolve headers anyway.
-- includes:
- - valgrind/callgrind.h
- - valgrind/memcheck.h
- - valgrind/valgrind.h
-
- includes:
- cudnn.h: contrib/libs/nvidia/cudnn/cudnn.h
|
openssl rehash: document -compat
Fixes | @@ -99,6 +99,12 @@ Note that current versions will not use the old style.
Do not remove existing links.
This is needed when keeping new and old-style links in the same directory.
+=item B<-compat>
+
+Generate links for both old-style (MD5) and new-style (SHA1) hashing.
+This allows releases before 1.0.0 to use these links along-side newer
+releases.
+
=item B<-v>
Print messages about old links removed and new links created.
|
Add back cipher suite information in ssh-opt.sh | @@ -8902,6 +8902,7 @@ run_test "TLS 1.3 m->G AES_128_GCM_SHA256 , RSA_PSS_RSAE_SHA256" \
"$P_CLI debug_level=4 force_version=tls1_3 server_name=localhost force_ciphersuite=TLS1-3-AES-128-GCM-SHA256 allow_sha1=0" \
0 \
-c "ECDH curve: x25519" \
+ -c "server hello, chosen ciphersuite: ( 1301 ) - TLS1-3-AES-128-GCM-SHA256" \
-c "Certificate Verify: Signature algorithm ( 0804 )" \
-c "mbedtls_ssl_tls13_process_certificate_verify() returned 0" \
-c "HTTP/1.0 200 OK"
|
Map numpad ENTER key
Forward numpad ENTER key to the device.
Fixes <https://github.com/Genymobile/scrcpy/issues/117>. | @@ -73,6 +73,7 @@ static enum android_metastate convert_meta_state(SDL_Keymod mod) {
static SDL_bool convert_keycode(SDL_Keycode from, enum android_keycode *to) {
switch (from) {
MAP(SDLK_RETURN, AKEYCODE_ENTER);
+ MAP(SDLK_KP_ENTER, AKEYCODE_NUMPAD_ENTER);
MAP(SDLK_ESCAPE, AKEYCODE_ESCAPE);
MAP(SDLK_BACKSPACE, AKEYCODE_DEL);
MAP(SDLK_TAB, AKEYCODE_TAB);
|
added oscore content type | @@ -129,6 +129,7 @@ typedef enum {
APPLICATION_PKCS10 = 286, ///< application/pkcs10
APPLICATION_PKIX_CERT = 287, ///< application/pkix-cert
APPLICATION_VND_OCF_CBOR = 10000, ///< application/vnd.ocf+cbor
+ APPLICATION_OSCORE = 10001, ///< application/oscore
APPLICATION_VND_OMA_LWM2M_TLV = 11542, ///< application/vnd.oma.lwm2m+tlv
APPLICATION_VND_OMA_LWM2M_JSON = 11543,///< application/vnd.oma.lwm2m+json
APPLICATION_VND_OMA_LWM2M_CBOR = 11544 ///< application/vnd.oma.lwm2m+cbor
|
Force use inter | @@ -1968,7 +1968,6 @@ static void search_pu_inter(encoder_state_t * const state,
kvz_sort_keys_by_cost(&amvp[2]);
}
- FILE_BITS((double)info->inter_bitcost, x, y, depth, "regular inter bitcost");
}
/**
@@ -2122,6 +2121,7 @@ void kvz_search_cu_inter(encoder_state_t * const state,
if (*inter_cost < MAX_DOUBLE && cur_pu->inter.mv_dir & 2) {
assert(fracmv_within_tile(&info, cur_pu->inter.mv[1][0], cur_pu->inter.mv[1][1]));
}
+ FILE_BITS((double)*inter_bitcost, x, y, depth, "regular inter bitcost");
}
|
Make unclickable drop down lists work | @@ -807,6 +807,10 @@ static lv_res_t release_handler(lv_obj_t * ddlist)
{
lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
+ /*Only deal with clickable drop down lists*/
+ if(!lv_obj_get_click(ddlist))
+ return LV_RES_OK;
+
if(ext->opened == 0) { /*Open the list*/
ext->opened = 1;
lv_obj_set_drag(lv_page_get_scrl(ddlist), true);
|
os/net: Modify return types of bsd socket APIs.
The return types of some bsd sockets APIS are modified to be POSIX-compatible. | @@ -132,7 +132,7 @@ int listen(int s, int backlog)
return lwip_listen(s, backlog);
}
-int recv(int s, void *mem, size_t len, int flags)
+ssize_t recv(int s, void *mem, size_t len, int flags)
{
/* Treat as a cancellation point */
(void)enter_cancellation_point();
@@ -141,7 +141,7 @@ int recv(int s, void *mem, size_t len, int flags)
return result;
}
-int recvfrom(int s, void *mem, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen)
+ssize_t recvfrom(int s, void *mem, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen)
{
/* Treat as a cancellation point */
(void)enter_cancellation_point();
@@ -150,7 +150,7 @@ int recvfrom(int s, void *mem, size_t len, int flags, struct sockaddr *from, soc
return result;
}
-int send(int s, const void *data, size_t size, int flags)
+ssize_t send(int s, const void *data, size_t size, int flags)
{
/* Treat as a cancellation point */
(void)enter_cancellation_point();
@@ -159,7 +159,7 @@ int send(int s, const void *data, size_t size, int flags)
return result;
}
-int sendto(int s, const void *data, size_t size, int flags, const struct sockaddr *to, socklen_t tolen)
+ssize_t sendto(int s, const void *data, size_t size, int flags, const struct sockaddr *to, socklen_t tolen)
{
/* Treat as a cancellation point */
(void)enter_cancellation_point();
|
bondo: adding symbol selector??? | @@ -64,11 +64,15 @@ static void bondo_doit(t_bondo *x)
outlet_float(x->x_outs[i], p[i]->p_float);
else if (s == &s_symbol && p[i]->p_symbol)
{
+
+ outlet_symbol(x->x_outs[i], p[i]->p_symbol);
/* LATER rethink */
+ /* old code
if (x->x_multiatom)
outlet_symbol(x->x_outs[i], p[i]->p_symbol);
else
outlet_anything(x->x_outs[i], p[i]->p_symbol, 0, 0);
+ */
}
else if (s == &s_pointer)
{
|
doc: PG 14 release notes, adjust updates/deletes on partitions | @@ -663,7 +663,7 @@ Improve the performance of updates/deletes on partitioned tables when only a few
</para>
<para>
-This also allows run-time pruning of updates/deletes on partitioned tables.
+This also allows updates/deletes on partitioned tables to use execution-time partition pruning.
</para>
</listitem>
|
vmlaq in arm_dot_prod_f32 instead of vmulq and vadd | @@ -72,7 +72,7 @@ void arm_dot_prod_f32(
float32x4_t vec1;
float32x4_t vec2;
float32x4_t res;
- float32x2_t accum = vdup_n_f32(0);
+ float32x4_t accum = vdupq_n_f32(0);
/* Compute 4 outputs at a time */
blkCnt = blockSize >> 2U;
@@ -85,8 +85,7 @@ void arm_dot_prod_f32(
/* C = A[0]*B[0] + A[1]*B[1] + A[2]*B[2] + ... + A[blockSize-1]*B[blockSize-1] */
/* Calculate dot product and then store the result in a temporary buffer. */
- res = vmulq_f32(vec1, vec2);
- accum = vadd_f32(accum, vpadd_f32(vget_low_f32(res), vget_high_f32(res)));
+ accum = vmlaq_f32(accum, vec1, vec2);
/* Increment pointers */
pSrcA += 4;
@@ -98,7 +97,12 @@ void arm_dot_prod_f32(
/* Decrement the loop counter */
blkCnt--;
}
- sum += accum[0] + accum[1];
+
+#if __aarch64__
+ sum = vpadds_f32(vpadd_f32(vget_low_f32(accum), vget_high_f32(accum)));
+#else
+ sum = (vpadd_f32(vget_low_f32(accum), vget_high_f32(accum)))[0] + (vpadd_f32(vget_low_f32(accum), vget_high_f32(accum)))[1];
+#endif
/* Tail */
blkCnt = blockSize & 0x3;
|
Cleanup unused fields in transport.c | @@ -27,8 +27,6 @@ struct _transport_t
union {
struct {
int sock;
- struct sockaddr_storage addr;
- socklen_t addr_len;
operations_info ops;
} udp;
struct {
@@ -85,10 +83,6 @@ transportCreateUdp(const char* host, const char* port)
// If none worked, get out
if (t->udp.sock == -1) goto out;
- // Save the address for later
- memmove(&t->udp.addr, addr->ai_addr, addr->ai_addrlen);
- t->udp.addr_len = addr->ai_addrlen;
-
// Set the socket to non blocking, and close on exec
int flags = fcntl(t->udp.sock, F_GETFL, 0);
if (fcntl(t->udp.sock, F_SETFL, flags | O_NONBLOCK) == -1) {
|
[mempool] fix race condition for GetAddress | @@ -441,7 +441,9 @@ func (mp *MemPool) verifyTx(tx *types.Tx) error {
return err
}
} else {
+ mp.RLock()
account := mp.getAddress(tx.GetBody().GetAccount())
+ mp.RUnlock()
err = key.VerifyTxWithAddress(tx, account)
if err != nil {
return err
|
Remove now invalid comment in pk_opaque_ecdsa_can_do() | @@ -1495,9 +1495,6 @@ static size_t pk_opaque_get_bitlen( const void *ctx )
static int pk_opaque_ecdsa_can_do( mbedtls_pk_type_t type )
{
- /* For now ECDSA opaque PSA keys can only wrap ECC keypairs,
- * as checked by setup_psa().
- * Also, ECKEY_DH does not really make sense with the current API. */
return( type == MBEDTLS_PK_ECKEY ||
type == MBEDTLS_PK_ECDSA );
}
|
Test recipes base | @@ -309,6 +309,7 @@ def onadd_ytest(unit, *args):
'BUILD-FOLDER-PATH': strip_roots(unit.path()),
'BINARY-PATH': strip_roots(os.path.join(unit.path(), unit.filename())),
'CUSTOM-DEPENDENCIES': ' '.join(spec_args.get('DEPENDS', []) + get_values_list(unit, 'TEST_DEPENDS_VALUE')),
+ 'TEST-RECIPES': base64.b64encode(unit.get('RECIPE_COMMAND_VALUE') or ''),
'TEST-DATA': serialize_list(_common.filter_out_by_keyword(spec_args.get('DATA', []) + (unit.get(['__test_data']) or '').split(' ') + get_values_list(unit, 'TEST_DATA_VALUE'), 'AUTOUPDATED')),
'TEST-TIMEOUT': ''.join(spec_args.get('TIMEOUT', [])) or unit.get('TEST_TIMEOUT') or '',
'FORK-MODE': fork_mode,
@@ -704,6 +705,10 @@ def onsetup_pytest_bin(unit, *args):
unit.onno_platform()
unit.onadd_pytest_script(["PY_TEST"])
+def onuse_recipe(unit, *args):
+ recipe_cmd = unit.get(["RECIPE_COMMAND_VALUE"]) or ''
+ recipe_cmd += "\n" + subprocess.list2cmdline(args)
+ unit.set(["RECIPE_COMMAND_VALUE", recipe_cmd])
def onrun(unit, *args):
exectest_cmd = unit.get(["EXECTEST_COMMAND_VALUE"]) or ''
|
cache, mmapstorage: disable shelltests | @@ -55,9 +55,9 @@ endif (ENABLE_ASAN)
add_msr_test (msr_syntax "${CMAKE_SOURCE_DIR}/tests/shell/shell_recorder/tutorial_wrapper/SyntaxCheck.md" REQUIRED_PLUGINS mini)
add_msr_test (readme_msr "${CMAKE_SOURCE_DIR}/tests/shell/shell_recorder/tutorial_wrapper/README.md")
add_msr_test (issue_template "${CMAKE_SOURCE_DIR}/.github/ISSUE_TEMPLATE.md")
-add_msr_test (mmapstorage_shelltests "${CMAKE_SOURCE_DIR}/src/plugins/mmapstorage/shelltests.md" REQUIRED_PLUGINS mmapstorage)
-add_msr_test (cache_shelltests "${CMAKE_SOURCE_DIR}/src/plugins/cache/shelltests.md" REQUIRED_PLUGINS cache mmapstorage dump resolver
- multifile)
+#add_msr_test (mmapstorage_shelltests "${CMAKE_SOURCE_DIR}/src/plugins/mmapstorage/shelltests.md" REQUIRED_PLUGINS mmapstorage)
+#add_msr_test (cache_shelltests "${CMAKE_SOURCE_DIR}/src/plugins/cache/shelltests.md" REQUIRED_PLUGINS cache mmapstorage dump resolver
+# multifile)
# ~~~
# Only works with super user privileges, since it writes to `/etc/hosts`:
|
VERSION bump to version 2.1.91 | @@ -64,7 +64,7 @@ endif()
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(SYSREPO_MAJOR_VERSION 2)
set(SYSREPO_MINOR_VERSION 1)
-set(SYSREPO_MICRO_VERSION 90)
+set(SYSREPO_MICRO_VERSION 91)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
dm: fix the memory leak in virtio mei
The possible memory leak was introduced by commit
If mevent add fails in virtio mei, the resource allocated doesn't
be released. This patch fix this memory leak issue. | @@ -373,6 +373,20 @@ vmei_set_status(struct virtio_mei *vmei, enum vmei_status status)
vmei->status = status;
}
+static void
+vmei_rx_teardown(void *param)
+{
+ unsigned int i;
+ struct vmei_host_client *hclient = param;
+
+ if (hclient->client_fd > -1)
+ close(hclient->client_fd);
+ for (i = 0; i < VMEI_IOBUFS_MAX; i++)
+ free(hclient->send_bufs.bufs[i].iov_base);
+ free(hclient->recv_buf);
+ free(hclient);
+}
+
static void
vmei_host_client_destroy(const struct refcnt *ref)
{
@@ -389,20 +403,8 @@ vmei_host_client_destroy(const struct refcnt *ref)
if (hclient->rx_mevp)
mevent_delete(hclient->rx_mevp);
-}
-
-static void
-vmei_rx_teardown(void *param)
-{
- unsigned int i;
- struct vmei_host_client *hclient = param;
-
- if (hclient->client_fd > -1)
- close(hclient->client_fd);
- for (i = 0; i < VMEI_IOBUFS_MAX; i++)
- free(hclient->send_bufs.bufs[i].iov_base);
- free(hclient->recv_buf);
- free(hclient);
+ else
+ vmei_rx_teardown(hclient);
}
static struct vmei_host_client *
@@ -977,6 +979,8 @@ static void vmei_del_reset_event(struct virtio_mei *vmei)
{
if (vmei->reset_mevp)
mevent_delete_close(vmei->reset_mevp);
+ else
+ vmei_reset_teardown(vmei);
}
static void vmei_rx_callback(int fd, enum ev_type type, void *param);
|
component/esp32 : remove pm gpio dbg | @@ -188,7 +188,6 @@ esp_err_t esp_phy_rf_deinit(phy_rf_module_t module)
}
if (s_is_phy_rf_en == false) {
- gpio_set_level(15, 0); //G1, 15
// Disable PHY and RF.
phy_close_rf();
// Disable WiFi/BT common peripheral clock. Do not disable clock for hardware RNG
|
board_inspector: add a property to reflect the encoded IRQs in RDT
This patch adds the property `irqs` to the class SmallResourceitemIRQ so
that the list of IRQs encoded in this resource item can be retrieved
easily. | @@ -43,6 +43,10 @@ def SmallResourceItemIRQ_factory(_len):
('_WKC', ctypes.c_uint8, 1),
('reserved', ctypes.c_uint8, 2),
] if (_len > 2) else [])
+
+ @property
+ def irqs(self):
+ return [i for i in range(0, 16) if ((self._INT & (1 << i)) != 0)]
return SmallResourceItemIRQ
# 6.4.2.2 DMA Descriptor
|
Add gpu_ram_part parameter to Python-package | @@ -1189,6 +1189,8 @@ class CatBoostClassifier(CatBoost):
used_ram_limit : int, [default=None]
Try to limit used memory (limit value in bytes).
WARNING: Currently this option affects CTR memory usage only.
+ gpu_ram_part : int, [default=0.95]
+ How much of the GPU RAM to use for training.
allow_writing_files : bool, [default=True]
If this flag is set to False, no files with different diagnostic info will be created during training.
With this flag no snapshotting can be done. Plus visualisation will not
@@ -1254,6 +1256,7 @@ class CatBoostClassifier(CatBoost):
snapshot_file=None,
fold_len_multiplier=None,
used_ram_limit=None,
+ gpu_ram_part=None,
allow_writing_files=None,
approx_on_full_history=None,
boosting_type=None,
@@ -1551,6 +1554,7 @@ class CatBoostRegressor(CatBoost):
snapshot_file=None,
fold_len_multiplier=None,
used_ram_limit=None,
+ gpu_ram_part=None,
allow_writing_files=None,
approx_on_full_history=None,
boosting_type=None,
|
add C++11 milliseconds uptime routine | @@ -158,6 +158,11 @@ namespace ARIASDK_NS_BEGIN {
std::string to_utf8_string(const std::wstring& in);
+ inline uint64_t GetUptimeMs()
+ {
+ return std::chrono::system_clock::now().time_since_epoch() / std::chrono::milliseconds(1);
+ }
+
#ifdef _WINRT
Platform::String ^to_platform_string(const std::string& s);
|
xpath BUGFIX nested predicates in leaf-lists
Refs | @@ -7808,14 +7808,22 @@ eval_name_test_try_compile_predicates(const struct lyxp_expr *exp, uint32_t *tok
val_start_idx = e_idx;
/* ']' */
- while (lyxp_check_token(NULL, exp, e_idx, LYXP_TOKEN_BRACK2)) {
- if (!lyxp_check_token(NULL, exp, e_idx, LYXP_TOKEN_OPER_LOG)) {
+ nested_pred = 1;
+ do {
+ ++e_idx;
+
+ if ((nested_pred == 1) && !lyxp_check_token(NULL, exp, e_idx, LYXP_TOKEN_OPER_LOG)) {
/* higher priority than '=' */
rc = LY_ENOT;
goto cleanup;
+ } else if (!lyxp_check_token(NULL, exp, e_idx, LYXP_TOKEN_BRACK1)) {
+ /* nested predicate */
+ ++nested_pred;
+ } else if (!lyxp_check_token(NULL, exp, e_idx, LYXP_TOKEN_BRACK2)) {
+ /* predicate end */
+ --nested_pred;
}
- ++e_idx;
- }
+ } while (nested_pred);
/* try to evaluate the value */
LY_CHECK_GOTO(rc = eval_name_test_try_compile_predicate_append(exp, val_start_idx, e_idx - 1, ctx_scnode, set,
|
add option to select benchmarks using bitmask | @@ -613,11 +613,13 @@ int main_bench(int argc, char* argv[])
{
bool threads = false;
bool scaling = false;
+ long flags = ~0l;
const struct opt_s opts[] = {
OPT_SET('T', &threads, "varying number of threads"),
OPT_SET('S', &scaling, "varying problem size"),
+ OPT_LONG('s', &flags, "flags", "select benchmarks"),
};
cmdline(&argc, argv, 0, 1, usage_str, help_str, ARRAY_SIZE(opts), opts);
@@ -638,7 +640,12 @@ int main_bench(int argc, char* argv[])
num_init();
+ md_clear(BENCH_DIMS, dims, out, CFL_SIZE);
+
do {
+ if (!(flags & (1 << pos[TESTS_IND])))
+ continue;
+
if (threads) {
num_set_num_threads(pos[THREADS_IND] + 1);
|
SoundData: deallocate rb | @@ -180,4 +180,8 @@ void lovrSoundDataDestroy(void* ref) {
SoundData* soundData = (SoundData*) ref;
stb_vorbis_close(soundData->decoder);
lovrRelease(Blob, soundData->blob);
+ if (soundData->ring) {
+ ma_pcm_rb_uninit(soundData->ring);
+ free(soundData->ring);
+ }
}
|
disable Win2019 DCAP LVI snmalloc jenkins test -- unstable | @@ -127,8 +127,8 @@ try{
"Win2016 Sim Release Cross Compile LVI snmalloc": { windowsCrossCompile('acc-win2016', 'Release', 'OFF', 'ControlFlow', '1', 'OFF', ['-DUSE_SNMALLOC=ON']) },
"Win2016 Release Cross Compile DCAP LVI snmalloc": { windowsCrossCompile('acc-win2016', 'Release', 'ON', 'ControlFlow', '0', 'OFF', ['-DUSE_SNMALLOC=ON']) },
- "Win2019 Sim Debug Cross Compile LVI snmalloc": { windowsCrossCompile('acc-win2019', 'Debug', 'OFF', 'ControlFlow', '1', 'OFF', ['-DUSE_SNMALLOC=ON']) },
- "Win2019 Release Cross Compile DCAP LVI snmalloc": { windowsCrossCompile('acc-win2019', 'Release', 'ON', 'ControlFlow', '0', 'OFF', ['-DUSE_SNMALLOC=ON']) }
+ "Win2019 Sim Debug Cross Compile LVI snmalloc": { windowsCrossCompile('acc-win2019', 'Debug', 'OFF', 'ControlFlow', '1', 'OFF', ['-DUSE_SNMALLOC=ON']) }
+ //"Win2019 Release Cross Compile DCAP LVI snmalloc": { windowsCrossCompile('acc-win2019', 'Release', 'ON', 'ControlFlow', '0', 'OFF', ['-DUSE_SNMALLOC=ON']) }
]
parallel testing_stages
}
|
[COMMENTED] Make inotify monitor new per-app config file or if delete, the main config file again
Needs to be triggered by main config file change.
FIXME what if there's no config file? | @@ -21,9 +21,14 @@ static void fileChanged(void *params_void) {
struct inotify_event *event =
(struct inotify_event *) &buffer[i];
i += EVENT_SIZE + event->len;
- if (event->mask & IN_MODIFY) {
+ if (event->mask & IN_MODIFY /*|| event->mask & IN_IGNORED*/) {
parse_overlay_config(&local_params, getenv("MANGOHUD_CONFIG"));
std::lock_guard<std::mutex> lk(nt->mutex);
+ /*if (nt->params->config_file_path != local_params.config_file_path) {
+ fprintf(stderr, "MANGOHUD: watching config file: %s\n", local_params.config_file_path.c_str());
+ inotify_rm_watch(nt->fd, nt->wd);
+ nt->wd = inotify_add_watch(nt->fd, local_params.config_file_path.c_str(), IN_MODIFY | IN_DELETE | IN_DELETE_SELF);
+ }*/
*nt->params = local_params;
}
}
|
VERSION bump to version 0.11.30 | @@ -32,7 +32,7 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0")
# set version
set(LIBNETCONF2_MAJOR_VERSION 0)
set(LIBNETCONF2_MINOR_VERSION 11)
-set(LIBNETCONF2_MICRO_VERSION 29)
+set(LIBNETCONF2_MICRO_VERSION 30)
set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
|
fix(workflow) use same Unix port variant for MicroPython submodules | @@ -24,7 +24,7 @@ jobs:
- name: Initialize lv_bindings submodule
run: git submodule update --init --recursive lib/lv_bindings
- name: Update Unix port submodules
- run: make -C ports/unix submodules
+ run: make -C ports/unix VARIANT=dev DEBUG=1 submodules
- name: Checkout LVGL submodule
working-directory: ./lib/lv_bindings/lvgl
run: |
|
Treat invalid reserved bits PROTOCOL_VIOLATION after payload decryption | @@ -4166,6 +4166,7 @@ static ssize_t conn_recv_handshake_pkt(ngtcp2_conn *conn,
uint64_t max_crypto_rx_offset;
size_t odcil;
ngtcp2_crypto_level crypto_level;
+ int invalid_reserved_bits = 0;
if (pktlen == 0) {
return 0;
@@ -4420,9 +4421,12 @@ static ssize_t conn_recv_handshake_pkt(ngtcp2_conn *conn,
rv = ngtcp2_pkt_verify_reserved_bits(plain_hdpkt[0]);
if (rv != 0) {
+ invalid_reserved_bits = 1;
+
ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_PKT,
"packet has incorrect reserved bits");
- return rv;
+
+ /* Will return error after decrypting payload */
}
if (pktns_pkt_num_is_duplicate(pktns, hd.pkt_num)) {
@@ -4448,6 +4452,10 @@ static ssize_t conn_recv_handshake_pkt(ngtcp2_conn *conn,
return NGTCP2_ERR_DISCARD_PKT;
}
+ if (invalid_reserved_bits) {
+ return NGTCP2_ERR_PROTO;
+ }
+
payload = conn->crypto.decrypt_buf.base;
payloadlen = (size_t)nwrite;
@@ -5875,6 +5883,7 @@ static ssize_t conn_recv_pkt(ngtcp2_conn *conn, const ngtcp2_path *path,
int non_probing_pkt = 0;
int key_phase_bit_changed = 0;
int force_decrypt_failure = 0;
+ int invalid_reserved_bits = 0;
if (pkt[0] & NGTCP2_HEADER_FORM_BIT) {
nread = ngtcp2_pkt_decode_hd_long(&hd, pkt, pktlen);
@@ -5977,17 +5986,12 @@ static ssize_t conn_recv_pkt(ngtcp2_conn *conn, const ngtcp2_path *path,
rv = ngtcp2_pkt_verify_reserved_bits(plain_hdpkt[0]);
if (rv != 0) {
+ invalid_reserved_bits = 1;
+
ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_PKT,
"packet has incorrect reserved bits");
- if (hd.type == NGTCP2_PKT_SHORT) {
- rv = conn_on_stateless_reset(conn, &hd, pkt, pktlen);
- if (rv == 0) {
- return (ssize_t)pktlen;
- }
- }
-
- return NGTCP2_ERR_DISCARD_PKT;
+ /* Will return error after decrypting payload */
}
if (pktns_pkt_num_is_duplicate(pktns, hd.pkt_num)) {
@@ -6066,6 +6070,17 @@ static ssize_t conn_recv_pkt(ngtcp2_conn *conn, const ngtcp2_path *path,
return NGTCP2_ERR_DISCARD_PKT;
}
+ if (invalid_reserved_bits) {
+ if (hd.type == NGTCP2_PKT_SHORT) {
+ rv = conn_on_stateless_reset(conn, &hd, pkt, pktlen);
+ if (rv == 0) {
+ return (ssize_t)pktlen;
+ }
+ }
+
+ return NGTCP2_ERR_PROTO;
+ }
+
payload = conn->crypto.decrypt_buf.base;
payloadlen = (size_t)nwrite;
|
sdl: haptic.go: Make HapticOpen() and HapticOpenFromMouse() to also return error | @@ -213,8 +213,12 @@ func HapticName(index int) string {
// HapticOpen opens a haptic device for use.
// (https://wiki.libsdl.org/SDL_HapticOpen)
-func HapticOpen(index int) *Haptic {
- return (*Haptic)(unsafe.Pointer(C.SDL_HapticOpen(C.int(index))))
+func HapticOpen(index int) (*Haptic, error) {
+ haptic := (*Haptic)(unsafe.Pointer(C.SDL_HapticOpen(C.int(index))))
+ if haptic != nil {
+ return haptic, nil
+ }
+ return nil, GetError()
}
// HapticOpened reports whether the haptic device at the designated index has been opened.
@@ -239,8 +243,12 @@ func MouseIsHaptic() (bool, error) {
// HapticOpenFromMouse open a haptic device from the current mouse.
// (https://wiki.libsdl.org/SDL_HapticOpenFromMouse)
-func HapticOpenFromMouse() *Haptic {
- return (*Haptic)(unsafe.Pointer(C.SDL_HapticOpenFromMouse()))
+func HapticOpenFromMouse() (*Haptic, error) {
+ haptic := (*Haptic)(unsafe.Pointer(C.SDL_HapticOpenFromMouse()))
+ if haptic != nil {
+ return haptic, nil
+ }
+ return nil, GetError()
}
// JoystickIsHaptic reports whether a joystick has haptic features.
|
sysdeps/linux: Append \n after sys_log() | @@ -26,6 +26,8 @@ void sys_libc_log(const char *message) {
while(message[n])
n++;
do_syscall(NR_write, 1, message, n);
+ char lf = '\n';
+ do_syscall(NR_write, 1, &lf, 1);
}
void sys_libc_panic() {
|
doc: add 0.6 to doc version menu
Add the 0.6 version of documentation to the menu list (again) | @@ -189,6 +189,7 @@ else:
html_context = {
'current_version': current_version,
'versions': ( ("latest", "/latest/"),
+ ("0.6", "/0.6/"),
("0.5", "/0.5/"),
("0.4", "/0.4/"),
("0.3", "/0.3/"),
|
ExtendedTools: Remove cstyle casts | @@ -32,8 +32,8 @@ static BOOLEAN NTAPI EtFramesEqualFunction(
_In_ PVOID Entry2
)
{
- PET_FPS_COUNTER entry1 = (PET_FPS_COUNTER)Entry1;
- PET_FPS_COUNTER entry2 = (PET_FPS_COUNTER)Entry2;
+ PET_FPS_COUNTER entry1 = static_cast<PET_FPS_COUNTER>(Entry1);
+ PET_FPS_COUNTER entry2 = static_cast<PET_FPS_COUNTER>(Entry2);
return entry1->ProcessId == entry2->ProcessId;
}
@@ -42,7 +42,7 @@ static ULONG NTAPI EtFramesHashFunction(
_In_ PVOID Entry
)
{
- PET_FPS_COUNTER entry = (PET_FPS_COUNTER)Entry;
+ PET_FPS_COUNTER entry = static_cast<PET_FPS_COUNTER>(Entry);
return HandleToUlong(entry->ProcessId) / 4;
}
@@ -108,7 +108,7 @@ PET_FPS_COUNTER EtLookupProcessGpuFrameEntry(
lookupEntry.ProcessId = ProcessId;
PhAcquireQueuedLockShared(&EtFramesHashTableLock);
- entry = reinterpret_cast<PET_FPS_COUNTER>(PhFindEntryHashtable(EtFramesHashTable, &lookupEntry));
+ entry = static_cast<PET_FPS_COUNTER>(PhFindEntryHashtable(EtFramesHashTable, &lookupEntry));
PhReleaseQueuedLockShared(&EtFramesHashTableLock);
return entry;
@@ -148,7 +148,7 @@ VOID EtAddGpuFrameToHashTable(
PET_FPS_COUNTER entry;
lookupEntry.ProcessId = UlongToHandle(ProcessId);
- entry = reinterpret_cast<PET_FPS_COUNTER>(PhFindEntryHashtable(EtFramesHashTable, &lookupEntry));
+ entry = static_cast<PET_FPS_COUNTER>(PhFindEntryHashtable(EtFramesHashTable, &lookupEntry));
if (entry)
{
|
remove duplicate is_dir from rebase | @@ -448,11 +448,6 @@ static boolean is_special(tuple n)
return table_find(n, sym(special)) ? true : false;
}
-static boolean is_dir(tuple n)
-{
- return children(n) ? true : false;
-}
-
static CLOSURE_3_2(file_op_complete, void, thread, file, boolean, status, bytes);
static void file_op_complete(thread t, file f, boolean is_file_offset, status s, bytes length)
{
|
out_forward: check if TLS mode exists | @@ -61,6 +61,8 @@ static inline void print_msgpack_status(int ret, char *context)
}
}
+#ifdef FLB_HAVE_TLS
+
/* Read a secure forward msgpack message */
static int secure_forward_read(struct flb_upstream_conn *u_conn,
char *buf, size_t size, size_t *out_len)
@@ -104,9 +106,6 @@ static int secure_forward_read(struct flb_upstream_conn *u_conn,
return -1;
}
-#ifdef FLB_HAVE_TLS
-
-
static void secure_forward_bin_to_hex(uint8_t *buf, size_t len, char *out)
{
int i;
@@ -514,10 +513,12 @@ void cb_forward_flush(void *data, size_t bytes,
}
/* Secure Forward ? */
+#ifdef FLB_HAVE_TLS
if (ctx->secured == FLB_TRUE) {
ret = secure_forward_handshake(u_conn, ctx);
flb_debug("[out_fw] handshake status = %i", ret);
}
+#endif
/* Write message header */
ret = flb_io_net_write(u_conn, mp_sbuf.data, mp_sbuf.size, &bytes_sent);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.