message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
DotNetTools: Fix assembly menu ignoring FileBrowseExecutable settings | @@ -524,7 +524,13 @@ VOID DotNetAsmShowContextMenu(
{
if (!PhIsNullOrEmptyString(node->PathText) && PhDoesFileExistsWin32(PhGetString(node->PathText)))
{
- PhShellExploreFile(Context->WindowHandle, node->PathText->Buffer);
+ PhShellExecuteUserString(
+ Context->WindowHandle,
+ L"FileBrowseExecutable",
+ node->PathText->Buffer,
+ FALSE,
+ L"Make sure the Explorer executable file is present."
+ );
}
}
break;
|
correct error reporting on python text compilation
The exception raised in the BPF class constructor assumed
that the "src_file" argument was used to pass eBPF code -
this is not the case for many of the tools scripts, which
tend to use "text". | @@ -287,6 +287,8 @@ class BPF(object):
if text:
self.module = lib.bpf_module_create_c_from_string(text.encode("ascii"),
self.debug, cflags_array, len(cflags_array))
+ if not self.module:
+ raise Exception("Failed to compile BPF text:\n%s" % text)
else:
src_file = BPF._find_file(src_file)
hdr_file = BPF._find_file(hdr_file)
@@ -296,7 +298,6 @@ class BPF(object):
else:
self.module = lib.bpf_module_create_c(src_file.encode("ascii"),
self.debug, cflags_array, len(cflags_array))
-
if not self.module:
raise Exception("Failed to compile BPF module %s" % src_file)
|
Attempt to fix travis gcc build error | @@ -208,7 +208,7 @@ static void log_printf(ngtcp2_log *log, const char *fmt, ...) {
return;
}
- write(log->fd, buf, (size_t)n);
+ (void)write(log->fd, buf, (size_t)n);
}
static void log_fr_stream(ngtcp2_log *log, const ngtcp2_pkt_hd *hd,
|
Refine test to account for negative memory pool values. | @@ -589,16 +589,20 @@ void fio_malloc_test(void) {
#endif
++count;
} while (arena_last_used->block == b);
+ {
+ intptr_t old_memory_pool_count = memory.count;
fio_free(mem);
- fprintf(stderr,
+ fprintf(
+ stderr,
"* Performed %zu allocations out of expected %zu allocations per "
"block.\n",
count,
(size_t)((FIO_MEMORY_BLOCK_SLICES - 2) - (sizeof(block_s) >> 4) - 1));
TEST_ASSERT(memory.available,
"memory pool empty (memory block wasn't freed)!\n");
- TEST_ASSERT(memory.count, "memory.count == 0 (memory block not counted)!\n");
-
+ TEST_ASSERT(old_memory_pool_count == memory.count,
+ "memory.count == 0 (memory block not counted)!\n");
+ }
/* rotate block again */
b = arena_last_used->block;
mem = fio_realloc(mem, 1);
|
OSX: Install octave via brew. | @@ -31,7 +31,8 @@ pushd "$DEPS_DIR"
python
brew install \
lua \
- mono
+ mono \
+ octave
fi
if [ "$CIRCLECI" == "true" ]; then
sudo apt-get -qq update
|
Use stdint version of veci16_t instead of creating a new typedef | #include <stdint.h>
-typedef int _veci16_t __attribute__((__vector_size__(16 * sizeof(int))));
-
void* memset(void *_dest, int value, unsigned int length)
{
char *dest = (char*) _dest;
@@ -28,11 +26,11 @@ void* memset(void *_dest, int value, unsigned int length)
if ((((unsigned int) dest) & 63) == 0)
{
// Write 64 bytes at a time.
- _veci16_t reallyWideValue = (veci16_t)(value | (value << 8) | (value << 16)
+ veci16_t reallyWideValue = (veci16_t)(value | (value << 8) | (value << 16)
| (value << 24));
while (length > 64)
{
- *((_veci16_t*) dest) = reallyWideValue;
+ *((veci16_t*) dest) = reallyWideValue;
length -= 64;
dest += 64;
}
|
improvement on handling PMKIDs calculated using zeroed PMK | @@ -1020,6 +1020,8 @@ static void addpmkid(uint8_t *macclient, uint8_t *macap, uint8_t *pmkid)
static pmkidlist_t *pmkidlistnew;
pmkidcount++;
+if(testzeroedpmkid(macclient, macap, pmkid) == false)
+ {
if(pmkidlistptr >= pmkidlist +pmkidlistmax)
{
pmkidlistnew = realloc(pmkidlist, (pmkidlistmax +PMKIDLIST_MAX) *PMKIDLIST_SIZE);
@@ -1037,6 +1039,31 @@ memcpy(pmkidlistptr->ap, macap, 6);
memcpy(pmkidlistptr->client, macclient, 6);
memcpy(pmkidlistptr->pmkid, pmkid, 16);
if(cleanbackpmkid() == false) pmkidlistptr++;
+ }
+else
+ {
+ zeroedpmkcount++;
+ if(donotcleanflag == true)
+ {
+ if(pmkidlistptr >= pmkidlist +pmkidlistmax)
+ {
+ pmkidlistnew = realloc(pmkidlist, (pmkidlistmax +PMKIDLIST_MAX) *PMKIDLIST_SIZE);
+ if(pmkidlistnew == NULL)
+ {
+ printf("failed to allocate memory for internal list\n");
+ exit(EXIT_FAILURE);
+ }
+ pmkidlist = pmkidlistnew;
+ pmkidlistptr = pmkidlistnew +maclistmax;
+ pmkidlistmax += PMKIDLIST_MAX;
+ }
+ memset(pmkidlistptr, 0, PMKIDLIST_SIZE);
+ memcpy(pmkidlistptr->ap, macap, 6);
+ memcpy(pmkidlistptr->client, macclient, 6);
+ memcpy(pmkidlistptr->pmkid, pmkid, 16);
+ if(cleanbackpmkid() == false) pmkidlistptr++;
+ }
+ }
return;
}
/*===========================================================================*/
@@ -1333,21 +1360,9 @@ if(authlen >= (int)(WPAKEY_SIZE +PMKID_SIZE))
if((pmkid->len == 0x14) && (pmkid->type == 0x04) && (memcmp(pmkid->pmkid, &zeroed32, 16) != 0))
{
zeiger->message |= HS_PMKID;
- if(testzeroedpmkid(macto, macfm, pmkid->pmkid) == false)
- {
- memcpy(zeiger->pmkid, pmkid->pmkid, 16);
- addpmkid(macto, macfm, pmkid->pmkid);
- }
- else
- {
- zeroedpmkcount++;
- if(donotcleanflag == true)
- {
memcpy(zeiger->pmkid, pmkid->pmkid, 16);
addpmkid(macto, macfm, pmkid->pmkid);
}
- }
- }
else pmkiduselesscount++;
}
for(zeiger = messagelist; zeiger < messagelist +MESSAGELIST_MAX +1; zeiger++)
|
ci: copy in tests prior to urbit-tests
Tests were moved out of pkg/arvo and into root,
but we still want them in for CI tests. | @@ -157,7 +157,10 @@ jobs:
exit $exitcode
- if: ${{ matrix.os == 'ubuntu-latest' }}
- run: nix-build -A urbit-tests
+ name: run urbit-tests
+ run: |
+ cp -RL tests pkg/arvo/tests
+ nix-build -A urbit-tests
- if: ${{ matrix.os == 'ubuntu-latest' }}
run: nix-build -A docker-image
|
corrected AddressSpaceId | @@ -1024,7 +1024,7 @@ AcpiFadtEnableReset (
//
// Resetting through port 0xCF9 is universal on Intel and AMD.
//
- Context->Fadt->ResetReg.AddressSpaceId = EFI_ACPI_6_2_SYSTEM_MEMORY;
+ Context->Fadt->ResetReg.AddressSpaceId = EFI_ACPI_6_2_SYSTEM_IO;
Context->Fadt->ResetReg.RegisterBitWidth = 8;
Context->Fadt->ResetReg.RegisterBitOffset = 0;
Context->Fadt->ResetReg.AccessSize = EFI_ACPI_6_2_BYTE;
|
[bsp][stm32l476-nucleo] change default RTT_DIR to ../.. | @@ -8,7 +8,7 @@ config $BSP_DIR
config $RTT_DIR
string
option env="RTT_ROOT"
- default: "rt-thread"
+ default: "../.."
# you can change the RTT_ROOT default: "rt-thread"
# example : default "F:/git_repositories/rt-thread"
|
fs/vfs: Remove the redundancy file name comparison in mountptrename | @@ -310,7 +310,17 @@ static int mountptrename(FAR const char *oldpath, FAR struct inode *oldinode,
goto errout_with_newinode;
}
- /* Does a directory entry already exist at the 'rewrelpath'? And is it
+ /* If oldrelpath and newrelpath are the same, then this is an attempt
+ * to move the directory entry onto itself. Let's not but say we did.
+ */
+
+ if (strcmp(oldrelpath, newrelpath) == 0)
+ {
+ ret = OK;
+ goto errout_with_newinode; /* Same name, this is not an error case. */
+ }
+
+ /* Does a directory entry already exist at the 'newrelpath'? And is it
* not the same directory entry that we are moving?
*
* If the directory entry at the newrelpath is a regular file, then that
@@ -318,23 +328,15 @@ static int mountptrename(FAR const char *oldpath, FAR struct inode *oldinode,
*
* If the directory entry at the target is a directory, then the source
* file should be moved "under" the directory, i.e., if newrelpath is a
- * directory, then rename(b,a) should use move the olrelpath should be
+ * directory, then rename(b,a) should use move the oldrelpath should be
* moved as if rename(b,a/basename(b)) had been called.
*/
- if (oldinode->u.i_mops->stat != NULL &&
- strcmp(oldrelpath, newrelpath) != 0)
+ if (oldinode->u.i_mops->stat != NULL)
{
struct stat buf;
next_subdir:
- /* Something exists for this directory entry. Do nothing in the
- * degenerate case where a directory or file is being moved to
- * itself.
- */
-
- if (strcmp(oldrelpath, newrelpath) != 0)
- {
ret = oldinode->u.i_mops->stat(oldinode, newrelpath, &buf);
if (ret >= 0)
{
@@ -389,7 +391,7 @@ next_subdir:
else
{
/* No.. newrelpath must refer to a regular file. Make sure
- * that the file at the olrelpath actually exists before
+ * that the file at the oldrelpath actually exists before
* performing any further actions with newrelpath
*/
@@ -413,22 +415,12 @@ next_subdir:
}
}
}
- }
-
- /* Just declare success of the oldrepath and the newrelpath point to
- * the same directory entry. That directory entry should have been
- * stat'ed above to assure that it exists.
- */
- ret = OK;
- if (strcmp(oldrelpath, newrelpath) != 0)
- {
/* Perform the rename operation using the relative paths at the common
* mountpoint.
*/
ret = oldinode->u.i_mops->rename(oldinode, oldrelpath, newrelpath);
- }
errout_with_newinode:
inode_release(newinode);
|
regex: fix pattern length | @@ -63,7 +63,7 @@ static int str_to_regex(unsigned char *pattern, OnigRegex *reg)
int len;
OnigErrorInfo einfo;
- len = strlen((char *) pattern) - 1;
+ len = strlen((char *) pattern);
ret = onig_new(reg, pattern, pattern + len,
ONIG_OPTION_DEFAULT,
ONIG_ENCODING_UTF8, ONIG_SYNTAX_RUBY, &einfo);
|
Updated AOMP nomenclature to be uniform - all caps | @@ -107,7 +107,7 @@ Build and install from sources is possible. However, the source build for AOMP
- It is a bootstrapped build. The built and installed LLVM compiler is used to build library components.
- Additional package dependencies are required that are not required when installing the AOMP package.
-Building aomp from source requires these dependencies that can be resolved on an ubuntu system with apt-get.
+Building AOMP from source requires these dependencies that can be resolved on an ubuntu system with apt-get.
```
sudo apt-get install cmake g++-5 g++ pkg-config libpci-dev libnuma-dev libelf-dev libffi-dev git python libopenmpi-dev
@@ -123,7 +123,7 @@ sudo install rock_dkms
sudo reboot
sudo usermod -a -G video $LOGNAME
```
-To build aomp with support for nvptx GPUs, you must first install cuda 10. We recommend cuda 10.0. Cuda 10.1 will not work till aomp moves to the trunk development of LLVM 9. Once you download cuda 10.0 local install file, these commands should complete the install of cuda. Note the first command references the install for Ubuntu 16.04.
+To build AOMP with support for nvptx GPUs, you must first install cuda 10. We recommend cuda 10.0. Cuda 10.1 will not work till AOMP moves to the trunk development of LLVM 9. Once you download cuda 10.0 local install file, these commands should complete the install of cuda. Note the first command references the install for Ubuntu 16.04.
```
sudo dpkg -i cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-10-0-local-10.0.130-410.48/7fa2af80.pub
@@ -146,7 +146,7 @@ The source build process above builds the development version of AOMP by checkin
git checkout rel_0.6.0
git pull
```
-You only need to do this in the aomp repository. The file "bin/aomp_common_vars" lists the branches of each repository for a particular aomp release. In the master branch of aomp, aomp_common_vars lists the development branches. It is a good idea to run clone_aomp.sh twice after you checkout a release to be sure you pulled all the checkouts for a particular release.
+You only need to do this in the AOMP repository. The file "bin/aomp_common_vars" lists the branches of each repository for a particular AOMP release. In the master branch of AOMP, aomp_common_vars lists the development branches. It is a good idea to run clone_aomp.sh twice after you checkout a release to be sure you pulled all the checkouts for a particular release.
If your are interested in joining the development of AOMP, please read the details on the source build at [README](bin/README.md).
|
add ubuntu-20.04 to bcc-test.yml
resending | @@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [ubuntu-18.04] # 18.04.3 release has 5.0.0 kernel
+ os: [ubuntu-18.04, ubuntu-20.04] # 18.04.3 release has 5.0.0 kernel
env:
- TYPE: Debug
PYTHON_TEST_LOGFILE: critical.log
|
Update ntrtl.h types | @@ -4562,6 +4562,12 @@ typedef struct _RTL_BITMAP
PULONG Buffer;
} RTL_BITMAP, *PRTL_BITMAP;
+typedef struct _RTL_BITMAP_EX
+{
+ ULONG64 SizeOfBitMap;
+ PULONG64 Buffer;
+} RTL_BITMAP_EX, *PRTL_BITMAP_EX;
+
NTSYSAPI
VOID
NTAPI
|
Aligned ocf_volume
Force cacheline alignment to avoid cacheline trashing on static fields | @@ -33,7 +33,7 @@ struct ocf_volume {
/* true if reading discarded pages returns 0 */
} features;
struct ocf_refcnt refcnt;
-};
+} __attribute__((aligned(64)));
int ocf_volume_type_init(struct ocf_volume_type **type,
const struct ocf_volume_properties *properties,
|
Fix migrating old projects containing scenes with mismatching width/height values to their images | @@ -27,6 +27,7 @@ const migrateProject = project => {
version = "1.2.0";
}
if (version === "1.2.0") {
+ data = migrateFrom120To200Scenes(data);
data = migrateFrom120To200Actors(data);
data = migrateFrom120To200Events(data);
version = "2.0.0";
@@ -253,6 +254,27 @@ const migrateFrom110To120Events = data => {
};
};
+/*
+ * In version 1.2.0 and below scene width/height was mostly a calculated
+ * from the image width and height. In version 2.0.0 the scene values are
+ * kept up to date and are the single source of truth for scene dimensions
+ */
+const migrateFrom120To200Scenes = (data) => {
+ const backgroundLookup = indexById(data.backgrounds);
+
+ return {
+ ...data,
+ scenes: data.scenes.map((scene) => {
+ const background = backgroundLookup[scene.backgroundId];
+ return {
+ ...scene,
+ width: background && background.width || 32,
+ height: background && background.height || 32,
+ };
+ }),
+ };
+};
+
/*
* In version 1.2.0 Actors had a movementType field, in 2.0.0 movement
* is now handled with movement scripts and whether an actor treats it's
|
papi: fix typo in repr
Reported by Vratko's review.
(Thanks for the review)
Fixes:
Type: fix | @@ -272,7 +272,7 @@ class FixedList(Packer):
return result, total
def __repr__(self):
- return "FixedList_(name=%s, field_type=%s, num=%s)" % (
+ return "FixedList(name=%s, field_type=%s, num=%s)" % (
self.name, self.field_type, self.num)
|
Validate parser parameter to XML_SetUserData | @@ -1319,6 +1319,8 @@ XML_SetReturnNSTriplet(XML_Parser parser, int do_nst)
void XMLCALL
XML_SetUserData(XML_Parser parser, void *p)
{
+ if (parser == NULL)
+ return;
if (handlerArg == userData)
handlerArg = userData = p;
else
|
Trying to work around an issue with Azure and install of automake. | @@ -86,7 +86,8 @@ macOS_automake_exists() {
macOS_automake_install() {
echo "Installing automake."
brew install automake
- if [ $? = 0 ]; then
+ # if [ $? = 0 ]; then
+ if automake --version &>/dev/null; then
echo "Installation of automake successful."
else
echo "Installation of automake failed."
|
stats cachedump: always dump COLD LRU
was defaulting to HOT, but HOT can be empty pretty easily and this can be
confusing. | @@ -563,7 +563,6 @@ int do_item_replace(item *it, item *new_it, const uint32_t hv) {
* The data could possibly be overwritten, but this is only accessing the
* headers.
* It may not be the best idea to leave it like this, but for now it's safe.
- * FIXME: only dumps the hot LRU with the new LRU's.
*/
char *item_cachedump(const unsigned int slabs_clsid, const unsigned int limit, unsigned int *bytes) {
unsigned int memlimit = 2 * 1024 * 1024; /* 2MB max response size */
@@ -575,7 +574,6 @@ char *item_cachedump(const unsigned int slabs_clsid, const unsigned int limit, u
char key_temp[KEY_MAX_LENGTH + 1];
char temp[512];
unsigned int id = slabs_clsid;
- if (!settings.lru_segmented)
id |= COLD_LRU;
pthread_mutex_lock(&lru_locks[id]);
|
enable NF_TABLES | @@ -266,10 +266,17 @@ CONFIG_USB_NET_HUAWEI_CDC_NCM=m
CONFIG_USB_NET_QMI_WWAN=m
CONFIG_NAMESPACES=y
CONFIG_NETFILTER=y
+CONFIG_NETFILTER_NETLINK=m
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
CONFIG_NETFILTER_XT_MATCH_STATE=m
CONFIG_NF_CONNTRACK=m
-CONFIG_NF_NAT_IPV4=m
+CONFIG_NF_TABLES=m
+CONFIG_NF_TABLES_IPV4=y
+CONFIG_NFT_CT=m
+CONFIG_NFT_COUNTER=m
+CONFIG_NFT_MASQ=m
+CONFIG_NFT_NAT=m
+CONFIG_NFT_COMPAT=m
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_NAT=m
CONFIG_IP_NF_TARGET_MASQUERADE=m
|
leap: fix ref regression | @@ -100,8 +100,10 @@ export function Omnibox(props: OmniboxProps): ReactElement {
}
Mousetrap.bind('escape', props.toggle);
const touchstart = new Event('touchstart');
- inputRef?.current?.dispatchEvent(touchstart);
- inputRef?.current?.focus();
+ // @ts-ignore
+ inputRef?.current?.input?.dispatchEvent(touchstart);
+ // @ts-ignore
+ inputRef?.current?.input?.focus();
return () => {
Mousetrap.unbind('escape');
setQuery('');
|
fix(hal): remove extra include of "../draw/sdl/lv_draw_sdl.h" | #include "../core/lv_theme.h"
#include "../draw/sdl/lv_draw_sdl.h"
#include "../draw/sw/lv_draw_sw.h"
-#include "../draw/sdl/lv_draw_sdl.h"
#if LV_USE_GPU_STM32_DMA2D
#include "../draw/stm32_dma2d/lv_gpu_stm32_dma2d.h"
#endif
@@ -574,7 +573,7 @@ lv_disp_rot_t lv_disp_get_rotation(lv_disp_t * disp)
{
if(disp == NULL) disp = lv_disp_get_default();
if(disp == NULL) return LV_DISP_ROT_NONE;
- return disp->driver->rotated;
+ return (lv_disp_rot_t)disp->driver->rotated;
}
/**********************
|
CI: Set `CTEST_OUTPUT_ON_FAILURE` environment variable. | @@ -7,6 +7,9 @@ jobs:
name: ${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.version }}
runs-on: ${{ matrix.config.os }}-latest
+ env:
+ CTEST_OUTPUT_ON_FAILURE: ON
+
strategy:
fail-fast: false
matrix:
|
README.md: Don't advertise meta-oe dependency
The dependencies to the meta-openembedded layers are handled through
dynamic layers so there is no need to advertise this in the
documentation. Especially that the layer configuration doesn't set that
either. | @@ -39,11 +39,6 @@ This layer depends on:
* branch: master
* revision: HEAD
-* URI: git://git.openembedded.org/meta-openembedded
- * layers: meta-oe, meta-multimedia, meta-networking, meta-python
- * branch: master
- * revision: HEAD
-
## Quick Start
1. source poky/oe-init-build-env rpi-build
|
Add warning about unsupported chacha and schannel | @@ -85,6 +85,8 @@ reg.exe add "HKLM\System\CurrentControlSet\Services\MsQuic\Parameters" /v Initia
## Windows
+> **Important** - ChaCha20-Poly1305 is not yet supported with MsQuic and Schannel, so this doesn't do anything yet.
+
By default, the new cipher suite `TLS_CHACHA20_POLY1305_SHA256` is disabled. It can be enabled via the following command:
```PowerShell
|
IPv6 NS/RS; do not vec_validate global structs in the DP | @@ -1558,13 +1558,15 @@ icmp6_router_solicitation (vlib_main_t * vm,
sizeof (icmp6_neighbor_discovery_header_t));
/* look up the radv_t information for this interface */
- vec_validate_init_empty
- (nm->if_radv_pool_index_by_sw_if_index, sw_if_index0, ~0);
-
- ri = nm->if_radv_pool_index_by_sw_if_index[sw_if_index0];
+ if (vec_len (nm->if_radv_pool_index_by_sw_if_index) >
+ sw_if_index0)
+ {
+ ri =
+ nm->if_radv_pool_index_by_sw_if_index[sw_if_index0];
if (ri != ~0)
radv_info = pool_elt_at_index (nm->if_radv_pool, ri);
+ }
error0 =
((!radv_info) ?
@@ -1907,13 +1909,15 @@ icmp6_router_advertisement (vlib_main_t * vm,
u32 ri;
/* look up the radv_t information for this interface */
- vec_validate_init_empty
- (nm->if_radv_pool_index_by_sw_if_index, sw_if_index0, ~0);
-
- ri = nm->if_radv_pool_index_by_sw_if_index[sw_if_index0];
+ if (vec_len (nm->if_radv_pool_index_by_sw_if_index) >
+ sw_if_index0)
+ {
+ ri =
+ nm->if_radv_pool_index_by_sw_if_index[sw_if_index0];
if (ri != ~0)
radv_info = pool_elt_at_index (nm->if_radv_pool, ri);
+ }
error0 =
((!radv_info) ?
|
Fix a windows build break | @@ -18,12 +18,12 @@ typedef enum {
UNICODE_LIMIT
} UNICODE_CONSTANTS;
-static ossl_unused inline int is_unicode_surrogate(unsigned long value)
+static ossl_unused ossl_inline int is_unicode_surrogate(unsigned long value)
{
return value >= SURROGATE_MIN && value <= SURROGATE_MAX;
}
-static ossl_unused inline int is_unicode_valid(unsigned long value)
+static ossl_unused ossl_inline int is_unicode_valid(unsigned long value)
{
return value <= UNICODE_MAX && !is_unicode_surrogate(value);
}
|
Fix build when enabling mdebug options. | @@ -145,14 +145,6 @@ static int shouldfail(void)
len = strlen(buff);
if (write(md_tracefd, buff, len) != len)
perror("shouldfail write failed");
-# ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
- if (shoulditfail) {
- void *addrs[30];
- int num = backtrace(addrs, OSSL_NELEM(addrs));
-
- backtrace_symbols_fd(addrs, num, md_tracefd);
- }
-# endif
}
# endif
@@ -305,6 +297,24 @@ int CRYPTO_mem_debug_pop(void)
return -1;
}
+void CRYPTO_mem_debug_malloc(void *addr, size_t num, int flag,
+ const char *file, int line)
+{
+ (void)addr; (void)num; (void)flag; (void)file; (void)line;
+}
+
+void CRYPTO_mem_debug_realloc(void *addr1, void *addr2, size_t num, int flag,
+ const char *file, int line)
+{
+ (void)addr1; (void)addr2; (void)num; (void)flag; (void)file; (void)line;
+}
+
+void CRYPTO_mem_debug_free(void *addr, int flag,
+ const char *file, int line)
+{
+ (void)addr; (void)flag; (void)file; (void)line;
+}
+
int CRYPTO_mem_leaks(BIO *b)
{
(void)b;
|
get_prifix array size amended | @@ -128,7 +128,7 @@ uint32_t current_offset;
/*******************************************************************************
* ROS Parameter
*******************************************************************************/
-char get_prefix[10];
+char get_prefix[100];
char* get_tf_prefix = get_prefix;
char odom_header_frame_id[30];
|
test: remove obsolete test entry | @@ -281,9 +281,5 @@ TEST_LIST = {
"server_start_stop_force_fair_balancing",
test_server_start_stop_force_fair_balancing
},
- {
- "server_start_fail_bad_endpoint",
- test_server_start_fail_bad_endpoint
- },
{NULL, NULL}
};
|
libtcmu:fix valid field in sense data | @@ -184,7 +184,7 @@ size_t tcmu_iovec_length(struct iovec *iovec, size_t iov_cnt)
void __tcmu_set_sense_data(uint8_t *sense_buf, uint8_t key, uint16_t asc_ascq)
{
- sense_buf[0] = 0x70; /* fixed, current */
+ sense_buf[0] |= 0x70; /* fixed, current */
sense_buf[2] = key;
sense_buf[7] = 0xa;
sense_buf[12] = (asc_ascq >> 8) & 0xff;
|
config.in: use portable hour specifier
`%l` is GNU specific. `%I` does the same thing but padded by zeros,
and is POSIX compliant. | @@ -205,7 +205,7 @@ bar {
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
- status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done
+ status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
colors {
statusline #ffffff
|
graph-push-hook: parameterise desk | ^- (quip card (unit vase))
=/ transform
%. *indexed-post:store
- .^(post-transform (scry:hc %cf %home /[u.mark]/transform-add-nodes))
+ .^(post-transform (scry:hc %cf q.byk.bowl /[u.mark]/transform-add-nodes))
=/ [* result=(list [index:store node:store])]
%+ roll
(flatten-node-map ~(tap by nodes.q.update))
[[%no %no %no] ~]
=/ key [u.mark (perm-mark-name perm)]
=/ convert
- .^(post-to-permission (scry %cf %home /[u.mark]/(perm-mark-name perm)))
+ .^(post-to-permission (scry %cf q.byk.bowl /[u.mark]/(perm-mark-name perm)))
:- ((convert indexed-post) vip)
%- zing
:~ ?: (~(has by graph-to-mark.cache) resource)
|
Rename "ref" to "node", and update some comments
The NodeUpdate can be used for both ast.Exp and ast.Var nodes, so "ref" isn't a good name.
My editor also deleted a bunch of whitespace. | @@ -48,16 +48,13 @@ function converter.convert(prog_ast)
end
--- Encapsulates an update on an AST Node.
--- A Node update has two parts:
--- `ref`: An ast.Var that denotes the node that has to be updated.
--- `update_fn`: A `(ast.Var) -> ()` function that is used to update the node.
--- `ref`'s location is used to create a new AST Node. The new node is then used to replace the original
--- occurance of `ref` in the AST by calling `update_fn` on the newly created node.
-local function NodeUpdate(ref, update_fn)
+-- Encapsulates an update to an AST Node.
+-- `node`: The AST we will replace (we use it's location)
+-- `update_fn`: A `node -> ()` function that is used to update the node.
+local function NodeUpdate(node, update_fn)
return {
- ref = ref, -- ast.Var
- update_fn = update_fn, -- (ast.Var) -> ()
+ node = node,
+ update_fn = update_fn,
}
end
@@ -138,20 +135,23 @@ function Converter:apply_transformations()
assert(not decl._exported_as)
-- 1. Create a record type `$T` to hold this captured var.
- -- 2. Transform the ast.Decl node from `local x = value` to `local x: $T = { value = value }`
- -- 3. Go over all the references ever made to this variable and transform them from `ast.Var.Name`
- -- to ast.Var.Dot
- local typ = types.T.Record(self:type_name(decl.name), { "value" } , { value = decl._type } )
+ -- 2. Transform node from `local x = value` to `local x: $T = { value = value }`
+ -- 3. Transform all references to the var from `ast.Var.Name` to ast.Var.Dot
+ local typ = types.T.Record(
+ self:type_name(decl.name),
+ { "value" } ,
+ { value = decl._type }
+ )
self:add_box_type(decl.loc, typ)
decl._type = typ
local init_exp_update = self.update_init_exp_of_decl[decl]
if init_exp_update then
- local old_ref = init_exp_update.ref
+ local old_exp = init_exp_update.node
local update = init_exp_update.update_fn
- local new_node = ast.Exp.InitList(old_ref.loc, {{ name = "value", exp = old_ref }})
+ local new_node = ast.Exp.InitList(old_exp.loc, {{ name = "value", exp = old_exp }})
new_node._type = typ
update(new_node)
else
@@ -159,10 +159,11 @@ function Converter:apply_transformations()
end
for _, node_update in ipairs(self.update_ref_of_decl[decl]) do
- local old_ref = node_update.ref
+ local old_var = node_update.node
local update = node_update.update_fn
- local new_node = ast.Var.Dot(old_ref.loc, ast.Exp.Var(old_ref.loc, old_ref), "value")
+ local loc = old_var.loc
+ local new_node = ast.Var.Dot(loc, ast.Exp.Var(loc, old_var), "value")
new_node.exp._type = typ
update(new_node)
end
|
fix type confusion in int_notifier.c | @@ -10,7 +10,7 @@ static int callback_num = 0;
static int_notify_callback_t callback_table[MAX_CALLBACKS] = {0};
static void clear_table() {
- memset(&callback_table, 0, sizeof(timer_callback_t) * callback_num);
+ memset(&callback_table, 0, sizeof(int_notify_callback_t) * callback_num);
callback_num = 0;
}
@@ -40,10 +40,7 @@ int_notify_callback_t* int_notifier_register_callback(uint32_t int_no, void* fun
}
panic("int callback table out of space");
- //TODO expand table instead of clearing it
- clear_table();
- //try adding the callback again now that we know the table has room
- return int_notifier_register_callback(int_no, func, context, repeats);
+ return NULL;
}
void int_notifier_remove_callback(int_notify_callback_t* callback) {
|
TODO HACK DONT COMMIT: Log to stderr | @@ -39,7 +39,7 @@ withLogFileHandle act = do
runApp :: RIO App a -> IO a
runApp inner = do
withLogFileHandle $ \logFile -> do
- logOptions <- logOptionsHandle logFile True
+ logOptions <- logOptionsHandle stderr True
<&> setLogUseTime True
<&> setLogUseLoc False
@@ -78,7 +78,7 @@ instance HasNetworkConfig PierApp where
runPierApp :: PierConfig -> NetworkConfig -> RIO PierApp a -> IO a
runPierApp pierConfig networkConfig inner = do
withLogFileHandle $ \logFile -> do
- logOptions <- logOptionsHandle logFile True
+ logOptions <- logOptionsHandle stderr True
<&> setLogUseTime True
<&> setLogUseLoc False
|
rpz-triggers, silence qname trigger explanation in rpz-log, this is
backwards compatible. | @@ -1399,9 +1399,11 @@ log_rpz_apply(char* trigger, uint8_t* dname, struct addr_tree_node* addrnode,
port = 0;
}
snprintf(portstr, sizeof(portstr), "@%u", (unsigned)port);
- snprintf(txt, sizeof(txt), "rpz: applied %s%s%s%s %s %s %s%s",
+ snprintf(txt, sizeof(txt), "rpz: applied %s%s%s%s%s%s %s %s%s",
(log_name?"[":""), (log_name?log_name:""), (log_name?"] ":""),
- trigger, dnamestr, rpz_action_to_string(a),
+ (strcmp(trigger,"qname")==0?"":trigger),
+ (strcmp(trigger,"qname")==0?"":" "),
+ dnamestr, rpz_action_to_string(a),
(ip[0]?ip:""), (ip[0]?portstr:""));
log_nametypeclass(0, txt, qinfo->qname, qinfo->qtype, qinfo->qclass);
}
|
[kernel] initialize eventsManager | @@ -159,11 +159,6 @@ void Simulation::associate(SP::OneStepIntegrator osi, SP::DynamicalSystem ds)
}
-
-
-
-
-
SP::InteractionsGraph Simulation::indexSet(unsigned int i)
{
return _nsds->topology()->indexSet(i) ;
@@ -209,6 +204,8 @@ void Simulation::initialize_new()
{
DEBUG_BEGIN("Simulation::initialize(SP::Model m, bool withOSI)\n");
+
+
// symmetry in indexSets Do we need it ?
_nsds->topology()->setProperties();
@@ -224,10 +221,6 @@ void Simulation::initialize_new()
}
}
-
-
-
-
std::map< SP::OneStepIntegrator, std::list<SP::DynamicalSystem> >::iterator it;
std::list<SP::DynamicalSystem> ::iterator itlist;
for ( it = _OSIDSmap.begin(); it !=_OSIDSmap.end(); ++it)
@@ -246,8 +239,6 @@ void Simulation::initialize_new()
if (_nsds->version() != _nsdsVersion)
{
-
-
DynamicalSystemsGraph::VIterator dsi, dsend;
SP::DynamicalSystemsGraph DSG = _nsds->topology()->dSG(0);
for (std11::tie(dsi, dsend) = DSG->vertices(); dsi != dsend; ++dsi)
@@ -286,6 +277,14 @@ void Simulation::initialize_new()
if(!_isInitialized)
{
+
+ _T = _nsds->finalT();
+
+ // === Events manager initialization ===
+ _eventsManager->initialize(_T);
+ _tinit = _eventsManager->startingTime();
+
+
SP::Topology topo = _nsds->topology();
unsigned int indxSize = topo->indexSetsSize();
assert (_numberOfIndexSets >0);
|
freertos: remove xSemaphoreAltTake/Give macros from upstream files
xSemaphoreAltTake and xSemaphoreAltGive are Espressif defined macros and
are not being used. The respective definitions, xQueueAltGenericReceive
and xQueueAltGenericSend are also not part of current FreeRTOS source
(v10.4.3). Hence, removed xSemaphoreAltTake and xSemaphoreAltGive
definitions to align with upstream code. | @@ -410,23 +410,6 @@ typedef QueueHandle_t SemaphoreHandle_t;
*/
#define xSemaphoreTakeRecursive( xMutex, xBlockTime ) xQueueTakeMutexRecursive( ( xMutex ), ( xBlockTime ) )
-#ifdef ESP_PLATFORM // IDF-3814
-/** @cond */
-/*
- * xSemaphoreAltTake() is an alternative version of xSemaphoreTake().
- *
- * The source code that implements the alternative (Alt) API is much
- * simpler because it executes everything from within a critical section.
- * This is the approach taken by many other RTOSes, but FreeRTOS.org has the
- * preferred fully featured API too. The fully featured API has more
- * complex code that takes longer to execute, but makes much less use of
- * critical sections. Therefore the alternative API sacrifices interrupt
- * responsiveness to gain execution speed, whereas the fully featured API
- * sacrifices execution speed to ensure better interrupt responsiveness.
- */
-#define xSemaphoreAltTake( xSemaphore, xBlockTime ) xQueueAltGenericReceive( ( QueueHandle_t ) ( xSemaphore ), NULL, ( xBlockTime ), pdFALSE )
-/** @endcond */
-#endif // ESP_PLATFORM
/**
* <i>Macro</i> to release a semaphore. The semaphore must have previously been
* created with a call to xSemaphoreCreateBinary(), xSemaphoreCreateMutex() or
@@ -579,25 +562,6 @@ typedef QueueHandle_t SemaphoreHandle_t;
*/
#define xSemaphoreGiveRecursive( xMutex ) xQueueGiveMutexRecursive( ( xMutex ) )
-#ifdef ESP_PLATFORM // IDF-3814
-/** @cond */
-/*
- * xSemaphoreAltGive() is an alternative version of xSemaphoreGive().
- *
- * The source code that implements the alternative (Alt) API is much
- * simpler because it executes everything from within a critical section.
- * This is the approach taken by many other RTOSes, but FreeRTOS.org has the
- * preferred fully featured API too. The fully featured API has more
- * complex code that takes longer to execute, but makes much less use of
- * critical sections. Therefore the alternative API sacrifices interrupt
- * responsiveness to gain execution speed, whereas the fully featured API
- * sacrifices execution speed to ensure better interrupt responsiveness.
- */
-#define xSemaphoreAltGive( xSemaphore ) xQueueAltGenericSend( ( QueueHandle_t ) ( xSemaphore ), NULL, semGIVE_BLOCK_TIME, queueSEND_TO_BACK )
-
-/** @endcond */
-#endif // ESP_PLATFORM
-
/**
* <i>Macro</i> to release a semaphore. The semaphore must have previously been
* created with a call to xSemaphoreCreateBinary() or xSemaphoreCreateCounting().
|
arm/unwinder: set default unwinder type to arm exidx/extab | @@ -1245,8 +1245,7 @@ if SCHED_BACKTRACE
choice
prompt "Choose ARM unwinder"
- default UNWINDER_STACK_POINTER if ARM_THUMB
- default UNWINDER_FRAME_POINTER if !ARM_THUMB
+ default UNWINDER_ARM
---help---
This determines which method will be used for unwinding nuttx stack
traces for debug.
|
Correct Sunricher TERNCY-DC01 battery scale | "at": "0x0021",
"cl": "0x0001",
"ep": 1,
- "eval": "Item.val = Attr.val",
+ "eval": "Item.val = Attr.val / 2",
"fn": "zcl"
},
"default": 0
|
Check Bashisms: Exclude Zsh completion file | @@ -11,7 +11,7 @@ cd "@CMAKE_SOURCE_DIR@"
# this way we also check subdirectories
# The script `check-env-dep` uses process substitution which is **not** a standard `sh` feature!
# See also: https://unix.stackexchange.com/questions/151925
-scripts=$(find -E scripts/ -type f -not -regex '.+(check-env-dep|\.(cmake|fish|in|md|txt))$' | xargs)
+scripts=$(find -E scripts/ -type f -not -regex '.+(check-env-dep|kdb_zsh_completion|\.(cmake|fish|in|md|txt))$' | xargs)
checkbashisms $scripts
ret=$?
# 2 means skipped file, e.g. README.md, that is fine
|
arrm, neon: impove hadd performance | @@ -47,8 +47,13 @@ glmm_abs(float32x4_t v) {
static inline
float32x4_t
glmm_vhadd(float32x4_t v) {
+ return vaddq_f32(vaddq_f32(glmm_splat_x(v), glmm_splat_y(v)),
+ vaddq_f32(glmm_splat_z(v), glmm_splat_w(v)));
+ /*
+ this seems slower:
v = vaddq_f32(v, vrev64q_f32(v));
return vaddq_f32(v, vcombine_f32(vget_high_f32(v), vget_low_f32(v)));
+ */
}
static inline
|
Update port_bsp.rst | @@ -79,7 +79,7 @@ We create our targets with the following set of newt commands:
::
newt target create boot-myboard &&
- newt target set boot-myboard app=@apache-mynewt-core/apps/boot \
+ newt target set boot-myboard app=@mcuboot/boot/mynewt \
bsp=hw/bsp/myboard \
build_profile=optimized
@@ -93,7 +93,7 @@ Which generates the following output:
::
Target targets/boot-myboard successfully created
- Target targets/boot-myboard successfully set target.app to @apache-mynewt-core/apps/boot
+ Target targets/boot-myboard successfully set target.app to @mcuboot/boot/mynewt
Target targets/boot-myboard successfully set target.bsp to hw/bsp/myboard
Target targets/boot-myboard successfully set target.build_profile to debug
Target targets/blinky-myboard successfully created
|
Improve the performance of CPUID by clearing EAX. | @@ -13,7 +13,8 @@ static inline void cpu_relax(void)
static inline void cpu_serialize(void)
{
- asm volatile("cpuid" : : : "%rax", "%rbx", "%rcx", "%rdx");
+ asm volatile("xorl %%eax, %%eax\n\t"
+ "cpuid" : : : "%rax", "%rbx", "%rcx", "%rdx");
}
static inline uint64_t rdtsc(void)
|
Add missing PostgreSQL 11 control/WAL versions in Perl tests.
These values don't seem to be used for testing but better to be tidy. | @@ -287,6 +287,7 @@ sub dbControlVersion
&PG_VERSION_95 => 942,
&PG_VERSION_96 => 960,
&PG_VERSION_10 => 1002,
+ &PG_VERSION_11 => 1100,
};
if (!defined($hControlVersion->{$strPgVersion}))
@@ -441,6 +442,7 @@ sub walGenerateContent
&PG_VERSION_95 => hex('0xD087'),
&PG_VERSION_96 => hex('0xD093'),
&PG_VERSION_10 => hex('0xD097'),
+ &PG_VERSION_11 => hex('0xD098'),
};
my $tWalContent = pack('S', $hWalMagic->{$strPgVersion});
|
SetupTool: Fix regression from commit | @@ -985,7 +985,6 @@ VOID SetupCreateLink(
IPropertyStore_SetValue(propertyStorePtr, &PKEY_AppUserModel_ID, &propValue);
- PropVariantClear(&propValue);
//PropVariantInit(&propValue);
//propValue.vt = VT_CLSID;
//propValue.puuid = GUID;
@@ -1016,7 +1015,7 @@ VOID SetupCreateLink(
// Save the shortcut to the file system...
IPersistFile_Save(persistFilePtr, LinkFilePath, TRUE);
- //SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH | SHCNF_FLUSHNOWAIT, LinkFilePath, NULL);
+ SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH, LinkFilePath, NULL);
CleanupExit:
if (persistFilePtr)
|
BugID:18236504:Fix yloop certificate fail for not allocating fd | #endif
#if (TEST_CONFIG_YLOOP_ENABLED)
#define TEST_CONFIG_YLOOP_EVENT_COUNT (1000)
-#define TEST_CONFIG_YLOOP_LOOP_COUNT (5)
+#define TEST_CONFIG_YLOOP_LOOP_COUNT (4)
#endif
static unsigned int g_var = 0;
|
Fix configuration for older CMake versions | @@ -99,10 +99,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
add_compile_options(-fvisibility=hidden)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
- #disable gcc caller-saves flag for O2-O3
+ #disable gcc caller-saves flag for O2-O3 optimizations
#workaround fix for gcc 9.3+
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
- if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.3)
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.3 OR
+ CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 9.9)
add_compile_options(-fno-caller-saves)
endif()
endif()
|
Stop using some fast approx when ISA_INVARIANCE=ON | @@ -433,8 +433,11 @@ ASTCENC_SIMD_INLINE vint4 operator*(vint4 a, vint4 b)
return vint4(_mm_mullo_epi32 (a.m, b.m));
#else
__m128i t1 = _mm_mul_epu32(a.m, b.m);
- __m128i t2 = _mm_mul_epu32(_mm_srli_si128(a.m, 4), _mm_srli_si128(b.m, 4));
- __m128i r = _mm_unpacklo_epi32(_mm_shuffle_epi32(t1, _MM_SHUFFLE (0, 0, 2, 0)),
+ __m128i t2 = _mm_mul_epu32(
+ _mm_srli_si128(a.m, 4),
+ _mm_srli_si128(b.m, 4));
+ __m128i r = _mm_unpacklo_epi32(
+ _mm_shuffle_epi32(t1, _MM_SHUFFLE (0, 0, 2, 0)),
_mm_shuffle_epi32(t2, _MM_SHUFFLE (0, 0, 2, 0)));
return vint4(r);
#endif
@@ -1039,10 +1042,14 @@ ASTCENC_SIMD_INLINE vfloat4 dot3(vfloat4 a, vfloat4 b)
*/
ASTCENC_SIMD_INLINE vfloat4 recip(vfloat4 b)
{
+#if ASTCENC_ISA_INVARIANCE == 0
// Reciprocal with a single NR iteration
__m128 t1 = _mm_rcp_ps(b.m);
__m128 t2 = _mm_mul_ps(b.m, _mm_mul_ps(t1, t1));
return vfloat4(_mm_sub_ps(_mm_add_ps(t1, t1), t2));
+#else
+ return 1.0f / b;
+#endif
}
/**
@@ -1050,8 +1057,12 @@ ASTCENC_SIMD_INLINE vfloat4 recip(vfloat4 b)
*/
ASTCENC_SIMD_INLINE vfloat4 fast_recip(vfloat4 b)
{
+#if ASTCENC_ISA_INVARIANCE == 0
// Reciprocal with no NR iteration
return vfloat4(_mm_rcp_ps(b.m));
+#else
+ return 1.0f / b;
+#endif
}
/**
@@ -1059,19 +1070,23 @@ ASTCENC_SIMD_INLINE vfloat4 fast_recip(vfloat4 b)
*/
ASTCENC_SIMD_INLINE vfloat4 normalize(vfloat4 a)
{
+#if ASTCENC_ISA_INVARIANCE == 0
// Compute 1/divisor using rsqrt with one NR iteration
- vfloat4 half = vfloat4(0.5f);
- vfloat4 three = vfloat4(3.0f);
vfloat4 length = dot(a, a);
-
__m128 raw = _mm_rsqrt_ps(length.m);
// Apply NR iteration
+ vfloat4 half = vfloat4(0.5f);
+ vfloat4 three = vfloat4(3.0f);
__m128 ref = _mm_mul_ps(_mm_mul_ps(length.m, raw), raw);
ref = _mm_mul_ps(_mm_mul_ps(half.m, raw), _mm_sub_ps(three.m, ref));
// Apply scaling factor
return vfloat4(_mm_mul_ps(a.m, ref));
+#else
+ vfloat4 length = dot(a, a);
+ return a / sqrt(length);
+#endif
}
/**
|
Add hard pulse option with utests | @@ -213,6 +213,18 @@ static void sum_up_signal(struct sim_data* data, float *mxy, float *sa_r1, floa
/* ------------ RF-Pulse -------------- */
+// Single hard pulse without discrete sampling
+static void hard_pulse(struct sim_data* data, int N, int P, float xp[P][N])
+{
+ data->grad.gb[2] = (data->grad.mom_sl + data->voxel.w); //[rad/s]
+
+ for (int i = 0; i < P; i++)
+ bloch_excitation2(xp[i], xp[i], data->pulse.flipangle/180.*M_PI, data->pulse.phase);
+
+ data->grad.gb[2] = 0.;
+}
+
+
static void ode_pulse(struct sim_data* data, float h, float tol, int N, int P, float xp[P][N])
{
// Turn on potential slice-selection gradient
@@ -229,17 +241,39 @@ void start_rf_pulse(struct sim_data* data, float h, float tol, int N, int P, flo
{
data->seq.pulse_applied = true;
+ if (0. == data->pulse.rf_end)
+ hard_pulse(data, N, P, xp);
+ else
ode_pulse(data, h, tol, N, P, xp);
}
/* ------------ Relaxation -------------- */
+static void hard_relaxation(struct sim_data* data, int N, int P, float xp[P][N], float st, float end)
+{
+ float xp2[3] = { 0. };
+
+ data->grad.gb[2] = (data->grad.mom + data->voxel.w); // [rad/s]
+
+ for (int i = 0; i < P; i++) {
+
+ xp2[0] = xp[i][0];
+ xp2[1] = xp[i][1];
+ xp2[2] = xp[i][2];
+
+ bloch_relaxation(xp[i], end-st, xp2, data->voxel.r1, data->voxel.r2, data->grad.gb);
+ }
+
+ data->grad.gb[2] = 0.;
+}
+
+
static void ode_relaxation(struct sim_data* data, float h, float tol, int N, int P, float xp[P][N], float st, float end)
{
data->seq.pulse_applied = false;
- data->grad.gb[2] = data->grad.mom; // [rad/s]
+ data->grad.gb[2] = data->grad.mom; // [rad/s], offresonance w appears in Bloch equation and can be skipped here
// Choose P-1 because ODE interface treats signal seperat and P only describes the number of parameters
ode_direct_sa(h, tol, N, P-1, xp, st, end, data, bloch_simu_fun, bloch_pdy2, bloch_pdp2);
@@ -252,6 +286,9 @@ static void relaxation2(struct sim_data* data, float h, float tol, int N, int P,
{
data->seq.pulse_applied = false;
+ if (0. == data->pulse.rf_end)
+ hard_relaxation(data, N, P, xp, st, end);
+ else
ode_relaxation(data, h, tol, N, P, xp, st, end);
}
|
Remove remnant prototype. | @@ -18,8 +18,6 @@ opencoap_vars_t opencoap_vars;
uint8_t opencoap_options_parse(OpenQueueEntry_t* msg,
coap_option_iht* options,
uint8_t optionsLen);
-
-coap_option_iht* opencoap_find_object_security_option(coap_option_iht* array, uint8_t arrayLen);
//=========================== public ==========================================
//===== from stack
|
[iot] Fix generate_certificate.cmd, affected by samples reorg
The documentation got modified previosly by | @REM Copyright (c) Microsoft Corporation. All rights reserved.
-@REM SPDX-License-Identifier MIT
+@REM SPDX-License-Identifier: MIT
@echo off
openssl ecparam -out device_ec_key.pem -name prime256v1 -genkey
IF %ERRORLEVEL% NEQ 0 (
- echo Failed generating certificate key
- exit b 1
+ echo "Failed generating certificate key"
+ exit /b 1
)
-openssl req -new -days 365 -nodes -x509 -key device_ec_key.pem -out device_ec_cert.pem -config x509_config.cfg -subj CN=paho-sample-device1
+openssl req -new -days 365 -nodes -x509 -key device_ec_key.pem -out device_ec_cert.pem -config x509_config.cfg -subj "/CN=paho-sample-device1"
IF %ERRORLEVEL% NEQ 0 (
- echo Failed generating certificate
- exit b 1
+ echo "Failed generating certificate"
+ exit /b 1
)
openssl x509 -noout -text -in device_ec_cert.pem
-type device_ec_cert.pem device_cert_store.pem
-type device_ec_key.pem device_cert_store.pem
+type device_ec_cert.pem > device_cert_store.pem
+type device_ec_key.pem >> device_cert_store.pem
echo.
-echo It is NOT recommended to use OpenSSL on Windows or OSX. Recommended TLS stacks are
-echo Microsoft Windows SChannel httpsdocs.microsoft.comen-uswindowswin32comschannel
+echo It is NOT recommended to use OpenSSL on Windows or OSX. Recommended TLS stacks are:
+echo Microsoft Windows SChannel: https://docs.microsoft.com/en-us/windows/win32/com/schannel
echo OR
-echo Apple Secure Transport httpsdeveloper.apple.comdocumentationsecuritysecure_transport
+echo Apple Secure Transport : https://developer.apple.com/documentation/security/secure_transport
echo If using OpenSSL, it is recommended to use the OpenSSL Trusted CA store configured on your system.
echo.
-echo If required (for example on Windows), download the Baltimore PEM CA from httpswww.digicert.comdigicert-root-certificates.htm to the current folder.
-echo Once it is downloaded, run the following command to set the environment variable for the samples
+echo If required (for example on Windows), download the Baltimore PEM CA from https://www.digicert.com/digicert-root-certificates.htm to the current folder.
+echo Once it is downloaded, run the following command to set the environment variable for the samples:
echo.
-echo set AZ_IOT_DEVICE_X509_TRUST_PEM_FILE=%CD%BaltimoreCyberTrustRoot.crt.pem
+echo set "AZ_IOT_DEVICE_X509_TRUST_PEM_FILE=%CD%\BaltimoreCyberTrustRoot.crt.pem"
echo.
echo Sample certificate generated
-echo Use the following command to set the environment variable for the samples
+echo Use the following command to set the environment variable for the samples:
echo.
-echo set AZ_IOT_DEVICE_X509_CERT_PEM_FILE=%CD%device_cert_store.pem
+echo set "AZ_IOT_DEVICE_X509_CERT_PEM_FILE=%CD%\device_cert_store.pem"
echo.
-echo Use the following fingerprint when creating your device in IoT Hub
+echo Use the following fingerprint when creating your device in IoT Hub:
-FOR F tokens= %%a in ('openssl x509 -noout -fingerprint -in device_ec_cert.pem') do SET output=%%a
-set fingerprint=%output=%
+FOR /F "tokens=*" %%a in ('openssl x509 -noout -fingerprint -in device_ec_cert.pem') do SET output=%%a
+set fingerprint=%output::=%
echo %fingerprint%
-echo %fingerprint% fingerprint.txt
+echo %fingerprint% > fingerprint.txt
echo.
echo The fingerprint has also been placed in fingerprint.txt for future reference
|
Fix man3 reference to CRYPTO_secure_used
CLA: trivial | @@ -6,7 +6,7 @@ CRYPTO_secure_malloc_init, CRYPTO_secure_malloc_initialized,
CRYPTO_secure_malloc_done, OPENSSL_secure_malloc, CRYPTO_secure_malloc,
OPENSSL_secure_zalloc, CRYPTO_secure_zalloc, OPENSSL_secure_free,
CRYPTO_secure_free, OPENSSL_secure_actual_size, OPENSSL_secure_allocated,
-CYRPTO_secure_used - secure heap storage
+CRYPTO_secure_used - secure heap storage
=head1 SYNOPSIS
@@ -30,7 +30,7 @@ CYRPTO_secure_used - secure heap storage
size_t OPENSSL_secure_actual_size(const void *ptr);
int OPENSSL_secure_allocated(const void *ptr);
- size_t CYRPTO_secure_used();
+ size_t CRYPTO_secure_used();
=head1 DESCRIPTION
|
Docs - updating bookb build dependencies | @@ -22,7 +22,7 @@ GEM
middleman-livereload
middleman-sprockets
middleman-syntax (= 2.1.0)
- nokogiri (= 1.8.5)
+ nokogiri (>= 1.10.8)
puma
rack-rewrite
redcarpet (~> 3.2.3)
@@ -156,8 +156,8 @@ GEM
minitest (5.11.3)
multi_json (1.13.1)
multipart-post (2.0.0)
- nokogiri (1.8.2)
- mini_portile2 (~> 2.3.0)
+ nokogiri (1.10.8)
+ mini_portile2 (~> 2.4.0)
padrino-helpers (0.13.3.4)
i18n (~> 0.6, >= 0.6.7)
padrino-support (= 0.13.3.4)
|
Removed unnecessary TC calls from parser.c. | @@ -731,10 +731,6 @@ static void
contains_usecs (void) {
if (conf.serve_usecs)
return;
-
-#ifdef TCB_BTREE
- ht_insert_genstats ("serve_usecs", 1);
-#endif
conf.serve_usecs = 1; /* flag */
}
@@ -1619,9 +1615,6 @@ uncount_processed (GLog * glog) {
glog->processed -= conf.num_tests;
else
glog->processed = 0;
-#ifdef TCB_BTREE
- ht_replace_genstats ("total_requests", glog->processed);
-#endif
}
/* Keep track of all valid log strings. */
|
Generalize initial metadata error message | @@ -453,7 +453,7 @@ parse_overlay_config(struct overlay_params *params,
dbusmgr::dbus_mgr.init(params->media_player_name);
get_media_player_metadata(dbusmgr::dbus_mgr, params->media_player_name, main_metadata);
} catch (std::runtime_error& e) {
- std::cerr << "Failed to get initial Spotify metadata: " << e.what() << std::endl;
+ std::cerr << "MANGOHUD: Failed to get initial media player metadata: " << e.what() << std::endl;
}
} else {
dbusmgr::dbus_mgr.deinit();
|
NANO: Disable WiFi debug flag which is not supported. | #define OMV_ENABLE_OV5640_AF (0)
// Enable WiFi debug
-#define OMV_ENABLE_WIFIDBG (1)
+#define OMV_ENABLE_WIFIDBG (0)
// Enable self-tests on first boot
#define OMV_ENABLE_SELFTEST (0)
|
[bsp/stm32/stm32g070-st-nucleo/board/Kconfig]: corret path. | @@ -186,7 +186,7 @@ menu "On-chip Peripheral Drivers"
bool "Enable Watchdog Timer"
select RT_USING_WDT
default n
- source "libraries/HAL_Drivers/Kconfig"
+ source "../libraries/HAL_Drivers/Kconfig"
endmenu
|
osiris: Update KYBL_EN output type
Set KYBL_EN(GPIOA7) to GPIO_OUT_LOW from GPIO_ODR_LOW.
BRANCH=none
TEST=build pass | @@ -74,7 +74,7 @@ GPIO(USB_C1_RT_RST_R_ODL, PIN(0, 2), GPIO_ODR_LOW)
GPIO(VCCST_PWRGD_OD, PIN(A, 4), GPIO_ODR_LOW)
GPIO(LED_1_L, PIN(C, 4), GPIO_OUT_HIGH)
GPIO(LED_2_L, PIN(C, 3), GPIO_OUT_HIGH)
-GPIO(KYBL_EN, PIN(A, 7), GPIO_ODR_LOW)
+GPIO(KYBL_EN, PIN(A, 7), GPIO_OUT_LOW)
GPIO(AMP_PWR_EN, PIN(5, 7), GPIO_ODR_LOW)
/* UART alternate functions */
|
Change functions to static | #define DEBUG 0
/*---------------------------------------------------------------------------*/
-void
+static void
slipnet_init(void)
{
}
@@ -68,7 +68,7 @@ slip_send_packet(const uint8_t *ptr, int len)
slip_arch_writeb(SLIP_END);
}
/*---------------------------------------------------------------------------*/
-void
+static void
slipnet_input(void)
{
int i;
|
Fixed redux on production build | import { createStore, applyMiddleware } from "redux";
import thunk from "redux-thunk";
import rootReducer from "../reducers/rootReducer";
-import { composeWithDevTools } from 'redux-devtools-extension';
-export default function configureStore() {
- // return createStore(
- // rootReducer,
- // window.__REDUX_DEVTOOLS_EXTENSION__ &&
- // window.__REDUX_DEVTOOLS_EXTENSION__(),
- // applyMiddleware(thunk)
- // );
+const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
+export default function configureStore() {
return createStore(
rootReducer,
- composeWithDevTools(
+ composeEnhancers(
applyMiddleware(thunk)
)
);
|
Add summary at end of test. | //
#include <pappl/base-private.h>
+#include <cups/dir.h>
#include "testpappl.h"
#include <stdlib.h>
#include <limits.h>
@@ -54,6 +55,7 @@ typedef struct _pappl_testdata_s // Test data
{
cups_array_t *names; // Tests to run
pappl_system_t *system; // System
+ const char *outdirname; // Output directory
} _pappl_testdata_t;
@@ -374,7 +376,7 @@ main(int argc, // I - Number of command-line arguments
// Run any test(s)...
if (cupsArrayCount(testdata.names))
{
-
+ testdata.outdirname = outdirname;
testdata.system = system;
if (pthread_create(&testid, NULL, (void *(*)(void *))run_tests, &testdata))
@@ -708,6 +710,10 @@ run_tests(_pappl_testdata_t *testdata) // I - Testing data
{
const char *name; // Test name
void *ret = NULL; // Return thread status
+ cups_dir_t *dir; // Output directory
+ cups_dentry_t *dent; // Output file
+ int files = 0; // Total file count
+ off_t total = 0; // Total output size
#ifdef HAVE_LIBJPEG
static const char * const jpeg_files[] =
{ // List of JPEG files to print
@@ -780,8 +786,28 @@ run_tests(_pappl_testdata_t *testdata) // I - Testing data
}
}
+ // Summarize results...
+ if ((dir = cupsDirOpen(testdata->outdirname)) != NULL)
+ {
+ while ((dent = cupsDirRead(dir)) != NULL)
+ {
+ if (S_ISREG(dent->fileinfo.st_mode))
+ {
+ files ++;
+ total += dent->fileinfo.st_size;
+ }
+ }
+
+ cupsDirClose(dir);
+ }
+
papplSystemShutdown(testdata->system);
+ if (ret)
+ printf("\nFAILED: %d output file(s), %.1fMB\n", files, total / 1048576.0);
+ else
+ printf("\nPASSED: %d output file(s), %.1fMB\n", files, total / 1048576.0);
+
return (ret);
}
|
Fix potential issue with PwmPin::GetChannel
Add code to remove warning about unused parameters | int Library_win_dev_pwm_native_Windows_Devices_Pwm_PwmPin::GetChannel (int pin, int timerId)
{
+ (void)pin;
+ (void)timerId;
+
int channel = 0;
#if defined(STM32F427xx) || defined(STM32F429xx)
switch (timerId)
|
Sync CHANGES.md and NEWS.md with 3.1 release | @@ -8,6 +8,7 @@ OpenSSL Releases
----------------
- [OpenSSL 3.2](#openssl-32)
+ - [OpenSSL 3.1](#openssl-31)
- [OpenSSL 3.0](#openssl-30)
- [OpenSSL 1.1.1](#openssl-111)
- [OpenSSL 1.1.0](#openssl-110)
@@ -19,7 +20,7 @@ OpenSSL Releases
OpenSSL 3.2
-----------
-### Major changes between OpenSSL 3.0 and OpenSSL 3.2 [under development]
+### Major changes between OpenSSL 3.1 and OpenSSL 3.2 [under development]
* Added support for certificate compression (RFC8879), including
library support for Brotli and Zstandard compression.
@@ -27,7 +28,17 @@ OpenSSL 3.2
by default.
* TCP Fast Open (RFC7413) support is available on Linux, macOS, and FreeBSD
where enabled and supported.
+
+OpenSSL 3.1
+-----------
+
+### Major changes between OpenSSL 3.0 and OpenSSL 3.1.0 [under development]
+
* SSL 3, TLS 1.0, TLS 1.1, and DTLS 1.0 only work at security level 0.
+ * Performance enhancements and new platform support including new
+ assembler code algorithm implementations.
+ * Deprecated LHASH statistics functions.
+ * FIPS 140-3 compliance changes.
OpenSSL 3.0
-----------
|
Fix filtered handle highlighting | @@ -2398,6 +2398,41 @@ VOID PhProcessProviderUpdate(
}
}
+ if (processItem->QueryHandle && processItem->IsHandleValid)
+ {
+ OBJECT_BASIC_INFORMATION basicInfo;
+ BOOLEAN filteredHandle = FALSE;
+
+ if (NT_SUCCESS(PhGetHandleInformationEx(
+ NtCurrentProcess(),
+ processItem->QueryHandle,
+ ULONG_MAX,
+ 0,
+ NULL,
+ &basicInfo,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+ )))
+ {
+ if ((basicInfo.GrantedAccess & PROCESS_QUERY_INFORMATION) != PROCESS_QUERY_INFORMATION)
+ {
+ filteredHandle = TRUE;
+ }
+ }
+ else
+ {
+ filteredHandle = TRUE;
+ }
+
+ if (processItem->IsProtectedHandle != filteredHandle)
+ {
+ processItem->IsProtectedHandle = filteredHandle;
+ modified = TRUE;
+ }
+ }
+
if (modified)
{
PhInvokeCallback(PhGetGeneralCallback(GeneralCallbackProcessProviderModifiedEvent), processItem);
|
Additional warnings in cipher.h | @@ -89,8 +89,8 @@ typedef enum {
/**
* \brief Supported {cipher type, cipher mode} pairs.
*
- * \warning DES is considered weak cipher and its use
- * constitutes a security risk. Arm recommends considering stronger
+ * \warning DES/3DES are considered weak ciphers and their use
+ * constitutes a security risk. We recommend considering stronger
* ciphers instead.
*/
typedef enum {
@@ -126,12 +126,12 @@ typedef enum {
MBEDTLS_CIPHER_CAMELLIA_128_GCM, /**< Camellia cipher with 128-bit GCM mode. */
MBEDTLS_CIPHER_CAMELLIA_192_GCM, /**< Camellia cipher with 192-bit GCM mode. */
MBEDTLS_CIPHER_CAMELLIA_256_GCM, /**< Camellia cipher with 256-bit GCM mode. */
- MBEDTLS_CIPHER_DES_ECB, /**< DES cipher with ECB mode. */
- MBEDTLS_CIPHER_DES_CBC, /**< DES cipher with CBC mode. */
- MBEDTLS_CIPHER_DES_EDE_ECB, /**< DES cipher with EDE ECB mode. */
- MBEDTLS_CIPHER_DES_EDE_CBC, /**< DES cipher with EDE CBC mode. */
- MBEDTLS_CIPHER_DES_EDE3_ECB, /**< DES cipher with EDE3 ECB mode. */
- MBEDTLS_CIPHER_DES_EDE3_CBC, /**< DES cipher with EDE3 CBC mode. */
+ MBEDTLS_CIPHER_DES_ECB, /**< DES cipher with ECB mode. \warning DES is considered weak. */
+ MBEDTLS_CIPHER_DES_CBC, /**< DES cipher with CBC mode. \warning DES is considered weak. */
+ MBEDTLS_CIPHER_DES_EDE_ECB, /**< DES cipher with EDE ECB mode. \warning 3DES is considered weak. */
+ MBEDTLS_CIPHER_DES_EDE_CBC, /**< DES cipher with EDE CBC mode. \warning 3DES is considered weak. */
+ MBEDTLS_CIPHER_DES_EDE3_ECB, /**< DES cipher with EDE3 ECB mode. \warning 3DES is considered weak. */
+ MBEDTLS_CIPHER_DES_EDE3_CBC, /**< DES cipher with EDE3 CBC mode. \warning 3DES is considered weak. */
MBEDTLS_CIPHER_AES_128_CCM, /**< AES cipher with 128-bit CCM mode. */
MBEDTLS_CIPHER_AES_192_CCM, /**< AES cipher with 192-bit CCM mode. */
MBEDTLS_CIPHER_AES_256_CCM, /**< AES cipher with 256-bit CCM mode. */
@@ -217,11 +217,11 @@ typedef enum {
enum {
/** Undefined key length. */
MBEDTLS_KEY_LENGTH_NONE = 0,
- /** Key length, in bits (including parity), for DES keys. */
+ /** Key length, in bits (including parity), for DES keys. \warning DES is considered weak. */
MBEDTLS_KEY_LENGTH_DES = 64,
- /** Key length in bits, including parity, for DES in two-key EDE. */
+ /** Key length in bits, including parity, for DES in two-key EDE. \warning 3DES is considered weak. */
MBEDTLS_KEY_LENGTH_DES_EDE = 128,
- /** Key length in bits, including parity, for DES in three-key EDE. */
+ /** Key length in bits, including parity, for DES in three-key EDE. \warning 3DES is considered weak. */
MBEDTLS_KEY_LENGTH_DES_EDE3 = 192,
};
|
upload pier on succesful build | @@ -10,3 +10,14 @@ before_install:
before_script: bash make-pill.sh
+deploy:
+ skip_cleanup: true
+ provider: gcs
+ access_key_id: GOOGW5WD4W7RF3TQ5EBM
+ secret_access_key:
+ secure: cbMrx/jloYtTiMc9b+gujrpdzmB05yHC7C2PN1dqHoe25JqwS1c8ne0jhzYOanSkJptPEjwpKeEYLyF87CStCglMJaHwsx1wAm94D8Vh6WL96pgxFbMdVRD+g2dAcSXYnSX5C0QpFrnxY8ujg9yqhItpvd+whsPYjxZahIUd5rPPS1gCP2O6hGpKFCv5++DB1RgqL5y1Hlm9efsLxsnkS7cuzrSX6o8I6Yns5pFlDDRED7Tgpp5DYYfq6ZmiIpxbuYZK+AYJKK7N2zC4RfFXstgL+M9h7joFE1r8RlzrVHLXL7+3qg8POWEEu47008ORByDCmlt5VKoMBJ3q4J4ykDKI2qmx3jw68tGIu2o5uVf6KpxtAM2IJSNZ4mOEYjs7ieR1GOrLKr7lSSYEOIShJhx7J1MMjBOaS17Ho7Uc4iNLGpH4M7DpiKwVLnjfsYiasv/1xq71ed386wLTpI5YyY/SfsNPoIbgv1IjkKIMRLl5l85tEUK10h8dxQi3mXeaP698LnQLdHdxeBKJB08hwJrl7kIOJnqZxWPBp8i7OQeIvKcu+WzMg5UIR4hR7wj7NEga/+1jjjDQeo7EHQB2Tk9dhXtTmozOGpsW49H7+VBThhhNODEYeX3CIcdOtSyjuwBLZ45HsKIhhWA00b+YyE8boBkV1yQeFh/IYCZBn7s=
+ bucket: ci-piers.urbit.org
+ local-dir: .travis/zod
+ on:
+ repo: urbit/arvo
+ all_branches: true
|
Possible edge case GC protection | @@ -403,8 +403,12 @@ static void *iodine_on_pubsub_call_block(void *msg_) {
fio_msg_s *msg = msg_;
VALUE args[2];
args[0] = rb_str_new(msg->channel.data, msg->channel.len);
+ IodineStore.add(args[0]);
args[1] = rb_str_new(msg->msg.data, msg->msg.len);
+ IodineStore.add(args[1]);
IodineCaller.call2((VALUE)msg->udata2, call_id, 2, args);
+ IodineStore.remove(args[1]);
+ IodineStore.remove(args[0]);
return NULL;
}
|
libcupsfilters: More manufacturer name fixes in ieee1284NormalizeMakeAndModel() | @@ -915,6 +915,15 @@ ieee1284NormalizeMakeAndModel(
snprintf(buffer, bufsize, "HP %s", make_and_model);
modelptr = buffer + 3;
}
+ else if (!strncasecmp(make_and_model, "ecosys", 6))
+ {
+ /*
+ * Kyocera...
+ */
+
+ snprintf(buffer, bufsize, "Kyocera %s", make_and_model);
+ modelptr = buffer + 8;
+ }
/*
* Known make names with space
@@ -929,6 +938,9 @@ ieee1284NormalizeMakeAndModel(
else if (strncasecmp(buffer, "lexmark international", 21) &&
isspace(buffer[21]))
modelptr = buffer + 22;
+ else if (strncasecmp(buffer, "kyocera mita", 12) &&
+ isspace(buffer[12]))
+ modelptr = buffer + 13;
/*
* Consider the first space as separation between make and model
@@ -1037,6 +1049,19 @@ ieee1284NormalizeMakeAndModel(
bufptr += 4;
}
+ bufptr = buffer;
+ while ((bufptr = strcasestr(bufptr, "TOSHIBA TEC Corp.")) != NULL)
+ {
+ /*
+ * Strip "TEC Corp."...
+ */
+
+ moverightpart(buffer, bufsize, bufptr + 7, -10);
+ if (modelptr >= bufptr + 17)
+ modelptr -= 10;
+ bufptr += 7;
+ }
+
/*
* Remove repeated manufacturer names...
*/
|
tcmu:fix return data length of rtpg response data | @@ -374,7 +374,7 @@ int tcmu_emulate_report_tgt_port_grps(struct tcmu_device *dev,
int next_off = off + 8 + (group->num_tgt_ports * 4);
if (next_off > alloc_len) {
- ret_data_len += next_off;
+ ret_data_len += 8 + (group->num_tgt_ports * 4);
continue;
}
|
[timer] Fix the bug that the linked list is still mounted when the single timer is not modified | @@ -579,7 +579,7 @@ void rt_timer_check(void)
{
continue;
}
-
+ rt_list_remove(&(t->row[RT_TIMER_SKIP_LIST_LEVEL - 1]));
if ((t->parent.flag & RT_TIMER_FLAG_PERIODIC) &&
(t->parent.flag & RT_TIMER_FLAG_ACTIVATED))
{
@@ -667,7 +667,7 @@ void rt_soft_timer_check(void)
{
continue;
}
-
+ rt_list_remove(&(t->row[RT_TIMER_SKIP_LIST_LEVEL - 1]));
if ((t->parent.flag & RT_TIMER_FLAG_PERIODIC) &&
(t->parent.flag & RT_TIMER_FLAG_ACTIVATED))
{
|
Change library suffix for Ruby only on Windows | @@ -1224,8 +1224,8 @@ function(tinyspline_add_swig_library)
PROPERTY SUFFIX ".dylib"
)
endif()
- # Fix library suffix for Ruby.
- if(${ARGS_LANG} STREQUAL "ruby")
+ # Fix library suffix for Ruby on Windows.
+ if(${ARGS_LANG} STREQUAL "ruby" AND ${TINYSPLINE_PLATFORM_IS_WINDOWS})
set_property(
TARGET ${ARGS_TARGET}
APPEND
|
cleanup and fix handling of dup'd fd
avoid fd leak, move ownership of fd to handling code | @@ -1528,8 +1528,7 @@ static void async_read_ready(h2o_socket_t *listener, const char *err)
// reset async
assert(adata->client.sock->async.enabled);
adata->client.sock->async.enabled = 0;
- do_close_socket(listener);
- do_dispose_socket(listener);
+ dispose_socket(listener, NULL);
if (err != NULL) {
return;
@@ -1544,11 +1543,14 @@ static void async_ssl_on_close(void *data)
if (adata->client.sock->async.enabled) {
// closing ssl, resume async transaction if pending to allow
- // resources to be freed in async_on_close
+ // resources to be freed in async_on_close. In the case of ptls,
+ // this is done in `ptls_free` by calling a cancelation callback
+ if (adata->client.sock->ssl->ossl != NULL) {
if (SSL_waiting_for_async(adata->client.sock->ssl->ossl)) {
SSL_do_handshake(adata->client.sock->ssl->ossl);
}
}
+ }
// call original cb
adata->client.ssl.on_close_cb(adata->client.ssl.on_close_data);
@@ -1561,8 +1563,7 @@ static void async_on_close(void *data)
// cancel async callback
if (adata->client.sock->async.enabled) {
- do_close_socket(adata->async_sock);
- do_dispose_socket(adata->async_sock);
+ dispose_socket(adata->async_sock, NULL);
}
do_delayed_handshakes(adata->client.sock);
@@ -1575,10 +1576,11 @@ static void async_on_close(void *data)
static void do_ssl_async(h2o_socket_t *sock)
{
+ int async_fd;
+
async_handshake_in_flight = sock;
assert(!sock->async.enabled);
sock->async.enabled = 1;
- int async_fd;
if (sock->ssl->ptls != NULL) {
async_fd = ptls_openssl_get_async_fd(sock->ssl->ptls);
} else {
@@ -1591,6 +1593,9 @@ static void do_ssl_async(h2o_socket_t *sock)
SSL_get_all_async_fds(sock->ssl->ossl, fds, &numfds);
async_fd = fds[0];
}
+ // dup the fd as h2o socket handling will close it
+ async_fd = dup(async_fd);
+ assert(async_fd != -1);
// add async fd to event loop in order to retry when openssl engine is ready
#if H2O_USE_LIBUV
|
Print scrcpy header first
Inconditionnally print the scrcpy version first, without using LOGI().
The log level is configured only after parsing the command line
parameters (it may be changed via -V), and command line parsing logs
should not appear before the scrcpy version. | @@ -47,6 +47,9 @@ main(int argc, char *argv[]) {
setbuf(stderr, NULL);
#endif
+ printf("scrcpy " SCRCPY_VERSION
+ " <https://github.com/Genymobile/scrcpy>\n");
+
struct scrcpy_cli_args args = {
.opts = scrcpy_options_default,
.help = false,
@@ -73,8 +76,6 @@ main(int argc, char *argv[]) {
return 0;
}
- LOGI("scrcpy " SCRCPY_VERSION " <https://github.com/Genymobile/scrcpy>");
-
#ifdef SCRCPY_LAVF_REQUIRES_REGISTER_ALL
av_register_all();
#endif
|
Fixed a small typo in the readme. | @@ -33,7 +33,7 @@ Notable aspects of the design include:
due to free list sharding) the memory is marked to the OS as unused ("reset" or "purged")
reducing (real) memory pressure and fragmentation, especially in long running
programs.
-- __secure__: _mimalloc_ can be build in secure mode, adding guard pages,
+- __secure__: _mimalloc_ can be built in secure mode, adding guard pages,
randomized allocation, encrypted free lists, etc. to protect against various
heap vulnerabilities. The performance penalty is only around 3% on average
over our benchmarks.
|
interop: Disable PMTUD for ecn test case
Disable PMTUD for ecn test case because ngtcp2 does not set ECN bit
for PMTUD packets. | @@ -44,6 +44,9 @@ if [ "$ROLE" == "client" ]; then
if [ "$TESTCASE" == "v2" ]; then
CLIENT_ARGS="$CLIENT_ARGS --other-versions v2draft,v1"
fi
+ if [ "$TESTCASE" == "ecn" ]; then
+ CLIENT_ARGS="$CLIENT_ARGS --no-pmtud"
+ fi
if [ "$TESTCASE" == "resumption" ] || [ "$TESTCASE" == "zerortt" ]; then
CLIENT_ARGS="$CLIENT_ARGS --session-file session.txt --tp-file tp.txt"
if [ "$TESTCASE" == "resumption" ]; then
@@ -75,6 +78,8 @@ elif [ "$ROLE" == "server" ]; then
SERVER_ARGS="$SERVER_ARGS --timeout=180s --handshake-timeout=180s"
elif [ "$TESTCASE" == "v2" ]; then
SERVER_ARGS="$SERVER_ARGS --preferred-versions v2draft"
+ elif [ "$TESTCASE" == "ecn" ]; then
+ SERVER_ARGS="$SERVER_ARGS --no-pmtud"
fi
$SERVER_BIN '*' 443 $SERVER_ARGS $SERVER_PARAMS &> $LOG
|
Add cookies write in client hello | @@ -688,6 +688,48 @@ static int ssl_tls13_parse_cookie_ext( mbedtls_ssl_context *ssl,
return( 0 );
}
+static int ssl_tls13_write_cookie_ext( mbedtls_ssl_context *ssl,
+ unsigned char* buf,
+ unsigned char* end,
+ size_t* olen )
+{
+ unsigned char *p = buf;
+
+ *olen = 0;
+
+ if( ssl->handshake->verify_cookie == NULL )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 3, ( "no cookie to send; skip extension" ) );
+ return( 0 );
+ }
+
+ MBEDTLS_SSL_DEBUG_BUF( 3, "client hello, cookie",
+ ssl->handshake->verify_cookie,
+ ssl->handshake->verify_cookie_len );
+
+ MBEDTLS_SSL_CHK_BUF_PTR( p, end, 2 );
+ p += 2;
+ MBEDTLS_SSL_CHK_BUF_PTR( p, end, ssl->handshake->verify_cookie_len + 4 );
+
+ MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, adding cookie extension" ) );
+
+ /* Extension Type */
+ MBEDTLS_PUT_UINT16_BE( MBEDTLS_TLS_EXT_COOKIE, p, 0 );
+
+ /* Extension Length */
+ MBEDTLS_PUT_UINT16_BE( ssl->handshake->verify_cookie_len + 2, p, 0 );
+
+ /* Cookie Length */
+ MBEDTLS_PUT_UINT16_BE( ssl->handshake->verify_cookie_len, p, 0 );
+
+ /* Cookie */
+ memcpy( p, ssl->handshake->verify_cookie, ssl->handshake->verify_cookie_len );
+
+ *olen = ssl->handshake->verify_cookie_len + 6;
+
+ return( 0 );
+}
+
/* Write cipher_suites
* CipherSuite cipher_suites<2..2^16-2>;
*/
@@ -873,6 +915,13 @@ static int ssl_tls13_write_client_hello_body( mbedtls_ssl_context *ssl,
p += output_len;
#endif /* MBEDTLS_SSL_ALPN */
+ /* For TLS / DTLS 1.3 we need to support the use of cookies
+ * ( if the server provided them ) */
+ ret = ssl_tls13_write_cookie_ext( ssl, p, end, &output_len );
+ if( ret != 0 )
+ return( ret );
+ p += output_len;
+
#if defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED)
/*
|
Add message indicating that node.sleep() was disabled during build. | @@ -108,13 +108,18 @@ static int node_sleep( lua_State* L )
cfg.resume_cb_ptr = &node_sleep_resume_cb;
pmSleep_suspend(&cfg);
#else
- c_printf("\n The option \"timer_suspend_enable\" in \"app/include/user_config.h\" was disabled during FW build!\n");
- return luaL_error(L, "light sleep is unavailable");
+ dbg_printf("\n The option \"TIMER_SUSPEND_ENABLE\" in \"app/include/user_config.h\" was disabled during FW build!\n");
+ return luaL_error(L, "node.sleep() is unavailable");
#endif
return 0;
}
+#else
+static int node_sleep( lua_State* L )
+{
+ dbg_printf("\n The options \"TIMER_SUSPEND_ENABLE\" and \"PMSLEEP_ENABLE\" in \"app/include/user_config.h\" were disabled during FW build!\n");
+ return luaL_error(L, "node.sleep() is unavailable");
+}
#endif //PMSLEEP_ENABLE
-
static int node_info( lua_State* L )
{
lua_pushinteger(L, NODE_VERSION_MAJOR);
@@ -600,8 +605,8 @@ static const LUA_REG_TYPE node_map[] =
{ LSTRKEY( "restart" ), LFUNCVAL( node_restart ) },
{ LSTRKEY( "dsleep" ), LFUNCVAL( node_deepsleep ) },
{ LSTRKEY( "dsleepMax" ), LFUNCVAL( dsleepMax ) },
-#ifdef PMSLEEP_ENABLE
{ LSTRKEY( "sleep" ), LFUNCVAL( node_sleep ) },
+#ifdef PMSLEEP_ENABLE
PMSLEEP_INT_MAP,
#endif
{ LSTRKEY( "info" ), LFUNCVAL( node_info ) },
|
Update documentation in man pages | .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "ELEKTRA\-PLUGINS" "7" "October 2019" "" ""
+.TH "ELEKTRA\-PLUGINS" "7" "November 2019" "" ""
.
.SH "NAME"
\fBelektra\-plugins\fR \- plugins overview
@@ -125,6 +125,9 @@ augeas \fIaugeas/\fR reads/writes many different configuration files using the a
hosts \fIhosts/\fR reads/writes hosts files
.
.IP "\(bu" 4
+kconfig \fIkconfig/\fR reads/writes KConfig ini files
+.
+.IP "\(bu" 4
line \fIline/\fR reads/writes any file line by line
.
.IP "\(bu" 4
|
TLSv1.3 alert and handshake messages can never be 0 length
We abort if we read a message like this. | @@ -644,6 +644,15 @@ int ssl3_get_record(SSL *s)
&thisrr->data[end], 1, s, s->msg_callback_arg);
}
+ if (SSL_IS_TLS13(s)
+ && (thisrr->type == SSL3_RT_HANDSHAKE
+ || thisrr->type == SSL3_RT_ALERT)
+ && thisrr->length == 0) {
+ al = SSL_AD_UNEXPECTED_MESSAGE;
+ SSLerr(SSL_F_SSL3_GET_RECORD, SSL_R_BAD_LENGTH);
+ goto f_err;
+ }
+
if (thisrr->length > SSL3_RT_MAX_PLAIN_LENGTH) {
al = SSL_AD_RECORD_OVERFLOW;
SSLerr(SSL_F_SSL3_GET_RECORD, SSL_R_DATA_LENGTH_TOO_LONG);
|
python handler: make writes blocking | @@ -38,6 +38,7 @@ class Handler(object):
self._receive_thread.daemon = True
self._sinks = [] # This is a list of weakrefs to upstream iterators
self._dead = False
+ self._write_lock = threading.Lock()
def _recv_thread(self):
"""
@@ -241,6 +242,7 @@ class Handler(object):
self.remove_callback(cb, msg_type)
def __call__(self, msg, **metadata):
+ with self._write_lock:
self._source(msg, **metadata)
class _SBPQueueIterator(object):
|
Fix issue where unable to add new scenes | @@ -307,10 +307,10 @@ const addScene = (state, action) => {
const defaultActors = defaults.actors || [];
const defaultTriggers = defaults.triggers || [];
- const actorNewIdLookup = defaults.actors.reduce((memo, actor) => {
+ const actorNewIdLookup = defaultActors.reduce((memo, actor) => {
return { ...memo, [actor.id]: uuid() };
}, {});
- const triggerNewIdLookup = defaults.triggers.reduce((memo, actor) => {
+ const triggerNewIdLookup = defaultTriggers.reduce((memo, actor) => {
return { ...memo, [actor.id]: uuid() };
}, {});
const newIdsLookup = Object.assign({}, actorNewIdLookup, triggerNewIdLookup);
|
Add davemarchevsky to CODEOWNERS for everything
I can't figure out how to get emailed for all PRs, and I'm doing reviews for the whole repo, so add self to codeowners everywhere. | # see https://help.github.com/articles/about-codeowners/ for syntax
# Miscellaneous
-* @drzaeus77 @goldshtn @yonghong-song @4ast @brendangregg
+* @drzaeus77 @goldshtn @yonghong-song @4ast @brendangregg @davemarchevsky
# Documentation
-/docs/ @brendangregg @goldshtn
-/man/ @brendangregg @goldshtn
+/docs/ @brendangregg @goldshtn @davemarchevsky
+/man/ @brendangregg @goldshtn @davemarchevsky
# Tools
-/tools/ @brendangregg @goldshtn
+/tools/ @brendangregg @goldshtn @davemarchevsky
# Compiler, C API
-/src/cc/ @drzaeus77 @yonghong-song @4ast
+/src/cc/ @drzaeus77 @yonghong-song @4ast @davemarchevsky
# Python API
-/src/python/ @drzaeus77 @goldshtn
+/src/python/ @drzaeus77 @goldshtn @davemarchevsky
# Tests
-/tests/ @drzaeus77 @yonghong-song
+/tests/ @drzaeus77 @yonghong-song @davemarchevsky
|
fix: mkdir creating a mkdir dir | @@ -141,7 +141,7 @@ test: common discord slack github reddit $(TEST_EXES)
mkdir :
mkdir -p $(ACTOR_OBJDIR)/common/third-party $(ACTOR_OBJDIR)/specs
mkdir -p $(OBJDIR)/common/third-party $(LIBDIR)
- $(foreach var, $(SPECS_SUBDIR), @mkdir -p $(SPECSDIR)/$(var) $(OBJDIR)/$(SPECSDIR)/$(var))
+ $(foreach var, $(SPECS_SUBDIR), mkdir -p $(SPECSDIR)/$(var) $(OBJDIR)/$(SPECSDIR)/$(var))
mkdir -p $(OBJDIR)/test
mkdir -p $(OBJDIR)/sqlite3
mkdir -p $(OBJDIR)/add-ons
@@ -167,7 +167,7 @@ all_headers: $(SPECS)
actor-gen.exe: mkdir $(ACTOR_GEN_OBJS)
$(ACC) -o $@ $(ACTOR_GEN_OBJS) -lm
- @ mkdir -p bin
+ mkdir -p bin
mv $@ ./bin
#generic compilation
|
BugID:19278468:Add config options for link params | #ifndef BLE_CONFIG_H
#define BLE_CONFIG_H
-/**
- * CONFIG_BT: Tx thread stack size
- */
-
-#ifndef CONFIG_BT_HCI_TX_STACK_SIZE
#define CONFIG_BT_HCI_TX_STACK_SIZE 512
-#endif
-#ifndef CONFIG_BT_HCI_CMD_COUNT
#define CONFIG_BT_HCI_CMD_COUNT 16
+
+#ifdef CONFIG_BLE_LINK_PARAMETERS
+#define CONFIG_SUP_TO_LIMIT 400
+#define CONFIG_CONN_SUP_TIMEOUT 400
+#define CONFIG_CONN_INTERVAL_MIN 24
+#define CONFIG_CONN_INTERVAL_MAX 40
#endif
#if defined(__cplusplus)
|
[afl][fuzz] Add some checks | @@ -282,6 +282,9 @@ if(eapleap->leapversion != 1)
return false;
eaplen = htobe16(eapleap->eaplen);
+if((eaplen <= 8) || (eaplen > 258 +16))
+ return false;
+
if((eapleap->eapcode == EAP_CODE_REQ) && (eapleap->leapcount == 8))
{
memcpy(&hcleap.mac_ap1, mac_2, 6);
@@ -893,7 +896,7 @@ memcpy(neweapdbdata->mac_ap.addr, mac_ap, 6);
memcpy(neweapdbdata->mac_sta.addr, mac_sta, 6);
neweapdbdata->eapol_len = htobe16(eap->len) +4;
-if(neweapdbdata->eapol_len > 256)
+if(neweapdbdata->eapol_len > 256 -4)
return false;
memcpy(neweapdbdata->eapol, eap, neweapdbdata->eapol_len);
|
Fix netlink constant in lukefile | @@ -78,7 +78,7 @@ modules = {
['posix.sys.socket'] = {
defines = {
HAVE_NET_IF_H = {checkheader='net/if.h', include='sys/socket.h'},
- HAVE_NETLINK_H = {checkheader='linux/netlink.h', include='sys/socket.h'},
+ HAVE_LINUX_NETLINK_H = {checkheader='linux/netlink.h', include='sys/socket.h'},
},
libraries = {
{checksymbol='socket', library='socket'},
|
symtab: Fix outdated comments on a function. | @@ -762,18 +762,14 @@ lily_class *lily_new_raw_class(const char *name, uint16_t line_num)
return new_class;
}
-/* This creates a new class entity. This entity is used for, well, more than it
- should be. The entity is going to be either an enum, a variant, or a
- user-defined class. The class is assumed to be refcounted, because it usually
- is.
- The new class is automatically linked up to the current module. No default
- type is created, in case the newly-made class ends up needing generics. */
+/* This creates a new class-like entity (class or enum) that's linked into the
+ current module's class-like listing. The new class-like entry is given the
+ next available id. */
lily_class *lily_new_class(lily_symtab *symtab, const char *name,
uint16_t line_num)
{
lily_class *new_class = lily_new_raw_class(name, line_num);
- /* Builtin classes will override this. */
new_class->module = symtab->active_module;
new_class->line_num = line_num;
|
Shorten stack.yaml | -# This file was automatically generated by 'stack init'
-#
-# Some commonly used options have been documented as comments in this file.
-# For advanced use and comprehensive documentation of the format, please see:
-# https://docs.haskellstack.org/en/stable/yaml_configuration/
-
-# Resolver to choose a 'specific' stackage snapshot or a compiler version.
-# A snapshot resolver dictates the compiler version and the set of packages
-# to be used for project dependencies. For example:
-#
-# resolver: lts-3.5
-# resolver: nightly-2015-09-21
-# resolver: ghc-7.10.2
-#
-# The location of a snapshot can be provided as a file or url. Stack assumes
-# a snapshot provided as a file might change, whereas a url resource does not.
-#
-# resolver: ./custom-snapshot.yaml
-# resolver: https://example.com/snapshots/2018-01-01.yaml
resolver: lts-13.18
-
-# User packages to be built.
-# Various formats can be used as shown in the example below.
-#
-# packages:
-# - some-directory
-# - https://example.com/foo/bar/baz-0.0.2.tar.gz
-# - location:
-# git: https://github.com/commercialhaskell/stack.git
-# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
-# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a
-# subdirs:
-# - auto-update
-# - wai
packages:
- .
-# Dependency packages to be pulled from upstream that are not in the resolver
-# using the same syntax as the packages field.
-# (e.g., acme-missiles-0.3)
-# extra-deps: []
-
-# Override default flag values for local packages and extra-deps
-# flags: {}
-
-# Extra package databases containing global packages
-# extra-package-dbs: []
-
-# Control whether we use the GHC we find on the path
-# system-ghc: true
-#
-# Require a specific version of stack, using version ranges
-# require-stack-version: -any # Default
-# require-stack-version: ">=1.9"
-#
-# Override the architecture used by stack, especially useful on Windows
-# arch: i386
-# arch: x86_64
-#
-# Extra directories used by stack for building
-# extra-include-dirs: [/path/to/dir]
-# extra-lib-dirs: [/path/to/dir]
-#
-# Allow a newer minor version of GHC than the snapshot specifies
-# compiler-check: newer-minor
|
Flip cubemap x texture coordinate; | @@ -114,7 +114,7 @@ const char* lovrCubeVertexShader = ""
const char* lovrCubeFragmentShader = ""
"in vec3 texturePosition[2]; \n"
"vec4 color(vec4 graphicsColor, sampler2D image, vec2 uv) { \n"
-" return graphicsColor * texture(lovrEnvironmentTexture, texturePosition[lovrViewportIndex]); \n"
+" return graphicsColor * texture(lovrEnvironmentTexture, texturePosition[lovrViewportIndex] * vec3(-1, 1, 1)); \n"
"}";
const char* lovrPanoFragmentShader = ""
|
tools/version: generate dummy version without breakout | @@ -76,7 +76,7 @@ if [ -z ${VERSION} ] ; then
# If the VERSION does not match X.Y.Z, retrieve version from the tag
if [[ ! ${VERSION} =~ ([0-9]+)\.([0-9]+)\.([0-9]+) ]] ; then
- VERSION=`git -C ${WD} -c 'versionsort.suffix=-' tag --sort=v:refname | grep -E "nuttx-[0-9]+\.[0-9]+\.[0-9]+" | tail -1 | cut -d'-' -f2-`
+ VERSION=`git -C ${WD} -c 'versionsort.suffix=-' tag --sort=v:refname 2>/dev/null | grep -E "nuttx-[0-9]+\.[0-9]+\.[0-9]+" | tail -1 | cut -d'-' -f2-`
fi
fi
@@ -117,12 +117,11 @@ PATCH=`echo ${VERSION} | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+" | cut -d'.' -f3`
# Get GIT information (if not provided on the command line)
if [ -z "${BUILD}" ]; then
- BUILD=`git -C ${WD} log --oneline -1 | cut -d' ' -f1 2>/dev/null`
+ BUILD=`git -C ${WD} log --oneline -1 2>/dev/null | cut -d' ' -f1`
if [ -z "${BUILD}" ]; then
echo "GIT version information is not available"
- exit 5
fi
- if [ -n "`git -C ${WD} diff-index --name-only HEAD | head -1`" ]; then
+ if [ -n "`git -C ${WD} diff-index --name-only HEAD 2>/dev/null | head -1`" ]; then
BUILD=${BUILD}-dirty
fi
fi
|
make the location more flexible | @@ -130,7 +130,7 @@ typedef struct clap_preset_location {
// name of this location
char name[CLAP_NAME_SIZE];
- // path to a directory on the file system in which preset can be found
+ // path to a directory or a file on the file system in which preset can be found
char path[CLAP_URI_SIZE];
} clap_preset_location_t;
|
revert some tries | :- module(decoding_net4).
:- lib(ic).
-:- lib(timeout_simple).
%%% Bottom layer is storing the following facts in the State
@@ -431,6 +430,9 @@ region_free_bound(S, Reg) :-
%RBase #>= 0 ;
RBase #>= CLimit ;
% In case that allocation doesnt work, just get me any.
+ Reg = region(Id, block(RBase, _)),
+ CReg = region(Id, _),
+ not(state_has_in_use(S, CReg)),
RBase #>= 0.
@@ -588,7 +590,6 @@ alias_conf(S, R1, R2, Conf) :-
region_size(R1, R1Size),
region_alloc_test(S, R2, R1Size, 21),
route(S, R2, D, Conf).
- %timeout(route(S, R2, D, Conf), 3, fail).
region_alloc_multiple(_, [], _, _).
|
Fix I2C driver for Write/Read operations | #include "Esp32_DeviceMapping.h"
+static const char* TAG = "I2C";
///////////////////////////////////////////////////////////////////////////////////////
// !!! KEEP IN SYNC WITH Windows.Devices.I2c.I2cSharingMode (in managed code) !!! //
@@ -186,17 +187,21 @@ HRESULT Library_win_dev_i2c_native_Windows_Devices_I2c_I2cDevice::NativeTransmit
}
i2c_cmd_handle_t cmd = i2c_cmd_link_create();
- i2c_master_start(cmd);
- int ReadWrite = (readSize > 0) ? I2C_MASTER_READ : I2C_MASTER_WRITE;
- i2c_master_write_byte( cmd, ( slaveAddress << 1 ) | ReadWrite, 1);
if ( writeSize != 0 ) // Write
{
- i2c_master_write(cmd, &writeData[0], writeSize, true);
+ i2c_master_start(cmd);
+ i2c_master_write_byte( cmd, ( slaveAddress << 1 ) | I2C_MASTER_WRITE, 1);
+ i2cStatus = i2c_master_write(cmd, &writeData[0], writeSize, true);
+ if (i2cStatus != ESP_OK) ESP_LOGE( TAG, "i2c_master_write error:%d", i2cStatus );
+
}
if (readSize != 0 ) // Read
{
+ i2c_master_start(cmd);
+ i2c_master_write_byte( cmd, ( slaveAddress << 1 ) | I2C_MASTER_READ, 1);
i2cStatus = i2c_master_read(cmd, &readData[0], readSize, I2C_MASTER_ACK );
+ if (i2cStatus != ESP_OK) ESP_LOGE( TAG, "i2c_master_read error:%d", i2cStatus );
}
i2c_master_stop(cmd);
@@ -210,16 +215,24 @@ HRESULT Library_win_dev_i2c_native_Windows_Devices_I2c_I2cDevice::NativeTransmit
if (i2cStatus != ESP_OK)
{
+ uint32_t transferResult = I2cTransferStatus_FullTransfer;
+
// set the result field
if ( i2cStatus == ESP_FAIL )
{
- result[ Library_win_dev_i2c_native_Windows_Devices_I2c_I2cTransferResult::FIELD___status ].SetInteger((CLR_UINT32)I2cTransferStatus_SlaveAddressNotAcknowledged);
+ transferResult = I2cTransferStatus_SlaveAddressNotAcknowledged;
+ }
+ else if (i2cStatus == ESP_ERR_TIMEOUT )
+ {
+ transferResult = I2cTransferStatus_ClockStretchTimeout;
}
else
{
- result[ Library_win_dev_i2c_native_Windows_Devices_I2c_I2cTransferResult::FIELD___status ].SetInteger((CLR_UINT32)I2cTransferStatus_UnknownError);
+ transferResult = I2cTransferStatus_UnknownError;
}
+ result[ Library_win_dev_i2c_native_Windows_Devices_I2c_I2cTransferResult::FIELD___status ].SetInteger((CLR_UINT32)transferResult);
+
// set the bytes transferred field
result[ Library_win_dev_i2c_native_Windows_Devices_I2c_I2cTransferResult::FIELD___bytesTransferred ].SetInteger(0);
}
|
yaviks: add 3S batteries support
Add batteries Cosmx si03058xl and SMP highpower_si03058xl
into yaviks EC.
BRANCH=none
TEST=verify battery can discharge, charge, cut-off. | default_battery: cosmx {
compatible = "cosmx,gh02047xl", "battery-smart";
};
+ cosmx_si03058xl {
+ compatible = "cosmx,si03058xl", "battery-smart";
+ };
dynapack_atl_gh02047xl {
compatible = "dynapack,atl_gh02047xl", "battery-smart";
};
smp_highpower_gh02047xl {
compatible = "smp,highpower_gh02047xl", "battery-smart";
};
+ smp_highpower_si03058xl {
+ compatible = "smp,highpower_si03058xl", "battery-smart";
+ };
};
hibernate-wake-pins {
|
quic: support the streams_blocked_receive probe | @@ -405,6 +405,25 @@ int trace_streams_blocked_send(struct pt_regs *ctx) {
return 0;
}
+
+int trace_streams_blocked_receive(struct pt_regs *ctx) {
+ void *pos = NULL;
+ struct quic_event_t event = {};
+ struct st_quicly_conn_t conn = {};
+ sprintf(event.type, "streams_blocked_receive");
+
+ bpf_usdt_readarg(1, ctx, &pos);
+ bpf_probe_read(&conn, sizeof(conn), pos);
+ event.master_conn_id = conn.master_id;
+ bpf_usdt_readarg(2, ctx, &event.at);
+ bpf_usdt_readarg(3, ctx, &event.limit);
+ bpf_usdt_readarg(4, ctx, &event.is_unidirectional);
+
+ if (events.perf_submit(ctx, &event, sizeof(event)) < 0)
+ bpf_trace_printk("failed to perf_submit\\n");
+
+ return 0;
+}
"""
def handle_req_line(cpu, data, size):
@@ -530,6 +549,7 @@ if sys.argv[1] == "quic":
u.enable_probe(probe="new_token_acked", fn_name="trace_new_token_acked")
u.enable_probe(probe="new_token_receive", fn_name="trace_new_token_receive")
u.enable_probe(probe="streams_blocked_send", fn_name="trace_streams_blocked_send")
+ u.enable_probe(probe="streams_blocked_receive", fn_name="trace_streams_blocked_receive")
b = BPF(text=quic_bpf, usdt_contexts=[u])
else:
u.enable_probe(probe="receive_request", fn_name="trace_receive_req")
|
Fix TWAMP send rate
Update timers in send/recv loop to allow for higher packet rates. | @@ -3454,6 +3454,32 @@ RECEIVE:
tvalclear(&wake.it_interval);
wake.it_value.tv_sec = timeout.tv_sec;
wake.it_value.tv_usec = timeout.tv_nsec / 1000;
+
+ /* How long do we have till the next send? */
+ if(i < ep->tsession->test_spec.npackets - 1){
+ node = get_node(ep, i+1);
+ OWPNum64ToTimespec(&nexttime,node->relative);
+ timespecadd(&nexttime,&ep->start);
+
+ /* Next send is already late? */
+ if(timespeccmp(&nexttime,&currtime,<)){
+ goto SKIP_SEND;
+ }
+
+ /* Next send real soon now? */
+ sleeptime = nexttime;
+ timespecsub(&sleeptime,&currtime);
+ if(sleeptime.tv_sec == 0 && sleeptime.tv_nsec < 1000000){
+ goto SKIP_SEND;
+ }
+
+ /* Set timer till next send (but not longer than timeout) */
+ if(timespeccmp(&sleeptime,&timeout,<)){
+ wake.it_value.tv_sec = sleeptime.tv_sec;
+ wake.it_value.tv_usec = sleeptime.tv_nsec / 1000;
+ }
+ }
+
if(setitimer(ITIMER_REAL,&wake,NULL) != 0){
OWPError(ep->cntrl->ctx,OWPErrFATAL,OWPErrUNKNOWN,
"setitimer(wake=%d,%d) seq=%u: %M",
@@ -3671,13 +3697,9 @@ RECEIVE:
node->hit = True;
/*
- * If we just received the last packet of the session
- * then go back to receive so that any duplicates can
- * be received
+ * Try receive again, maybe there is still time till next send
*/
- if(i == ep->tsession->test_spec.npackets-1){
goto RECEIVE;
- }
SKIP_SEND:
i++;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.