message
stringlengths
6
474
diff
stringlengths
8
5.22k
u3: print error msg if system page size is incompatible
@@ -1075,7 +1075,15 @@ u3e_live(c3_o nuu_o, c3_c* dir_c) { // require that our page size is a multiple of the system page size. // - c3_assert(0 == (1 << (2 + u3a_page)) % sysconf(_SC_PAGESIZE)); + { + size_t sys_i = sysconf(_SC_PAGESIZE); + + if ( pag_siz_i % sys_i ) { + fprintf(stderr, "loom: incompatible system page size (%zuKB)\r\n", + sys_i >> 10); + exit(1); + } + } u3P.dir_c = dir_c; u3P.nor_u.nam_c = "north";
Extend the threads test to add simple fetch from multi threads Issue suggests that doing a simple fetch from multi-threads may result in issues so we add a test for that.
@@ -267,7 +267,7 @@ static int test_atomic(void) static OSSL_LIB_CTX *multi_libctx = NULL; static int multi_success; -static void thread_multi_worker(void) +static void thread_general_worker(void) { EVP_MD_CTX *mdctx = EVP_MD_CTX_new(); EVP_MD *md = EVP_MD_fetch(multi_libctx, "SHA2-256", NULL); @@ -342,16 +342,28 @@ static void thread_multi_worker(void) multi_success = 0; } +static void thread_multi_simple_fetch(void) +{ + EVP_MD *md = EVP_MD_fetch(NULL, "SHA2-256", NULL); + + if (md != NULL) + EVP_MD_free(md); + else + multi_success = 0; +} + /* * Do work in multiple worker threads at the same time. - * Test 0: Use the default provider - * Test 1: Use the fips provider + * Test 0: General worker, using the default provider + * Test 1: General worker, using the fips provider + * Test 2: Simple fetch worker */ static int test_multi(int idx) { thread_t thread1, thread2; int testresult = 0; OSSL_PROVIDER *prov = NULL; + void (*worker)(void); if (idx == 1 && !do_fips) return TEST_skip("FIPS not supported"); @@ -360,15 +372,28 @@ static int test_multi(int idx) multi_libctx = OSSL_LIB_CTX_new(); if (!TEST_ptr(multi_libctx)) goto err; - prov = OSSL_PROVIDER_load(multi_libctx, (idx == 0) ? "default" : "fips"); + prov = OSSL_PROVIDER_load(multi_libctx, (idx == 1) ? "fips" : "default"); if (!TEST_ptr(prov)) goto err; - if (!TEST_true(run_thread(&thread1, thread_multi_worker)) - || !TEST_true(run_thread(&thread2, thread_multi_worker))) + switch (idx) { + case 0: + case 1: + worker = thread_general_worker; + break; + case 2: + worker = thread_multi_simple_fetch; + break; + default: + TEST_error("Invalid test index"); + goto err; + } + + if (!TEST_true(run_thread(&thread1, worker)) + || !TEST_true(run_thread(&thread2, worker))) goto err; - thread_multi_worker(); + worker(); if (!TEST_true(wait_for_thread(thread1)) || !TEST_true(wait_for_thread(thread2)) @@ -420,6 +445,6 @@ int setup_tests(void) ADD_TEST(test_once); ADD_TEST(test_thread_local); ADD_TEST(test_atomic); - ADD_ALL_TESTS(test_multi, 2); + ADD_ALL_TESTS(test_multi, 3); return 1; }
ssse3: improve some NEON implementations By removing some slow implementations.
@@ -369,9 +369,6 @@ simde_mm_hadd_epi16 (simde__m128i a, simde__m128i b) { #else #if defined(SIMDE_ARM_NEON_A64V8_NATIVE) return vreinterpretq_s64_s16(vpaddq_s16(simde__m128i_to_private(a).neon_i16, simde__m128i_to_private(b).neon_i16)); - #elif defined(SIMDE_ARM_NEON_A32V7_NATIVE) - return vreinterpretq_s64_s16(vcombine_s16(vpadd_s16(vget_low_s16(simde__m128i_to_private(a).neon_i16), vget_high_s16(simde__m128i_to_private(a).neon_i16)), - vpadd_s16(vget_low_s16(simde__m128i_to_private(b).neon_i16), vget_high_s16(simde__m128i_to_private(b).neon_i16)))); #else return simde_mm_add_epi16(simde_x_mm_deinterleaveeven_epi16(a, b), simde_x_mm_deinterleaveodd_epi16(a, b)); #endif @@ -386,14 +383,9 @@ simde__m128i simde_mm_hadd_epi32 (simde__m128i a, simde__m128i b) { #if defined(SIMDE_X86_SSSE3_NATIVE) return _mm_hadd_epi32(a, b); - #else - #if defined(SIMDE_ARM_NEON_A32V7_NATIVE) - return vreinterpretq_s64_s32(vcombine_s32(vpadd_s32(vget_low_s32(simde__m128i_to_private(a).neon_i32), vget_high_s32(simde__m128i_to_private(a).neon_i32)), - vpadd_s32(vget_low_s32(simde__m128i_to_private(b).neon_i32), vget_high_s32(simde__m128i_to_private(b).neon_i32)))); #else return simde_mm_add_epi32(simde_x_mm_deinterleaveeven_epi32(a, b), simde_x_mm_deinterleaveodd_epi32(a, b)); #endif - #endif } #if defined(SIMDE_X86_SSSE3_ENABLE_NATIVE_ALIASES) # define _mm_hadd_epi32(a, b) simde_mm_hadd_epi32(a, b)
Add chroma channels to variance calculation.
@@ -1257,21 +1257,22 @@ static void encoder_state_init_new_frame(encoder_state_t * const state, kvz_pict double lcu_var = pixel_var(tmp, LCU_LUMA_SIZE); - // UNCOMMENT AND CONTINUE HERE - /* if (has_chroma) { // Add chroma variance if not monochrome int32_t c_stride = state->tile->frame->source->stride >> 1; - kvz_pixel c_tmp[LCU_CHROMA_SIZE]; - int lcu_chroma_width = LCU_WIDTH / 2; + kvz_pixel chromau_tmp[LCU_CHROMA_SIZE]; + kvz_pixel chromav_tmp[LCU_CHROMA_SIZE]; + int lcu_chroma_width = LCU_WIDTH >> 1; int c_pxl_x = x * lcu_chroma_width; int c_pxl_y = y * lcu_chroma_width; - int c_x_max = 0; - int c_y_max = 0; + int c_x_max = MIN(c_pxl_x + lcu_chroma_width, frame->width >> 1) - c_pxl_x; + int c_y_max = MIN(c_pxl_y + lcu_chroma_width, frame->height >> 1) - c_pxl_y; - kvz_pixels_blit(&state->tile->frame->source->u[c_pxl_x + c_pxl_y * c_stride], c_tmp, c_x_max, c_y_max, c_stride, LCU_WIDTH >> 1); + kvz_pixels_blit(&state->tile->frame->source->u[c_pxl_x + c_pxl_y * c_stride], chromau_tmp, c_x_max, c_y_max, c_stride, lcu_chroma_width); + kvz_pixels_blit(&state->tile->frame->source->v[c_pxl_x + c_pxl_y * c_stride], chromav_tmp, c_x_max, c_y_max, c_stride, lcu_chroma_width); + lcu_var += pixel_var(chromau_tmp, LCU_CHROMA_SIZE); + lcu_var += pixel_var(chromav_tmp, LCU_CHROMA_SIZE); } - */ state->frame->aq_offsets[id] = d * (log(lcu_var) - log(frame_var)); id++;
Fix typo in nsd.conf man-page
@@ -149,7 +149,7 @@ clause. There may only be one clause. .TP .B ip\-address:\fR <ip4 or ip6>[@port] -NSD will bind to the listed ip\-address. Can be give multiple times +NSD will bind to the listed ip\-address. Can be given multiple times to bind multiple ip\-addresses. Optionally, a port number can be given. If none are given NSD listens to the wildcard interface. Same as commandline option .BR \-a.
MuPDF API changes (again...)
/* * ipptransform utility for converting PDF and JPEG files to raster data or HP PCL. * - * Copyright 2016-2017 by the IEEE-ISTO Printer Working Group. + * Copyright 2016-2018 by the IEEE-ISTO Printer Working Group. * * Licensed under Apache License v2.0. See the file "LICENSE" for more * information. @@ -2073,8 +2073,8 @@ xform_document( ras.band_height = ras.header.cupsHeight; /* TODO: Update code to not use RGBA/GrayA pixmap now that MuPDF supports it */ - pixmap = fz_new_pixmap(context, cs, (int)ras.header.cupsWidth, (int)ras.band_height, 1); - pixmap->interpolate = 0; + pixmap = fz_new_pixmap(context, cs, (int)ras.header.cupsWidth, (int)ras.band_height, NULL, 1); + pixmap->flags = 0; pixmap->xres = (int)ras.header.HWResolution[0]; pixmap->yres = (int)ras.header.HWResolution[1];
macOS: try setup-python action
@@ -69,6 +69,9 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.x' - name: Install Dependencies run: | @@ -77,7 +80,7 @@ jobs: # Unlink parallel package, because of conflict with moreutils brew unlink parallel || >&2 printf 'Unlinking parallel failed.`\n' # Uninstall old Python versions and azure-cli due to file conflicts - brew remove azure-cli [email protected] || >&2 printf 'Uninstalling old python versions and azure-cli failed.`\n' + brew remove azure-cli [email protected] [email protected]|| >&2 printf 'Uninstalling old python versions and azure-cli failed.`\n' brew install augeas \ antlr \ antlr4-cpp-runtime \ @@ -101,7 +104,6 @@ jobs: npm \ openssl \ pkg-config \ - [email protected] \ qt \ [email protected] \ shfmt \ @@ -125,7 +127,6 @@ jobs: gem install ronn-ng -v 0.10.1.pre1 gem install test-unit --no-document # Install Python packages - export PATH="/usr/local/opt/[email protected]/bin:$PATH" pip2 install cheetah # Required by kdb-gen pip3 install cmakelang[yaml]==0.6.13 # Install JavaScript packages
YAwn: Check plugin code with OCLint
@@ -28,7 +28,8 @@ oclint -p "@PROJECT_BINARY_DIR@" -enable-global-analysis -enable-clang-static-an "src/plugins/yambi/"*.cpp \ "src/plugins/yamlcpp/"*.{c,cpp} \ "src/plugins/yamlsmith/"*.{c,cpp} \ - "src/plugins/yanlr/"*.{c,cpp} + "src/plugins/yanlr/"*.{c,cpp} \ + "src/plugins/yawn/"*.cpp \ exit_if_fail "OCLint found problematic code" end_script
Init block_mode before decimation_mode
@@ -949,6 +949,13 @@ static void construct_block_size_descriptor_2d( } auto& bm = bsd.block_modes[packed_bm_idx]; + + bm.decimation_mode = static_cast<uint8_t>(decimation_mode); + bm.quant_mode = static_cast<uint8_t>(quant_mode); + bm.is_dual_plane = static_cast<uint8_t>(is_dual_plane); + bm.weight_bits = static_cast<uint8_t>(weight_bits); + bm.mode_index = static_cast<uint16_t>(i); + auto& dm = bsd.decimation_modes[decimation_mode]; if (is_dual_plane) @@ -960,12 +967,6 @@ static void construct_block_size_descriptor_2d( dm.set_ref_1_plane(bm.get_weight_quant_mode()); } - bm.decimation_mode = static_cast<uint8_t>(decimation_mode); - bm.quant_mode = static_cast<uint8_t>(quant_mode); - bm.is_dual_plane = static_cast<uint8_t>(is_dual_plane); - bm.weight_bits = static_cast<uint8_t>(weight_bits); - bm.mode_index = static_cast<uint16_t>(i); - bsd.block_mode_packed_index[i] = static_cast<uint16_t>(packed_bm_idx); packed_bm_idx++;
Fix USB device leak on connection error If sc_usb_connect() failed, then the sc_usb_device was never destroyed. The assignment was mistakenly removed by commit
@@ -89,6 +89,8 @@ scrcpy_otg(struct scrcpy_options *options) { goto end; } + usb_device_initialized = true; + LOGI("USB device: %s (%04" PRIx16 ":%04" PRIx16 ") %s %s", usb_device.serial, usb_device.vid, usb_device.pid, usb_device.manufacturer, usb_device.product);
u3: updates guard-page assertion to account for variable loom sizes
@@ -590,7 +590,7 @@ _ce_patch_compose(void) sou_w = (swu_w + (pag_wiz_i - 1)) >> u3a_page; c3_assert( ((gar_pag_p >> u3a_page) >= nor_w) - && ((gar_pag_p >> u3a_page) <= (u3a_pages - (sou_w + 1))) ); + && ((gar_pag_p >> u3a_page) <= (u3P.pag_w - (sou_w + 1))) ); } #ifdef U3_SNAPSHOT_VALIDATION
Add some TODO notes into init.c We should be seeking to move the OPENSSL_init_crypto and OPENSSL_cleanup processing into OPENSSL_CTX instead.
@@ -468,6 +468,11 @@ void OPENSSL_cleanup(void) OPENSSL_INIT_STOP *currhandler, *lasthandler; CRYPTO_THREAD_LOCAL key; + /* + * TODO(3.0): This function needs looking at with a view to moving most/all + * of this into onfree handlers in OPENSSL_CTX. + */ + /* If we've not been inited then no need to deinit */ if (!base_inited) return; @@ -579,6 +584,11 @@ void OPENSSL_cleanup(void) */ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings) { + /* + * TODO(3.0): This function needs looking at with a view to moving most/all + * of this into OPENSSL_CTX. + */ + if (stopped) { if (!(opts & OPENSSL_INIT_BASE_ONLY)) CRYPTOerr(CRYPTO_F_OPENSSL_INIT_CRYPTO, ERR_R_INIT_FAIL);
npl/riot: simplify ble_npl_hw_is_in_critical() Recently the RIOT IRQ API was extended to support irq_is_enabled(), so time to switch away from the hacked implementation of ble_npl_hw_is_in_critical().
@@ -38,8 +38,6 @@ extern "C" { typedef uint32_t ble_npl_time_t; typedef int32_t ble_npl_stime_t; -extern volatile int ble_npl_in_critical; - struct ble_npl_event { event_callback_t e; void *arg; @@ -257,27 +255,19 @@ ble_npl_time_delay(ble_npl_time_t ticks) static inline uint32_t ble_npl_hw_enter_critical(void) { - uint32_t ctx = irq_disable(); - ++ble_npl_in_critical; - return ctx; + return (uint32_t)irq_disable(); } static inline void ble_npl_hw_exit_critical(uint32_t ctx) { - --ble_npl_in_critical; irq_restore((unsigned)ctx); } static inline bool ble_npl_hw_is_in_critical(void) { - /* - * XXX Currently RIOT does not support an API for finding out if interrupts - * are currently disabled, hence in a critical section in this context. - * So for now, we use this global variable to keep this state for us. - -*/ - return (ble_npl_in_critical > 0); + return (bool)!irq_is_enabled(); } #ifdef __cplusplus
vere: make note of litte-endianness dependency
@@ -388,6 +388,8 @@ _ames_serialize_packet(u3_panc* pac_u, c3_o dop_o) | (hed_u->rac_y << 25) | (hed_u->enc_o << 27); + // XX assumes little-endian + // memcpy(pac_y, &hed_w, 4); pac = u3i_bytes(4 + sen_y + rec_y + bod_u->con_w, pac_y);
Fix compilation error C4576 with C++ and MSVC 2019 (19.28.29913)
@@ -285,7 +285,7 @@ typedef struct */ AZ_NODISCARD AZ_INLINE az_json_writer_options az_json_writer_options_default() { - az_json_writer_options options = (az_json_writer_options) { + az_json_writer_options options = { ._internal = { .unused = false, }, @@ -623,7 +623,7 @@ typedef struct */ AZ_NODISCARD AZ_INLINE az_json_reader_options az_json_reader_options_default() { - az_json_reader_options options = (az_json_reader_options) { + az_json_reader_options options = { ._internal = { .unused = false, },
nat: remove unused import Type: style
@@ -5,7 +5,6 @@ from io import BytesIO from random import randint import scapy.compat -from framework import tag_fixme_vpp_workers from framework import VppTestCase, VppTestRunner from scapy.data import IP_PROTOS from scapy.layers.inet import IP, TCP, UDP, ICMP, GRE
Remove unused code from custom_io test
@@ -230,10 +230,6 @@ int main(int argc, char **argv) EXPECT_NOT_EQUAL(fcntl(client_to_server[0], F_SETFL, fcntl(client_to_server[0], F_GETFL) | O_NONBLOCK), -1); EXPECT_NOT_EQUAL(fcntl(server_to_client[1], F_SETFL, fcntl(server_to_client[1], F_GETFL) | O_NONBLOCK), -1); - struct pollfd ufds[2]; - ufds[0].fd = client_to_server[0]; - ufds[0].events = POLLIN | POLLPRI; - /* Negotiate the handshake. */ do { int ret;
uiplib: ensure string is null-terminated when printing unspecified address
@@ -250,9 +250,11 @@ uiplib_ipaddr_snprint(char *buf, size_t size, const uip_ipaddr_t *addr) } } - if(n >= size - 1) { - buf[size - 1] = '\0'; - } + /* + * Make sure the output string is always null-terminated. + */ + buf[MIN(n, size - 1)] = '\0'; + return n; } /*---------------------------------------------------------------------------*/
iOS: fix issue with crash set_sleep on SDk >= 13.2
@@ -228,7 +228,6 @@ namespace rho { void SystemImplIphone::getScreenSleeping(rho::apiGenerator::CMethodResult& result) { - boolean ret = [[UIApplication sharedApplication] isIdleTimerDisabled] ? false : true; result.set(ret); //result.setError("not implemented at iOS platform"); @@ -237,7 +236,10 @@ namespace rho { void SystemImplIphone::setScreenSleeping(bool flag, rho::apiGenerator::CMethodResult& result) { - [[UIApplication sharedApplication] setIdleTimerDisabled: (!flag ? YES : NO)]; + BOOL flag_value = flag; + dispatch_async(dispatch_get_main_queue(), ^{ + [[UIApplication sharedApplication] setIdleTimerDisabled: (!flag_value ? YES : NO)]; + }); //rho_sys_set_sleeping(flag?1:0); } //----------------------------------------------------------------------------------------------------------------------
add stub for openat syscall
@@ -264,6 +264,7 @@ struct code syscall_codes[]= { {SYS_inotify_add_watch, "inotify_add_watch"}, {SYS_inotify_rm_watch, "inotify_rm_watch"}, {SYS_migrate_pages, "migrate_pages"}, + {SYS_openat, "SYS_openat"}, {SYS_mkdirat, "mkdirat"}, {SYS_mknodat, "mknodat"}, {SYS_fchownat, "fchownat"}, @@ -410,7 +411,6 @@ sysreturn open(char *name, int flags, int mode) bytes length; heap h = heap_general(get_kernel_heaps()); unix_heaps uh = get_unix_heaps(); - // fix - lookup should be robust if (name == 0) return set_syscall_error (current, EINVAL); if (!(n = resolve_cstring(current->p->cwd, name))) { @@ -437,6 +437,11 @@ sysreturn open(char *name, int flags, int mode) return fd; } +// TODO: this is stub, should be updated +sysreturn openat(int dirfd, char *name, int flags, int mode) { + return open(name,flags,mode); +} + static void fill_stat(tuple n, struct stat *s) { buffer b; @@ -599,6 +604,7 @@ void register_file_syscalls(void **map) register_syscall(map, SYS_getrlimit, getrlimit); register_syscall(map, SYS_getpid, getpid); register_syscall(map, SYS_exit, (sysreturn (*)())exit); + register_syscall(map,SYS_openat,openat); } void *linux_syscalls[SYS_MAX];
isOpen() should return true when db is open
@@ -52,7 +52,7 @@ namespace ARIASDK_NS_BEGIN { m_observer->OnStorageFailed("Database is not open"); return false; } - return false; + return true; } OfflineStorage_SQLite::OfflineStorage_SQLite(ILogManager & logManager, IRuntimeConfig& runtimeConfig, bool inMemory) @@ -565,7 +565,10 @@ namespace ARIASDK_NS_BEGIN { return result; } - IF_CLOSED_RETURN result; + if (!isOpen()) { + LOG_ERROR("Oddly closed"); + return result; + } { #ifdef ENABLE_LOCKING DbTransaction transaction(m_db.get());
Add missing flags fixing the markdown parser bug
@@ -225,7 +225,7 @@ conf_data = configuration_data() conf_data.set('URBIT_VERSION', '"0.5.1"') osdet = build_machine.system() -os_c_flags = [] +os_c_flags = ['-funsigned-char','-ffast-math'] os_deps = [] os_link_flags = []
replace localtime with localtime_r
@@ -115,8 +115,14 @@ char* getDateString() { return NULL; } time_t now = time(NULL); - struct tm* t = localtime(&now); + struct tm* t = secAlloc(sizeof(struct tm)); + if (localtime_r(&now, t) == NULL) { + oidc_setErrnoError(); + secFree(t); + return NULL; + } strftime(s, 10 + 1, "%F", t); + secFree(t); return s; }
Add comment about setting application_name.
@@ -233,6 +233,7 @@ dbOpen(Db *this) } MEM_CONTEXT_END(); + // Set application name to help identify the backup session if (this->pgVersion >= PG_VERSION_APPLICATION_NAME) dbExec(this, strNewFmt("set application_name = '%s'", strPtr(this->applicationName))); }
Guard MSC specific stuff with _MSC_VER
# define WIN32 #endif -#ifdef WIN32 +#ifdef _MSC_VER # pragma warning(push) # pragma warning(disable : 4324) #endif # endif /* !BUILDING_NGTCP2 */ #endif /* !defined(WIN32) */ -#ifdef WIN32 +#ifdef _MSC_VER # define NGTCP2_ALIGN(N) __declspec(align(N)) -#else /* !WIN32 */ +#else /* !_MSC_VER */ # define NGTCP2_ALIGN(N) __attribute__((aligned(N))) -#endif /* !WIN32 */ +#endif /* !_MSC_VER */ #ifdef __cplusplus extern "C" { @@ -5656,7 +5656,7 @@ NGTCP2_EXTERN uint32_t ngtcp2_select_version(const uint32_t *preferred_versions, #define ngtcp2_settings_default(SETTINGS) \ ngtcp2_settings_default_versioned(NGTCP2_SETTINGS_VERSION, (SETTINGS)) -#ifdef WIN32 +#ifdef _MSC_VER # pragma warning(pop) #endif
apps/examples/elf : change priority in /micomapp/Messaging.c change priority in /micomapp/Messaging.c
@@ -251,7 +251,7 @@ static int multicast_recv_test(void) int recv2_pid; int recv3_pid; - recv1_pid = task_create("multi_recv_nonblock", TASK_PRIO - 1, STACKSIZE, multi_recv_nonblock, NULL); + recv1_pid = task_create("multi_recv_nonblock", TASK_PRIO, STACKSIZE, multi_recv_nonblock, NULL); if (recv1_pid < 0) { printf("[MICOM] Fail to create multi_recv_nonblock task.\n"); return ERROR;
Suppress printf.
:: :: ?: =(`@`0 dep) - ~&(dep-empty+hen +>.$) + :: ~&(dep-empty+hen +>.$) + +>.$ ?: =(dep 0vtest) :: upstream testing +>.$(mow ?.(ask mow :_(mow [hen %give %news dep]))) ::
short spinners dont give miss
@@ -311,7 +311,7 @@ class Check: hitresult = 300 elif spinner["rot count"] > spinrequired: hitresult = 100 - elif spinner["rot count"] > 0.1 * spinrequired: + elif spinner["rot count"] >= 0.1 * spinrequired: hitresult = 50 else: hitresult = 0
bugfix: use size_t also when GC is enabled
@@ -262,7 +262,7 @@ void * lv_mem_realloc(void * data_p, size_t new_size) #else /* LV_ENABLE_GC */ -void * lv_mem_realloc(void * data_p, uint32_t new_size) +void * lv_mem_realloc(void * data_p, size_t new_size) { void * new_p = LV_MEM_CUSTOM_REALLOC(data_p, new_size); if(new_p == NULL) LV_LOG_WARN("Couldn't allocate memory");
shm main BUGFIX wrong size of subscriptions in ext shm Refs
@@ -1098,10 +1098,10 @@ sr_shmmain_ext_get_size_main_shm(sr_shm_t *shm_main, char *ext_shm_addr) assert(oper_subs[i].xpath); shm_size += sr_strshmlen(ext_shm_addr + oper_subs[i].xpath); } - shm_size += SR_SHM_SIZE(shm_mod->oper_subs * sizeof *oper_subs); + shm_size += SR_SHM_SIZE(shm_mod->oper_sub_count * sizeof *oper_subs); /* notif subscriptions */ - shm_size += SR_SHM_SIZE(shm_mod->notif_subs * sizeof(sr_mod_notif_sub_t)); + shm_size += SR_SHM_SIZE(shm_mod->notif_sub_count * sizeof(sr_mod_notif_sub_t)); } return shm_size;
Remove duplicate assignment.
@@ -949,7 +949,7 @@ static int strip_eol(char *linebuf, int *plen, int flags) int len = *plen; char *p, c; int is_eol = 0; - p = linebuf + len - 1; + for (p = linebuf + len - 1; len > 0; len--, p--) { c = *p; if (c == '\n')
ipsec: fix - crash in ipsec policy cli
@@ -344,6 +344,12 @@ ipsec_policy_add_del_command_fn (vlib_main_t * vm, ipsec_main_t *im = &ipsec_main; ipsec_sa_t *sa = 0; p1 = hash_get (im->sa_index_by_sa_id, p.sa_id); + if (!p1) + { + error = + clib_error_return (0, "SA with index %u not found", p.sa_id); + goto done; + } sa = pool_elt_at_index (im->sad, p1[0]); if (sa && sa->protocol == IPSEC_PROTOCOL_AH && is_add && p.is_ipv6) {
publish: automatically continue lists Fixes
@@ -10,6 +10,7 @@ import CodeMirror from "codemirror"; import "codemirror/mode/markdown/markdown"; import "codemirror/addon/display/placeholder"; +import "codemirror/addon/edit/continuelist"; import "codemirror/lib/codemirror.css"; import { Box } from "@tlon/indigo-react"; @@ -54,6 +55,7 @@ export function MarkdownEditor( scrollbarStyle: "native", // cursorHeight: 0.85, placeholder: placeholder || "", + extraKeys: { 'Enter': 'newlineAndIndentContinueMarkdownList' } }; const editor: React.RefObject<any> = useRef();
tcprtt-manpage: Add missing options (-p, -P, -a, -A) in the SYNOPSIS section of the 'tcprtt' man page
.SH NAME tcprtt \- Trace TCP RTT of established connections. Uses Linux eBPF/bcc. .SH SYNOPSIS -.B tcprtt [\-h] [\-T] [\-D] [\-m] [\-i INTERVAL] [\-d DURATION] [\-b] [\-B] [\-e] [\-4 | \-6] +.B tcprtt [\-h] [\-T] [\-D] [\-m] [\-p LPORT] [\-P RPORT] [\-a LADDR] [\-A RADDR] [\-i INTERVAL] [\-d DURATION] [\-b] [\-B] [\-e] [\-4 | \-6] .SH DESCRIPTION This tool traces established connections RTT(round-trip time) to analyze the quality of network. This can be useful for general troubleshooting to
Print traceback for lua code.
@@ -1222,6 +1222,39 @@ static bool initLua(tic_mem* tic, const char* code) return true; } +/* +** Message handler which appends stract trace to exceptions. +** This function was extractred from lua.c. +*/ +static int msghandler (lua_State *L) { + const char *msg = lua_tostring(L, 1); + if (msg == NULL) { /* is error object not a string? */ + if (luaL_callmeta(L, 1, "__tostring") && /* does it have a metamethod */ + lua_type(L, -1) == LUA_TSTRING) /* that produces a string? */ + return 1; /* that is the message */ + else + msg = lua_pushfstring(L, "(error object is a %s value)", + luaL_typename(L, 1)); + } + luaL_traceback(L, L, msg, 1); /* append a standard traceback */ + return 1; /* return the traceback */ +} + +/* +** Interface to 'lua_pcall', which sets appropriate message handler function. +** Please use this function for all top level lua functions. +** This function was extractred from lua.c (and stripped of signal handling) +*/ +static int docall (lua_State *L, int narg, int nres) { + int status; + int base = lua_gettop(L) - narg; /* function index */ + lua_pushcfunction(L, msghandler); /* push message handler */ + lua_insert(L, base); /* put it under function and args */ + status = lua_pcall(L, narg, nres, base); + lua_remove(L, base); /* remove message handler from the stack */ + return status; +} + static void callLuaTick(tic_mem* tic) { tic_machine* machine = (tic_machine*)tic; @@ -1235,7 +1268,7 @@ static void callLuaTick(tic_mem* tic) lua_getglobal(lua, TicFunc); if(lua_isfunction(lua, -1)) { - if(lua_pcall(lua, 0, 0, 0) != LUA_OK) + if(docall(lua, 0, 0) != LUA_OK) machine->data->error(machine->data->data, lua_tostring(lua, -1)); } else @@ -1257,7 +1290,7 @@ static void callLuaScanlineName(tic_mem* memory, s32 row, void* data, const char if(lua_isfunction(lua, -1)) { lua_pushinteger(lua, row); - if(lua_pcall(lua, 1, 0, 0) != LUA_OK) + if(docall(lua, 1, 0) != LUA_OK) machine->data->error(machine->data->data, lua_tostring(lua, -1)); } else lua_pop(lua, 1); @@ -1284,7 +1317,7 @@ static void callLuaOverlap(tic_mem* memory, void* data) lua_getglobal(lua, OvrFunc); if(lua_isfunction(lua, -1)) { - if(lua_pcall(lua, 0, 0, 0) != LUA_OK) + if(docall(lua, 0, 0) != LUA_OK) machine->data->error(machine->data->data, lua_tostring(lua, -1)); } else lua_pop(lua, 1);
Implement next_time (nextthink) exposure.
@@ -90,6 +90,7 @@ int mapstrings_entity_property(ScriptVariant **varlist, int paramCount) "spawn_type", "speed_multiplier", "stall_time", + "think_time", "timestamp", "toss_time", }; @@ -652,6 +653,13 @@ HRESULT openbor_get_entity_property(ScriptVariant **varlist , ScriptVariant **pr break; + case _ENTITY_THINK_TIME: + + ScriptVariant_ChangeType(*pretvar, VT_INTEGER); + (*pretvar)->lVal = (LONG)handle->nextthink; + + break; + case _ENTITY_TIMESTAMP: ScriptVariant_ChangeType(*pretvar, VT_INTEGER); @@ -1317,6 +1325,15 @@ HRESULT openbor_set_entity_property(ScriptVariant **varlist, ScriptVariant **pre break; + case _ENTITY_THINK_TIME: + + if (SUCCEEDED(ScriptVariant_IntegerValue(varlist[ARG_VALUE], &temp_int))) + { + handle->nextthink = temp_int; + } + + break; + case _ENTITY_TIMESTAMP: if (SUCCEEDED(ScriptVariant_IntegerValue(varlist[ARG_VALUE], &temp_int)))
http_client: possible buffer overflow fixed when determining last header item to be written closes
@@ -188,6 +188,7 @@ int http_header_generate_string(http_header_handle_t header, int index, char *bu if (siz + 1 > *buffer_len - 2) { ret_idx = idx - 1; + break; } }
Fix the comments to be correct.
/* vim: set sw=2 expandtab tw=80: */ +/* This application can operate in three modes: input, output + * or interrupt. The mode is set as a constant in main(). + * - Output mode uses the pin connected to LED 0 (through the led() + * system call interface. + * - Input mode uses userspace GPIO pin 0 (the 0th pin made available + * to userspace programs. Consult the boot sequence of your board or + * its documentation to determine which hardware pin this is. + * - Interrupt mode uses userspace GPIO pin 0 (see input mode above). + * It executes a callback when the pin goes from low to high. To test + * this, connect the pin to Vdd. + */ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -18,7 +29,7 @@ static void timer_cb (__attribute__ ((unused)) int arg0, __attribute__ ((unused)) void* userdata) {} // ************************************************** -// GPIO output example +// GPIO output example: toggles LED. // ************************************************** static void gpio_output(void) { printf("Periodically blinking LED\n"); @@ -34,13 +45,13 @@ static void gpio_output(void) { } // ************************************************** -// GPIO input example +// GPIO input example: reads userspace pin 0. // ************************************************** static void gpio_input(void) { printf("Periodically reading value of the GPIO 0 pin\n"); printf("Jump pin high to test (defaults to low)\n"); - // set LED pin as input and start repeating timer + // set userspace pin 0 as input and start repeating timer // pin is configured with a pull-down resistor, so it should read 0 as default gpio_enable_input(0, PullDown); tock_timer_t timer; @@ -63,13 +74,13 @@ static void gpio_cb (__attribute__ ((unused)) int pin_num, __attribute__ ((unused)) void* userdata) {} static void gpio_interrupt(void) { - printf("Print GPIO 0 pin reading whenever its value changes\n"); + printf("Print upserspace GPIO 0 pin reading whenever its value changes\n"); printf("Jump pin high to test\n"); // set callback for GPIO interrupts gpio_interrupt_callback(gpio_cb, NULL); - // set LED as input and enable interrupts on it + // set userspace pin 0 as input and enable interrupts on it gpio_enable_input(0, PullDown); gpio_enable_interrupt(0, Change);
fbo: fix pread/pwrite return handling pread/pwrite return -1 on failure so we need to use a ssize_t instead of a size_t.
@@ -1107,7 +1107,7 @@ static int fbo_read(struct tcmu_device *dev, uint8_t *cdb, struct iovec *iovec, uint64_t offset; int length = 0; int remaining; - size_t ret; + ssize_t ret; int rc; // TBD: If we simulate start/stop, then fail if stopped @@ -1165,7 +1165,7 @@ static int fbo_do_verify(struct fbo_state *state, struct iovec *iovec, size_t iov_cnt, uint64_t offset, int length, uint8_t *sense) { - size_t ret; + ssize_t ret; uint32_t cmp_offset; void *buf; int rc = SAM_STAT_GOOD; @@ -1227,7 +1227,7 @@ static int fbo_write(struct tcmu_device *dev, uint8_t *cdb, struct iovec *iovec, uint64_t offset; int length = 0; int remaining; - size_t ret; + ssize_t ret; int rc = SAM_STAT_GOOD; int rc1; @@ -1319,7 +1319,7 @@ static int fbo_do_format(struct tcmu_device *dev, uint8_t *sense) uint64_t offset = 0; uint8_t *buf; unsigned int length = 1024 * 1024; - size_t ret; + ssize_t ret; int rc = SAM_STAT_GOOD; buf = malloc(length);
Mark blocking wiki documented.
@@ -2474,8 +2474,7 @@ typedef struct entity bool hitwall; // Blcoked by wall/platform/obstacle. ~~ bool getting; // Picking up item. ~~ bool turning; // Turning around. ~~ - - int blocking; + bool blocking; // In blocking state. ~~ int falling; int running; // Flag to determine if a player is running int ducking; // in duck stance
Do not decrement resolv timer if already 0
@@ -596,7 +596,7 @@ check_entries(void) if(namemapptr->state == STATE_NEW || namemapptr->state == STATE_ASKING) { etimer_set(&retry, CLOCK_SECOND / 4); if(namemapptr->state == STATE_ASKING) { - if(--namemapptr->tmr == 0) { + if(namemapptr->tmr == 0 || --namemapptr->tmr == 0) { #if RESOLV_CONF_SUPPORTS_MDNS if(++namemapptr->retries == (namemapptr->is_mdns ? RESOLV_CONF_MAX_MDNS_RETRIES :
schema compile BUGFIX inserting node into choice The cases in the choice can come not only from a choice and augment, but also from groupings. It was overlooked and internal error was reported.
@@ -4155,7 +4155,7 @@ lys_compile_node_connect(struct lysc_ctx *ctx, struct lysc_node *parent, struct * * @param[in] ctx Compile context. * @param[in] node_p Node image from the parsed tree. If the case is explicit, it is the LYS_CASE node, but in case of implicit case, - * it is the LYS_CHOICE node or LYS_AUGMENT node. + * it is the LYS_CHOICE, LYS_AUGMENT or LYS_GROUPING node. * @param[in] ch The compiled choice structure where the new case structures are created (if needed). * @param[in] child The new data node being part of a case (no matter if explicit or implicit). * @return The case structure where the child node belongs to, NULL in case of error. Note that the child is not connected into the siblings list, @@ -4178,7 +4178,7 @@ lys_compile_node_case(struct lysc_ctx *ctx, struct lysp_node *node_p, struct lys } \ } - if (node_p->nodetype == LYS_CHOICE || node_p->nodetype == LYS_AUGMENT) { + if (node_p->nodetype & (LYS_CHOICE | LYS_AUGMENT | LYS_GROUPING)) { UNIQUE_CHECK(child->name, ctx->mod); /* we have to add an implicit case node into the parent choice */
crypto: fix coverity warnings Type: fix
@@ -207,7 +207,6 @@ generate_digest (vlib_main_t * vm, static int restore_engines (u32 * engs) { - return 0; vnet_crypto_main_t *cm = &crypto_main; u32 i; vnet_crypto_engine_t *ce; @@ -230,7 +229,6 @@ restore_engines (u32 * engs) static int save_current_engines (u32 * engs) { - return 0; vnet_crypto_main_t *cm = &crypto_main; uword *p; u32 i; @@ -536,6 +534,7 @@ test_crypto_static (vlib_main_t * vm, crypto_test_main_t * tm, op->chunk_index = vec_len (chunks); while (pt->data) { + clib_memset (&ch, 0, sizeof (ch)); ch.src = pt->data; ch.len = pt->length; ch.dst = computed_data + computed_data_total_len; @@ -554,6 +553,7 @@ test_crypto_static (vlib_main_t * vm, crypto_test_main_t * tm, op->chunk_index = vec_len (chunks); while (ct->data) { + clib_memset (&ch, 0, sizeof (ch)); ch.src = ct->data; ch.len = ct->length; ch.dst = computed_data + computed_data_total_len; @@ -608,6 +608,7 @@ test_crypto_static (vlib_main_t * vm, crypto_test_main_t * tm, op->chunk_index = vec_len (chunks); while (pt->data) { + clib_memset (&ch, 0, sizeof (ch)); ch.src = pt->data; ch.len = pt->length; vec_add1 (chunks, ch);
Release Channels in thread.getChannel;
@@ -60,6 +60,7 @@ int l_lovrThreadGetChannel(lua_State* L) { const char* name = luaL_checkstring(L, 1); Channel* channel = lovrThreadGetChannel(name); luax_pushtype(L, Channel, channel); + lovrRelease(&channel->ref); return 1; }
Remove useless documentation link to Solr documentation into help page
The wildcard * is also allowed, which triggers a search for any word that starts with the same characters as the ones declared in the query. <br> For instance, searching ret* will return documents containing words such as return, retired, retreat. </p> -<p> - Examples and more operators are presented here: <br/> - <a target="blank" href="https://lucene.apache.org/solr/guide/7_6/the-standard-query-parser.html#the-standard-query-parser">https://lucene.apache.org/solr/guide/7_6/the-standard-query-parser.html#the-standard-query-parser</a> -</p> + <h2>Facets:</h2> <p>
revert literal changes
@@ -569,6 +569,7 @@ macx:TARGET = "Denarius" macx:QMAKE_CFLAGS_THREAD += -pthread macx:QMAKE_LFLAGS_THREAD += -pthread macx:QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 +macx:QMAKE_MAC_SDK = macosx10.11 macx:QMAKE_CXXFLAGS_THREAD += -pthread macx:QMAKE_RPATHDIR = @executable_path/../Frameworks
fix tuple list
@@ -14,11 +14,11 @@ class GenerateSlider: :param radius: float, size of slider :param scale: float, current resolution with 512x384 """ - self.sliderborder = sliderborder + self.sliderborder = list(sliderborder) self.sliderborder[0], self.sliderborder[2] = self.sliderborder[2], self.sliderborder[0] self.sliderborder = tuple(self.sliderborder) - self.slideroverride = slideroverride + self.slideroverride = list(slideroverride) self.slideroverride[0], self.slideroverride[2] = self.slideroverride[2], self.slideroverride[0] self.slideroverride = tuple(self.slideroverride)
mesh: Fix gen_prov struct definition Remove unnecessary const keywords (the entire struct is const) and use bool instead of u8_t for the require_link member.
@@ -1459,9 +1459,9 @@ static void gen_prov_start(struct prov_rx *rx, struct os_mbuf *buf) } static const struct { - void (*const func)(struct prov_rx *rx, struct os_mbuf *buf); - const u8_t require_link; - const u8_t min_len; + void (*func)(struct prov_rx *rx, struct os_mbuf *buf); + bool require_link; + u8_t min_len; } gen_prov[] = { { gen_prov_start, true, 3 }, { gen_prov_ack, true, 0 },
increased inbound request and ward timeouts to 5 min
@@ -463,7 +463,7 @@ _http_rec_accept(h2o_handler_t* han_u, h2o_req_t* rec_u) req_u->tim_u = c3_malloc(sizeof(*req_u->tim_u)); req_u->tim_u->data = req_u; uv_timer_init(u3L, req_u->tim_u); - uv_timer_start(req_u->tim_u, _http_req_timer_cb, 30 * 1000, 0); + uv_timer_start(req_u->tim_u, _http_req_timer_cb, 300 * 1000, 0); _http_req_dispatch(req_u, req); @@ -2310,7 +2310,7 @@ _proxy_ward_start(u3_pcon* con_u, u3_noun sip) uv_timer_init(u3L, &rev_u->tim_u); // XX how long? - uv_timer_start(&rev_u->tim_u, _proxy_ward_timer_cb, 120 * 1000, 0); + uv_timer_start(&rev_u->tim_u, _proxy_ward_timer_cb, 300 * 1000, 0); // XX u3_lo_shut(c3y); }
divide huge pages more even
@@ -385,6 +385,7 @@ static bool mi_arena_add(mi_arena_t* arena) { // reserve at a specific numa node int mi_reserve_huge_os_pages_at(size_t pages, int numa_node) mi_attr_noexcept { + if (pages==0) return 0; if (numa_node < -1) numa_node = -1; if (numa_node >= 0) numa_node = numa_node % _mi_os_numa_node_count(); size_t hsize = 0; @@ -422,18 +423,20 @@ int mi_reserve_huge_os_pages_interleave(size_t pages) mi_attr_noexcept { // pages per numa node int numa_count = _mi_os_numa_node_count(); if (numa_count <= 0) numa_count = 1; - size_t pages_per = pages / numa_count; - if (pages_per == 0) pages_per = 1; + const size_t pages_per = pages / numa_count; + const size_t pages_mod = pages % numa_count; // reserve evenly among numa nodes for (int numa_node = 0; numa_node < numa_count && pages > 0; numa_node++) { - int err = mi_reserve_huge_os_pages_at((pages_per > pages ? pages : pages_per), numa_node); + size_t node_pages = pages_per; // can be 0 + if (numa_node < pages_mod) node_pages++; + int err = mi_reserve_huge_os_pages_at(node_pages, numa_node); if (err) return err; - if (pages < pages_per) { + if (pages < node_pages) { pages = 0; } else { - pages -= pages_per; + pages -= node_pages; } }
Update README for MacOS dependencies
$ sudo apt-get install gcc cmake libsdl2-dev libsdl2-mixer-dev python3 inotify-tools ``` +### MacOS + +```console +$ brew install gcc cmake sdl2 sdl2_mixer python3 +``` + ### NixOS For [NixOS] we have a development environment defined in [default.nix]
linux/trace: pass pcRegSz to arch_getInstrStr
@@ -448,7 +448,7 @@ static size_t arch_getPC(pid_t pid, uint64_t* pc, uint64_t* status_reg HF_ATTR_U } static void arch_getInstrStr( - pid_t pid, uint64_t pc, uint64_t status_reg HF_ATTR_UNUSED, char* instr) { + pid_t pid, uint64_t pc, uint64_t status_reg HF_ATTR_UNUSED, size_t pcRegSz HF_ATTR_UNUSED, char* instr) { /* * We need a value aligned to 8 * which is sizeof(long) on 64bit CPU archs (on most of them, I hope;) @@ -617,7 +617,7 @@ static void arch_traceSaveData(run_t* run, pid_t pid) { LOG_W("ptrace arch_getPC failed"); return; } - arch_getInstrStr(pid, pc, status_reg, instr); + arch_getInstrStr(pid, pc, status_reg, pcRegSz, instr); LOG_D("Pid: %d, signo: %d, errno: %d, code: %d, addr: %p, pc: %" PRIx64 ", instr: '%s'", pid, si.si_signo, si.si_errno, si.si_code, si.si_addr, pc, instr);
docker: alpine release image add libgit2, tcl, configure to work without sudo
@@ -6,14 +6,13 @@ RUN apk update \ build-base \ cmake \ curl \ - diffutils \ - file \ + libgit2 \ git \ ninja \ - ronn \ + tcl \ yaml-cpp-dev -# Google Test +# Google Test (TODO: update before 0.9.2 to gtest 1.10.0, but does not work with elektra 0.9.1) ENV GTEST_ROOT=/opt/gtest ARG GTEST_VER=release-1.8.1 RUN mkdir -p ${GTEST_ROOT} \ @@ -32,6 +31,12 @@ RUN mkdir -p ${ELEKTRA_ROOT} \ && tar -zxvf elektra.tar.gz --strip-components=1 -C ${ELEKTRA_ROOT} \ && rm elektra.tar.gz +ARG USERID=1000 +RUN adduser \ + -u ${USERID} \ + -D \ + elektra + ARG PARALLEL=8 WORKDIR ${ELEKTRA_ROOT} RUN mkdir build \ @@ -40,19 +45,18 @@ RUN mkdir build \ -DTOOLS="ALL" \ -DENABLE_DEBUG="OFF" \ -DENABLE_LOGGER="OFF" \ + -DKDB_DB_SYSTEM='/home/elektra/.config/kdb/system' \ + -DKDB_DB_SPEC='/home/elektra/.config/kdb/spec' \ + -DKDB_DB_HOME='/home/elektra/.config/kdb/home' \ .. \ && make -j ${PARALLEL} \ - && ctest -T Test --output-on-failure -j ${PARALLEL} -LE kdbtests + && ctest -T Test --output-on-failure -j ${PARALLEL} FROM alpine:3.10 COPY --from=0 ${ELEKTRA_ROOT} \ ${ELEKTRA_ROOT} -RUN apk update \ - && apk add --no-cache --upgrade\ - bash - ENV ELEKTRA_ROOT=/opt/elektra WORKDIR ${ELEKTRA_ROOT} RUN cd build \ @@ -60,16 +64,11 @@ RUN cd build \ && ldconfig /usr/local/lib/elektra/ \ && rm -Rf ${ELEKTRA_ROOT} +RUN echo "alias sudo='' # in this image we do not need to be root" >> /etc/profile +RUN echo "export PS1='\u $ '" >> /etc/profile ENV LD_LIBRARY_PATH=/usr/local/lib/elektra/ +ENV ENV="/etc/profile" -# Create User:Group -# The id is important as jenkins docker agents use the same id that is running -# on the slaves to execute containers ARG USERID=1000 -RUN adduser \ - -u ${USERID} \ - -D \ - -s /bin/bash \ - elektra USER ${USERID} WORKDIR /home/elektra
[DeviceDrivers]Fix continuous write page bug for spi_flash_at45dbxx driver
@@ -140,12 +140,12 @@ static rt_size_t AT45DB_flash_read_page_256(rt_device_t dev, rt_off_t pos, void* { uint32_t index, nr; uint8_t * read_buffer = buffer; + uint32_t page = pos; nr = size; for (index = 0; index < nr; index++) { - uint32_t page = pos; uint8_t send_buffer[8]; uint32_t i; @@ -170,12 +170,12 @@ static rt_size_t AT45DB_flash_read_page_512(rt_device_t dev, rt_off_t pos, void* { uint32_t index, nr; uint8_t * read_buffer = buffer; + uint32_t page = pos; nr = size; for (index = 0; index < nr; index++) { - uint32_t page = pos; uint8_t send_buffer[8]; uint32_t i; @@ -200,12 +200,12 @@ static rt_size_t AT45DB_flash_read_page_1024(rt_device_t dev, rt_off_t pos, void { uint32_t index, nr; uint8_t * read_buffer = buffer; + uint32_t page = pos; nr = size; for (index = 0; index < nr; index++) { - uint32_t page = pos; uint8_t send_buffer[8]; uint32_t i; @@ -230,12 +230,12 @@ static rt_size_t AT45DB_flash_write_page_256(rt_device_t dev, rt_off_t pos, cons { rt_uint32_t index, nr; const uint8_t * write_buffer = buffer; + uint32_t page = pos; nr = size; for (index = 0; index < nr; index++) { - uint32_t page = pos; uint8_t send_buffer[4]; send_buffer[0] = AT45DB_MM_PAGE_PROG_THRU_BUFFER1; @@ -258,12 +258,12 @@ static rt_size_t AT45DB_flash_write_page_512(rt_device_t dev, rt_off_t pos, cons { rt_uint32_t index, nr; const uint8_t * write_buffer = buffer; + uint32_t page = pos; nr = size; for (index = 0; index < nr; index++) { - uint32_t page = pos; uint8_t send_buffer[4]; send_buffer[0] = AT45DB_MM_PAGE_PROG_THRU_BUFFER1; @@ -286,12 +286,12 @@ static rt_size_t AT45DB_flash_write_page_1024(rt_device_t dev, rt_off_t pos, con { rt_uint32_t index, nr; const uint8_t * write_buffer = buffer; + uint32_t page = pos; nr = size; for (index = 0; index < nr; index++) { - uint32_t page = pos; uint8_t send_buffer[4]; send_buffer[0] = AT45DB_MM_PAGE_PROG_THRU_BUFFER1;
grib_accessor_classes_hash declared static
@@ -678,7 +678,7 @@ static const struct accessor_class_hash classes[] = {"reference_value_error", &grib_accessor_class_reference_value_error} }; -const struct accessor_class_hash * +static const struct accessor_class_hash * grib_accessor_classes_hash (const char *str, unsigned int len) { register const int key = grib_accessor_classes_get_id (str, len);
Update changelog for FreeRTOS kernel update
# Change Log for Amazon FreeRTOS +### New Features +#### FreeRTOS Kernel V10.2.1 +- Kernel version for Amazon FreeRTOS is updated to V10.2.1. +- Add ARM Cortex-M23 (ARMv8-M) GCC/ARMclang and IAR ports. +- Add support to automatically switch between 32-bit and 64-bit cores to RISC-V port. + ### Updates -### Demo specific stack size and priority +#### Demo specific stack size and priority - Make stack size and priority to be demo specific. In current release all demos have same stack size and priority. This change will make stack size and priority configurable for each demo. Demo can use default stack size/ priority or define its own. ## 201906.00 Major 06/17/2019
[dpos] bug-fix: index out of range
@@ -292,8 +292,7 @@ func (pls *pLibStatus) rollbackPreLIB(c *confirmInfo) { pls.plib[c.BPID] = newEntry logger.Debug(). - Str("BPID", c.BPID).Uint64("block no", newEntry[len(newEntry)-1].BlockNo). - Int("old len", oldLen).Int("new len", purgeBeg). + Str("BPID", c.BPID).Int("old len", oldLen).Int("new len", purgeBeg). Msg("rollback pre-LIB entry") } }
add dlls to path
@@ -5,6 +5,7 @@ init: - cmd: call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat" - cmd: set INCLUDE=C:\Libraries\boost_1_67_0;%INCLUDE% - cmd: set LIB=C:\Libraries\boost_1_67_0\lib32-msvc-14.1;%LIB% + - cmd: set PATH=C:\projects\vcf-validator\lib\windows_specific;%PATH% install: - cmd: install_dependencies.bat
Add support for aes_256_gcm
@@ -34,8 +34,9 @@ struct menc_sess { struct menc_st { /* one SRTP session per media line */ const struct menc_sess *sess; - uint8_t key_tx[32]; - uint8_t key_rx[32]; + uint8_t key_tx[32+12]; + /* base64_decoding worst case encoded 32+12 key */ + uint8_t key_rx[46]; struct srtp *srtp_tx, *srtp_rx; bool use_srtp; bool got_sdp; @@ -52,6 +53,7 @@ struct menc_st { static const char aes_cm_128_hmac_sha1_32[] = "AES_CM_128_HMAC_SHA1_32"; static const char aes_cm_128_hmac_sha1_80[] = "AES_CM_128_HMAC_SHA1_80"; static const char aes_128_gcm[] = "AEAD_AES_128_GCM"; +static const char aes_256_gcm[] = "AEAD_AES_256_GCM"; static const char *preferred_suite = aes_cm_128_hmac_sha1_80; @@ -79,6 +81,7 @@ static bool cryptosuite_issupported(const struct pl *suite) if (0 == pl_strcasecmp(suite, aes_cm_128_hmac_sha1_32)) return true; if (0 == pl_strcasecmp(suite, aes_cm_128_hmac_sha1_80)) return true; if (0 == pl_strcasecmp(suite, aes_128_gcm)) return true; + if (0 == pl_strcasecmp(suite, aes_256_gcm)) return true; return false; } @@ -130,6 +133,8 @@ static enum srtp_suite resolve_suite(const char *suite) return SRTP_AES_CM_128_HMAC_SHA1_80; if (0 == str_casecmp(suite, aes_128_gcm)) return SRTP_AES_128_GCM; + if (0 == str_casecmp(suite, aes_256_gcm)) + return SRTP_AES_256_GCM; return -1; } @@ -142,6 +147,7 @@ static size_t get_master_keylen(enum srtp_suite suite) case SRTP_AES_CM_128_HMAC_SHA1_32: return 16+14; case SRTP_AES_CM_128_HMAC_SHA1_80: return 16+14; case SRTP_AES_128_GCM: return 16+12; + case SRTP_AES_256_GCM: return 32+12; default: return 0; } }
Added openssl init specifying no atexit in the tcp transpoprt.
@@ -368,6 +368,12 @@ establishTlsSession(transport_t *trans) enterCriticalSection(); if (!g_tls_calls_are_safe) goto err; + static int init_called = FALSE; + if (!init_called) { + OPENSSL_init_ssl(OPENSSL_INIT_NO_ATEXIT, NULL); + init_called = TRUE; + } + trans->net.tls.ctx = SSL_CTX_new(TLS_method()); if (!trans->net.tls.ctx) { char msg[512] = {0};
Teach OpenSSL::ParseC about OPENSSL_EXPORT and OPENSSL_EXTERN
@@ -610,6 +610,12 @@ EOF }, }, + # OpenSSL's declaration of externs with possible export linkage + # (really only relevant on Windows) + { regexp => qr/OPENSSL_(?:EXPORT|EXTERN)/, + massager => sub { return ("extern"); } + }, + # Spurious stuff found in the OpenSSL headers # Usually, these are just macros that expand to, well, something { regexp => qr/__NDK_FPABI__/,
Change registry for Travis CI.
@@ -35,8 +35,8 @@ env: - DOCKER_COMPOSE_VERSION: 1.22.0 - GHR_VERSION: 0.12.0 - GIT_SUBMODULE_STRATEGY: recursive - - IMAGE_REGISTRY: registry.hub.docker.com - - IMAGE_NAME: registry.hub.docker.com/$TRAVIS_REPO_SLUG + - IMAGE_REGISTRY: registry.gitlab.com + - IMAGE_NAME: registry.gitlab.com/$TRAVIS_REPO_SLUG - ARTIFACTS_PATH: $TRAVIS_BUILD_DIR/artifacts addons:
CMSIS-DSP : Disabled some tests which are not passing yet.
@@ -638,19 +638,19 @@ group Root { cifft_noisy_64_q15:test_cifft_q15 cifft_noisy_128_q15:test_cifft_q15 cifft_noisy_256_q15:test_cifft_q15 - cifft_noisy_512_q15:test_cifft_q15 - cifft_noisy_1024_q15:test_cifft_q15 - cifft_noisy_2048_q15:test_cifft_q15 - cifft_noisy_4096_q15:test_cifft_q15 + disabled {cifft_noisy_512_q15:test_cifft_q15} + disabled {cifft_noisy_1024_q15:test_cifft_q15} + disabled {cifft_noisy_2048_q15:test_cifft_q15} + disabled {cifft_noisy_4096_q15:test_cifft_q15} cifft_step_16_q15:test_cifft_q15 cifft_step_32_q15:test_cifft_q15 cifft_step_64_q15:test_cifft_q15 cifft_step_128_q15:test_cifft_q15 cifft_step_256_q15:test_cifft_q15 - cifft_step_512_q15:test_cifft_q15 - cifft_step_1024_q15:test_cifft_q15 - cifft_step_2048_q15:test_cifft_q15 - cifft_step_4096_q15:test_cifft_q15 + disabled {cifft_step_512_q15:test_cifft_q15} + disabled {cifft_step_1024_q15:test_cifft_q15} + disabled {cifft_step_2048_q15:test_cifft_q15} + disabled {cifft_step_4096_q15:test_cifft_q15} } }
Move contrib/python/xmpppy in deprecated
@@ -234,3 +234,8 @@ ALLOW mail/python/huge_py2 -> contrib/deprecated/python/cyordereddict ALLOW sprav/protos/model -> contrib/deprecated/python/cyordereddict ALLOW yql/udfs/common/python/python_arc -> contrib/deprecated/python/cyordereddict DENY .* -> contrib/deprecated/python/cyordereddict + +ALLOW contrib/deprecated/python/xmpppy -> contrib/deprecated/python/xmpppy +ALLOW ads/libs/py_notifier -> contrib/deprecated/python/xmpppy +ALLOW yql/udfs/common/python/python_arc -> contrib/deprecated/python/xmpppy +DENY .* -> contrib/deprecated/python/xmpppy
Make test_alloc_realloc_many_attributes() robust vs allocations
@@ -8683,7 +8683,9 @@ START_TEST(test_alloc_realloc_many_attributes) if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR) break; - XML_ParserReset(parser, NULL); + /* See comment in test_alloc_parse_xdecl() */ + alloc_teardown(); + alloc_setup(); } if (i == 0) fail("Parse succeeded despite no reallocations");
os/compression/compress_read.c : Declare decompression related global variables as static Variables for compression header and decompression buffers are used only in this file. So declaring them as static.
* Private Declarations ****************************************************************************/ -struct s_header *compression_header; -struct s_buffer buffers; +static struct s_header *compression_header; +static struct s_buffer buffers; /**************************************************************************** * Private Functions
Module api doc generator, fixing issue with negative lookback terminating at "." There is a little regex that wraps up all the free-floating functions in the doc-block e.g. malloc() with backticks. in case of `redis.call()`, it used to wrap just `call()` in backticks.
@@ -20,7 +20,7 @@ def markdown(s) # Add backquotes around RedisModule functions and type where missing. l = l.gsub(/(?<!`)RedisModule[A-z]+(?:\*?\(\))?/){|x| "`#{x}`"} # Add backquotes around c functions like malloc() where missing. - l = l.gsub(/(?<![`A-z])[a-z_]+\(\)/, '`\0`') + l = l.gsub(/(?<![`A-z.])[a-z_]+\(\)/, '`\0`') # Add backquotes around macro and var names containing underscores. l = l.gsub(/(?<![`A-z\*])[A-Za-z]+_[A-Za-z0-9_]+/){|x| "`#{x}`"} # Link URLs preceded by space or newline (not already linked)
rp2/modutime: time_ns is not part of Pycopy API and not available. Fixes build error.
@@ -106,7 +106,9 @@ STATIC const mp_rom_map_elem_t mp_module_time_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_mktime), MP_ROM_PTR(&time_mktime_obj) }, { MP_ROM_QSTR(MP_QSTR_time), MP_ROM_PTR(&time_time_obj) }, + #if 0 { MP_ROM_QSTR(MP_QSTR_time_ns), MP_ROM_PTR(&mp_utime_time_ns_obj) }, + #endif { MP_ROM_QSTR(MP_QSTR_sleep), MP_ROM_PTR(&mp_utime_sleep_obj) }, { MP_ROM_QSTR(MP_QSTR_sleep_ms), MP_ROM_PTR(&mp_utime_sleep_ms_obj) },
Made sure we can get time from poserdata_sync
static uint32_t PoserData_timecode(PoserData *poser_data) { switch (poser_data->pt) { + case POSERDATA_SYNC: case POSERDATA_LIGHT: { PoserDataLight *lightData = (PoserDataLight *)poser_data; return lightData->timecode; @@ -26,6 +27,7 @@ static uint32_t PoserData_timecode(PoserData *poser_data) { return imuData->timecode; } } + assert(false); return -1; }
bugfix for TCPv6 send ok when sta disconnect
@@ -1101,7 +1101,9 @@ static esp_err_t esp_netif_down_api(esp_netif_api_msg_t *msg) esp_netif_reset_ip_info(esp_netif); } - + for(int8_t i = 0 ;i < LWIP_IPV6_NUM_ADDRESSES ;i++) { + netif_ip6_addr_set(lwip_netif, i, IP6_ADDR_ANY6); + } netif_set_addr(lwip_netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); netif_set_down(lwip_netif);
Fix vendor options - wrong logic for ignoring standard options...
@@ -231,7 +231,7 @@ _papplMainloopAddOptions( if ((value = cupsGetOption(name, num_options, options)) == NULL) continue; - if (strcmp(name, "copies") && strcmp(name, "finishings") && strcmp(name, "media") && strcmp(name, "orientation-requested") && strcmp(name, "print-color-mode") && strcmp(name, "print-content-optimize") && strcmp(name, "print-darkness") && strcmp(name, "print-quality") && strcmp(name, "print-scaling") && strcmp(name, "print-speed") && strcmp(name, "printer-resolution")) + if (!strcmp(name, "copies") || !strcmp(name, "finishings") || !strcmp(name, "media") || !strcmp(name, "orientation-requested") || !strcmp(name, "print-color-mode") || !strcmp(name, "print-content-optimize") || !strcmp(name, "print-darkness") || !strcmp(name, "print-quality") || !strcmp(name, "print-scaling") || !strcmp(name, "print-speed") || !strcmp(name, "printer-resolution")) continue; snprintf(defname, sizeof(defname), "%s-default", name);
groups: autojoin checks for group first
@@ -18,21 +18,31 @@ export class JoinScreen extends Component { } componentDidMount() { - // direct join from incoming URL - if ((this.props.ship) && (this.props.name)) { - const incomingGroup = `${this.props.ship}/${this.props.name}`; + this.componentDidUpdate(); + } + + componentDidUpdate(prevProps) { + const { props, state } = this; + // autojoin by URL, waits for group information + if ((props.ship && props.name) && + (prevProps && (prevProps.groups !== props.groups))) { + console.log('autojoining'); + const incomingGroup = `${props.ship}/${props.name}`; + // push to group if already exists + if (`/ship/${incomingGroup}` in props.groups) { + this.props.history.push(`/~groups/ship/${incomingGroup}`); + return; + } this.setState({ group: incomingGroup }, () => { this.onClickJoin(); }); } - } - - componentDidUpdate() { - if (this.props.groups) { - if (this.state.awaiting) { - const group = `/ship/${this.state.group}`; - if (group in this.props.groups) { - this.props.history.push(`/~groups${group}`); + // once we've joined, push to group page + if (props.groups) { + if (state.awaiting) { + const group = `/ship/${state.group}`; + if (group in props.groups) { + props.history.push(`/~groups${group}`); } } } @@ -41,6 +51,7 @@ export class JoinScreen extends Component { onClickJoin() { const { props, state } = this; + console.log('i am joining'); const { group } = state; const [ship, name] = group.split('/');
BugID:17702301: Fix Bug of AES128 CFG with Linux HAL.
* Copyright (C) 2015-2018 Alibaba Group Holding Limited */ - - #include <string.h> #include "iot_import.h" #include "mbedtls/aes.h" typedef struct { mbedtls_aes_context ctx; uint8_t iv[16]; + uint8_t key[16]; } platform_aes_t; p_HAL_Aes128_t HAL_Aes128_Init( @@ -38,6 +37,7 @@ p_HAL_Aes128_t HAL_Aes128_Init( if (ret == 0) { memcpy(p_aes128->iv, iv, 16); + memcpy(p_aes128->key, key, 16); } else { free(p_aes128); p_aes128 = NULL; @@ -131,6 +131,7 @@ int HAL_Aes128_Cfb_Decrypt( if (!aes || !src || !dst) return ret; + ret = mbedtls_aes_setkey_enc(&p_aes128->ctx, p_aes128->key, 128); ret = mbedtls_aes_crypt_cfb128(&p_aes128->ctx, MBEDTLS_AES_DECRYPT, length, &offset, p_aes128->iv, src, dst); return ret;
add timeout for vm
@@ -159,10 +159,6 @@ namespace "config" do #TODO: windows path way $virtualbox_path = ENV['VBOX_MSI_INSTALL_PATH'] Rake::Task["build:sailfish:startvm"].invoke() - #if $virtualbox_path.empty? - # raise "Please, set VirtualBox variable environment..." - #end - #system("\"" + File.join($virtualbox_path, "VBoxManage.exe") + "\"" + " startvm \"Sailfish OS Build Engine\" --type headless") end end @@ -265,6 +261,8 @@ namespace "build" do if !vm_is_started? system("\"" + File.join($virtualbox_path, "VBoxManage.exe") + "\"" + " startvm \"Sailfish OS Build Engine\" --type headless") + puts "Waiting 40 seconds vm..." + sleep 40.0 end end
Fix OSRAM and Paulmann ZigBee 3.0 lights not registering to REST-API
@@ -1188,6 +1188,18 @@ void DeRestPluginPrivate::addLightNode(const deCONZ::Node *node) // filter for supported devices switch (i->deviceId()) { + case DEV_ID_Z30_ONOFF_PLUGIN_UNIT: + case DEV_ID_Z30_DIMMABLE_PLUGIN_UNIT: + case DEV_ID_Z30_EXTENDED_COLOR_LIGHT: + case DEV_ID_Z30_COLOR_TEMPERATURE_LIGHT: + { + if (hasServerOnOff) + { + lightNode.setHaEndpoint(*i); + } + } + break; + case DEV_ID_MAINS_POWER_OUTLET: case DEV_ID_HA_ONOFF_LIGHT: case DEV_ID_ONOFF_OUTPUT: @@ -1195,24 +1207,21 @@ void DeRestPluginPrivate::addLightNode(const deCONZ::Node *node) case DEV_ID_HA_DIMMABLE_LIGHT: case DEV_ID_HA_COLOR_DIMMABLE_LIGHT: case DEV_ID_SMART_PLUG: - case DEV_ID_ZLL_ONOFF_LIGHT: case DEV_ID_ZLL_ONOFF_PLUGIN_UNIT: - case DEV_ID_Z30_ONOFF_PLUGIN_UNIT: case DEV_ID_ZLL_ONOFF_SENSOR: // case DEV_ID_ZLL_DIMMABLE_LIGHT: // same as DEV_ID_HA_ONOFF_LIGHT case DEV_ID_ZLL_DIMMABLE_PLUGIN_UNIT: - case DEV_ID_Z30_DIMMABLE_PLUGIN_UNIT: case DEV_ID_ZLL_COLOR_LIGHT: case DEV_ID_ZLL_EXTENDED_COLOR_LIGHT: - case DEV_ID_Z30_EXTENDED_COLOR_LIGHT: case DEV_ID_ZLL_COLOR_TEMPERATURE_LIGHT: - case DEV_ID_Z30_COLOR_TEMPERATURE_LIGHT: { if (hasServerOnOff) { - if (node->nodeDescriptor().manufacturerCode() == VENDOR_JENNIC && i->endpoint() != 0x02 && i->endpoint() != 0x03) + if ((node->address().ext() & macPrefixMask) == jennicMacPrefix && + node->nodeDescriptor().manufacturerCode() == VENDOR_JENNIC && i->endpoint() != 0x02 && i->endpoint() != 0x03) { + // TODO better filter for lumi. devices (i->deviceId(), modelid?) // blacklist switch endpoints for lumi.ctrl_neutral1 and lumi.ctrl_neutral1 } else @@ -1325,6 +1334,15 @@ void DeRestPluginPrivate::addLightNode(const deCONZ::Node *node) lightNode.setNeedSaveDatabase(true); } + if ((node->address().ext() & macPrefixMask) == osramMacPrefix) + { + if (lightNode.manufacturer() != QLatin1String("OSRAM")) + { + lightNode.setManufacturerName(QLatin1String("OSRAM")); + lightNode.setNeedSaveDatabase(true); + } + } + if ((node->address().ext() & macPrefixMask) == philipsMacPrefix) { if (lightNode.manufacturer() != QLatin1String("Philips"))
Change default margins to 2
@@ -16,7 +16,7 @@ static void usage() { "Usage: tui [options] [file]\n\n" "Options:\n" " --margins <number> Add cosmetic margins.\n" - " Default: 0\n" + " Default: 2\n" " -h or --help Print this message and exit.\n" ); // clang-format on @@ -360,7 +360,7 @@ int main(int argc, char** argv) { {"help", no_argument, 0, 'h'}, {NULL, 0, NULL, 0}}; char* input_file = NULL; - int margin_thickness = true; + int margin_thickness = 2; for (;;) { int c = getopt_long(argc, argv, "h", tui_options, NULL); if (c == -1)
In cpp wrapper: added saving module raw data to module class
@@ -265,15 +265,15 @@ namespace wasm3 { module(const std::shared_ptr<M3Environment> &env, std::istream &in_wasm) { in_wasm.unsetf(std::ios::skipws); - std::vector<uint8_t> in_bytes; std::copy(std::istream_iterator<uint8_t>(in_wasm), std::istream_iterator<uint8_t>(), - std::back_inserter(in_bytes)); - parse(env.get(), in_bytes.data(), in_bytes.size()); + std::back_inserter(m_moduleRawData)); + parse(env.get(), m_moduleRawData.data(), m_moduleRawData.size()); } module(const std::shared_ptr<M3Environment> &env, const uint8_t *data, size_t size) : m_env(env) { - parse(env.get(), data, size); + m_moduleRawData = std::vector<uint8_t>{data, data + size}; + parse(env.get(), m_moduleRawData.data(), m_moduleRawData.size()); } void parse(IM3Environment env, const uint8_t *data, size_t size) { @@ -296,6 +296,7 @@ namespace wasm3 { std::shared_ptr<M3Environment> m_env; std::shared_ptr<M3Module> m_module; bool m_loaded = false; + std::vector<uint8_t> m_moduleRawData {}; };
refine wording per review
@@ -10,7 +10,7 @@ See the AppScope repo to view [all issues](https://github.com/criblio/appscope/i 2021-10-05 - Maintenance Pre-Release -- **Improvement**: [#462](https://github.com/criblio/appscope/issues/462) Add support for Unix domain sockets with new `scope relay` command. +- **Improvement**: [#462](https://github.com/criblio/appscope/issues/462) Add support for sending event/metric output to a Unix domain socket. - **Improvement**: [#492](https://github.com/criblio/appscope/issues/492) Add support for custom configuration with new `custom` section in `scope.yml`.
Update token security attributes
#define TOKEN_SECURITY_ATTRIBUTE_DISABLED_BY_DEFAULT 0x0008 #define TOKEN_SECURITY_ATTRIBUTE_DISABLED 0x0010 #define TOKEN_SECURITY_ATTRIBUTE_MANDATORY 0x0020 +#define TOKEN_SECURITY_ATTRIBUTE_COMPARE_IGNORE 0x0040 #define TOKEN_SECURITY_ATTRIBUTE_VALID_FLAGS ( \ TOKEN_SECURITY_ATTRIBUTE_NON_INHERITABLE | \
Fix cast in sctp_findassociation_ep_addr In AF_CONN case cast to sockaddr_conn instead of sockaddr_in6
@@ -1487,7 +1487,7 @@ sctp_findassociation_ep_addr(struct sctp_inpcb **inp_p, struct sockaddr *remote, #endif #if defined(__Userspace__) case AF_CONN: - rport = (((struct sockaddr_in6 *)remote)->sin6_port); + rport = (((struct sockaddr_conn *)remote)->sconn_port); break; #endif default:
add certificate path for freebsd
# # The clients doing the lookup need to be provided with the appropiate CA certificates: # --tls-client-cert /usr/share/ca-certificates/mozilla -# +# --tls-client-cert /usr/local/share/certs # Note: --announce is only needed when KadNode does not do the authentication. # As an alternative, create a secret/public key via 'kadnode --bob-create-key'
Fix LWIP-socket invalid error mapping Solves
@@ -155,20 +155,19 @@ static const int err_to_errno_table[] = { 0, /* ERR_OK 0 No error, everything OK. */ ENOMEM, /* ERR_MEM -1 Out of memory error. */ ENOBUFS, /* ERR_BUF -2 Buffer error. */ - EWOULDBLOCK, /* ERR_TIMEOUT -3 Timeout */ + ETIMEDOUT, /* ERR_TIMEOUT -3 Timeout */ EHOSTUNREACH, /* ERR_RTE -4 Routing problem. */ EINPROGRESS, /* ERR_INPROGRESS -5 Operation in progress */ EINVAL, /* ERR_VAL -6 Illegal value. */ EWOULDBLOCK, /* ERR_WOULDBLOCK -7 Operation would block. */ EADDRINUSE, /* ERR_USE -8 Address in use. */ - EALREADY, /* ERR_ALREADY -9 Already connecting. */ - EISCONN, /* ERR_ISCONN -10 Conn already established. */ - ENOTCONN, /* ERR_CONN -11 Not connected. */ - ECONNABORTED, /* ERR_ABRT -12 Connection aborted. */ - ECONNRESET, /* ERR_RST -13 Connection reset. */ - ENOTCONN, /* ERR_CLSD -14 Connection closed. */ - EIO, /* ERR_ARG -15 Illegal argument. */ - -1, /* ERR_IF -16 Low-level netif error */ + EISCONN, /* ERR_ISCONN -9 Conn already established.*/ + ECONNABORTED, /* ERR_ABRT -10 Connection aborted. */ + ECONNRESET, /* ERR_RST -11 Connection reset. */ + ESHUTDOWN, /* ERR_CLSD -12 Connection closed. */ + ENOTCONN, /* ERR_CONN -13 Not connected. */ + EIO, /* ERR_ARG -14 Illegal argument. */ + -1, /* ERR_IF -15 Low-level netif error */ }; #define ERR_TO_ERRNO_TABLE_SIZE \
Fix pointer to emulator.cc in GenerateSimFiles
@@ -90,7 +90,7 @@ object GenerateSimFiles extends App with HasGenerateSimConfig { "/vsrc/EICG_wrapper.v", ) ++ (sim match { // simulator specific files to include case VerilatorSimulator => Seq( - "/project-template/csrc/emulator.cc", + "/csrc/emulator.cc", "/csrc/verilator.h", ) case VCSSimulator => Seq(
Unbreak build when SPIFFS_CACHE==0.
#ifndef SPIFFS_CACHE_STATS #define SPIFFS_CACHE_STATS 1 #endif +#else +// No SPIFFS_CACHE, also disable SPIFFS_CACHE_WR +#ifndef SPIFFS_CACHE_WR +#define SPIFFS_CACHE_WR 0 +#endif #endif // Always check header of each accessed page to ensure consistent state.
Attempted to make only processor 0 have data
@@ -240,18 +240,30 @@ avtRemapFilter::Execute(void) int size = vars->GetNumberOfTuples(); double *varsDouble = (double*) vars->GetVoidPointer(0); double *newBuff = new double[size]; - SumDoubleArrayAcrossAllProcessors(varsDouble, newBuff, size); + // SumDoubleArrayAcrossAllProcessors(varsDouble, newBuff, size); + SumDoubleArray(varsDouble, newBuff, size); + if (PAR_Rank() == 0) + { for (int i = 0; i < size; ++i) { varsDouble[i] = newBuff[i]; } + } delete [] newBuff; #endif + if (PAR_Rank() == 0) + { SetOutputDataTree(new avtDataTree(rg, 0)); - debug5 << "DONE Remapping" << std::endl; + } + else + { + rg->Delete(); + SetOutputDataTree(new avtDataTree(NULL, -1)); + } CleanClippingFunctions(); + debug5 << "DONE Remapping" << std::endl; return; }
evp: fix coverity resource leak
@@ -313,6 +313,7 @@ static EVP_PKEY_CTX *int_ctx_new(OSSL_LIB_CTX *libctx, if (propquery != NULL) { ret->propquery = OPENSSL_strdup(propquery); if (ret->propquery == NULL) { + OPENSSL_free(ret); EVP_KEYMGMT_free(keymgmt); return NULL; }
unify name of make command to fetch version
@@ -338,7 +338,7 @@ install_shared_libs: err all make_install_dirs install: install_soter_headers install_themis_headers install_static_libs install_shared_libs -get_themis_version: +get_version: @echo $(THEMIS_VERSION) THEMIS_DIST_FILENAME = $(THEMIS_VERSION).tar.gz
lower arena reset delay
@@ -81,7 +81,7 @@ static mi_option_desc_t options[_mi_option_last] = #endif { 1, UNINIT, MI_OPTION(allow_decommit) }, // decommit pages when not eager committed { 250, UNINIT, MI_OPTION(reset_delay) }, // reset delay in milli-seconds - { 1000, UNINIT, MI_OPTION(arena_reset_delay) }, // reset delay in milli-seconds + { 250, UNINIT, MI_OPTION(arena_reset_delay) }, // reset delay in milli-seconds { 0, UNINIT, MI_OPTION(use_numa_nodes) }, // 0 = use available numa nodes, otherwise use at most N nodes. { 100, UNINIT, MI_OPTION(os_tag) }, // only apple specific for now but might serve more or less related purpose { 16, UNINIT, MI_OPTION(max_errors) } // maximum errors that are output
Remove temporary files before running script
@@ -14,6 +14,7 @@ if __platform__ is iOS: import _codecompletion from pyto import * from pyto import __isMainApp__ + import os if __host__ is not widget: import builtins @@ -156,6 +157,14 @@ def run_script(path, replMode=False, debug=False, breakpoints=[]): if arg != "": sys.argv.append(str(arg)) + d=os.path.expanduser("~/tmp") + filesToRemove = [os.path.join(d,f) for f in os.listdir(d)] + for f in filesToRemove: + try: + os.remove(f) + except PermissionError: + pass + def run() -> None: if __platform__ is iOS:
Wrap profilerecorder collection errors This allows us to better figure out where these errors came from.
@@ -161,7 +161,7 @@ func (r *RecorderReconciler) Reconcile(_ context.Context, req reconcile.Request) if err := r.client.Get(ctx, req.NamespacedName, pod); err != nil { if kerrors.IsNotFound(err) { if err := r.collectProfile(ctx, req.NamespacedName); err != nil { - return reconcile.Result{}, err + return reconcile.Result{}, errors.Wrap(err, "collect profile for removed pod") } } else { // Returning an error means we will be requeued implicitly. @@ -194,7 +194,7 @@ func (r *RecorderReconciler) Reconcile(_ context.Context, req reconcile.Request) if pod.Status.Phase == corev1.PodSucceeded { if err := r.collectProfile(ctx, req.NamespacedName); err != nil { - return reconcile.Result{}, err + return reconcile.Result{}, errors.Wrap(err, "collect profile for succeeded pod") } }
Fix derive_discontinuous_lines_ignoring_epsilon test
@@ -472,10 +472,10 @@ void derive_discontinuous_lines_ignoring_epsilon(CuTest *tc) CuAssertIntEquals(tc, 2, (int)ts_deboornet_num_result(&net)); TS_CALL(try, status.code, ts_deboornet_result( &net, &result, &status)) - CuAssertDblEquals(tc, 1.0, result[0], EPSILON); - CuAssertDblEquals(tc, 1.0, result[1], EPSILON); - CuAssertDblEquals(tc, -2.0, result[2], EPSILON); - CuAssertDblEquals(tc, -2.0, result[3], EPSILON); + CuAssertDblEquals(tc, 1.0 / 0.7, result[0], EPSILON); + CuAssertDblEquals(tc, 1.0 / 0.7, result[1], EPSILON); + CuAssertDblEquals(tc, -2.0 / 0.3, result[2], EPSILON); + CuAssertDblEquals(tc, -2.0 / 0.3, result[3], EPSILON); TS_CATCH(status.code) CuFail(tc, status.message); TS_FINALLY
nimble/ll: Improve getting advertising and target address aux_data pointer contains valid advertiser and directed address from the very beggining if it is available. Later on when getting address let's make use of it and do not try to parse packet unless this is empty beacon
@@ -1922,6 +1922,27 @@ ble_ll_scan_get_addr_from_ext_adv(uint8_t *rxbuf, struct ble_mbuf_hdr *ble_hdr, return -1; } + if (aux_data) { + /* If address has been provided, we do have it already in aux_data.*/ + if (aux_data->flags & BLE_LL_AUX_HAS_ADDRA) { + *addr = aux_data->addr; + *addr_type = aux_data->addr_type; + } + + if (!inita) { + return 0; + } + + if (aux_data->flags & BLE_LL_AUX_HAS_DIR_ADDRA) { + *inita = aux_data->dir_addr; + *inita_type = aux_data->dir_addr_type; + } + + return 0; + } + + /* If this is just becon with no aux data, lets get address from the packet */ + ext_hdr_len = rxbuf[2] & 0x3F; ext_hdr_flags = rxbuf[3]; @@ -1937,19 +1958,6 @@ ble_ll_scan_get_addr_from_ext_adv(uint8_t *rxbuf, struct ble_mbuf_hdr *ble_hdr, *addr_type = ble_ll_get_addr_type(rxbuf[0] & BLE_ADV_PDU_HDR_TXADD_MASK); i += BLE_LL_EXT_ADV_ADVA_SIZE; - if (aux_data) { - /* Lets copy addr to aux_data. Need it for e.g. chaining */ - /* XXX add sanity checks */ - memcpy(aux_data->addr, *addr, 6); - aux_data->addr_type = *addr_type; - aux_data->flags |= BLE_LL_AUX_HAS_ADDRA; - } - } else { - /* We should have address already in aux_data */ - if (aux_data->flags & BLE_LL_AUX_HAS_ADDRA) { - *addr = aux_data->addr; - *addr_type = aux_data->addr_type; - } } if (!inita) { @@ -1961,18 +1969,6 @@ ble_ll_scan_get_addr_from_ext_adv(uint8_t *rxbuf, struct ble_mbuf_hdr *ble_hdr, *inita_type = ble_ll_get_addr_type(rxbuf[0] & BLE_ADV_PDU_HDR_RXADD_MASK); i += BLE_LL_EXT_ADV_TARGETA_SIZE; - if (aux_data) { - /* Lets copy addr to aux_data. Need it for e.g. chaining */ - memcpy(aux_data->dir_addr, *inita, 6); - aux_data->dir_addr_type = *inita_type; - aux_data->flags |= BLE_LL_AUX_HAS_DIR_ADDRA; - } - } else { - /* We should have address already in aux_data */ - if (aux_data->flags & BLE_LL_AUX_HAS_DIR_ADDRA) { - *inita = aux_data->dir_addr; - *inita_type = aux_data->dir_addr_type; - } } return 0;
Tests: removed misleading comments in test_routing.t.
@@ -1993,12 +1993,12 @@ class TestRouting(TestApplicationProto): self.get(url='/?Foo=bar')['status'], 404, 'match arguments case sensitive', - ) # FAIL + ) self.assertEqual( self.get(url='/?foo=Bar')['status'], 404, 'match arguments case sensitive 2', - ) # FAIL + ) self.assertEqual( self.get(url='/?foo=bar1')['status'], 404,
[catboost/tutorials] just comment -> just comment out
@@ -11,7 +11,7 @@ public class CatBoost4jPredictionTutorial { // Load "adult.cbm" model that we trained withing Jupyter Notebook adultModel = CatBoostModel.loadModel(ClassLoader.getSystemResourceAsStream("models/adult.cbm")); - // You can also try to load your own model just comment the line above and uncomment two lines below while + // You can also try to load your own model just comment out the line above and uncomment two lines below while // replacing "foo/bar" with path to your model that classifies data from UCI Adult Dataset. // // final String adultModelPath = "foo/bar";
imxrt1020-evk: Add download support for smartfs image This patch adds support for downloading the smartfs image onto the board.
@@ -98,6 +98,7 @@ function get_executable_name() app) echo "tinyara_user.bin";; micom) echo "micom";; wifi) echo "wifi";; + userfs) echo "imxrt1020-evk_smartfs.bin";; *) echo "No Binary Match" exit 1 esac @@ -111,6 +112,14 @@ function get_partition_index() app | App | APP) echo "1";; micom | Micom | MICOM) echo "2";; wifi | Wifi | WIFI) echo "4";; + userfs | Userfs | USERFS) + for i in "${!parts[@]}" + do + if [[ "${parts[$i]}" = "userfs" ]]; then + echo $i + fi + done + ;; *) echo "No Matching Partition" exit 1 esac
Also clean src/utils/htslib/config.h When built within bedtools, usually HTSlib's configure script will not have been used (as detected via config.mk not existing), so clean should also remove the generated config.h.
@@ -197,10 +197,13 @@ $(UTIL_SUBDIRS) $(SUBDIRS): $(OBJ_DIR) $(BIN_DIR) @echo "- Building in $@" @$(MAKE) --no-print-directory --directory=$@ +# Usually HTSlib's configure script has not been used (detected via config.mk +# not existing), so clean should also remove the generated config.h. clean: @echo " * Cleaning up." @rm -f $(VERSION_FILE) $(OBJ_DIR)/* $(BIN_DIR)/* @cd src/utils/htslib && make clean > /dev/null + @test -e src/utils/htslib/config.mk || rm -f src/utils/htslib/config.h .PHONY: clean test: all
VERSION bump to version 0.12.46
@@ -34,7 +34,7 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0") # set version set(LIBNETCONF2_MAJOR_VERSION 0) set(LIBNETCONF2_MINOR_VERSION 12) -set(LIBNETCONF2_MICRO_VERSION 45) +set(LIBNETCONF2_MICRO_VERSION 46) set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION}) set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
unified_serial: fix RX_STATUS_DETECTED
@@ -26,7 +26,8 @@ typedef enum { RX_STATUS_NONE = 0, RX_STATUS_DETECTING = 100, // RX_STATUS_DETECTING + RX_SERIAL_PROTOCOL_X = detecting proto X - RX_STATUS_DETECTED = 200 + RX_SERIAL_PROTOCOL_MAX, + RX_STATUS_DETECTED = 200, + // RX_STATUS_DETECTED + RX_SERIAL_PROTOCOL_X = detected proto X } rx_status_t; void rx_serial_find_protocol();
Tidied comments in halt.c.
@@ -32,10 +32,6 @@ int fiNumHalts(HALT *halt,MODULE *module,int iBody) { iNumHalts++; if (halt->bPosDeDt) iNumHalts++; -/* XXX not implemented yet. - if (halt->dMinIntEn > 0) - iNumHalts++; -*/ for (iModule=0;iModule<module->iNumModules[iBody];iModule++) module->fnCountHalts[iBody][iModule](halt,&iNumHalts); @@ -77,7 +73,6 @@ int HaltMinObl(BODY *body,EVOLVE *evolve,HALT *halt,IO *io,UPDATE *update, /* Maximum Eccentricity? */ int fniHaltMaxEcc(BODY *body,EVOLVE *evolve,HALT *halt,IO *io,UPDATE *update, fnUpdateVariable ***fnUpdate,int iBody) { - // XXX is EccSq defined here /* Halt simulation if body reaches maximum orbital eccentricity. */ if (sqrt(pow(body[iBody].dHecc,2)+pow(body[iBody].dKecc,2)) >= halt->dMaxEcc) { if (io->iVerbose >= VERBPROG) { @@ -127,7 +122,7 @@ int HaltMinSemi(BODY *body,EVOLVE *evolve,HALT *halt,IO *io,UPDATE *update, return 0; } -/* Minimum Internal Power? XXX Rewrite with radheat and thermint written +/* Minimum Internal Power? Rewrite with radheat and thermint written int HaltMinIntEn(BODY *body,EVOLVE *evolve,HALT *halt,IO *io,UPDATE *update,int iBody) { if (body[iBody].dIntEn <= halt->dMinIntEn) { if (io->iVerbose >= VERBPROG) { @@ -307,7 +302,7 @@ void VerifyHalts(BODY *body,CONTROL *control,MODULE *module,OPTIONS *options) { control->fnHalt[iBody][iHaltNow++] = &HaltMinEcc; if (control->Halt[iBody].bPosDeDt) control->fnHalt[iBody][iHaltNow++] = &HaltPosDeccDt; - /* XXX Should be changed with thermint completed + /* Should be changed with thermint completed if (control->Halt[iBody].dMinIntEn > 0) control->fnHalt[iBody][iHaltNow++] = &HaltMinIntEn; */ @@ -315,9 +310,6 @@ void VerifyHalts(BODY *body,CONTROL *control,MODULE *module,OPTIONS *options) { for (iModule=0;iModule<module->iNumModules[iBody];iModule++) module->fnVerifyHalt[iBody][iModule](body,control,options,iBody,&iHaltNow); - /* XXX This needs to become VerifyMultiBodyHalts, as should only - be applied if DISTORB called. This problem is hard! */ - if (iHaltMaxEcc) { if (iBody != iHaltMaxEcc) { control->Halt[iBody].dMaxEcc = control->Halt[iHaltMaxEcc].dMaxEcc;
Add devicename (ConBee, RaspBee, ...) to unauthorized config response
@@ -701,6 +701,10 @@ void DeRestPluginPrivate::basicConfigToMap(QVariantMap &map) map["apiversion"] = QString(GW_API_VERSION); map["name"] = gwName; map["starterkitid"] = QLatin1String(""); + if (!gwDeviceName.isEmpty()) + { + map["devicename"] = gwDeviceName; + } } /*! GET /api/<apikey>