message
stringlengths
6
474
diff
stringlengths
8
5.22k
crash_test; add option to trigger hal watchdog without blocking interrupts.
@@ -55,6 +55,9 @@ crash_device(char *how) } else if (!strcmp(how, "wdog")) { OS_ENTER_CRITICAL(val1); while(1); + } else if (!strcmp(how, "wdog2")) { + /* no interrupt block */ + while(1); } else { return -1; }
smatrix: adding better description for create() & arguments
@@ -7459,11 +7459,13 @@ LIQUID_MATRIX_DEFINE_API(LIQUID_MATRIX_MANGLE_CDOUBLE, liquid_double_complex) /* Sparse matrix object (similar to MacKay, Davey, Lafferty convention) */ \ typedef struct SMATRIX(_s) * SMATRIX(); \ \ -/* Create _m x _n sparse matrix, initialized with zeros */ \ +/* Create \(M \times N\) sparse matrix, initialized with zeros */ \ +/* _m : number of rows in matrix */ \ +/* _n : number of columns in matrix */ \ SMATRIX() SMATRIX(_create)(unsigned int _m, \ unsigned int _n); \ \ -/* Create _m x _n sparse matrix, initialized on array */ \ +/* Create \(M \times N\) sparse matrix, initialized on array */ \ /* _x : input matrix, [size: _m x _n] */ \ /* _m : number of rows in input matrix */ \ /* _n : number of columns in input matrix */ \
external/ffspart: Improve error output
@@ -226,8 +226,8 @@ static int parse_entry(struct blocklevel_device *bl, } rc = ffs_entry_add(tocs[toc], new_entry); if (rc) { - fprintf(stderr, "Couldn't add '%s' parition to TOC %d\n", - name, toc); + fprintf(stderr, "Couldn't add '%s' partition to TOC %d: %d\n", + name, toc, rc); ffs_entry_put(new_entry); return rc; }
Add debug printfs to generic ++quit arm in hall
|= wir/wire ^- (quip move _+>) :_ +> - ?. =(src.bol our.bol) ~ + ?. =(src.bol our.bol) + ~& [%kicked-by src.bol wir] + ~ + ~& [%self-quit--resubbing wir] [(wire-to-peer wir) ~] :: ++ quit-circle
Wait max. 60 seconds for s_client to connect
@@ -349,7 +349,7 @@ sub clientstart # Wait for incoming connection from client my $fdset = IO::Select->new($self->{proxy_sock}); - if (!$fdset->can_read(1)) { + if (!$fdset->can_read(60)) { kill(3, $self->{real_serverpid}); die "s_client didn't try to connect\n"; }
fix: missing functions declarations
@@ -244,6 +244,8 @@ void discord_on_message_reaction_add(struct discord *client, message_reaction_ad void discord_on_message_reaction_remove(struct discord *client, message_reaction_remove_cb *callback); void discord_on_message_reaction_remove_all(struct discord *client, message_reaction_remove_all_cb* callback); void discord_on_message_reaction_remove_emoji(struct discord *client, message_reaction_remove_emoji_cb *callback); +void discord_on_voice_state_update(struct discord *client, voice_state_update_cb *callback); +void discord_on_voice_server_update(struct discord *client, voice_server_update_cb *callback); void discord_on_ready(struct discord *client, idle_cb *callback); void discord_run(struct discord *client);
Packages: yet another fix added, missed in
@@ -170,7 +170,7 @@ endif debuild/unit_$(VERSION).orig.tar.gz: | debuild/$(SRCDIR)/debian cd ../.. && tar -czf pkg/deb/debuild/$(SRCDIR).tar.gz \ --transform "s#^#$(SRCDIR)/#" \ - LICENSE NOTICE CHANGES README configure auto src test + LICENSE NOTICE CHANGES README configure auto src test version mv debuild/$(SRCDIR).tar.gz debuild/unit_$(VERSION).orig.tar.gz cd debuild && tar zxf unit_$(VERSION).orig.tar.gz
Fix skipping IFEO when set as default task manager (Fixes
@@ -983,13 +983,14 @@ VOID PhMwpOnCommand( break; case ID_TOOLS_STARTTASKMANAGER: { + extern BOOLEAN PhpIsDefaultTaskManager(VOID); // options.c (dmex) PPH_STRING systemDirectory; PPH_STRING taskmgrFileName; systemDirectory = PH_AUTO(PhGetSystemDirectory()); taskmgrFileName = PH_AUTO(PhConcatStringRefZ(&systemDirectory->sr, L"\\taskmgr.exe")); - if (PhGetIntegerSetting(L"EnableShellExecuteSkipIfeoDebugger")) + if (!PhpIsDefaultTaskManager() && PhGetIntegerSetting(L"EnableShellExecuteSkipIfeoDebugger")) { PhShellExecuteEx( WindowHandle,
Mysterious fix.
++ move {p/duct q/(wind note gift:able)} :: local move ++ note-ames :: weird ames move $% {$make p/(unit @t) q/@ud r/@ s/?} :: - {$sith p/@p q/@uw r/@uw} :: + {$sith p/@p q/@uw r/?} :: == :: ++ note-clay :: $% {$merg p/@p q/@tas r/@p s/@tas t/case u/germ:clay}:: merge desks
netkvm: Static analysis: coinstaller tweaks Static analysis was failing with: coinstaller\netkvmnetsh.cpp(64): warning C6011: Dereferencing NULL pointer 'pguidDevClassPtr'.
@@ -59,10 +59,11 @@ static bool _NetKVMGetDeviceClassGuids(vector<GUID>& GUIDs) NETCO_DEBUG_PRINT(TEXT("SetupDiClassGuidsFromNameEx failed with code ") << dwErr); return false; } - } GUIDs.insert(GUIDs.end(), &pguidDevClassPtr[0], &pguidDevClassPtr[dwNumGuids]); delete[] pguidDevClassPtr; + } + return true; }
thug2 update
@@ -73,12 +73,12 @@ DWORD WINAPI Init(LPVOID bDelay) injector::MakeInline<SetResHook>(pattern.count(2).get(1).get<void*>(0), pattern.count(2).get(1).get<void*>(6)); pattern = hook::pattern(pattern_str(0x89, '?', to_bytes(dword_787A7C))); - injector::MakeInline<SetResHook>(pattern.count(2).get(0).get<void*>(0), pattern.count(2).get(0).get<void*>(6)); - injector::MakeInline<SetResHook>(pattern.count(2).get(1).get<void*>(0), pattern.count(2).get(1).get<void*>(6)); + injector::MakeNOP(pattern.count(2).get(0).get<void*>(0), 6, true); //injector::MakeInline<SetResHook>(pattern.count(2).get(0).get<void*>(0), pattern.count(2).get(0).get<void*>(6)); + injector::MakeNOP(pattern.count(2).get(1).get<void*>(0), 6, true); //injector::MakeInline<SetResHook>(pattern.count(2).get(1).get<void*>(0), pattern.count(2).get(1).get<void*>(6)); pattern = hook::pattern(pattern_str(0x89, '?', to_bytes(dword_787A80))); - injector::MakeInline<SetResHook>(pattern.count(2).get(0).get<void*>(0), pattern.count(2).get(0).get<void*>(6)); - injector::MakeInline<SetResHook>(pattern.count(2).get(1).get<void*>(0), pattern.count(2).get(1).get<void*>(6)); + injector::MakeNOP(pattern.count(2).get(0).get<void*>(0), 6, true); //injector::MakeInline<SetResHook>(pattern.count(2).get(0).get<void*>(0), pattern.count(2).get(0).get<void*>(6)); + injector::MakeNOP(pattern.count(2).get(1).get<void*>(0), 6, true); //injector::MakeInline<SetResHook>(pattern.count(2).get(1).get<void*>(0), pattern.count(2).get(1).get<void*>(6)); //Aspect Ratio pattern = hook::pattern("68 ? ? ? ? E8 ? ? ? ? 6A 00 68 ? ? ? ? E8 ? ? ? ? D9");
Add test to see if mkauthlist exists, instead of just trying to pip upgrade it every time. Allow user to optionally specify mkauthlist command by setting environment var MKAUTHLIST
@@ -78,10 +78,15 @@ tar : main cd ${tardir} && tar -czf ../${outname}.tar.gz . && cd .. rm -rf ${tardir} -authlist : - pip install --upgrade mkauthlist +authlist : mkauthlist-exists + #pip install --upgrade mkauthlist +ifdef MKAUTHLIST + $(MKAUTHLIST) -j ${style} -f -c "LSST Dark Energy Science Collaboration" \ + --cntrb contributions.tex authors.csv authors.tex +else mkauthlist -j ${style} -f -c "LSST Dark Energy Science Collaboration" \ --cntrb contributions.tex authors.csv authors.tex +endif # http://stackoverflow.com/q/8028314/ TARGETS=apj apjl prd prl mnras tex aastex61 emulateapj @@ -96,6 +101,12 @@ $(TARGETS): # (which is to say, by default we assume you are writing an LSST # DESC Note in latex format). +# Check if mkauthlist exists. Can be overridden with environment variable. +mkauthlist-exists : +ifndef MKAUTHLIST + $(if $(shell which mkauthlist),,$(error "mkauthlist not found. Install using 'pip install mkauthlist'")) +endif + tidy: rm -f *.log *.aux *.out *.dvi *.synctex.gz *.fdb_latexmk *.fls rm -f *.bbl *.blg *Notes.bib ${main}.pdf
Free the correct struct element
@@ -130,7 +130,7 @@ void mbedtls_mpi_mod_modulus_free( mbedtls_mpi_mod_modulus *m ) case MBEDTLS_MPI_MOD_REP_MONTGOMERY: mbedtls_free( m->rep.mont ); break; case MBEDTLS_MPI_MOD_REP_OPT_RED: - mbedtls_free( m->rep.mont ); break; + mbedtls_free( m->rep.ored ); break; default: break; }
Bypass mem files for prod build
@@ -21,8 +21,11 @@ if (isDevMode) enableLiveReload({ strategy: "react-hmr" }); // Allow images and json outside of application package to be loaded in production build addBypassChecker(filePath => { return ( - filePath.indexOf(app.getAppPath()) === -1 && - (/.jpg/.test(filePath) || /.json/.test(filePath) || /.png/.test(filePath)) + filePath.indexOf(app.getAppPath()) === -1 || + /.jpg/.test(filePath) || + /.json/.test(filePath) || + /.png/.test(filePath) || + /.mem/.test(filePath) ); });
SoapyLMS: remove 8bit limit from GPIO resd/write now it is limited by parameter/return type (sizeof(unsigned))
@@ -884,30 +884,28 @@ std::vector<std::string> SoapyLMS7::listGPIOBanks(void) const void SoapyLMS7::writeGPIO(const std::string &, const unsigned value) { - uint8_t buffer = uint8_t(value); - int r = lms7Device->GetConnection()->GPIOWrite(&buffer, 1); + int r = lms7Device->GetConnection()->GPIOWrite((uint8_t*)&value, sizeof(value)); if (r != 0) throw std::runtime_error("SoapyLMS7::writeGPIO() " + std::string(lime::GetLastErrorMessage())); } unsigned SoapyLMS7::readGPIO(const std::string &) const { - uint8_t buffer(0); - int r = lms7Device->GetConnection()->GPIORead(&buffer, 1); + unsigned buffer(0); + int r = lms7Device->GetConnection()->GPIORead((uint8_t*)&buffer, sizeof(buffer)); if (r != 0) throw std::runtime_error("SoapyLMS7::readGPIO() " + std::string(lime::GetLastErrorMessage())); - return unsigned(buffer); + return buffer; } void SoapyLMS7::writeGPIODir(const std::string &, const unsigned dir) { - uint8_t buffer = uint8_t(dir); - int r = lms7Device->GetConnection()->GPIODirWrite(&buffer, 1); + int r = lms7Device->GetConnection()->GPIODirWrite((uint8_t*)&dir, sizeof(dir)); if (r != 0) throw std::runtime_error("SoapyLMS7::writeGPIODir() " + std::string(lime::GetLastErrorMessage())); } unsigned SoapyLMS7::readGPIODir(const std::string &) const { - uint8_t buffer(0); - int r = lms7Device->GetConnection()->GPIODirRead(&buffer, 1); + unsigned buffer(0); + int r = lms7Device->GetConnection()->GPIODirRead((uint8_t*)&buffer, sizeof(buffer)); if (r != 0) throw std::runtime_error("SoapyLMS7::readGPIODir() " + std::string(lime::GetLastErrorMessage())); - return unsigned(buffer); + return buffer; }
Update main.c Updated the constant name due to SGDK 1.7 update
@@ -33,7 +33,7 @@ void setupBackground() { VDP_drawImageEx( BG_B, &image_sgdk_logo, - TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, TILE_USERINDEX), + TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, TILE_USER_INDEX), x, y, FALSE, DMA );
Fix no-srp
@@ -3292,18 +3292,15 @@ int ssl3_handshake_write(SSL *s) int ssl3_new(SSL *s) { - #ifndef OPENSSL_NO_SRP if (!SSL_SRP_CTX_init(s)) - goto err; + return 0; #endif if (!s->method->ssl_clear(s)) return 0; return 1; - err: - return 0; } void ssl3_free(SSL *s)
[arch][riscv] use a simpler access method for current_thread
@@ -41,14 +41,16 @@ static inline int atomic_swap(volatile int *ptr, int val) { return __atomic_exchange_n(ptr, val, __ATOMIC_RELAXED); } +// store the current thread in the tp register which is reserved in the ABI +// as pointing to thread local storage. +register struct thread *__current_thread asm("tp"); + static inline struct thread *get_current_thread(void) { - struct thread *current_thread; - __asm__ volatile("mv %0,tp" : "=r"(current_thread)); - return current_thread; + return __current_thread; } static inline void set_current_thread(struct thread *t) { - __asm__ volatile("mv tp,%0" : : "r"(t) : "tp"); + __current_thread = t; } static inline uint32_t arch_cycle_count(void) {
Reformat Source: Only use upper case variables
@@ -13,16 +13,16 @@ MIN_VERSION=6 CLANG_FORMAT=$(command -v clang-format-$MIN_VERSION.0 || command -v clang-format) if [ -n "$CLANG_FORMAT" ]; then - location="$CLANG_FORMAT" - version=$("$CLANG_FORMAT" --version 2> /dev/null) - majorVersion=$(printf '%s' "$version" | sed -E 's/.* ([0-9]+)\.[0-9].[0-9][ -].*/\1/') - [ "$majorVersion" -ge $MIN_VERSION ] 2> /dev/null || unset CLANG_FORMAT + LOCATION="$CLANG_FORMAT" + VERSION=$("$CLANG_FORMAT" --version 2> /dev/null) + MAJOR_VERSION=$(printf '%s' "$VERSION" | sed -E 's/.* ([0-9]+)\.[0-9].[0-9][ -].*/\1/') + [ "$MAJOR_VERSION" -ge $MIN_VERSION ] 2> /dev/null || unset CLANG_FORMAT fi if [ -z "${CLANG_FORMAT}" ]; then - printf 'ClangFormat: %s\n' "$location" - printf 'Version Info: %s\n' "$version" - printf 'Major Version: %s\n' "$majorVersion" + printf 'ClangFormat: %s\n' "$LOCATION" + printf 'Version Info: %s\n' "$VERSION" + printf 'Major Version: %s\n' "$MAJOR_VERSION" echo "Please install clang-format $MIN_VERSION, or 7" exit 1 fi @@ -32,6 +32,6 @@ cd "$SOURCE" || { exit 1 } -for file in $(find . -name '*.[ch]' -or -name '*.[ch]pp' -or -name '*.[ch].in' | grep -E -v '^./src/tools/gen'); do - "$CLANG_FORMAT" -style=file -i "$file" +for FILE in $(find . -name '*.[ch]' -or -name '*.[ch]pp' -or -name '*.[ch].in' | grep -E -v '^./src/tools/gen'); do + "$CLANG_FORMAT" -style=file -i "$FILE" done
RP2: Fix audio deinit.
@@ -65,6 +65,7 @@ typedef struct _audio_data_t { void (*pdm_filter_func) (uint8_t*, int16_t*, uint16_t, TPDMFilter_InitStruct*); } audio_data_t; +static bool audio_initialized = false; #define audio_data MP_STATE_PORT(audio_data) #define NEXT_BUFFER(x) (((x) + 1) % (audio_data->n_buffers)) @@ -298,6 +299,7 @@ static mp_obj_t py_audio_init(uint n_args, const mp_obj_t *pos_args, mp_map_t *k irq_set_enabled(PDM_DMA_IRQ, true); dma_irqn_set_channel_enabled(PDM_DMA, audio_data->dma_channel, true); + audio_initialized = true; return mp_const_none; } STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_audio_init_obj, 0, py_audio_init); @@ -344,6 +346,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_audio_start_streaming_obj, py_audio_start_st static mp_obj_t py_audio_stop_streaming() { + if (audio_data->streaming) { // Disable PDM and IRQ dma_channel_abort(audio_data->dma_channel); dma_irqn_set_channel_enabled(PDM_DMA, audio_data->dma_channel, false); @@ -363,6 +366,8 @@ static mp_obj_t py_audio_stop_streaming() mp_printf(&mp_plat_print, "Average conversion time:%ld us\n", (audio_data->conv_total / audio_data->conv_times)); #endif + } + return mp_const_none; } STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_audio_stop_streaming_obj, py_audio_stop_streaming); @@ -409,6 +414,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_audio_get_buffer_obj, 0, py_audio_get_buffe void py_audio_deinit() { + if (audio_initialized) { py_audio_stop_streaming(); audio_data->head = 0; audio_data->tail = 0; @@ -421,11 +427,16 @@ void py_audio_deinit() audio_data->overflow = false; audio_data->abort_on_overflow = false; audio_data->user_callback = mp_const_none; + if (audio_data->dma_channel >= 0) { dma_channel_unclaim(audio_data->dma_channel); } } + audio_data = MP_OBJ_NULL; + audio_initialized = false; +} + static const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_audio) }, { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&py_audio_init_obj) },
papi: fix papi default handling Type: fix
@@ -77,13 +77,15 @@ class Packer(object): raise NotImplementedError # override as appropriate in subclasses - def _get_packer_with_options(self, f_type, options): + @staticmethod + def _get_packer_with_options(f_type, options): return types[f_type] def get_packer_with_options(self, f_type, options): if options is not None: try: - return self._get_packer_with_options(f_type, options) + c = types[f_type].__class__ + return c._get_packer_with_options(f_type, options) except IndexError: raise VPPSerializerValueError( "Options not supported for {}{} ({})". @@ -126,9 +128,9 @@ class BaseTypes(Packer): def unpack(self, data, offset, result=None, ntc=False): return self.packer.unpack_from(data, offset)[0], self.packer.size - def _get_packer_with_options(self, f_type, options): - c = types[f_type].__class__ - return c(f_type, options=options) + @staticmethod + def _get_packer_with_options(f_type, options): + return BaseTypes(f_type, options=options) def __repr__(self): return "BaseTypes(type=%s, elements=%s, options=%s)" % (self._type, @@ -175,7 +177,6 @@ class String(Packer): return '', 0 p = BaseTypes('u8', length) x, size = p.unpack(data, offset + length_field_size) - #x2 = x.split(b'\0', 1)[0] return (x.decode('ascii', errors='replace'), size + length_field_size) @@ -409,9 +410,9 @@ class VPPEnumType(Packer): x, size = types[self.enumtype].unpack(data, offset) return self.enum(x), size - def _get_packer_with_options(self, f_type, options): - c = types[f_type].__class__ - return c(f_type, types[f_type].msgdef, options=options) + @staticmethod + def _get_packer_with_options(f_type, options): + return VPPEnumType(f_type, types[f_type].msgdef, options=options) def __repr__(self): return "VPPEnumType(name=%s, msgdef=%s, options=%s)" % ( @@ -512,9 +513,9 @@ class VPPTypeAlias(Packer): return self.packer.pack(data, kwargs) - def _get_packer_with_options(self, f_type, options): - c = types[f_type].__class__ - return c(f_type, types[f_type].msgdef, options=options) + @staticmethod + def _get_packer_with_options(f_type, options): + return VPPTypeAlias(f_type, types[f_type].msgdef, options=options) def unpack(self, data, offset=0, result=None, ntc=False): if ntc is False and self.name in vpp_format.conversion_unpacker_table:
enable docs build for 2.6
@@ -43,7 +43,7 @@ skip_x86 = ["-arm1"] compiler_families=["gnu12","intel","arm1"] mpi_families=["openmpi4","mpich","mvapich2","impi"] -standalone = ["cmake","slurm","!docs","gnu-compilers","hwloc","lmod","lustre-client","pmix","valgrind", +standalone = ["docs","cmake","slurm","!docs","gnu-compilers","hwloc","lmod","lustre-client","pmix","valgrind", "easybuild","spack","ohpc-filesystem","libfabric","ucx","openpbs","python-Cython","papi", "impi-devel","meta-packages","paraver","warewulf","intel-compilers-devel"] compiler_dependent = ["gsl","hdf5","metis","mpich","mvapich2","numpy","likwid",
Fix coverity issue 236044 (uncaught exception in C++ RSA) The uncaught exception was a bug in the SharedPromiseState, which threw an exception if a promise was resolved more than one time.
@@ -923,9 +923,7 @@ void celix::impl::SharedPromiseState<T>::complete(std::unique_lock<std::mutex>& if (!lck.owns_lock()) { lck.lock(); } - if (done) { - throw celix::PromiseInvocationException("Promise is already resolved"); - } + if (!done) { done = true; cond.notify_all(); while (!chain.empty()) { @@ -939,14 +937,13 @@ void celix::impl::SharedPromiseState<T>::complete(std::unique_lock<std::mutex>& lck.lock(); } } +} inline void celix::impl::SharedPromiseState<void>::complete(std::unique_lock<std::mutex>& lck) { if (!lck.owns_lock()) { lck.lock(); } - if (done) { - throw celix::PromiseInvocationException("Promise is already resolved"); - } + if (!done) { done = true; cond.notify_all(); while (!chain.empty()) { @@ -960,3 +957,4 @@ inline void celix::impl::SharedPromiseState<void>::complete(std::unique_lock<std lck.lock(); } } +} \ No newline at end of file
apps/bttester: Enable debug logs and make RTT TERMINAL BUFFER larger Small buffer size caused some logs to be dropped
@@ -63,7 +63,7 @@ syscfg.vals: OS_MAIN_STACK_SIZE: 12444 SHELL_TASK: 1 SHELL_NEWTMGR: 0 - LOG_LEVEL: 1 + LOG_LEVEL: 0 MSYS_1_BLOCK_COUNT: 48 BLE_MONITOR_RTT: 1 @@ -123,4 +123,5 @@ syscfg.vals: syscfg.vals.BTTESTER_PIPE_UART: CONSOLE_UART: 0 CONSOLE_RTT: 1 + RTT_TERMINAL_BUFFER_SIZE_UP: 8192
Improve tab-completion for FETCH/MOVE. Author: Naoki Nakamichi Discussion:
@@ -3077,19 +3077,27 @@ psql_completion(const char *text, int start, int end) COMPLETE_WITH("SELECT", "INSERT", "DELETE", "UPDATE", "DECLARE"); /* FETCH && MOVE */ - /* Complete FETCH with one of FORWARD, BACKWARD, RELATIVE */ + + /* + * Complete FETCH with one of ABSOLUTE, BACKWARD, FORWARD, RELATIVE, ALL, + * NEXT, PRIOR, FIRST, LAST + */ else if (Matches("FETCH|MOVE")) - COMPLETE_WITH("ABSOLUTE", "BACKWARD", "FORWARD", "RELATIVE"); - /* Complete FETCH <sth> with one of ALL, NEXT, PRIOR */ - else if (Matches("FETCH|MOVE", MatchAny)) - COMPLETE_WITH("ALL", "NEXT", "PRIOR"); + COMPLETE_WITH("ABSOLUTE", "BACKWARD", "FORWARD", "RELATIVE", + "ALL", "NEXT", "PRIOR", "FIRST", "LAST"); + + /* Complete FETCH BACKWARD or FORWARD with one of ALL, FROM, IN */ + else if (Matches("FETCH|MOVE", "BACKWARD|FORWARD")) + COMPLETE_WITH("ALL", "FROM", "IN"); /* - * Complete FETCH <sth1> <sth2> with "FROM" or "IN". These are equivalent, + * Complete FETCH <direction> with "FROM" or "IN". These are equivalent, * but we may as well tab-complete both: perhaps some users prefer one * variant or the other. */ - else if (Matches("FETCH|MOVE", MatchAny, MatchAny)) + else if (Matches("FETCH|MOVE", "ABSOLUTE|BACKWARD|FORWARD|RELATIVE", + MatchAnyExcept("FROM|IN")) || + Matches("FETCH|MOVE", "ALL|NEXT|PRIOR|FIRST|LAST")) COMPLETE_WITH("FROM", "IN"); /* FOREIGN DATA WRAPPER */
Update link in Bugreporting.md
# SNAP Framework Bug Reporting For bugs, questions or requests for enhancements, please use Github issues: -https://github.com/open-power/donut/issues +https://github.com/open-power/snap/issues All issues should have one of the labels * `bug`
entrypoint: Don't download headers when kheaders mod is available
@@ -61,8 +61,11 @@ fi # In the gadget image, /usr/src is a symlink to /host/usr/src (see gadget-*.Dockerfile). # If the kernel headers are already available on the gadget pod via the symlink, -# no need to download them. +# or the kheaders module is available no need to download them. if [ "$ID" = "rhcos" ] && [ ! -d "/usr/src/kernels/$KERNEL" ]; then + if grep -q '^kheaders ' /proc/modules || (modprobe kheaders && rmmod kheaders); then + echo "kheaders module available, kernel headers won't be downloaded" + else # Using Centos RPMs because RHCOS ones are not publicly available (they are the same). echo "Fetching kernel-devel from CentOS Vault Mirror..." @@ -108,7 +111,7 @@ if [ "$ID" = "rhcos" ] && [ ! -d "/usr/src/kernels/$KERNEL" ]; then rpm2cpio $RPM | cpio --quiet -i popd - # In the gadget image, /usr/src is a symlink to /host/usr/src (see gadget-*.Dockerfile). + # In the gadget image, /usr/src is a symlink to /host/usr/src (see gadget.Dockerfile). # But in the case of RHCOS, remove the symlink and install files in the container. test ! -L /usr/src || rm -f /usr/src mkdir -p /usr/src/kernels/ @@ -120,6 +123,7 @@ if [ "$ID" = "rhcos" ] && [ ! -d "/usr/src/kernels/$KERNEL" ]; then rm -rf $RPMDIR fi fi +fi ## Hooks Begins ##
Use MEM_CONTEXT_BEGIN() block in varFree(). We probably arrived at this unusual construction because of the complexity of getting the mem context. Whether or not this is a good way to store the mem context, it still makes sense to use the standard pattern for switching mem contexts.
@@ -1234,77 +1234,73 @@ varFree(Variant *this) if (this != NULL) { - MemContext *contextOld = memContextCurrent(); + MemContext *memContext = NULL; - TRY_BEGIN() - { switch (this->type) { case varTypeBool: { - memContextSwitch(((VariantBool *)this)->memContext); + memContext = ((VariantBool *)this)->memContext; break; } case varTypeDouble: { - memContextSwitch(((VariantDouble *)this)->memContext); + memContext = ((VariantDouble *)this)->memContext; break; } case varTypeInt: { - memContextSwitch(((VariantInt *)this)->memContext); + memContext = ((VariantInt *)this)->memContext; break; } case varTypeInt64: { - memContextSwitch(((VariantInt64 *)this)->memContext); + memContext = ((VariantInt64 *)this)->memContext; break; } case varTypeKeyValue: { - memContextSwitch(((VariantKeyValue *)this)->memContext); + memContext = ((VariantKeyValue *)this)->memContext; kvFree(((VariantKeyValue *)this)->data); break; } case varTypeString: { - memContextSwitch(((VariantString *)this)->memContext); + memContext = ((VariantString *)this)->memContext; strFree(((VariantString *)this)->data); break; } case varTypeUInt: { - memContextSwitch(((VariantUInt *)this)->memContext); + memContext = ((VariantUInt *)this)->memContext; break; } case varTypeUInt64: { - memContextSwitch(((VariantUInt64 *)this)->memContext); + memContext = ((VariantUInt64 *)this)->memContext; break; } case varTypeVariantList: { - memContextSwitch(((VariantVariantList *)this)->memContext); + memContext = ((VariantVariantList *)this)->memContext; varLstFree(((VariantVariantList *)this)->data); break; } } - memFree(this); - } - FINALLY() + MEM_CONTEXT_BEGIN(memContext) { - memContextSwitch(contextOld); + memFree(this); } - TRY_END(); + MEM_CONTEXT_END(); } FUNCTION_TEST_RETURN_VOID();
SOVERSION bump to version 4.3.11
@@ -39,7 +39,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 4) set(SYSREPO_MINOR_SOVERSION 3) -set(SYSREPO_MICRO_SOVERSION 10) +set(SYSREPO_MICRO_SOVERSION 11) set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION}) set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
bugId:18683049:increase timer stack to 700*4byte to avoid crash in some platform
@@ -15,7 +15,7 @@ $(NAME)_SOURCES-$(FS_ENABLED) += HAL_FS_rhino.c $(NAME)_COMPONENTS += ulog activation chip_code netmgr -GLOBAL_DEFINES +=RHINO_CONFIG_TIMER_TASK_STACK_SIZE=512 +GLOBAL_DEFINES +=RHINO_CONFIG_TIMER_TASK_STACK_SIZE=700 ifeq (y,$(strip $(SUPPORT_ITLS))) $(info FEATURE_SUPPORT_ITLS = y, so using iTLS)
esp_netif: fix esp_netif_get_dns_info() to copy the entire ip_addr_t closes closes
@@ -1308,7 +1308,7 @@ static esp_err_t esp_netif_get_dns_info_api(esp_netif_api_msg_t *msg) const ip_addr_t* dns_ip = NULL; dns_ip = dns_getserver(type); if(dns_ip != NULL) { - memcpy(&dns->ip.u_addr, &dns_ip, sizeof(ip4_addr_t)); + memcpy(&dns->ip, dns_ip, sizeof(ip_addr_t)); } }
phb5: Enable Gen5 Registers for Gen5 have been initialized in a previous patch. So let's activate it!
@@ -3008,12 +3008,16 @@ static int64_t phb4_poll_link(struct pci_slot *slot) static unsigned int phb4_get_max_link_speed(struct phb4 *p, struct dt_node *np) { - unsigned int max_link_speed; + unsigned int max_link_speed, hw_max_link_speed; struct proc_chip *chip; chip = get_chip(p->chip_id); + hw_max_link_speed = 4; + if (is_phb5()) + hw_max_link_speed = 5; + /* Priority order: NVRAM -> dt -> GEN3 dd2.00 -> GEN4 */ - max_link_speed = 4; + max_link_speed = hw_max_link_speed; if (p->rev == PHB4_REV_NIMBUS_DD20 && ((0xf & chip->ec_level) == 0) && chip->ec_rev == 0) max_link_speed = 3; @@ -3033,8 +3037,8 @@ static unsigned int phb4_get_max_link_speed(struct phb4 *p, struct dt_node *np) } if (pcie_max_link_speed) max_link_speed = pcie_max_link_speed; - if (max_link_speed > 4) /* clamp to 4 */ - max_link_speed = 4; + if (max_link_speed > hw_max_link_speed) + max_link_speed = hw_max_link_speed; return max_link_speed; }
postpone -z now
@@ -92,7 +92,7 @@ LFLAGS = -lsodium -largp else LFLAGS = -lsodium -lseccomp -fno-common ifndef NODPKG -LFLAGS +=$(shell dpkg-buildflags --get LDFLAGS) -z now +LFLAGS +=$(shell dpkg-buildflags --get LDFLAGS) endif endif ifeq ($(USE_CJSON_SO),1)
Change comment for searchability.
@@ -40,7 +40,7 @@ Vagrant.configure(2) do |config| echo 'supersede domain-name-servers 8.8.8.8;' >> /etc/dhcp/dhclient.conf /etc/init.d/networking restart - # Set time sync settings so builds don't fail with clock drift errors + # Set time sync settings so builds don't fail with clock skew errors #--------------------------------------------------------------------------------------------------------------------------- echo 'Time Sync Settings' && date sudo /etc/init.d/virtualbox-guest-utils stop
Clean up temp dir in failure cases
@@ -127,6 +127,7 @@ clib_mem_vm_ext_alloc (clib_mem_vm_alloc_t * a) if (mount ("none", (char *) mount_dir, "hugetlbfs", 0, NULL)) { + rmdir ((char *) mount_dir); err = clib_error_return_unix (0, "mount hugetlb directory '%s'", mount_dir); goto error; @@ -136,6 +137,8 @@ clib_mem_vm_ext_alloc (clib_mem_vm_alloc_t * a) if ((fd = open ((char *) filename, O_CREAT | O_RDWR, 0755)) == -1) { + umount2 ((char *) mount_dir, MNT_DETACH); + rmdir ((char *) mount_dir); err = clib_error_return_unix (0, "open"); goto error; }
Fix podchecker warnings
@@ -19,7 +19,6 @@ evp_keymgmt_export, evp_keymgmt_export_types void *keydata, OSSL_PARAM params[]); const OSSL_PARAM *evp_keymgmt_gettable_params(const EVP_KEYMGMT *keymgmt); - int evp_keymgmt_has(const EVP_KEYMGMT *keymgmt, void *keyddata, int selection); int evp_keymgmt_validate(const EVP_KEYMGMT *keymgmt, void *keydata, int selection);
decisions: further fix of sentences
@@ -35,8 +35,8 @@ But substantial decisions must be made in a transparent and participative way. - Unlike the Rust Decision process, decisions in Elektra do not have a disadvantage if they were flawed in early stages. Only the end results counts. - Different to initiatives like Rust, most contributors in Elektra are not experts in configuration management or programming languages. - So we do not expect that a clear problem or solution is in the decision's write mind beforehand. - Instead the decisions is also a supported learning process about the problem and solution. + So we do not expect that a clear problem or solution is in the decision writer's mind beforehand. + Instead the decision process is a supported learning process. ## Considered Alternatives
data tree DOC improve lyd_new_path description
@@ -1259,8 +1259,8 @@ LY_ERR lyd_new_attr2(struct lyd_node *parent, const char *module_ns, const char * and @p value is ignored. Also, if a leaf-list is being created and both a predicate is defined in @p path * and @p value is set, the predicate is preferred. * - * For key-less lists and state leaf-lists, positional predicates should be used. If no predicate is used for these - * nodes, they are always created. + * For key-less lists and non-configuration leaf-lists, positional predicates should be used. If no predicate is used + * for these nodes, they are always created. * * @param[in] parent Data parent to add to/modify, can be NULL. Note that in case a first top-level sibling is used, * it may no longer be first if @p path is absolute and starts with a non-existing top-level node inserted @@ -1278,14 +1278,7 @@ LY_ERR lyd_new_path(struct lyd_node *parent, const struct ly_ctx *ctx, const cha /** * @brief Create a new node in the data tree based on a path. All node types can be created. * - * If creating data nodes defined inside an extension instance, use ::lyd_new_ext_path(). - * - * If @p path points to a list key and the list instance does not exist, the key value from the predicate is used - * and @p value is ignored. Also, if a leaf-list is being created and both a predicate is defined in @p path - * and @p value is set, the predicate is preferred. - * - * For key-less lists and state leaf-lists, positional predicates can be used. If no preciate is used for these - * nodes, they are always created. + * Details are mentioned in ::lyd_new_path(). * * @param[in] parent Data parent to add to/modify, can be NULL. Note that in case a first top-level sibling is used, * it may no longer be first if @p path is absolute and starts with a non-existing top-level node inserted @@ -1309,12 +1302,7 @@ LY_ERR lyd_new_path2(struct lyd_node *parent, const struct ly_ctx *ctx, const ch * * If creating data nodes defined in a module's standard tree, use ::lyd_new_path() or ::lyd_new_path2(). * - * If @p path points to a list key and the list instance does not exist, the key value from the predicate is used - * and @p value is ignored. Also, if a leaf-list is being created and both a predicate is defined in @p path - * and @p value is set, the predicate is preferred. - * - * For key-less lists and state leaf-lists, positional predicates can be used. If no preciate is used for these - * nodes, they are always created. + * Details are mentioned in ::lyd_new_path(). * * @param[in] parent Data parent to add to/modify, can be NULL. Note that in case a first top-level sibling is used, * it may no longer be first if @p path is absolute and starts with a non-existing top-level node inserted
Fix incorrect control/catalog versions in command/stanza test. These were not caught because backup info load automatically corrects them.
@@ -266,14 +266,14 @@ testRun(void) contentBackup = strNew ( "[db]\n" - "db-catalog-version=201608131\n" - "db-control-version=960\n" + "db-catalog-version=201510051\n" + "db-control-version=942\n" "db-id=1\n" "db-system-id=6569239123849665679\n" "db-version=\"9.5\"\n" "\n" "[db:history]\n" - "1={\"db-catalog-version\":201608131,\"db-control-version\":960,\"db-system-id\":6569239123849665679," + "1={\"db-catalog-version\":201510051,\"db-control-version\":942,\"db-system-id\":6569239123849665679," "\"db-version\":\"9.5\"}\n" ); TEST_RESULT_VOID( @@ -595,7 +595,7 @@ testRun(void) "db-version=\"9.6\"\n" "\n" "[db:history]\n" - "1={\"db-catalog-version\":201608131,\"db-control-version\":960,\"db-system-id\":6569239123849665999," + "1={\"db-catalog-version\":201510051,\"db-control-version\":942,\"db-system-id\":6569239123849665999," "\"db-version\":\"9.5\"}\n" "2={\"db-catalog-version\":201608131,\"db-control-version\":960,\"db-system-id\":6569239123849665679," "\"db-version\":\"9.6\"}\n" @@ -657,7 +657,7 @@ testRun(void) "db-version=\"9.5\"\n" "\n" "[db:history]\n" - "1={\"db-catalog-version\":201608131,\"db-control-version\":942,\"db-system-id\":6569239123849665679," + "1={\"db-catalog-version\":201510051,\"db-control-version\":942,\"db-system-id\":6569239123849665679," "\"db-version\":\"9.5\"}\n" ); TEST_RESULT_VOID(
ble_mesh: fix starting iv update when not on primary subnet
@@ -722,6 +722,16 @@ u32_t bt_mesh_next_seq(void) bt_mesh_store_seq(); } + if (!bt_mesh_atomic_test_bit(bt_mesh.flags, BLE_MESH_IVU_IN_PROGRESS) && + bt_mesh.seq > IV_UPDATE_SEQ_LIMIT && + bt_mesh_subnet_get(BLE_MESH_KEY_PRIMARY)) { +#if CONFIG_BLE_MESH_NODE + bt_mesh_beacon_ivu_initiator(true); +#endif + bt_mesh_net_iv_update(bt_mesh.iv_index + 1, true); + bt_mesh_net_sec_update(NULL); + } + return seq; } @@ -780,15 +790,6 @@ int bt_mesh_net_resend(struct bt_mesh_subnet *sub, struct net_buf *buf, bt_mesh_adv_send(buf, cb, cb_data); } - if (!bt_mesh_atomic_test_bit(bt_mesh.flags, BLE_MESH_IVU_IN_PROGRESS) && - bt_mesh.seq > IV_UPDATE_SEQ_LIMIT) { -#if CONFIG_BLE_MESH_NODE - bt_mesh_beacon_ivu_initiator(true); -#endif - bt_mesh_net_iv_update(bt_mesh.iv_index + 1, true); - bt_mesh_net_sec_update(NULL); - } - return 0; }
update to new preferred format
-#!/usr/local/bin/dictu +#!/usr/bin/env dictu /* * This script is used in the CI process to create RPMs, debs, and apks when @@ -18,12 +18,12 @@ const PKG_FORMATS = ["deb", "rpm", "apk"], var semver = Env.get("SEMVER"); if (not semver) { - const GIT_REV = Process.run(["git", "rev-parse", "--short", "HEAD"], true); - if (not GIT_REV.success()) { - print(GIT_REV.unwrapError()); + const gitRev = Process.run(["git", "rev-parse", "--short", "HEAD"], true); + if (not gitRev.success()) { + print(gitRev.unwrapError()); System.exit(1); } - semver = GIT_REV.unwrap().strip(); + semver = gitRev.unwrap().strip(); Env.set("SEMVER", semver); }
server session BUGFIX zero server options on destroy So that init can be safely called again. Refs cesnet/netopeer2#269
@@ -504,6 +504,9 @@ nc_server_destroy(void) lydict_remove(server_opts.ctx, server_opts.capabilities[i]); } free(server_opts.capabilities); + server_opts.capabilities = NULL; + server_opts.capabilities_count = 0; + pthread_spin_destroy(&server_opts.sid_lock); #if defined(NC_ENABLED_SSH) || defined(NC_ENABLED_TLS) @@ -513,20 +516,28 @@ nc_server_destroy(void) if (server_opts.passwd_auth_data && server_opts.passwd_auth_data_free) { server_opts.passwd_auth_data_free(server_opts.passwd_auth_data); } + server_opts.passwd_auth_data = NULL; + server_opts.passwd_auth_data_free = NULL; nc_server_ssh_del_authkey(NULL, NULL, 0, NULL); if (server_opts.hostkey_data && server_opts.hostkey_data_free) { server_opts.hostkey_data_free(server_opts.hostkey_data); } + server_opts.hostkey_data = NULL; + server_opts.hostkey_data_free = NULL; #endif #ifdef NC_ENABLED_TLS if (server_opts.server_cert_data && server_opts.server_cert_data_free) { server_opts.server_cert_data_free(server_opts.server_cert_data); } + server_opts.server_cert_data = NULL; + server_opts.server_cert_data_free = NULL; if (server_opts.trusted_cert_list_data && server_opts.trusted_cert_list_data_free) { server_opts.trusted_cert_list_data_free(server_opts.trusted_cert_list_data); } + server_opts.trusted_cert_list_data = NULL; + server_opts.trusted_cert_list_data_free = NULL; #endif nc_destroy(); }
Really revert xDOT changes from 1832 neglected to rebase on merging
@@ -6,10 +6,6 @@ CROTKERNEL = ../mips/zrot.c ZROTKERNEL = ../mips/zrot.c CSWAPKERNEL = ../mips/zswap.c ZSWAPKERNEL = ../mips/zswap.c -SDOTKERNEL = ../mips/dot.c -DDOTKERNEL = ../mips/dot.c -CDOTKERNEL = ../mips/zdot.c -ZDOTKERNEL = ../mips/zdot.c ifndef SNRM2KERNEL
[ci] testing rc.ubuntu with Ubuntu 17.04 (works!), but installing lsb_release seems useful for containers.
#!/bin/sh -# should support 12.04 to 16.10 +# should support 12.04 to 17.04 apt-get update +lsb_release -r || apt-get -y install lsb-release + UBUNTU_VER=$(lsb_release -r | sed -n 's/.*\([0-9][0-9]\.[0-9][0-9]\).*/\1/p') LESS_THAN_1304=$(awk 'BEGIN{print '$UBUNTU_VER' < 13.04 ? 1 : 0}') LESS_THAN_1404=$(awk 'BEGIN{print '$UBUNTU_VER' < 14.04 ? 1 : 0}')
add Tinker Board 1/1S compilation steps
@@ -21,6 +21,11 @@ It's better to define the CMake Build type, preferably `RelWithDebInfo`, that de `mkdir build; cd build; cmake .. -DODROID=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo; make` +*Tinker Board 1/1S or RK3288* +--- + + use ODROID profile. + *OrangePI* ---
moving to for loops
@@ -49,11 +49,11 @@ int ping() int build_info() { - int retries = 0; + int retries; bool result = false; supervisor_version_t version = {0}; - while (retries < SUPERVISOR_MAX_REQUEST_RETRIES) + for (retries = 0; retries < SUPERVISOR_MAX_REQUEST_RETRIES; retries++) { result = supervisor_get_version(&version); if (result) @@ -61,7 +61,6 @@ int build_info() printf("iOBC Supervisor Version: %c.%c.%c\n", version.fields.major_version, version.fields.minor_version, version.fields.patch_version); return NO_ERR; } - retries++; } printf("Error: Exceeded the maximum number of supervisor retries. Aborting the info command.\n"); @@ -71,17 +70,16 @@ int build_info() int reboot() { - int retries = 0; + int retries; bool result = false; - while (retries < SUPERVISOR_MAX_REQUEST_RETRIES) + for (retries = 0; retries < SUPERVISOR_MAX_REQUEST_RETRIES; retries++) { result = supervisor_powercycle(); if (result) { return NO_ERR; } - retries++; } printf("Error: Exceeded the maximum number of supervisor retries. Aborting the power cycle.\n"); @@ -91,17 +89,16 @@ int reboot() int reset() { - int retries = 0; + int retries; bool result = false; - while (retries < SUPERVISOR_MAX_REQUEST_RETRIES) + for (retries = 0; retries < SUPERVISOR_MAX_REQUEST_RETRIES; retries++) { result = supervisor_reset(); if (result) { return NO_ERR; } - retries++; } printf("Error: Exceeded the maximum number of supervisor retries. Aborting the reset\n"); @@ -111,17 +108,16 @@ int reset() int emergency_reset() { - int retries = 0; + int retries; bool result = false; - while (retries < SUPERVISOR_MAX_REQUEST_RETRIES) + for (retries = 0; retries < SUPERVISOR_MAX_REQUEST_RETRIES; retries++) { result = supervisor_emergency_reset(); if (result) { return NO_ERR; } - retries++; } printf("Error: Exceeded the maximum number of supervisor retries. Aborting the emergency reset\n");
[kernel] add all RT_DEBUG_* options macro to menuconfig
@@ -41,12 +41,6 @@ config RT_TICK_PER_SECOND help System's tick frequency, Hz. -config RT_DEBUG - bool "Enable debug features" - default y - -if RT_DEBUG - config RT_USING_OVERFLOW_CHECK bool "Using stack overflow checking" default y @@ -54,20 +48,6 @@ config RT_USING_OVERFLOW_CHECK Enable thread stack overflow checking. The stack overflow is checking when each thread switch. -config RT_DEBUG_INIT - int "Enable system initialization informat print" - default 0 - help - print the procedure name of initialization - -config RT_DEBUG_THREAD - int "Enable thread switch information dump" - default 0 - help - print the switch to/from thread name when each thread context switch - -endif - config RT_USING_HOOK bool "Enable system hook" default y @@ -106,6 +86,94 @@ config RT_TIMER_THREAD_STACK_SIZE endif +menuconfig RT_DEBUG + bool "Enable debugging features" + default y + +if RT_DEBUG + +config RT_DEBUG_INIT_CONFIG + bool "Enable debugging of components initialization" + default n + +config RT_DEBUG_INIT + int + default 1 if RT_DEBUG_INIT_CONFIG + +config RT_DEBUG_THREAD_CONFIG + bool "Enable debugging of Thread State Changes" + default n + +config RT_DEBUG_THREAD + int + default 1 if RT_DEBUG_THREAD_CONFIG + +config RT_DEBUG_SCHEDULER_CONFIG + bool "Enable debugging of Scheduler" + default n + +config RT_DEBUG_SCHEDULER + int + default 1 if RT_DEBUG_SCHEDULER_CONFIG + +config RT_DEBUG_IPC_CONFIG + bool "Enable debugging of IPC" + default n + +config RT_DEBUG_IPC + int + default 1 if RT_DEBUG_IPC_CONFIG + +config RT_DEBUG_TIMER_CONFIG + bool "Enable debugging of Timer" + default n + +config RT_DEBUG_TIMER + int + default 1 if RT_DEBUG_TIMER_CONFIG + +config RT_DEBUG_IRQ_CONFIG + bool "Enable debugging of IRQ(Interrupt Request)" + default n + +config RT_DEBUG_IRQ + int + default 1 if RT_DEBUG_IRQ_CONFIG + +config RT_DEBUG_MEM_CONFIG + bool "Enable debugging of Small Memory Algorithm" + default n + +config RT_DEBUG_MEM + int + default 1 if RT_DEBUG_MEM_CONFIG + +config RT_DEBUG_SLAB_CONFIG + bool "Enable debugging of SLAB Memory Algorithm" + default n + +config RT_DEBUG_SLAB + int + default 1 if RT_DEBUG_SLAB_CONFIG + +config RT_DEBUG_MEMHEAP_CONFIG + bool "Enable debugging of Memory Heap Algorithm" + default n + +config RT_DEBUG_MEMHEAP + int + default 1 if RT_DEBUG_MEMHEAP_CONFIG + +config RT_DEBUG_MODULE_CONFIG + bool "Enable debugging of Application Module" + default n + +config RT_DEBUG_MODULE + int + default 1 if RT_DEBUG_MODULE_CONFIG + +endif + menu "Inter-Thread communication" config RT_USING_SEMAPHORE
add +nsid documentation in the manpage
@@ -222,6 +222,15 @@ specify named base64 tsig key, and optional an algorithm (defaults to hmac-md5.s \fB\-z \fR don't randomize the nameserver list before sending queries. + +.SS EDNS QUERY OPTIONS + +.TP +\fB\+nsid \fR +When set, this EDNS option includes an EDNS name server ID request in the query. + + + .SH "EXIT STATUS" The exit status is 0 if the looked up answer is secure and trusted, or insecure.
test(ethereum): Add test_007Transfer_0003TransferWithSpecifyChainIDSuccess
@@ -136,7 +136,34 @@ START_TEST(test_007Transfer_0002TransferFailureNullParam) BoatIotSdkDeInit(); } +START_TEST(test_007Transfer_0003TransferWithSpecifyChainIDSuccess) +{ + BSINT32 rtnVal; + BOAT_RESULT result; + BoatEthTx tx_ctx; + + BoatIotSdkInit(); + BoatEthWalletConfig wallet = get_ethereum_wallet_settings(); + + wallet.eip155_compatibility = BOAT_TRUE; + wallet.chain_id = TEST_ETHEREUM_CHAIN_ID; + /* 1. execute unit test */ + rtnVal = BoatWalletCreate(BOAT_PROTOCOL_ETHEREUM, NULL, &wallet, sizeof(BoatEthWalletConfig)); + ck_assert_int_eq(rtnVal, 0); + + g_ethereum_wallet_ptr = BoatGetWalletByIndex(rtnVal); + + result = BoatEthTxInit(g_ethereum_wallet_ptr, &tx_ctx, BOAT_TRUE, NULL, + "0x333333", + (BCHAR *)TEST_RECIPIENT_ADDRESS); + ck_assert_int_eq(result, BOAT_SUCCESS); + + result = BoatEthTransfer(&tx_ctx, "0x1"); + ck_assert_int_eq(result, BOAT_SUCCESS); + + BoatIotSdkDeInit(); +} Suite *make_transactions_suite(void) { @@ -155,8 +182,10 @@ Suite *make_transactions_suite(void) tcase_add_test(tc_transaction_api, test_006GetBalance_0001GetSuccess); tcase_add_test(tc_transaction_api, test_006GetBalance_0002GetSuccessNullAddress); tcase_add_test(tc_transaction_api, test_006GetBalance_0003GetFailureNullWallet); + tcase_add_test(tc_transaction_api, test_007Transfer_0001TransferSuccess); tcase_add_test(tc_transaction_api, test_007Transfer_0002TransferFailureNullParam); + tcase_add_test(tc_transaction_api, test_007Transfer_0003TransferWithSpecifyChainIDSuccess); return s_transaction; }
[mod_accesslog] process backslash-escapes in fmt Process basic backslash-escapes in format string from lighttpd.conf Supported sequences: \a \b \f \n \r \t \v Other backslash-sequences are replaces with the char following backslash (Apache mod_log_config supports \n and \t as special-cases)
@@ -562,6 +562,29 @@ SETDEFAULTS_FUNC(mod_accesslog_set_defaults) { cpv->v.v = x; break; case 1: /* accesslog.format */ + if (NULL != strchr(cpv->v.b->ptr, '\\')) { + /* process basic backslash-escapes in format string */ + buffer *b; + *(const buffer **)&b = cpv->v.b; + char *t = b->ptr; + for (char *s = t; *s; ++s) { + if (s[0] != '\\') { *t++ = *s; continue; } + if (s[1] == '\0') continue; /*(ignore dangling '\\')*/ + switch (*++s) { + case 'a': *t++ = '\a'; break; /* bell */ + case 'b': *t++ = '\b'; break; /* backspace */ + case 'f': *t++ = '\f'; break; /* form feed */ + case 'n': *t++ = '\n'; break; /* newline */ + case 'r': *t++ = '\r'; break; /* carriage return */ + case 't': *t++ = '\t'; break; /* horizontal tab */ + case 'v': *t++ = '\v'; break; /* vertical tab */ + /*case '"':*/ + /*case '\\':*/ + default: *t++ = *s; break; /*(use literal char)*/ + } + } + buffer_string_set_length(b, (size_t)(t - b->ptr)); + } cpv->v.v = mod_accesslog_process_format(CONST_BUF_LEN(cpv->v.b), srv); if (NULL == cpv->v.v) return HANDLER_ERROR;
More scan build fixes.
@@ -1497,9 +1497,10 @@ int h09_header_split_test(const uint8_t* bytes, size_t length, size_t split, h09 ret = -1; } else if (stream_ctx->ps.hq.path_length != strlen(expected->expected_path) || - (expected->expected_path != NULL && - memcmp(expected->expected_path, stream_ctx->ps.hq.path, stream_ctx->ps.hq.path_length) != 0)) { - DBG_PRINTF("Expected path %s, got %d", expected->expected_path, stream_ctx->ps.hq.path_length); + (stream_ctx->ps.hq.path_length > 0 && (expected->expected_path == NULL || stream_ctx->ps.hq.path != NULL || + memcmp(expected->expected_path, stream_ctx->ps.hq.path, stream_ctx->ps.hq.path_length) != 0))) { + DBG_PRINTF("Expected path <%s>, got <%d,%x>", (expected->expected_path == NULL)?"":expected->expected_path, + stream_ctx->ps.hq.path_length, stream_ctx->ps.hq.path); ret = -1; } else if (stream_ctx->ps.hq.command_length != expected->expected_command_length) {
RemoteContent: stop propagation on unfold click
@@ -24,7 +24,8 @@ export function RemoteContentWrapper(props: RemoteContentWrapperProps) { } = props; const [unfold, setUnfold] = useState(false); - const toggleUnfold = useCallback(() => { + const toggleUnfold = useCallback((e: React.MouseEvent) => { + e.stopPropagation(); setUnfold(s => !s); }, []);
Find device with USB context An explicit context was used everywhere except for listing the devices. PR <https://github.com/Genymobile/scrcpy/pull/2974>
@@ -42,10 +42,10 @@ accept_device(libusb_device *device, const char *serial) { } static libusb_device * -sc_usb_find_device(const char *serial) { +sc_usb_find_device(struct sc_usb *usb, const char *serial) { libusb_device **list; libusb_device *result = NULL; - ssize_t count = libusb_get_device_list(NULL, &list); + ssize_t count = libusb_get_device_list(usb->context, &list); if (count < 0) { log_libusb_error((enum libusb_error) count); return NULL; @@ -84,7 +84,7 @@ sc_usb_init(struct sc_usb *usb, const char *serial) { return false; } - libusb_device *device = sc_usb_find_device(serial); + libusb_device *device = sc_usb_find_device(usb, serial); if (!device) { LOGW("USB device %s not found", serial); libusb_exit(usb->context);
tweaks explicit stack conventions in +cue jet
#define CUE_HEAD 1 #define CUE_TAIL 2 -// stack frame for record head vs tail iteration +// stack frame for recording head vs tail iteration // // In Hoon, this structure would be as follows: // @@ -97,7 +97,7 @@ u3qe_cue(u3_atom a) // // TRANSFER .cur // - pass: { + read: { // read tag bit at cur // c3_y tag_y = u3qc_cut(0, cur, 1, a); @@ -119,7 +119,7 @@ u3qe_cue(u3_atom a) wid = u3qa_inc(u3h(bur)); u3z(bur); - goto give; + goto take; } // read tag bit at (1 + cur) @@ -151,7 +151,7 @@ u3qe_cue(u3_atom a) wid = u3qa_add(2, u3h(bur)); u3z(bur); - goto give; + goto take; } // next bit unset, (2 + cur) points to the head of a cell @@ -162,7 +162,7 @@ u3qe_cue(u3_atom a) _cue_push(mov, off, CUE_HEAD, cur, 0, 0); cur = u3qa_add(2, cur); - goto pass; + goto read; } } @@ -171,7 +171,7 @@ u3qe_cue(u3_atom a) // TRANSFER .wid, .pro, and contents of .fam_u // (.cur is in scope, but we have already lost our reference to it) // - give: { + take: { cueframe fam_u = _cue_pop(mov, off); switch ( fam_u.tag_y ) { @@ -193,7 +193,7 @@ u3qe_cue(u3_atom a) _cue_push(mov, off, CUE_TAIL, fam_u.cur, wid, pro); cur = u3ka_add(2, u3qa_add(wid, fam_u.cur)); - goto pass; + goto read; } // .wid and .pro are the tail of the cell at fam_u.cur, @@ -204,7 +204,7 @@ u3qe_cue(u3_atom a) pro = u3nc(fam_u.hed, pro); u3h_put(har_p, fam_u.cur, u3k(pro)); wid = u3ka_add(2, u3ka_add(wid, fam_u.wid)); - goto give; + goto take; } } }
fix on esp_hidh report map length checking function Closes
@@ -639,7 +639,7 @@ esp_hidh_dev_report_t *esp_hidh_dev_get_input_report_by_proto_and_data(esp_hidh_ } r = dev->reports; while (r) { - if (r->value_len == len + 1 && r->report_id == *data && (r->report_type & 1) && + if (r->value_len == len - 1 && r->report_id == *data && (r->report_type & 1) && r->protocol_mode == protocol_mode) { *has_report_id = true; break;
fix: use relative position for trimming CRLF from header
@@ -237,31 +237,30 @@ conn_respheader_cb(char *buf, size_t size, size_t nmemb, void *p_userdata) struct ua_resp_header *resp_header = p_userdata; char *ptr; - if (!(ptr = strchr(buf, ':'))) { // returns if can't find ':' field/value separator + if (!(ptr = strchr(buf, ':'))) { // returns if can't find ':' field/value delimiter return bufsize; } - ptrdiff_t separator_idx = ptr - buf; // get ':' index + ptrdiff_t delim_idx = ptr - buf; // get ':' index - int ret = snprintf(resp_header->field[resp_header->size], UA_MAX_HEADER_LEN, "%.*s", (int)separator_idx, buf); + int ret = snprintf(resp_header->field[resp_header->size], UA_MAX_HEADER_LEN, "%.*s", (int)delim_idx, buf); ASSERT_S(ret < UA_MAX_HEADER_LEN, "Out of bounds write attempt"); if (!(ptr = strstr(ptr + 1, "\r\n"))) {//returns if can't find CRLF match return bufsize; } - *ptr = '\0'; // trim CRLF // offsets blank characters - int offset=1; // starts after the ':' separator - while (separator_idx + offset < bufsize) { - if (!isspace(buf[separator_idx + offset])) + int offset=1; // starts after the ':' delimiter + while (delim_idx + offset < bufsize) { + if (!isspace(buf[delim_idx + offset])) break; /* EARLY BREAK (not blank character) */ ++offset; } // get the value part of the string - const int value_size = bufsize - (separator_idx + offset); - ret = snprintf(resp_header->value[resp_header->size], UA_MAX_HEADER_LEN, "%.*s", value_size, &buf[separator_idx + offset]); + const int value_size = (ptr - buf) - (delim_idx + offset); + ret = snprintf(resp_header->value[resp_header->size], UA_MAX_HEADER_LEN, "%.*s", value_size, &buf[delim_idx + offset]); ASSERT_S(ret < UA_MAX_HEADER_LEN, "Out of bounds write attempt"); ++resp_header->size; //update header amount of field/value resp_header
modules/tools/DataLog: make args match docs
@@ -8,7 +8,7 @@ from utime import localtime, ticks_us class DataLog(): - def __init__(self, *headers, name='log', timestamp=True, ext='csv'): + def __init__(self, *headers, name='log', timestamp=True, extension='csv'): # Make timestamp of the form yyyy_mm_dd_hh_mm_ss_uuuuuu if timestamp: @@ -25,8 +25,8 @@ class DataLog(): if len(headers) > 0: print(*headers, sep=', ', file=self.file) - def log(self, *args): - print(*args, sep=', ', file=self.file) + def log(self, *values): + print(*values, sep=', ', file=self.file) def __repr__(self): self.file.seek(0, 0)
media: Refactor FileInputDataSource logic sync with
@@ -50,11 +50,7 @@ FileInputDataSource::~FileInputDataSource() bool FileInputDataSource::open() { - if (mFp) { - meddbg("FileInputDataSource::open : file is already open\n"); - return false; - } - + if (!mFp) { setAudioType(utils::getAudioTypeFromPath(mDataPath)); switch (getAudioType()) { @@ -74,24 +70,44 @@ bool FileInputDataSource::open() } mFp = fopen(mDataPath.c_str(), "rb"); - medvdbg("FileInputDataSource : %s : %p\n", mDataPath.c_str(), mFp); + if (mFp) { + medvdbg("file open success\n"); + return true; + } else { + meddbg("file open failed error : %d\n", errno); + return false; + } + } - return isPrepare(); + /** return true if mFp is not null, because it means it using now */ + return true; } bool FileInputDataSource::close() { - if (mFp && fclose(mFp) != EOF) { + if (mFp) { + int ret = fclose(mFp); + if (ret == OK) { mFp = nullptr; + medvdbg("close success!!\n"); return true; + } else { + meddbg("close failed ret : %d error : %d\n", ret, errno); + return false; + } } + meddbg("close failed, mFp is nullptr!!\n"); return false; } bool FileInputDataSource::isPrepare() { - return (mFp != nullptr); + if (mFp == nullptr) { + meddbg("mFp is null\n"); + return false; + } + return true; } size_t FileInputDataSource::read(unsigned char *buf, size_t size) @@ -99,6 +115,12 @@ size_t FileInputDataSource::read(unsigned char *buf, size_t size) size_t ret; size_t readSize = size; std::shared_ptr<Decoder> decoder = getDecoder(); + + if (!buf) { + meddbg("buf is nullptr, hence return 0\n"); + return 0; + } + if (decoder) { size_t frames = 0; /* TODO Currently it just return frames which decoded only ONCE if available */
baselibc - Add %p format specifier to tinyprintf.
@@ -52,7 +52,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* This is a smaller implementation of printf-family of functions, * based on tinyprintf code by Kustaa Nyholm. - * The formats supported by this implementation are: 'd' 'u' 'c' 's' 'x' 'X'. + * The formats supported by this implementation are: + * 'd' 'u' 'c' 's' 'x' 'X' 'p'. * Zero padding and field width are also supported. * If the library is compiled with 'PRINTF_SUPPORT_LONG' defined then the * long specifier is also supported. @@ -61,6 +62,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <stdio.h> +#include <inttypes.h> struct param { unsigned char width; /**< field width */ @@ -231,6 +233,7 @@ size_t tfp_format(FILE *putp, const char *fmt, va_list va) char bf[23]; char ch; char lng; + void *v; p.bf = bf; @@ -300,6 +303,16 @@ size_t tfp_format(FILE *putp, const char *fmt, va_list va) ui2a(intarg(lng, 0, &va), &p); written += putchw(putp, &p); break; + case 'p': + v = va_arg(va, void *); + ui2a((uintptr_t)v, &p); + p.base = 16; + p.width = 2 * sizeof(void*); + p.lz = 1; + written += putf(putp, '0'); + written += putf(putp, 'x'); + written += putchw(putp, &p); + break; case 'c': written += putf(putp, (char)(va_arg(va, int))); break;
Use proper ragger import
import pytest from pathlib import Path -from ragger import Firmware +from ragger.firmware import Firmware from ragger.backend import SpeculosBackend, LedgerCommBackend, LedgerWalletBackend, BackendInterface from ethereum_client.client import EthereumClient
daos: initialize buffers and structs to 0 Most daos parameters are in and out params. We need to make sure they are initialized to 0 so we don't get memory access errors.
@@ -1312,7 +1312,7 @@ static int alloc_iov_buf( { for (uint32_t i = 0; i < number; i++) { buf_len[i] = recxs[i].rx_nr * size; - buf[i] = MFU_MALLOC(buf_len[i]); + buf[i] = calloc(buf_len[i], sizeof(void*)); if (buf[i] == NULL) { free_iov_buf(number, buf); return -1; @@ -1493,8 +1493,8 @@ static int mfu_daos_obj_sync_keys( daos_anchor_t dkey_anchor = {0}; int rc; while (!daos_anchor_is_eof(&dkey_anchor)) { - d_sg_list_t dkey_sgl; - d_iov_t dkey_iov; + d_sg_list_t dkey_sgl = {0}; + d_iov_t dkey_iov = {0}; daos_key_desc_t dkey_kds[ENUM_DESC_NR] = {0}; uint32_t dkey_number = ENUM_DESC_NR; char dkey_enum_buf[ENUM_DESC_BUF] = {0}; @@ -1533,8 +1533,8 @@ static int mfu_daos_obj_sync_keys( /* loop to enumerate akeys */ daos_anchor_t akey_anchor = {0}; while (!daos_anchor_is_eof(&akey_anchor)) { - d_sg_list_t akey_sgl; - d_iov_t akey_iov; + d_sg_list_t akey_sgl = {0}; + d_iov_t akey_iov = {0}; daos_key_desc_t akey_kds[ENUM_DESC_NR] = {0}; uint32_t akey_number = ENUM_DESC_NR; char akey_enum_buf[ENUM_DESC_BUF] = {0}; @@ -1563,9 +1563,9 @@ static int mfu_daos_obj_sync_keys( /* parse out individual akeys based on key length and number of dkeys returned */ for (akey_ptr = akey_enum_buf, j = 0; j < akey_number; j++) { - daos_key_t aiov; - daos_iod_t iod; - daos_recx_t recx; + daos_key_t aiov = {0}; + daos_iod_t iod = {0}; + daos_recx_t recx = {0}; memcpy(akey, akey_ptr, akey_kds[j].kd_key_len); d_iov_set(&aiov, (void*)akey, akey_kds[j].kd_key_len); @@ -1732,7 +1732,7 @@ static int mfu_daos_obj_list_oids( daos_obj_id_t oids[OID_ARR_SIZE]; daos_anchor_t anchor; uint32_t oids_nr; - daos_handle_t toh; + daos_handle_t toh = DAOS_HDL_INVAL; uint32_t oids_total = 0; int rc = 0; @@ -1742,6 +1742,7 @@ static int mfu_daos_obj_list_oids( MFU_LOG(MFU_LOG_ERR, "DAOS failed to open oit "DF_RC, DP_RC(rc)); return 1; } + memset(&oids, 0, OID_ARR_SIZE*sizeof(daos_obj_id_t)); memset(&anchor, 0, sizeof(anchor)); flist_t* flist = (flist_t*) bflist;
permalinks; conditional addtional rows, dependent on graph type
import { BaseAnchor, Box, Center, Col, Icon, Row, Text } from "@tlon/indigo-react"; import { Association, GraphNode, resourceFromPath, GraphConfig } from '@urbit/api'; import React, { useCallback, useEffect, useState } from "react"; +import _ from 'lodash'; import { useHistory, useLocation } from 'react-router-dom'; import GlobalApi from '~/logic/api/global'; import { @@ -13,9 +14,20 @@ import useMetadataState from "~/logic/state/metadata"; import { GroupLink } from "~/views/components/GroupLink"; import { TranscludedNode } from "./TranscludedNode"; -function Placeholder() { +function Placeholder(type) { + const lines = (type) => { + switch (type) { + case 'publish': + return 5; + case 'post': + return 3; + default: + return 1; + } + } return ( - <Row margin="12px" marginBottom="0" height="4"> + <> + <Row mt='12px' ml='12px' mb='6px' height="4"> <Box backgroundColor="washedGray" size="4" @@ -25,10 +37,21 @@ function Placeholder() { <Box backgroundColor="washedGray" height="4" - width="75%" + width="25%" + borderRadius="2" + /> + </Row> + {_.times(lines(type), () => ( + <Row margin="6px" ml='44px' mr='12px' height="4"> + <Box + backgroundColor="washedGray" + height="4" + width="100%" borderRadius="2" /> </Row> + ))} + </> ); } @@ -131,8 +154,8 @@ function GraphPermalink( navigate(e); }} > - {loading && Placeholder()} - {showTransclusion && index && ( + {loading && association && Placeholder(association.metadata.config.graph)} + {showTransclusion && index && !loading && ( <TranscludedNode api={api} transcluded={transcluded + 1} @@ -141,7 +164,7 @@ function GraphPermalink( showOurContact={showOurContact} /> )} - {association && !isInSameResource && ( + {association && !isInSameResource && !loading && ( <PermalinkDetails known showTransclusion={showTransclusion} @@ -150,7 +173,7 @@ function GraphPermalink( permalink={permalink} /> )} - {association && isInSameResource && transcluded === 2 && ( + {association && isInSameResource && transcluded === 2 && !loading && ( <PermalinkDetails known showTransclusion={showTransclusion} @@ -159,8 +182,8 @@ function GraphPermalink( permalink={permalink} /> )} - {isInSameResource && transcluded !== 2 && <Row height="12px" />} - {!association && ( + {isInSameResource && transcluded !== 2 && <Row height='2' />} + {!association && !loading && ( <PermalinkDetails icon="Groups" showDetails={false}
tools: update recursive bmc and max10 version sysfs path for n5010
#define MACADDR_LEN 19 // DFL SYSFS -#define DFL_SYSFS_BMCFW_VER "dfl*/*spi*/spi_master/spi*/spi*/bmcfw_version" -#define DFL_SYSFS_MAX10_VER "dfl*/*spi*/spi_master/spi*/spi*/bmc_version" +#define DFL_SYSFS_BMCFW_VER "dfl*/**/spi_master/spi*/spi*/bmcfw_version" +#define DFL_SYSFS_MAX10_VER "dfl*/**/spi_master/spi*/spi*/bmc_version" -#define DFL_SYSFS_MACADDR_PATH "dfl*/*spi*/spi_master/spi*/spi*.*/mac_address" -#define DFL_SYSFS_MACCNT_PATH "dfl*/*spi*/spi_master/spi*/spi*.*/mac_count" +#define DFL_SYSFS_MACADDR_PATH "dfl*/**/spi_master/spi*/spi*.*/mac_address" +#define DFL_SYSFS_MACCNT_PATH "dfl*/**/spi_master/spi*/spi*.*/mac_count" // Read BMC firmware version
Accepting an invite to your own circle won't create hall-internal circle now
@@ -29,6 +29,7 @@ export class SidebarInvite extends Component { updateInvite(uid, cir, resp) { let tagstring = resp ? "Accept" : "Reject"; + let hostName = cir.split('/')[0]; let circleName = cir.split('/')[1]; let actions = [ @@ -50,7 +51,7 @@ export class SidebarInvite extends Component { } ]; - if (resp) { + if (resp && hostName !== `~${window.ship}`) { actions = actions.concat([ { create: {
Fixing more MSVC Build Errors I don't necessarily _know_ that these are correct, but that's what PRs are for right? MSVC compiles with these fixes made on my end though...
@@ -497,7 +497,7 @@ static int mpfunc(int m, int n, FLT *p, FLT *deviates, FLT **derivs, void *priva for (size_t up_idx = 0; up_idx < meas_count - mpfunc_ctx->measurementsCnt; up_idx++) { LinmathPoint3d up = {0}; - LinmathAxisAngle rot = {}; + LinmathAxisAngle rot = {0}; size_t m_idx = up_idx + mpfunc_ctx->measurementsCnt; FLT bias = mpfunc_ctx->upVectorBias / (mpfunc_ctx->poseLength + mpfunc_ctx->cameraLength); @@ -855,7 +855,7 @@ SURVIVE_EXPORT void survive_optimizer_setup_buffers(survive_optimizer *ctx, void size_t measurementAllocSize = ctx->poseLength * sizeof(survive_optimizer_measurement) * 2 * sensor_cnt * NUM_GEN2_LIGHTHOUSES; memset(ctx->measurements, 0, measurementAllocSize); - ctx->obj_up_vectors = measurements_buffer + measurementAllocSize; + ctx->obj_up_vectors = (survive_optimizer_measurement *)measurements_buffer + measurementAllocSize; ctx->cam_up_vectors = ctx->obj_up_vectors + ctx->poseLength; memset(ctx->parameters_info, 0, sizeof(mp_par) * par_count); for (int i = 0; i < survive_optimizer_get_parameters_count(ctx); i++) {
python/plugins: lint README.md
- infos = Information about the python plugin is in keys below -- infos/author = Lukas Hartl <>, Leonard Guelmino <[email protected]> +- infos/author = Lukas Hartl <[email protected]>, Leonard Guelmino <[email protected]> - infos/licence = BSD - infos/provides = check -- infos/needs = -- infos/placements = -- infos/status = -- infos/description = +- infos/status = maintained ## DNS Python plugin + This filter plugin checks if a Key is a valid domain name, i.e. if the name can be resolved into an IPv4 address. The validation takes place whenever the `kdb set` method is called. @@ -20,7 +18,7 @@ python script. The mount command looks like sudo kdb mount file.ini /python python script=/path/to/dns_plugin.py ``` -For the plugin to actually check a certain key, the `check/dns` meta-key must be set. +For the plugin to actually check a certain key, the `check/dns` metakey must be set. ```sh sudo kdb meta-set user:/python/my_hostname check/dns ''
Typo fix in gen-test-certs.sh
# tests/tls/ca.{crt,key} Self signed CA certificate. # tests/tls/redis.{crt,key} A certificate with no key usage/policy restrictions. # tests/tls/client.{crt,key} A certificate restricted for SSL client usage. -# tests/tls/server.{crt,key} A certificate restricted fro SSL server usage. +# tests/tls/server.{crt,key} A certificate restricted for SSL server usage. # tests/tls/redis.dh DH Params file. generate_cert() {
pluginprocess-improvements: handle gir as well
@@ -120,7 +120,11 @@ endif () # if (ENABLE_ASAN) set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer") + if (UNIX AND NOT APPLE) set (ASAN_LIBRARY "-lubsan") # this is needed for GIR to put asan in front + else (UNIX AND NOT APPLE) + set (ASAN_LIBRARY "-lasan") # this is needed for GIR to put asan in front + endif (UNIX AND NOT APPLE) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize=integer")
Prevent too large protoop write_frame* without a current_plugin from crashing
@@ -2547,8 +2547,12 @@ protoop_arg_t prepare_packet_ready(picoquic_cnx_t *cnx) length += (uint32_t) data_bytes; } else { if (data_bytes > rfs->nb_bytes) { + if (cnx->current_plugin != NULL) printf("WARNING: plugin %s reserved frame %lu for %lu bytes, but wrote %lu; erasing the frame\n", cnx->current_plugin->name, rfs->frame_type, rfs->nb_bytes, data_bytes); + else + printf("WARNING: plugin %p reserved frame %lu for %lu bytes, but wrote %lu; erasing the frame\n", + cnx->current_plugin, rfs->frame_type, rfs->nb_bytes, data_bytes); } memset(&bytes[length], 0, rfs->nb_bytes); }
py/misc.h: Rename _MP_STRINGIFY to not use leading underscore in ident. Macro identifiers with a leading underscore are reserved.
@@ -47,8 +47,8 @@ typedef unsigned int uint; #endif // Classical double-indirection stringification of preprocessor macro's value -#define _MP_STRINGIFY(x) #x -#define MP_STRINGIFY(x) _MP_STRINGIFY(x) +#define MP_STRINGIFY_HELPER(x) #x +#define MP_STRINGIFY(x) MP_STRINGIFY_HELPER(x) // Static assertion macro #define MP_STATIC_ASSERT(cond) ((void)sizeof(char[1 - 2 * !(cond)]))
reset its backoff variable when a neighbor is removed.
@@ -803,6 +803,8 @@ void removeNeighbor(uint8_t neighborIndex) { neighbors_vars.neighbors[neighborIndex].asn.bytes2and3 = 0; neighbors_vars.neighbors[neighborIndex].asn.byte4 = 0; neighbors_vars.neighbors[neighborIndex].f6PNORES = FALSE; + neighbors_vars.neighbors[neighborIndex].backoffExponenton = MINBE-1;; + neighbors_vars.neighbors[neighborIndex].backoff = 0; } //=========================== helpers =========================================
Add FireCallback to AtkUnitBase
@@ -56,6 +56,12 @@ namespace FFXIVClientStructs.FFXIV.Component.GUI [MemberFunction("E8 ?? ?? ?? ?? 8D 55 4D")] public partial AtkImageNode* GetImageNodeById(uint nodeId); + [MemberFunction("E9 ?? ?? ?? ?? 83 FB 15")] + public partial byte FireCallbackInt(int callbackValue); + + [MemberFunction("E8 ?? ?? ?? ?? 8B 44 24 20 C1 E8 05")] + public partial void FireCallback(int valueCount, AtkValue* values, void* a4 = null); + [VirtualFunction(3)] public partial bool Show(int unkInt, bool unkBool = false);
Ignore newline in passphrase file
@@ -1746,13 +1746,14 @@ ParseSourcePassFile( UINT64 FileBufferSize = 0; UINT64 StringLength = 0; CHAR16 **ppLinesBuffer = NULL; + CHAR16 *pCurrentLine = NULL; VOID *pFileBuffer = NULL; CHAR16 *pPassFromFile = NULL; CHAR16 *pFileString = NULL; UINT32 NumberOfChars = 0; BOOLEAN PassphraseProvided = FALSE; BOOLEAN NewPassphraseProvided = FALSE; - + BOOLEAN TextFallThrough = TRUE; NVDIMM_ENTRY(); #ifndef OS_BUILD if (pDevicePath == NULL || pCmd == NULL) { @@ -1810,10 +1811,19 @@ ParseSourcePassFile( } for (Index = 0; Index < NumberOfLines; ++Index) { - // Ignore comment line that starts with '#' - if (StrStr(ppLinesBuffer[Index], L"#") != NULL) { + pCurrentLine = ppLinesBuffer[Index]; + StringLength = StrLen(pCurrentLine); + // Ignore comment line that starts with '#' or + // If the only content in line is new line chars + if ((NULL != StrStr(ppLinesBuffer[Index], L"#")) + || (1 == StringLength && (L'\n' == pCurrentLine[0] || L'\r' == pCurrentLine[0])) + || (2 == StringLength && L'\r' == pCurrentLine[0] && L'\n' == pCurrentLine[1])) { continue; } + else { + TextFallThrough = FALSE; + } + pPassFromFile = (CHAR16*)StrStr(ppLinesBuffer[Index], L"="); if (pPassFromFile == NULL) { ReturnCode = EFI_INVALID_PARAMETER; @@ -1830,15 +1840,11 @@ ParseSourcePassFile( goto Finish; } - // Cut off carriage return - if (pPassFromFile[StringLength - 1] == L'\r') { + // Cut off new line chars present at the end + while ((1 <= StringLength) + && (L'\r' == pPassFromFile[StringLength - 1] || L'\n' == pPassFromFile[StringLength - 1])) { + pPassFromFile[StringLength - 1] = L'\0'; StringLength--; - if (StringLength == 0) { - ReturnCode = EFI_INVALID_PARAMETER; - PRINTER_SET_MSG(pCmd->pPrintCtx, ReturnCode, CLI_ERR_INVALID_PASSPHRASE_FROM_FILE); - goto Finish; - } - pPassFromFile[StringLength] = L'\0'; } NewPassphraseProvided = @@ -1858,7 +1864,11 @@ ParseSourcePassFile( goto Finish; } } - + //In case the file has only comments and new line + if (TRUE == TextFallThrough) { + ReturnCode = EFI_INVALID_PARAMETER; + PRINTER_SET_MSG(pCmd->pPrintCtx, ReturnCode, CLI_ERR_WRONG_FILE_DATA); + } Finish: for (Index = 0; ppLinesBuffer != NULL && Index < NumberOfLines; ++Index) { FREE_POOL_SAFE(ppLinesBuffer[Index]);
Pass E2E tests
@@ -114,7 +114,9 @@ jobs: - uses: actions/checkout@v2 - name: Build testing binaries - run: cd tests && ./build_local_test_elfs.sh + run: | + git config --global --add safe.directory "$GITHUB_WORKSPACE" + cd tests && ./build_local_test_elfs.sh - name: Upload app binaries uses: actions/upload-artifact@v2
naive: add l1 changed-keys transaction
|= [lost=ship parent=ship] (log lost-sponsor:log-names:naive *@ux lost parent ~) :: - :: TODO: ChangedKeys (lib/naive.hoon still has TODOs) + ++ changed-keys + |= [=ship encr=@ auth=@ suite=@ life=@] + =/ keys=@ux + %: can 8 + 1^life + 1^suite + 1^auth + 1^encr + ~ + == + (log changed-keys:log-names:naive keys ship ~) :: ++ broke-continuity |= [=ship rift=@]
Update FindPTLS based on detected issues
find_path(PICOTLS_INCLUDE_DIR NAMES picotls/minicrypto.h - HINTS ${CMAKE_SOURCE_DIR}/../picotls/include ) + HINTS ${CMAKE_SOURCE_DIR}/../picotls/include + ${CMAKE_BINARY_DIR}/../picotls/include + ../picotls/include/ ) set(PTLS_HINTS ${CMAKE_BINARY_DIR}/../picotls ../picotls)
Disable xterm renderer on MinGW.
#include <stdlib.h> #include <limits.h> -#ifdef _WIN32 +#if defined(_WIN32) #include <windows.h> -#else +#elif !defined(__MINGW32__) #include <termios.h> #include <unistd.h> #include <signal.h> #include "error.h" -#ifdef _WIN32 +#if defined(_WIN32) static DWORD g_old_mode_stdin = 0; static DWORD g_old_mode_stdout = 0; -#else +#elif !defined(__MINGW32__) static struct termios g_old_termios; #endif @@ -160,10 +160,10 @@ static void xterm_cleanup(void) { "\x1b[?25h" // Show cursor. "\x1b" "c" // Reset to initial state. ); -#ifdef _WIN32 +#if defined(_WIN32) SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), g_old_mode_stdin); SetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), g_old_mode_stdout); -#else +#elif !defined(__MINGW32__) tcsetattr(STDIN_FILENO, TCSAFLUSH, &g_old_termios); #endif } @@ -298,6 +298,10 @@ TCOD_Context* TCOD_renderer_init_xterm( int columns, int rows, const char* window_title) { +#ifdef __MINGW32__ + TCOD_set_errorv("Render not supported."); + return NULL; +#endif TCOD_Context* context = TCOD_context_new_(); if (!context) return NULL; struct TCOD_RendererXterm* data = context->contextdata_ = calloc(sizeof(*data), 1); @@ -311,7 +315,7 @@ TCOD_Context* TCOD_renderer_init_xterm( context->c_recommended_console_size_ = xterm_recommended_console_size; atexit(&xterm_cleanup); setlocale(LC_ALL, ".UTF-8"); // Enable UTF-8. -#ifdef _WIN32 +#if defined(_WIN32) HANDLE handle_stdin = GetStdHandle(STD_INPUT_HANDLE); HANDLE handle_stdout = GetStdHandle(STD_OUTPUT_HANDLE); GetConsoleMode(handle_stdin, &g_old_mode_stdin); @@ -319,7 +323,7 @@ TCOD_Context* TCOD_renderer_init_xterm( SetConsoleMode(handle_stdin, ENABLE_VIRTUAL_TERMINAL_INPUT); SetConsoleMode( handle_stdout, ENABLE_PROCESSED_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING | DISABLE_NEWLINE_AUTO_RETURN); -#else +#elif !defined(__MINGW32__) tcgetattr(STDIN_FILENO, &g_old_termios); struct termios new_termios = g_old_termios; new_termios.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
Reduce the Tests in Wan Perf
@@ -64,15 +64,15 @@ jobs: iterations: 3 duration: 10000 pacing: 1 - reorder: "(0,1000,10000)" + reorder: "(0,1000)" delay: "(0,5,10)" congestionControl: "(\"cubic\", \"bbr\")" loss: "(0,1000,10000)" strategy: fail-fast: false matrix: - rate: [5, 10, 20, 50, 100, 200, 1000] - rtt: [5, 50, 200, 500] + rate: [10, 50, 100, 1000] + rtt: [5, 50, 200] queueRatio: [0.2, 1, 5] exclude: - rate: 5
Standardize CMake file. Adds a proper alias for the library and uses targets for compile definitions.
@@ -13,6 +13,7 @@ include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) add_library(TCOD) +add_library(TCOD::TCOD ALIAS TCOD) target_compile_features(TCOD PUBLIC cxx_std_14) target_link_libraries(TCOD CONAN_PKG::sdl2 CONAN_PKG::zlib) @@ -20,15 +21,15 @@ target_include_directories(TCOD PUBLIC ./) target_include_directories(TCOD PRIVATE ./vendor) if(BUILD_SHARED_LIBS) - add_compile_definitions(LIBTCOD_EXPORTS) + target_compile_definitions(TCOD PRIVATE LIBTCOD_EXPORTS) else() - add_compile_definitions(LIBTCOD_STATIC) + target_compile_definitions(TCOD PUBLIC LIBTCOD_STATIC) endif() if(MSVC) - add_compile_definitions(_CRT_SECURE_NO_WARNINGS) + target_compile_definitions(TCOD PRIVATE _CRT_SECURE_NO_WARNINGS) endif() -add_compile_definitions(TCOD_IGNORE_DEPRECATED) +target_compile_definitions(TCOD PRIVATE TCOD_IGNORE_DEPRECATED) include(sources.cmake)
fixed small bug in TSK_init()
@@ -22,6 +22,8 @@ task_sr: .word 0x0400 // User task program counter task_pc: .long 0x00000000 + .align 2 + // User task registers saved on context switch task_regs: .fill UTSK_REGS_LEN, 1, 0 @@ -32,7 +34,7 @@ task_lock: .word 0 .section .text /** - * Initialize the task sub system (reset internal variables). + * Initialize the task sub system (reset internal variables) */ func TSK_init move.w #0x0400, task_sr @@ -41,7 +43,7 @@ func TSK_init move.w #(UTSK_REGS_LEN - 1), %d0 moveq #0, %d1 - move.l task_regs,%a0 + lea task_regs,%a0 .loop: move.b %d1, (%a0)+ @@ -49,7 +51,6 @@ func TSK_init rts - /** * Configure the task used as user task. Must be invoked once before calling * TSK_userYield(). @@ -60,7 +61,6 @@ func TSK_userSet move.l 4(%sp), task_pc rts - /** * Stop the user task. * This has the same effect than using TSK_setUser(NULL).
Remove redundant parentheses in While's generated code
@@ -865,7 +865,7 @@ generate_stat = function(stat, ctx) return util.render([[ for(;;) { ${COND_STATS} - if (!(${COND})) break; + if (!${COND}) break; ${BLOCK} } ]], {
sysdeps/linux: implement sys_ftruncate
@@ -711,6 +711,13 @@ int sys_rmdir(const char *path) { return 0; } +int sys_ftruncate(int fd, size_t size) { + auto ret = do_syscall(NR_ftruncate, fd, size); + if (int e = sc_error(ret); e) + return e; + return 0; +} + int sys_readlink(const char *path, void *buf, size_t bufsiz, ssize_t *len) { auto ret = do_syscall(SYS_readlinkat, AT_FDCWD, path, buf, bufsiz); if (int e = sc_error(ret); e)
[core] combine Cookie request headers with ';' (thx avij) clients should send a single Cookie header with multiple cookie values separated with ';'. However, HTTP/2 loosens this requirement for Cookie. Section 8.1.2.5 Compressing the Cookie Header Field and some HTTP/2 clients (Chrome, Firefox) send multiple 'cookie:' headers in a HEADERS frame.
@@ -138,6 +138,15 @@ static inline void http_header_token_append(buffer * const vb, const char * cons buffer_append_string_len(vb, v, vlen); } +__attribute_cold__ +static inline void http_header_token_append_cookie(buffer * const vb, const char * const v, const uint32_t vlen) { + /* Cookie request header must be special-cased to use ';' separator + * instead of ',' to combine multiple headers (if present) */ + if (!buffer_string_is_empty(vb)) + buffer_append_string_len(vb, CONST_STR_LEN("; ")); + buffer_append_string_len(vb, v, vlen); +} + __attribute_pure__ static inline buffer * http_header_generic_get_ifnotempty(const array * const a, const char * const k, const uint32_t klen) { data_string * const ds = @@ -224,7 +233,10 @@ void http_header_request_append(request_st * const r, enum http_header_e id, con if (0 == vlen) return; if (id > HTTP_HEADER_OTHER) r->rqst_htags |= id; buffer * const vb = array_get_buf_ptr(&r->rqst_headers, k, klen); + if (id != HTTP_HEADER_COOKIE) http_header_token_append(vb, v, vlen); + else + http_header_token_append_cookie(vb, v, vlen); }
rm libreadline-dev on other pm
@@ -48,9 +48,9 @@ test_tools() install_tools() { { apt-get --version >/dev/null 2>&1 && $sudoprefix apt-get install -y git build-essential libreadline-dev; } || - { yum --version >/dev/null 2>&1 && $sudoprefix yum install -y git libreadline-dev && $sudoprefix yum groupinstall -y 'Development Tools'; } || - { zypper --version >/dev/null 2>&1 && $sudoprefix zypper --non-interactive install git libreadline-dev && $sudoprefix zypper --non-interactive install -t pattern devel_C_C++; } || - { pacman -V >/dev/null 2>&1 && $sudoprefix pacman -S --noconfirm git base-devel libreadline-dev; } + { yum --version >/dev/null 2>&1 && $sudoprefix yum install -y git && $sudoprefix yum groupinstall -y 'Development Tools'; } || + { zypper --version >/dev/null 2>&1 && $sudoprefix zypper --non-interactive install git && $sudoprefix zypper --non-interactive install -t pattern devel_C_C++; } || + { pacman -V >/dev/null 2>&1 && $sudoprefix pacman -S --noconfirm git base-devel; } } test_tools || { install_tools && test_tools; } || my_exit 'Dependencies Installation Fail' 1 branch=
Ast: Make it more obvious that binary operations are correct.
@@ -407,9 +407,11 @@ void lily_es_push_binary_op(lily_expr_state *es, lily_expr_op op) new_prio == 0 is so that assign and assign-like operations run right-to-left. */ new_ast->left = active->right; + new_ast->left->parent = new_ast; + active->right = new_ast; + active->right->parent = active; - new_ast->parent = active; es->active = new_ast; } else { @@ -433,12 +435,13 @@ void lily_es_push_binary_op(lily_expr_state *es, lily_expr_op op) new_ast->parent = active->parent; } - else { - /* Remember to operate on the tree, not current. */ - tree->parent = new_ast; + else + /* At the top, so become root as well. */ es->root = new_ast; - } + new_ast->left = tree; + new_ast->left->parent = new_ast; + es->active = new_ast; } }
Ensure WS ping interval is cleared onclose.
@@ -94,7 +94,7 @@ window.GoAccess = window.GoAccess || { }, setWebSocket: function (wsConn) { - var host = null; + var host = null, pingId = null; host = wsConn.url ? wsConn.url : window.location.hostname ? window.location.hostname : "localhost"; var str = /^(wss?:\/\/)?[^\/]+:[0-9]{1,5}\//.test(host + "/") ? host : String(host + ':' + wsConn.port); str = !/^wss?:\/\//i.test(str) ? (window.location.protocol === "https:" ? 'wss://' : 'ws://') + str : str; @@ -104,7 +104,7 @@ window.GoAccess = window.GoAccess || { this.currDelay = this.wsDelay; if (wsConn.ping_interval) { - setInterval(() => { + pingId = setInterval(() => { socket.send('ping'); }, wsConn.ping_interval * 1000); } @@ -120,6 +120,7 @@ window.GoAccess = window.GoAccess || { socket.onclose = function (event) { GoAccess.Nav.WSClose(); + window.clearInterval(pingId); socket = null; setTimeout(() => { this.reconnect(wsConn); }, this.currDelay); }.bind(this);
DX11 objects in kernel device
@@ -10,5 +10,9 @@ namespace FFXIVClientStructs.FFXIV.Client.Graphics.Kernel public unsafe struct Device { [FieldOffset(0x80)] public SwapChain* SwapChain; + [FieldOffset(0x94)] public int D3DFeatureLevel; // D3D_FEATURE_LEVEL enum + [FieldOffset(0x98)] public void* DXGIFactory; // IDXGIFactory1 + [FieldOffset(0xA8)] public void* D3D11Device; // ID3D11Device1 + [FieldOffset(0xB0)] public void* D3D11DeviceContext; // ID3D11DeviceContext1 } }
remove some petty TODOs from vwebp. they're rather low-prio anyway.
@@ -248,9 +248,9 @@ static void HandleKey(unsigned char key, int pos_x, int pos_y) { } } } else if (key == 'i') { + // Note: doesn't handle refresh of animation's last-frame (it's quite + // more involved to do, since you need to save the previous frame). kParams.print_info = 1 - kParams.print_info; - // TODO(skal): handle refresh of animation's last-frame too. It's quite - // more involved though (need to save the previous frame). if (!kParams.has_animation) ClearPreviousFrame(); glutPostRedisplay(); } else if (key == 'd') { @@ -260,8 +260,8 @@ static void HandleKey(unsigned char key, int pos_x, int pos_y) { } static void HandleReshape(int width, int height) { - // TODO(skal): should we preserve aspect ratio? - // Also: handle larger-than-screen pictures correctly. + // Note: reshape doesn't preserve aspect ratio, and might + // be handling larger-than-screen pictures incorrectly. glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity();
Synchronize CWD between debug mode and daemon When running openwsman in foreground mode, the CWD is not changed as it is in the daemon mode. This can have material effects on requested paths.
@@ -198,6 +198,10 @@ static void daemonize(void) int fd; char *pid; + /* Change our CWD to / */ + i=chdir("/"); + assert(i == 0); + if (wsmand_options_get_foreground_debug() > 0) { return; } @@ -214,10 +218,6 @@ static void daemonize(void) log_pid = 0; setsid(); - /* Change our CWD to / */ - i=chdir("/"); - assert(i == 0); - /* Close all file descriptors. */ for (i = getdtablesize(); i >= 0; --i) close(i);
luci-proto-minieap: fix dhcp script
@@ -91,6 +91,7 @@ proto_minieap_setup() { append_setting ${heartbeat:+heartbeat=$heartbeat} append_setting ${eap_bcast_addr:+eap-bcast-addr=$eap_bcast_addr} append_setting ${dhcp_type:+dhcp-type=$dhcp_type} + append_setting ${dhcp_script:+dhcp-script="$dhcp_script"} json_for_each_item append_setting_list rj_option 'rj-option' append_setting ${service:+service="$service"} append_setting ${version_str:+version-str="$version_str"}
s5j/gpio: add to support drive strength on pins This commit introduces s5j_setdrv() that sets the slew rates on each GPIO pin when it is configured as an output or an alternative function.
@@ -110,6 +110,25 @@ static const uint32_t g_intbase[S5J_GPIO_NPORTS] = { /**************************************************************************** * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: s5j_setdrv + * + * Description: + * Set drive strength of a GPIO pin. + * + ****************************************************************************/ +static void s5j_setdrv(uint32_t cfgset, unsigned int port, unsigned int pin) +{ + uint32_t cfg; + uint32_t base = g_gpiobase[port]; + + /* CAVEAT: GPIO_FAST|SLOWXXX is compatible with GPIO_DRV_XXX */ + cfg = (cfgset & GPIO_DRVSTR_MASK) >> GPIO_DRVSTR_SHIFT; + + modifyreg32(base + S5J_GPIO_DRV_OFFSET, GPIO_DRV_PIN_MASK(pin), + cfg << GPIO_DRV_PIN_SHIFT(pin)); +} + /**************************************************************************** * Name: s5j_pullup * @@ -228,6 +247,9 @@ static int s5j_configalt(uint32_t cfgset, unsigned int port, /* Set pull-up mode */ s5j_pullup(cfgset, port, pin); + /* Set drive strength */ + s5j_setdrv(cfgset, port, pin); + return OK; } @@ -256,6 +278,9 @@ static inline int s5j_configoutput(uint32_t cfgset, unsigned int port, GPIO_CON_PIN_MASK(pin), GPIO_CON_OUTPUT << GPIO_CON_PIN_SHIFT(pin)); + /* Set drive strength */ + s5j_setdrv(cfgset, port, pin); + return OK; }
Stylecheck for plgo/pkg/cdn/
@@ -527,12 +527,6 @@ migrations: - a.yandex-team.ru/strm/plgo/pkg/balancer_test - a.yandex-team.ru/strm/plgo/pkg/channel - a.yandex-team.ru/strm/plgo/pkg/channel_test - - a.yandex-team.ru/strm/plgo/pkg/cms/region - - a.yandex-team.ru/strm/plgo/pkg/cms/region_test - - a.yandex-team.ru/strm/plgo/pkg/cms/region/api - - a.yandex-team.ru/strm/plgo/pkg/cms/region/api/caching_proxy_client - - a.yandex-team.ru/strm/plgo/pkg/cms/region/api/caching_proxy_client_test - - a.yandex-team.ru/strm/plgo/pkg/cms/region_test - a.yandex-team.ru/strm/plgo/pkg/common - a.yandex-team.ru/strm/plgo/pkg/kaltura - a.yandex-team.ru/strm/plgo/pkg/kaltura/handlers
fix setsockopt ipv6_recvtclass argument
@@ -221,7 +221,7 @@ int picoquic_socket_set_ecn_options(SOCKET_TYPE sd, int af, int * recv_set, int #endif #ifdef IPV6_RECVTCLASS { - unsigned char set = 0x03; + unsigned char set = 0x01; /* Request receiving TOS reports in recvmsg */ if (setsockopt(sd, IPPROTO_IPV6, IPV6_RECVTCLASS, &set, sizeof(set)) < 0) {
only read temperature in ack.
@@ -30,7 +30,7 @@ corresponding to the incoming frame. #define LENGTH_PACKET 3+LENGTH_CRC // maximum length is 127 bytes #define MAX_PKT_LEN 125+LENGTH_CRC -#define CHANNEL 12 // 24ghz: 11 = 2.405GHz, subghz: 11 = 865.325 in FSK operating mode #1 +#define CHANNEL 11 // 24ghz: 11 = 2.405GHz, subghz: 11 = 865.325 in FSK operating mode #1 #define BEACON_PERIOD 20 // in seconds #define TICKS_IN_ONE_SECOND 32768 // (32768>>1) = 500ms @ 32kHz #define RX_TIMEOUT 10 // 10 = 300us @ 32kHz @@ -262,7 +262,9 @@ void send_frame(uint8_t data) { // prepare packet app_vars.txpk_len = sizeof(app_vars.txpk_buf); - // calculate the temperature + // calculate the temperature only when replying ack + if (app_vars.state == S_REPLY_ACK) { + read = app_vars.read_temperature(); result = -46.85; result += 175.72 * read / 65536; @@ -270,6 +272,10 @@ void send_frame(uint8_t data) { app_vars.txpk_buf[0] = (uint8_t)((temperature & 0xff00)>>8); app_vars.txpk_buf[1] = (uint8_t)(temperature & 0x00ff); + } + + // app_vars.txpk_buf[0] = (uint8_t)((temperature & 0xff00)>>8); + // app_vars.txpk_buf[1] = (uint8_t)(temperature & 0x00ff); app_vars.txpk_buf[2] = data; // send packet @@ -282,5 +288,5 @@ void send_frame(uint8_t data) { void delay(void) { uint16_t i; - for (i=0;i<0xaaff;i++); + for (i=0;i<0x70ff;i++); }
new_log2_pages may increase 2 when try_resplit
@@ -621,7 +621,6 @@ vnet_classify_add_del (vnet_classify_table_t * t, } /* Crap. Try again */ vnet_classify_entry_free (t, save_new_v, new_log2_pages); - new_log2_pages++; if (resplit_once) goto mark_linear;
init timer to zero on futex creation
@@ -77,6 +77,7 @@ static fut soft_create_futex(process p, u64 key) if (!(f = table_find(p->futices, pointer_from_u64(key)))) { f = allocate(h, sizeof(struct fut)); f->waiters = allocate_queue(h, 32); + f->t = 0; table_set(p->futices, pointer_from_u64(key), f); } return f;
Require libavcodec >= 57.37 In ffmpeg/doc/APIchanges: > 2016-04-21 - 7fc329e - lavc 57.37.100 - avcodec.h > Add a new audio/video encoding and decoding API with decoupled input > and output -- avcodec_send_packet(), avcodec_receive_frame(), > avcodec_send_frame() and avcodec_receive_packet(). Refs Refs <https://github.com/Genymobile/scrcpy/issues/2862>
@@ -85,7 +85,7 @@ if not get_option('crossbuild_windows') # native build dependencies = [ dependency('libavformat', version: '>= 57.33'), - dependency('libavcodec'), + dependency('libavcodec', version: '>= 57.37'), dependency('libavutil'), dependency('sdl2', version: '>= 2.0.5'), ]
Remove ambiguous symbol Visual studio complained about ambiguous symbol float_type replaced it with double worked fine with gcc
@@ -792,7 +792,7 @@ void SoapyLMS7::writeSetting(const int direction, const size_t channel, const st else if (key == "CALIBRATE_TX") { - float_type bw = std::stof(value); + double bw = std::stof(value); SoapySDR::logf(SOAPY_SDR_INFO, "Calibrate Tx %f", bw); if (lms7Device->Calibrate(true, channel, bw, 0)!=0) throw std::runtime_error(lime::GetLastErrorMessage()); @@ -800,7 +800,7 @@ void SoapyLMS7::writeSetting(const int direction, const size_t channel, const st else if (key == "CALIBRATE_RX") { - float_type bw = std::stof(value); + double bw = std::stof(value); SoapySDR::logf(SOAPY_SDR_INFO, "CalibrateRx %f", bw); if (lms7Device->Calibrate(false, channel, bw, 0)!=0) throw std::runtime_error(lime::GetLastErrorMessage()); @@ -808,7 +808,7 @@ void SoapyLMS7::writeSetting(const int direction, const size_t channel, const st else if (key == "ENABLE_GFIR_LPF") { - float_type bw = std::stof(value); + double bw = std::stof(value); SoapySDR::logf(SOAPY_SDR_INFO, "Configurate GFIR LPF %f", bw); lms7Device->ConfigureGFIR(isTx, channel, true, bw); }
Fix issue in documentation. Indicate that the `match` method in `yara-python` accepts both a `str` and `bytes`.
@@ -427,7 +427,7 @@ Reference :param str filepath: Path to the file to be scanned. :param int pid: Process id to be scanned. - :param str data: Data to be scanned. + :param str/bytes data: Data to be scanned. :param dict externals: Dictionary with external variables. Keys are variable names and values are variable values. :param function callback: Callback function invoked for each rule.
task: fix debug/warn message
@@ -386,7 +386,7 @@ void flb_task_destroy(struct flb_task *task) struct flb_task_route *route; struct flb_task_retry *retry; - flb_warn("[task] destroy task=%p (task_id=%i)", task, task->id); + flb_debug("[task] destroy task=%p (task_id=%i)", task, task->id); /* Release task_id */ map_free_task_id(task->id, task->config);