message
stringlengths
6
474
diff
stringlengths
8
5.22k
fix aqua for alef
%^ slum installed.boot-ova.pil now.hid =/ vane ?+ v ~|([%unknown-vane v] !!) - %a %ames + %a %alef %b %behn %c %clay %d %dill
Fix runas regression from commit
@@ -1198,6 +1198,8 @@ INT_PTR CALLBACK PhpRunAsDlgProc( if (userPart) PhDereferenceObject(userPart); } else + { + if (context->ProcessId) { HANDLE processHandle = NULL; HANDLE newProcessHandle; @@ -1276,20 +1278,22 @@ INT_PTR CALLBACK PhpRunAsDlgProc( { NtClose(processHandle); } - - // TODO: Commented out while testing above method (dmex) - //status = PhExecuteRunAsCommand3( - // hwndDlg, - // PhGetString(program), - // PhGetString(username), - // PhGetStringOrEmpty(password), - // logonType, - // context->ProcessId, - // sessionId, - // PhGetString(desktopName), - // useLinkedToken, - // createSuspended - // ); + } + else + { + status = PhExecuteRunAsCommand3( + hwndDlg, + PhGetString(program), + PhGetString(username), + PhGetStringOrEmpty(password), + logonType, + context->ProcessId, + sessionId, + PhGetString(desktopName), + useLinkedToken, + createSuspended + ); + } } } else
Map destination-uris to phone and faxPrefix options (Issue
@@ -3872,6 +3872,23 @@ get_options(cupsd_job_t *job, /* I - Job */ num_pwgppds = cupsAddOption("OutputOrder", "Reverse", num_pwgppds, &pwgppds); } + /* + * Map destination-uris value... + */ + + if ((job->printer->type & CUPS_PRINTER_FAX) && (attr = ippFindAttribute(job->attrs, "destination-uris", IPP_TAG_BEGIN_COLLECTION)) != NULL) + { + ipp_t *ipp = ippGetCollection(attr, 0); // Collection value + const char *destination_uri = ippGetString(ippFindAttribute(ipp, "destination-uri", IPP_TAG_URI), 0, NULL); + const char *pre_dial_string = ippGetString(ippFindAttribute(ipp, "pre-dial-string", IPP_TAG_TEXT), 0, NULL); + + if (destination_uri && !strncmp(destination_uri, "tel:", 4)) + num_pwgppds = cupsAddOption("phone", destination_uri + 4, num_pwgppds, &pwgppds); + + if (pre_dial_string) + num_pwgppds = cupsAddOption("faxPrefix", pre_dial_string, num_pwgppds, &pwgppds); + } + /* * Figure out how much room we need... */
Fix pluginVsInstall failure with Blueprint plugin. Added CONDUIT_HAVE_PARTITION_FLATTEN to PluginVsInstall.cmake.in.
# Use @filtered_VTKm_INCLUDE_DIRS@ for setting VTKm_INCLUDE_DIRS # instead of setting manually. # +# Kathleen Biagas, Mon Feb 28 13:48:42 PST 2022 +# Added CONDUIT_HAVE_PARTITION_FLATTEN. +# #****************************************************************************/ ## @@ -311,6 +314,7 @@ set(XDMF_LIB @XDMF_LIB@) set(CONDUIT_INCLUDE_DIR ${VISIT_INCLUDE_DIR}/conduit/conduit) set(CONDUIT_LIBRARY_DIR ${VISIT_LIBRARY_DIR} ${VISIT_ARCHIVE_DIR}) set(CONDUIT_LIB @CONDUIT_LIB@) +set(CONDUIT_HAVE_PARTITION_FLATTEN @CONDUIT_HAVE_PARTITION_FLATTEN@) if(VISIT_PARALLEL) set(CONDUIT_MPI_INCLUDE_DIR ${VISIT_INCLUDE_DIR}/conduit/conduit) set(CONDUIT_MPI_LIBRARY_DIR ${VISIT_LIBRARY_DIR} ${VISIT_ARCHIVE_DIR})
Do not skip locking the queue as the DPCs can be rebalanced across different cpus.
@@ -432,18 +432,15 @@ ENTER_FN(); if (!isr) { if (adaptExt->msix_enabled) { - if (!CHECKFLAG(adaptExt->perfFlags, STOR_PERF_ADV_CONFIG_LOCALITY)) { // Queue numbers start at 0, message ids at 1. NT_ASSERT(MessageID > VIRTIO_SCSI_REQUEST_QUEUE_0); NT_ASSERT(MessageID <= VIRTIO_SCSI_REQUEST_QUEUE_0 + adaptExt->num_queues); StorPortAcquireSpinLock(DeviceExtension, DpcLock, &adaptExt->dpc[MessageID - VIRTIO_SCSI_REQUEST_QUEUE_0 - 1], LockHandle); } - } else { StorPortAcquireSpinLock(DeviceExtension, InterruptLock, NULL, LockHandle); } } - EXIT_FN(); } @@ -461,10 +458,7 @@ ENTER_FN(); adaptExt = (PADAPTER_EXTENSION)DeviceExtension; if (!isr) { - if (!adaptExt->msix_enabled || !CHECKFLAG(adaptExt->perfFlags, STOR_PERF_ADV_CONFIG_LOCALITY)) { StorPortReleaseSpinLock(DeviceExtension, LockHandle); } - } - EXIT_FN(); }
Add configure-error for not allowed macros in ya.make
@@ -5,6 +5,7 @@ IF (AUTOCHECK) ELSE() UNITTEST() SIZE(MEDIUM) + ALLOCATOR(LF) ENDIF() SRCS( @@ -22,6 +23,4 @@ PEERDIR( INCLUDE(${ARCADIA_ROOT}/catboost/cuda/cuda_lib/default_nvcc_flags.make.inc) -ALLOCATOR(LF) - END()
Updated the translator spec to include tests for type aliases.
@@ -219,6 +219,54 @@ describe("Pallene to Lua translator", function () ]]) end) + it("Remove simple type aliases", function () + assert_translation([[ + local function a() + end + + typealias int = integer + + local function b() + end + ]], + [[ + local function a() + end + + + + local function b() + end + ]]) + end) + + it("Remove multiline type aliases", function () + assert_translation([[ + local function a() + end + + typealias point = { + x: integer, + y: integer + } + + local function b() + end + ]], + [[ + local function a() + end + + + + + + + local function b() + end + ]]) + end) + pending("Mutually recursive functions (infinite)", function () assert_translation([[ local function a()
myaktrc = unit64_t
@@ -204,7 +204,7 @@ static uint8_t mac_myclient[6]; static uint8_t mac_myap[6]; static uint8_t mac_ack[6]; -static unsigned long long int myrc; +static uint64_t myrc; static uint8_t myanonce[32]; static uint8_t mysnonce[32]; @@ -3189,7 +3189,7 @@ snprintf(servermsg, SERVERMSG_MAX, "\e[?25l\nstart capturing (stop with ctrl+c)\ "PREDEFINED ACCESS POINT.: %d entries\n" "MAC ACCESS POINT........: %02x%02x%02x%02x%02x%02x (incremented on every new client)\n" "MAC CLIENT..............: %02x%02x%02x%02x%02x%02x\n" - "REPLAYCOUNT.............: %llu\n" + "REPLAYCOUNT.............: %" PRIu64 "\n" "ANONCE..................: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n" "SNONCE..................: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n" "\n",
vmdk-image target to build ESXi image
@@ -18,6 +18,9 @@ CLEANDIRS+= $(OUTDIR)/image LWIPDIR= $(VENDORDIR)/lwip GITFLAGS+= --depth 1 https://github.com/nanovms/lwip.git -b STABLE-2_1_2_RELEASE +# VMware +QEMU_IMG= qemu-img + # GCE GCLOUD= gcloud GSUTIL= gsutil @@ -156,6 +159,14 @@ run-bridge: image run-noaccel: image $(QEMU) $(QEMU_COMMON) $(QEMU_USERNET) $(QEMU_CPU) || exit $$(($$?>>1)) + +############################################################################## +# VMware +CLEANFILES+= $(OUTDIR)/image/disk.vmdk + +vmdk-image: image + $(Q) $(QEMU_IMG) convert -f raw -O vmdk -o subformat=streamOptimized $(IMAGE) $(IMAGE:.raw=.vmdk) + ############################################################################## # GCE
Clarify adb requirements Since _scrcpy_ also supports `adb forward`, remove the part about `adb reverse`. Make explicit that _adb_ is included in the prebuilt application for Windows (many users manually download the platform-tools for no reason).
@@ -11,12 +11,12 @@ and _MacOS_. The Android part requires at least API 21 (Android 5.0). -You need [adb] (recent enough so that `adb reverse` is implemented, it works -with 1.0.36). It is available in the [Android SDK platform -tools][platform-tools], on packaged in your distribution (`android-adb-tools`). +You need [adb]. It is available in the [Android SDK platform +tools][platform-tools], or packaged in your distribution (`android-adb-tools`). -On Windows, just download the [platform-tools][platform-tools-windows] and -extract the following files to a directory accessible from your `PATH`: +On Windows, if you use the [prebuilt application](#windows), it is already +included. Otherwise, just download the [platform-tools][platform-tools-windows] +and extract the following files to a directory accessible from your `PATH`: - `adb.exe` - `AdbWinApi.dll` - `AdbWinUsbApi.dll`
Update state/presence from 'On with timed off' command
@@ -6994,6 +6994,37 @@ void DeRestPluginPrivate::handleOnOffClusterIndication(TaskItem &task, const deC group = getGroupForId(ind.dstAddress().group()); } + if (zclFrame.commandId() == 0x42) // on with timed off + { + for (Sensor &s : sensors) + { + if ((s.address().hasExt() && s.address().ext() == ind.srcAddress().ext()) || + (s.address().hasNwk() && s.address().nwk() == ind.srcAddress().nwk())) + { + if (!s.type().endsWith(QLatin1String("Presence"))) + { + continue; + } + + s.incrementRxCounter(); + ResourceItem *item = s.item(RStatePresence); + if (item) + { + bool changed = item->toBool() == false; + item->setValue(true); + s.updateStateTimestamp(); + + if (changed) + { + updateSensorEtag(&s); + Event e(RSensors, RStatePresence, s.id()); + enqueueEvent(e); + } + } + } + } + } + // update Nodes and Groups state if On/Off Command was send by a sensor if (group && group->state() != Group::StateDeleted && @@ -7023,7 +7054,7 @@ void DeRestPluginPrivate::handleOnOffClusterIndication(TaskItem &task, const deC group->setColorLoopActive(false); } } - updateEtag(group->etag); + updateGroupEtag(group); // check each light if colorloop needs to be disabled std::vector<LightNode>::iterator l = nodes.begin();
Directory Value: Add `const` modifiers
@@ -70,7 +70,7 @@ KeySetPair splitArrayLeavesOther (CppKeySet const & arrayParents, CppKeySet cons for (auto key : keys) { - bool isArrayLeaf = isFirstElement && key.isString () && key.getStringSize () > arrayValuePrefixSize && + bool const isArrayLeaf = isFirstElement && key.isString () && key.getStringSize () > arrayValuePrefixSize && strncmp (key.getString ().c_str (), ARRAY_VALUE_PREFIX, arrayValuePrefixSize) == 0; (isArrayLeaf ? firstElements : others).append (key); isFirstElement = arrayParents.lookup (key); @@ -193,7 +193,7 @@ KeySetPair splitArrayParentsOther (CppKeySet const & keys) CppKey previous; for (previous = keys.next (); keys.next (); previous = keys.current ()) { - bool previousIsArray = + bool const previousIsArray = previous.hasMeta ("array") || (keys.current ().isBelow (previous) && keys.current ().getBaseName ()[0] == '#' && isArrayParent (previous, keys)); @@ -466,7 +466,7 @@ int DirectoryValueDelegate::convertToDirectories (CppKeySet & keys) tie (directoryLeaves, nonDirectoryLeaves) = splitDirectoryLeavesOther (notArrayParents); - bool status = directoryLeaves.size () > 0 ? ELEKTRA_PLUGIN_STATUS_SUCCESS : ELEKTRA_PLUGIN_STATUS_NO_UPDATE; + bool const status = directoryLeaves.size () > 0 ? ELEKTRA_PLUGIN_STATUS_SUCCESS : ELEKTRA_PLUGIN_STATUS_NO_UPDATE; auto directories = removeBaseName (directoryLeaves); @@ -508,7 +508,8 @@ int DirectoryValueDelegate::convertToLeaves (CppKeySet & keys) arrayParents = convertArrayParentsToLeaves (arrayParents); tie (directories, leaves) = splitDirectoriesLeaves (notArrayParents); - bool status = directories.size () > 0 || arrayParents.size () > 0 ? ELEKTRA_PLUGIN_STATUS_SUCCESS : ELEKTRA_PLUGIN_STATUS_NO_UPDATE; + bool const status = + directories.size () > 0 || arrayParents.size () > 0 ? ELEKTRA_PLUGIN_STATUS_SUCCESS : ELEKTRA_PLUGIN_STATUS_NO_UPDATE; auto directoryLeaves = convertDirectoriesToLeaves (directories);
Add pinning tests for cancelUploadTask
@@ -32,8 +32,10 @@ class TransmissionPolicyManager4Test : public TransmissionPolicyManager { using TransmissionPolicyManager::addUpload; using TransmissionPolicyManager::removeUpload; using TransmissionPolicyManager::getCancelWaitTime; + using TransmissionPolicyManager::cancelUploadTask; using TransmissionPolicyManager::m_scheduledUploadAborted; + using TransmissionPolicyManager::m_isUploadScheduled; MOCK_METHOD3(scheduleUpload, void(int, EventLatency,bool)); MOCK_METHOD1(uploadAsync, void(EventLatency)); @@ -527,3 +529,15 @@ TEST_F(TransmissionPolicyManagerTests, getCancelWaitTime_ScheduledUploadNotAbort tpm.m_scheduledUploadAborted = false; ASSERT_EQ(tpm.getCancelWaitTime(), uint64_t { 0 }); } + +TEST_F(TransmissionPolicyManagerTests, cancelUploadTask_ScheduledUpload_ReturnsTrue) +{ + ASSERT_TRUE(tpm.cancelUploadTask()); +} + +TEST_F(TransmissionPolicyManagerTests, cancelUploadTask_ScheduledUpload_IsUploadScheduledSetToFalse) +{ + tpm.m_isUploadScheduled = true; + tpm.cancelUploadTask(); + ASSERT_FALSE(tpm.m_isUploadScheduled); +} \ No newline at end of file
OSX: force for compiler RB to ISEQ (fix LANG env issue)
@@ -3395,7 +3395,7 @@ namespace "build" do create_manifest cp compileERB, $srcdir puts "Running default.rb" - cmd_str = "#{$rubypath} -I#{rhodeslib} #{$srcdir}/default.rb" + cmd_str = "#{$rubypath} -E UTF-8 -I#{rhodeslib} #{$srcdir}/default.rb" if defined?(Bundler) Bundler.with_clean_env do puts `#{cmd_str}` @@ -3412,7 +3412,7 @@ namespace "build" do cp compileRB, $srcdir puts "Running compileRB" - cmd_str = "#{$rubypath} -I#{rhodeslib} #{$srcdir}/compileRB.rb" + cmd_str = "#{$rubypath} -E UTF-8 -I#{rhodeslib} #{$srcdir}/compileRB.rb" if defined?(Bundler) Bundler.with_clean_env do puts `#{cmd_str}`
Missing timer object initialization on Time_Initialize
@@ -24,6 +24,7 @@ static void NextEventTimer_Callback( void* arg ) HRESULT Time_Initialize() { // need to setup the timer at boot, but stoped + chVTObjectInit(&nextEventTimer); chVTSet(&nextEventTimer, TIME_INFINITE, NextEventTimer_Callback, nextEventCallbackDummyArg); return S_OK;
fuzz: don't fetch feedback if the process has been signaled, patch from nezetic
@@ -542,12 +542,14 @@ static void fuzz_fuzzLoop(honggfuzz_t * hfuzz, fuzzer_t * fuzzer) unlink(fuzzer->fileName); } + if (fuzzer->tmOutSignaled == false) { if (hfuzz->dynFileMethod != _HF_DYNFILE_NONE) { fuzz_perfFeedback(hfuzz, fuzzer); } if (hfuzz->useSanCov) { fuzz_sanCovFeedback(hfuzz, fuzzer); } + } if (hfuzz->useVerifier && (fuzzer->crashFileName[0] != 0) && fuzzer->backtrace) { if (!fuzz_runVerifier(hfuzz, fuzzer)) {
external/webserver: Fix svace issues: WGID 230303 and 230308
@@ -180,7 +180,7 @@ static int process_trailer_header(char *buf, unsigned int buf_len, struct http_r struct http_client_t *client, unsigned int sentence_start) { char *header_field_value = NULL; - unsigned int sentence_end; + int sentence_end; char *entity; unsigned int trailter_len;
Clarify comments on state test.
@@ -4002,7 +4002,8 @@ void aead_multipart_state_test( int key_type_arg, data_t *key_data, psa_aead_abort( &operation ); - /* Test for not sending any additional data or data (encrypt) */ + /* Test for not sending any additional data or data after setting non zero + * lengths for them. (encrypt) */ operation = psa_aead_operation_init( ); @@ -4022,7 +4023,8 @@ void aead_multipart_state_test( int key_type_arg, data_t *key_data, psa_aead_abort( &operation ); - /* Test for not sending any additional data or data (decrypt) */ + /* Test for not sending any additional data or data after setting non-zero + * lengths for them. (decrypt) */ operation = psa_aead_operation_init( ); @@ -4042,7 +4044,8 @@ void aead_multipart_state_test( int key_type_arg, data_t *key_data, psa_aead_abort( &operation ); - /* Test for not sending any additional data. */ + /* Test for not sending any additional data after setting a non-zero length + * for it. */ operation = psa_aead_operation_init( );
posix: detecting cross-device linking
@@ -855,7 +855,7 @@ int posix_link(const char *path1, const char *path2) { TRACE("link(%s, %s)", path1, path2); - oid_t oid, dir; + oid_t oid, dev, dir; int err; char *name, *basename, *dirname; int namelen; @@ -875,13 +875,18 @@ int posix_link(const char *path1, const char *path2) if ((err = proc_lookup(dirname, NULL, &dir)) < 0) break; - if ((err = proc_lookup(path1, NULL, &oid)) < 0) + if ((err = proc_lookup(path1, &oid, &dev)) < 0) break; + if (oid.port != dir.port) { + err = -EXDEV; + break; + } + if ((err = proc_link(dir, oid, basename)) < 0) break; - if (dir.port != oid.port) { + if (dev.port != oid.port) { /* Signal link to device */ /* FIXME: refcount here? */ if ((err = proc_link(oid, oid, path2)) < 0)
Extend BF queue protection to cache device queue So far the only resource protected by backfill queue blocking was internal OCF request queue. Move unblock to backfill io completion to protect also queue of underlying cache device.
@@ -54,6 +54,8 @@ static void _ocf_backfill_complete(struct ocf_request *req, int error) if (env_atomic_dec_return(&req->req_remaining)) return; + backfill_queue_dec_unblock(req->cache); + /* We must free the pages we have allocated */ ctx_data_secure_erase(cache->owner, req->data); ctx_data_munlock(cache->owner, req->data); @@ -75,8 +77,6 @@ static int _ocf_backfill_do(struct ocf_request *req) { unsigned int reqs_to_issue; - backfill_queue_dec_unblock(req->cache); - reqs_to_issue = ocf_engine_io_count(req); /* There will be #reqs_to_issue completions */
Fixed hud being wider than intended
@@ -2582,8 +2582,8 @@ static VkResult overlay_CreateInstance( instance_data->params.font_size > 0 ? font_size = instance_data->params.font_size : instance_data->params.font_size = 24; hudSpacing = font_size / 2; - hudFirstRow = font_size * 5; - hudSecondRow = font_size * 8; + hudFirstRow = font_size * 4.5; + hudSecondRow = font_size * 7.5; // Adjust height for DXVK/VKD3D version number if (engineName == "DXVK" || engineName == "VKD3D"){
Getting rid of critical warnings in create_nvme_host.tcl
@@ -36,7 +36,8 @@ puts " generating NVMe Host IP" ipx::infer_core -vendor IP -library user -taxonomy /UserIP $root_dir/hdl/nvme >> $log_file ipx::edit_ip_in_project -upgrade true -name edit_ip_project -directory $root_dir/ip/nvme/nvme_host_ip/nvme.tmp $root_dir/hdl/nvme/component.xml >> $log_file ipx::current_core $root_dir/hdl/nvme/component.xml -update_compile_order -fileset sim_1 +#SB 2018-07-04: Commenting the following line in order to get rid of critical warnings +#update_compile_order -fileset sim_1 ipx::add_bus_parameter FREQ_HZ [ipx::get_bus_interfaces host_s_axi -of_objects [ipx::current_core]] set_property description {Clock frequency (Hertz)} [ipx::get_bus_parameters FREQ_HZ -of_objects [ipx::get_bus_interfaces host_s_axi -of_objects [ipx::current_core]]]
Add defines to indicate if intypes.h and stdint.h are unavailable Use the defines OPENSSL_NO_INTTYPES_H & OPENSSL_NO_STDINT_H to determine if the headers are unavailable for a platform.
@@ -228,6 +228,8 @@ extern "C" { # endif /* Standard integer types */ +# define OPENSSL_NO_INTTYPES_H +# define OPENSSL_NO_STDINT_H # if defined(OPENSSL_SYS_UEFI) typedef INT8 int8_t; typedef UINT8 uint8_t; @@ -241,6 +243,9 @@ typedef UINT64 uint64_t; defined(__osf__) || defined(__sgi) || defined(__hpux) || \ defined(OPENSSL_SYS_VMS) || defined (__OpenBSD__) # include <inttypes.h> +# undef OPENSSL_NO_INTTYPES_H +/* Because the specs say that inttypes.h includes stdint.h if present */ +# undef OPENSSL_NO_STDINT_H # elif defined(_MSC_VER) && _MSC_VER<=1500 /* * minimally required typdefs for systems not supporting inttypes.h or @@ -256,6 +261,7 @@ typedef __int64 int64_t; typedef unsigned __int64 uint64_t; # else # include <stdint.h> +# undef OPENSSL_NO_STDINT_H # endif /* ossl_inline: portable inline definition usable in public headers */
Fix compile warning in `lv_spinbox_set_style` discards 'const' qualifier from pointer
@@ -82,7 +82,7 @@ lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy); * @param type which style should be set * @param style pointer to a style */ -static inline void lv_spinbox_set_style(lv_obj_t * spinbox, lv_spinbox_style_t type, lv_style_t * style) +static inline void lv_spinbox_set_style(lv_obj_t * spinbox, lv_spinbox_style_t type, const lv_style_t * style) { lv_ta_set_style(spinbox, type, style); }
fix(docs) add static keyword to driver declaration Add missing static keyword to disp_drv and indev_drv declarations in the examples
@@ -35,7 +35,7 @@ lv_disp_draw_buf_init(&draw_buf, buf1, NULL, MY_DISP_HOR_RES * MY_DISP_VER_SER / ``` - Implement and register a function which can copy the rendered image to an area of your display: ```c -lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/ +static lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/ lv_disp_drv_init(&disp_drv); /*Basic initialization*/ disp_drv.flush_cb = my_disp_flush; /*Set your driver function*/ disp_drv.buffer = &draw_buf; /*Assign the buffer to the display*/ @@ -61,7 +61,7 @@ void my_disp_flush(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * co ``` - Implement and register a function which can read an input device. E.g. for a touch pad: ```c -lv_indev_drv_t indev_drv; /*Descriptor of a input device driver*/ +static lv_indev_drv_t indev_drv; /*Descriptor of a input device driver*/ lv_indev_drv_init(&indev_drv); /*Basic initialization*/ indev_drv.type = LV_INDEV_TYPE_POINTER; /*Touch pad is a pointer-like device*/ indev_drv.read_cb = my_touchpad_read; /*Set your driver function*/
comment out stale warning
@@ -716,7 +716,7 @@ static scs_int validate(const ScsData *d, const ScsCone *k) { return -1; } if (d->m < d->n) { - scs_printf("WARN: m less than n, problem likely degenerate\n"); + /* scs_printf("WARN: m less than n, problem likely degenerate\n"); */ /* return -1; */ } if (SCS(validate_lin_sys)(d->A, d->P) < 0) {
Add ports to readme.
@@ -513,6 +513,7 @@ Available build options are the following ones. | **OPTION_BUILD_SCRIPTS** | Build scripts. | ON | | **OPTION_BUILD_SERIALS** | Build serials. | ON | | **OPTION_BUILD_DETOURS** | Build detours. | ON | +| **OPTION_BUILD_PORTS** | Build ports. | OFF | | **OPTION_FORK_SAFE** | Enable fork safety. | OFF | | **OPTION_THREAD_SAFE** | Enable thread safety. | OFF | | **CMAKE_BUILD_TYPE** | Define the type of build. | Release | @@ -520,11 +521,12 @@ Available build options are the following ones. It is possible to enable or disable concrete loaders, script, ports, serials or detours. For building use the following options. | Build Option Prefix | Build Option Suffix | -|:-------------------------:|----------------------------------------------------------| +|:-------------------------:|-----------------------------------------------------------------------| | **OPTION_BUILD_LOADERS_** | `C` `JS` `CS` `MOCK` `PY` `JSM` `NODE` `RB` `JSM` `FILE` | | **OPTION_BUILD_SCRIPTS_** | `C` `CS` `JS` `NODE` `PY` `RB` `JAVA` | | **OPTION_BUILD_SERIALS_** | `METACALL` `RAPID_JSON` | | **OPTION_BUILD_DETOURS_** | `FUNCHOOK` | +| **OPTION_BUILD_PORTS_** | `CS` `CXX` `D` `GO` `JAVA` `JS` `LUA` `NODE` `PHP` `PL` `PY` `R` `RB` | ## 7. Platform Support
add install support for alpine
@@ -93,7 +93,8 @@ install_tools() { yum --version >/dev/null 2>&1 && $sudoprefix yum install -y git readline-devel ccache && $sudoprefix yum groupinstall -y 'Development Tools'; } || { zypper --version >/dev/null 2>&1 && $sudoprefix zypper --non-interactive install git readline-devel ccache && $sudoprefix zypper --non-interactive install -t pattern devel_C_C++; } || { pacman -V >/dev/null 2>&1 && $sudoprefix pacman -S --noconfirm --needed git base-devel ccache; } || - { pkg list-installed >/dev/null 2>&1 && $sudoprefix pkg install -y git getconf build-essential readline ccache; } + { pkg list-installed >/dev/null 2>&1 && $sudoprefix pkg install -y git getconf build-essential readline ccache; } || + { apk --version >/dev/null 2>&1 && $sudoprefix apk add gcc g++ make readline-dev ncurses-dev libc-dev linux-headers } } test_tools || { install_tools && test_tools; } || my_exit "$(echo -e 'Dependencies Installation Fail\nThe getter currently only support these package managers\n\t* apt\n\t* yum\n\t* zypper\n\t* pacman\nPlease install following dependencies manually:\n\t* git\n\t* build essential like `make`, `gcc`, etc\n\t* libreadline-dev (readline-devel)\n\t* ccache (optional)')" 1 branch=master
crypto: drop the frame if there is no handler If async engines are disbaled and async is turned on vpp tries to enqueue frame with nonexisting handler which leads to segfault. This patch checks for handler and drops the frame in case it doesn't exist. Type: fix
@@ -599,6 +599,12 @@ vnet_crypto_async_submit_open_frame (vlib_main_t * vm, frame->state = VNET_CRYPTO_FRAME_STATE_PENDING; frame->enqueue_thread_index = vm->thread_index; + if (PREDICT_FALSE (cm->enqueue_handlers == NULL)) + { + frame->state = VNET_CRYPTO_FRAME_STATE_ELT_ERROR; + return -1; + } + int ret = (cm->enqueue_handlers[frame->op]) (vm, frame); if (PREDICT_TRUE (ret == 0))
Restore certificate_request state
@@ -1527,7 +1527,7 @@ static int ssl_tls13_postprocess_encrypted_extensions( mbedtls_ssl_context *ssl if( mbedtls_ssl_tls1_3_some_psk_enabled( ssl ) ) mbedtls_ssl_handshake_set_state( ssl, MBEDTLS_SSL_SERVER_FINISHED ); else - mbedtls_ssl_handshake_set_state( ssl, MBEDTLS_SSL_SERVER_CERTIFICATE ); + mbedtls_ssl_handshake_set_state( ssl, MBEDTLS_SSL_CERTIFICATE_REQUEST ); #else ((void) ssl); mbedtls_ssl_handshake_set_state( ssl, MBEDTLS_SSL_SERVER_FINISHED ); @@ -1536,6 +1536,34 @@ static int ssl_tls13_postprocess_encrypted_extensions( mbedtls_ssl_context *ssl } #if defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED) +/* + * Handler for MBEDTLS_SSL_CERTIFICATE_REQUEST + */ +static int ssl_tls13_process_certificate_request( mbedtls_ssl_context *ssl ) +{ + int ret = mbedtls_ssl_read_record( ssl, 0 ); + + if( ret != 0 ) + { + MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret ); + return( ret ); + } + + if( ( ssl->in_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE ) && + ( ssl->in_msg[0] == MBEDTLS_SSL_HS_CERTIFICATE_REQUEST ) ) + { + MBEDTLS_SSL_DEBUG_MSG( 1, ( "CertificateRequest not supported" ) ); + MBEDTLS_SSL_PEND_FATAL_ALERT( MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE, + MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE ); + return( MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE ); + } + + ssl->keep_current_message = 1; + mbedtls_ssl_handshake_set_state( ssl, MBEDTLS_SSL_SERVER_CERTIFICATE ); + + return( 0 ); +} + /* * Handler for MBEDTLS_SSL_SERVER_CERTIFICATE */ @@ -1647,6 +1675,10 @@ int mbedtls_ssl_tls13_handshake_client_step( mbedtls_ssl_context *ssl ) break; #if defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED) + case MBEDTLS_SSL_CERTIFICATE_REQUEST: + ret = ssl_tls13_process_certificate_request( ssl ); + break; + case MBEDTLS_SSL_SERVER_CERTIFICATE: ret = ssl_tls1_3_process_server_certificate( ssl ); break;
Solve minor bug in win32 implementation of threading atomic.
@@ -122,7 +122,7 @@ typedef LONG volatile atomic_flag; #undef __atomic_is_lock_free_power_of_2 -inline bool atomic_store_explicit8(CHAR volatile *obj, CHAR desired, memory_order order) +inline void atomic_store_explicit8(CHAR volatile *obj, CHAR desired, memory_order order) { if (order == memory_order_seq_cst) { @@ -134,7 +134,7 @@ inline bool atomic_store_explicit8(CHAR volatile *obj, CHAR desired, memory_orde } } -inline bool atomic_store_explicit16(SHORT volatile *obj, SHORT desired, memory_order order) +inline void atomic_store_explicit16(SHORT volatile *obj, SHORT desired, memory_order order) { if (order == memory_order_seq_cst) { @@ -146,7 +146,7 @@ inline bool atomic_store_explicit16(SHORT volatile *obj, SHORT desired, memory_o } } -inline bool atomic_store_explicit32(LONG volatile *obj, LONG desired, memory_order order) +inline void atomic_store_explicit32(LONG volatile *obj, LONG desired, memory_order order) { if (order == memory_order_seq_cst) { @@ -158,7 +158,7 @@ inline bool atomic_store_explicit32(LONG volatile *obj, LONG desired, memory_ord } } -inline bool atomic_store_explicit64(LONG64 volatile *obj, LONG64 desired, memory_order order) +inline void atomic_store_explicit64(LONG64 volatile *obj, LONG64 desired, memory_order order) { if (order == memory_order_seq_cst) #ifdef _M_IX86
extmod/modframebuf: make_new: Support separate __new__ vs __init__ phases.
@@ -264,11 +264,18 @@ STATIC void fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, int h, u } STATIC mp_obj_t framebuf_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { + MP_MAKE_NEW_GET_ONLY_FLAGS(); + // __new__ ignores args. + if (!only_new) { mp_arg_check_num(n_args, n_kw, 4, 5, false); + } mp_obj_framebuf_t *o = m_new_obj(mp_obj_framebuf_t); o->base.type = type; o->buf_obj = args[0]; + if (only_new) { + return MP_OBJ_FROM_PTR(o); + } mp_buffer_info_t bufinfo; mp_get_buffer_raise(args[0], &bufinfo, MP_BUFFER_WRITE);
check for sys/types.h
@@ -34,6 +34,7 @@ check_include_files(stdarg.h HAVE_STDARG_PROTOTYPES) check_include_files(sys/tree.h HAVE_SYS_TREE) check_include_files(sys/queue.h HAVE_SYS_QUEUE) check_include_files(sys/un.h HAVE_SYS_UN) +check_include_files(sys/types.h HAVE_SYS_TYPES_H) check_type_size("int" SIZEOF_INT) check_type_size("long" SIZEOF_LONG) @@ -126,6 +127,10 @@ if(has_c99) target_compile_definitions(evhtp PUBLIC EVHTP_HAS_C99) endif() +if (HAVE_SYS_TYPES_H) + target_compile_definitions(evhtp PUBLIC EVHTP_HAS_SYS_TYPES) +endif() + if(NOT HAVE_SYS_TREE) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/compat/sys/tree.h.in
Fix testclient handling of multiple threads.
@@ -85,9 +85,7 @@ main(int argc, /* I - Number of command-line arguments */ { int i; /* Looping var */ const char *opt; /* Current option */ - int num_clients = 0,/* Number of clients to simulate */ - clients_started = 0; - /* Number of clients that have been started */ + int num_clients = 0;/* Number of clients to simulate */ char scheme[32], /* URI scheme */ userpass[256], /* Username:password */ hostname[256], /* Hostname */ @@ -242,7 +240,7 @@ main(int argc, /* I - Number of command-line arguments */ data.hostname = hostname; data.resource = resource; - while (clients_started < num_clients) + while (client_count < num_clients) { _cupsMutexLock(&client_mutex); if (client_count < MAX_CLIENTS) @@ -859,6 +857,8 @@ run_client( * Create a job and wait for completion... */ + do + { request = ippNewRequest(IPP_OP_CREATE_JOB); ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, ldata.uri); ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, cupsUser()); @@ -878,14 +878,26 @@ run_client( if (verbosity) show_attributes("Create-Job response", 0, response); - if (cupsLastError() >= IPP_STATUS_REDIRECTION_OTHER_SITE) + if (cupsLastError() == IPP_STATUS_ERROR_BUSY) + { + puts("Printer is busy - retrying in 5 seconds..."); + sleep(5); + ippDelete(response); + response = NULL; + } + else if (cupsLastError() >= IPP_STATUS_REDIRECTION_OTHER_SITE) { printf("Unable to create print job: %s\n", cupsLastErrorString()); ldata.job_state = IPP_JSTATE_ABORTED; + ippDelete(response); + response = NULL; + } + } + while (cupsLastError() == IPP_STATUS_ERROR_BUSY); + if (cupsLastError() >= IPP_STATUS_REDIRECTION_OTHER_SITE) goto cleanup; - } if ((attr = ippFindAttribute(response, "job-id", IPP_TAG_INTEGER)) == NULL) {
Fix typo with checkrepo regex in aomp_common_vars.
@@ -392,7 +392,7 @@ function checkrepo(){ if [ "$COBRANCH" == "master" ] ; then echo "EXIT: Repository $REPO_DIR is on development branch: master" exit 1 - elif [[ "$COBRANCH" =~ $BRANCH_REEGEX ]] ; then + elif [[ "$COBRANCH" =~ $BRANCH_REGEX ]] ; then echo "we have an override $REPO_DIR" else echo "ERROR: The repository at $REPO_DIR is not on branch $REPO_BRANCH"
ts: Simplify this bit of silliness out too.
@@ -148,7 +148,7 @@ lily_type *lily_ts_resolve(lily_type_system *ts, lily_type *type) static void unify_call(lily_type_system *ts, lily_type *left, lily_type *right, int num_subtypes) { - lily_class *cls = left->cls->id < right->cls->id ? left->cls : right->cls; + lily_class *cls = left->cls; int flags = (left->flags & TYPE_IS_VARARGS) & (right->flags & TYPE_IS_VARARGS); lily_tm_add(ts->tm, lily_tm_make_call(ts->tm, flags, cls, num_subtypes));
fix {beak (unit silk)} -> (unit {beak silk})
=. +> (mo-give %mack ~) %+ mo-pass [%sys %rep (scot %p him) dap (scot %ud num) ~] - [%f %exec our (mo-beak dap) ~ %vale p.ron our q.ron] + [%f %exec our ~ (mo-beak dap) %vale p.ron our q.ron] :: $x =. +> (mo-give %mack ~) :: XX should crash (mo-give(hen (mo-ball him num)) %unto %quit ~)
silent error message if profile does not exist
@@ -18,13 +18,13 @@ int parseAndSetProfile(struct oidc_account* account, char* profile) { } secFree(profile); if (p == NULL) { - printError("Could not parse mytoken profile: %s\n", oidc_serror()); + // printError("Could not parse mytoken profile: %s\n", oidc_serror()); return 0; } cJSON* parsed = parseProfile(p); secFreeJson(p); if (parsed == NULL) { - printError("Could not parse mytoken profile: %s\n", oidc_serror()); + // printError("Could not parse mytoken profile: %s\n", oidc_serror()); return 0; } account_setUsedMytokenProfile(account, jsonToStringUnformatted(parsed));
checkpatch: Don't expect
# Don't expect SPDX tag in the first line of a file --ignore SPDX_LICENSE_TAG +# Don't expect Signed-off-by lines in commit messages +--no-signoff + # List of ignored rules # ---------------------
NewChannel: update links icon
@@ -154,7 +154,7 @@ export function NewChannel(props: NewChannelProps & RouteComponentProps) { name="moduleType" /> <IconRadio - icon="Links" + icon="Collection" label="Collection" id="link" name="moduleType"
Ensure the max_early_data option to s_server can be 0
@@ -918,7 +918,7 @@ const OPTIONS s_server_options[] = { {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, #endif {"keylogfile", OPT_KEYLOG_FILE, '>', "Write TLS secrets to file"}, - {"max_early_data", OPT_MAX_EARLY, 'p', + {"max_early_data", OPT_MAX_EARLY, 'n', "The maximum number of bytes of early data"}, {"early_data", OPT_EARLY_DATA, '-', "Attempt to read early data"}, {NULL, OPT_EOF, 0, NULL} @@ -997,7 +997,7 @@ int s_server_main(int argc, char *argv[]) unsigned int split_send_fragment = 0, max_pipelines = 0; const char *s_serverinfo_file = NULL; const char *keylog_file = NULL; - uint32_t max_early_data = 0; + int max_early_data = -1; /* Init of few remaining global variables */ local_argc = argc; @@ -1508,6 +1508,10 @@ int s_server_main(int argc, char *argv[]) break; case OPT_MAX_EARLY: max_early_data = atoi(opt_arg()); + if (max_early_data < 0) { + BIO_printf(bio_err, "Invalid value for max_early_data\n"); + goto end; + } break; case OPT_EARLY_DATA: early_data = 1; @@ -2002,7 +2006,7 @@ int s_server_main(int argc, char *argv[]) if (set_keylog_file(ctx, keylog_file)) goto end; - if (max_early_data > 0) + if (max_early_data >= 0) SSL_CTX_set_max_early_data(ctx, max_early_data); BIO_printf(bio_s_out, "ACCEPT\n");
Fix potential null deref in htp__strndup_
@@ -227,6 +227,8 @@ htp__strndup_(const char * str, size_t len) if ((p = malloc_(len + 1)) != NULL) { memcpy(p, str, len + 1); + } else { + return NULL; } p[len] = '\0';
doc FEATURE details on session datastore and subscriptions
@@ -21,6 +21,12 @@ These are the most common kinds of subscriptions. A callback can be set to be ca changes occur so that it can appropriately react and adjust the system or whatever it manages accordingly. There can be many subscribers for the same data and arbitrary XPath filters can be applied. +Any datastore can be subscribed to (startup, running and operational). The datastore is determined by the current +datastore at the time of subscription (that is, the call to @ref sr_module_change_subscribe). Changing the active +datastore after that does not have an effect on subscriptions that have already been made. For example, it is possible +to subscribe to running datastore, switch to the startup datastore, subscribe to it, and then switch back to edit the +running datastore all with one session and one subscription context. + On changes, the callback is called with an event. By default, there are always 2 events following one after the other. On _change_, the new datastore content is prepared but not written yet and so the changes can be refused for any reason. If they are not, the changes are committed and hence visible for any subsequent operations. Right
Fix bigalloc bugs. It was sometimes not unmapping things right, and sometimes being overly pessimistic about caching.
@@ -171,7 +171,11 @@ const bigalloc = {sz var p p = Failmem - sz = align(sz, Align) + /* + We need to round up to the page size so that unmapping + doesn't end up taking out the tail of another allocation. + */ + sz = align(sz, Pagesz) /* check our cache */ lock(memlck) @@ -180,9 +184,15 @@ const bigalloc = {sz continue ;; p = cache[i].p - if cache[i].sz - sz >= Bktmax + /* + There's no point splitting a chunk if it's smaller than + bktmax, since the allocator will never try using it. + */ + if sz - cache[i].sz > Bktmax cache[i].sz -= sz cache[i].p = ((p : intptr) + (sz : intptr) : byte#) + else + cache[i].sz = 0 ;; break ;; @@ -200,45 +210,50 @@ const bigalloc = {sz } const bigfree = {p, sz - var minsz, minp, minidx + var evictsz, evictp, evictidx var endp, endblk - minp = p - minidx = -1 - minsz = align(sz, Align) + sz = align(sz, Pagesz) + evictp = p + evictidx = -1 + evictsz = sz endp = ((p : intptr) + (sz : intptr) : byte#) lock(memlck) for var i = 0; i < cache.len; i++ endblk = ((cache[i].p : intptr) + (sz : intptr) : byte#) - /* try to merge with a saved block */ + /* merge in front of existing block */ if cache[i].p == endp cache[i].sz += sz cache[i].p = p - minsz = 0 + evictidx = -1 break + /* merge in behind existing block */ elif endblk == p cache[i].sz += sz - minsz = 0 + evictidx = -1 break ;; - /* check for merges */ - if cache[i].sz < minsz - minsz = cache[i].sz - minp = cache[i].p - minidx = i + /* evict */ + if cache[i].sz < evictsz + evictidx = i + evictsz = cache[i].sz + evictp = cache[i].p ;; ;; - unlock(memlck) - /* size of 0 means we found a slot. */ - if minsz == 0 - -> void + if evictidx != -1 + cache[evictidx].p = p + cache[evictidx].sz = sz ;; + unlock(memlck) - freemem(minp, minsz) - if minidx >= 0 - cache[minidx].p = p - cache[minidx].sz = sz + /* + Now that we've removed it, we can + free it. It's not in the cache, so + we don't need the lock held. + */ + if evictsz > 0 + freemem(evictp, evictsz) ;; }
actions: restart dbus before tests
@@ -49,7 +49,9 @@ jobs: run: | gem install test-unit --no-document pip2 install cheetah # Required by kdb-gen - brew services start dbus + brew tap homebrew/services + brew update # Work around for [Homebrew Services issue 206](https://github.com/Homebrew/homebrew-services/issues/206) + brew services restart dbus cmake -E make_directory ${{runner.workspace}}/build - name: Configure CMake
Fix cmake option in README
@@ -136,7 +136,7 @@ Instead of building picotls separately, you can use an integrated option * Clone and compile Picoquic and Picotls in a single command: ~~~ - cmake -DPICOQUIC_FETCH_PTLS . + cmake -DPICOQUIC_FETCH_PTLS=Y . make ~~~
io: fix EINPROGRESS check, also check that errno is not zero
@@ -167,7 +167,7 @@ static int net_io_connect_async(struct flb_upstream *u, * means a failure. */ err = flb_socket_error(u_conn->fd); - if (!FLB_EINPROGRESS(err)) { + if (!FLB_EINPROGRESS(err) && err != 0) { flb_errno(); flb_error("[io] connection #%i failed to: %s:%i", u_conn->fd, u->tcp_host, u->tcp_port);
BFD: disable gcc6 warnings in helper macros
@@ -385,8 +385,19 @@ static const unsigned optional = 0; have_##n = 1; \ } +#if __GNUC__ >= 6 +#define PRAGMA_STR1 \ + _Pragma ("GCC diagnostic ignored \"-Wtautological-compare\""); +#define PRAGMA_STR2 _Pragma ("GCC diagnostic pop"); +#else +#define PRAGMA_STR1 +#define PRAGMA_STR2 +#endif + #define CHECK_MANDATORY(t, n, s, r, ...) \ + PRAGMA_STR1 \ if (mandatory == r && !have_##n) \ + PRAGMA_STR2 \ { \ ret = clib_error_return (0, "Required parameter `%s' missing.", s); \ goto out; \
spelling correction in help text
@@ -505,7 +505,7 @@ SurviveContext *survive_init_internal(int argc, char *const *argv, void *userDat fprintf(stderr, " -h - shows help.\n"); fprintf(stderr, " -m - list parameters, for autocomplete.\n"); fprintf(stderr, " -p [poser] - use a specific poser.\n"); - fprintf(stderr, " -l [lighthouse count] - use a specific number of lighthoses.\n"); + fprintf(stderr, " -l [lighthouse count] - use a specific number of lighthouses.\n"); fprintf(stderr, " -c [config file] - set config file\n\n"); survive_print_known_configs( ctx, 1 );
help: change listen to host for input net plugins.
@@ -201,7 +201,7 @@ int flb_help_input(struct flb_input_instance *ins, void **out_buf, size_t *out_s struct mk_list *tls_config; struct flb_config_map m_input_net_listen = { .type = FLB_CONFIG_MAP_STR, - .name = "listen", + .name = "host", .def_value = "0.0.0.0", .desc = "Listen Address", };
[chore] Resolve merge conflict(s)
@@ -53,8 +53,6 @@ var ( StakingMinimum *big.Int // ProposalPrice is default value of creating proposal ProposalPrice *big.Int - // NamePrice is default value of creating and updating name - NamePrice *big.Int lastIndexOfBH int )
Android: fix incorrect screen sizes
@@ -75,22 +75,42 @@ public class BaseActivity extends Activity implements ServiceConnection { public void reread(Context context) { Logger.T(TAG, "Updating screen properties"); - WindowManager wm = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE); + Activity actvt = null; - Display d = wm.getDefaultDisplay(); - float dpr = RhodesActivity.getContext().getResources().getDisplayMetrics().density; - - mScreenWidth = d.getWidth(); - mScreenHeight = d.getHeight(); + try { + actvt = RhodesActivity.safeGetInstance(); + } + catch (Exception e) { + Logger.E(TAG, "can not get RhodesActivity !"); + } - mRealScreenWidth = (int) (d.getWidth() / dpr); - mRealScreenHeight = (int) (d.getHeight() / dpr); + DisplayMetrics displayMetrics = new DisplayMetrics(); + boolean isOK = false; - DisplayMetrics metrics = new DisplayMetrics(); - d.getMetrics(metrics); + try { + if (actvt == null) { + displayMetrics = RhodesActivity.getContext().getResources().getDisplayMetrics(); + isOK = true; + } + else { + actvt.getWindowManager().getDefaultDisplay().getRealMetrics(displayMetrics); + isOK = true; + } + } + catch (Exception e) { + Logger.E(TAG, "can not get real DisplayMetrics !"); + } + if (!isOK) { + displayMetrics = RhodesActivity.getContext().getResources().getDisplayMetrics(); + } + mRealScreenHeight = displayMetrics.heightPixels; + mRealScreenWidth = displayMetrics.widthPixels; + mScreenPpiX = displayMetrics.xdpi; + mScreenPpiY = displayMetrics.ydpi; + float density = displayMetrics.density; + mScreenWidth = (int)((float)mRealScreenWidth/density + 0.5); + mScreenHeight = (int)((float)mRealScreenHeight/density + 0.5); - mScreenPpiX = metrics.xdpi; - mScreenPpiY = metrics.ydpi; mScreenOrientation = AndroidFunctionalityManager.getAndroidFunctionality().getScreenOrientation(context);
update readme to include FreeBSD
@@ -91,6 +91,32 @@ $ ./build/Dictu Refer to [Dictu Docker](https://github.com/dictu-lang/Dictu/blob/develop/Docker/README.md) +### FreeBSD Installation + +For a full installation, make sure `curl` and `linenoise` are installed. They can be installed from the commands below: + +```bash +$ pkg install -y curl linenoise-ng +``` + +The following variables need to be set/available to run `cmake` successfully. + +For Bourne compatible shells... + +```bash +export CPATH=/usr/local/include +export LIBRARY_PATH=/usr/local/lib +export LD_LIBRARY_PATH=/usr/local/lib +``` + +```bash +$ git clone -b master https://github.com/dictu-lang/Dictu.git +$ cd Dictu +$ cmake -DCMAKE_BUILD_TYPE=Release -B ./build +$ cmake --build ./build +$ ./dictu +``` + ## Extensions Dictu has a Visual Studio Code extension [here](https://marketplace.visualstudio.com/items?itemName=Dictu.dictuvsc) with the implementation located
Various StatsRepository fixes
@@ -121,8 +121,9 @@ namespace MiningCore.Persistence.Postgres.Repositories var lastUpdate = con.QuerySingleOrDefault<DateTime?>(query, new { poolId, miner }, tx); - if (lastUpdate.HasValue) - { + if (!lastUpdate.HasValue) + return null; + // load rows rows by timestamp query = "SELECT * FROM minerstats WHERE poolid = @poolId AND miner = @miner AND created = @created"; @@ -155,7 +156,6 @@ namespace MiningCore.Persistence.Postgres.Repositories }; } } - } return result; } @@ -170,14 +170,21 @@ namespace MiningCore.Persistence.Postgres.Repositories "GROUP BY date_trunc('hour', created), worker " + "ORDER BY created, worker;"; - var entitiesByDate = con.Query<Entities.MinerWorkerPerformanceStats>(query, new { poolId, miner, start, end }) - .ToArray() + var entities = con.Query<Entities.MinerWorkerPerformanceStats>(query, new { poolId, miner, start, end }) + .ToArray(); + + // ensure worker is not null + foreach (var entity in entities) + entity.Worker = entity.Worker ?? string.Empty; + + // group + var entitiesByDate = entities .GroupBy(x=> x.Created); var result = entitiesByDate.Select(x => new WorkerPerformanceStatsContainer { Created = x.Key, - Workers = x.ToDictionary(y => y.Worker, y => new WorkerPerformanceStats + Workers = x.ToDictionary(y => y.Worker ?? string.Empty, y => new WorkerPerformanceStats { Hashrate = y.Hashrate, SharesPerSecond = y.SharesPerSecond
moba T1: make the real-constraint compatible with version 0.7.0 (thanks to Christian Holme)
#include "misc/misc.h" #include "misc/mri.h" #include "misc/debug.h" +#include "misc/version.h" #include "num/multind.h" #include "num/flpmath.h" @@ -194,7 +195,9 @@ static void T1_adj(const nlop_data_t* _data, unsigned int o, unsigned int i, com // sum (conj(R1s') * src, t) md_clear(data->N, data->map_dims, data->tmp_map, CFL_SIZE); md_zfmacc2(data->N, data->out_dims, data->map_strs, data->tmp_map, data->out_strs, src, data->out_strs, data->tmp_dR1s); - //md_zreal(data->N, data->map_dims, data->tmp_map, data->tmp_map); + + if (!use_compat_to_version("v0.7.00")) + md_zreal(data->N, data->map_dims, data->tmp_map, data->tmp_map); // dst[2] = sum (conj(R1s') * src, t) pos[COEFF_DIM] = 2;
[io] KernelTest.cpp, fix an exception message.
@@ -406,7 +406,7 @@ void KernelTest::t6() } catch (...) { - cout << "Exception caught in BouncingBallTS.cpp" << endl; + cout << "Exception caught in KernelTest.cpp" << endl; CPPUNIT_ASSERT(false); }
tools/ci: Update RISC-V toolchain in Dockerfile to latest version The updated the toolchain, but only in the script used by MacOS CI runners.
@@ -177,7 +177,7 @@ RUN cd /tools/renesas-tools/build/gcc && \ FROM nuttx-toolchain-base AS nuttx-toolchain-riscv # Download the latest RISCV GCC toolchain prebuilt by SiFive RUN mkdir riscv64-unknown-elf-gcc && \ - curl -s -L "https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14.tar.gz" \ + curl -s -L "https://static.dev.sifive.com/dev-tools/freedom-tools/v2020.12/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz" \ | tar -C riscv64-unknown-elf-gcc --strip-components 1 -xz ###############################################################################
Component/bt: fix build ble server error with BT_BLE_DYNAMIC_ENV_MEMORY option
@@ -269,8 +269,6 @@ void BTE_InitStack(void) if ((bta_gatts_cb_ptr = (tBTA_GATTS_CB *)osi_malloc(sizeof(tBTA_GATTS_CB))) == NULL) { return; } - memset((void *)bta_gattc_cb_ptr, 0, sizeof(tBTA_GATTC_CB)); - // memset((void *)bta_gatts_cb_ptr, 0, sizeof(tBTA_GATTS_CB)); #endif #if BTA_PAN_INCLUDED==TRUE
Remove appveyor debugging
@@ -30,9 +30,6 @@ test: off build_script: - cmd: .\build\CustomBuildTool.exe -on_finish: - - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - # Setup build notifications. notifications: - provider: Email
tests: fix NoneType printing if VPP died early Make error message more meaningful. Type: fix
@@ -106,13 +106,16 @@ class VppDiedError(Exception): if testcase is None and method_name is None: in_msg = '' else: - in_msg = 'running %s.%s ' % (testcase, method_name) + in_msg = ' while running %s.%s' % (testcase, method_name) - msg = "VPP subprocess died %sunexpectedly with return code: %d%s." % ( - in_msg, - self.rv, - ' [%s]' % (self.signal_name if + if self.rv: + msg = "VPP subprocess died unexpectedly%s with return code: %d%s."\ + % (in_msg, self.rv, ' [%s]' % + (self.signal_name if self.signal_name is not None else '')) + else: + msg = "VPP subprocess died unexpectedly%s." % in_msg + super(VppDiedError, self).__init__(msg)
added some pro builds to the CI
@@ -36,6 +36,29 @@ jobs: name: 'tic80-winxp-stub' path: build/bin/tic80*.exe +# === Windows XP PRO === + winxp-pro: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + + - name: Build + shell: cmd + run: | + cd build + cmake -G "Visual Studio 16 2019" -A Win32 -T v141_xp -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_PRO=On .. + cmake --build . --config %BUILD_TYPE% --parallel + + - name: Deploy + uses: actions/upload-artifact@v2 + with: + name: 'tic80-winxp-pro' + path: build/bin/tic80.exe + # === Windows === windows: runs-on: windows-latest @@ -82,6 +105,12 @@ jobs: cmake -G "Visual Studio 16 2019" -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_PRO=On .. cmake --build . --config %BUILD_TYPE% --parallel + - name: Deploy + uses: actions/upload-artifact@v2 + with: + name: 'tic80-windows-pro' + path: build/bin/tic80.exe + # === Windows Sokol === windows-sokol: runs-on: windows-latest @@ -128,6 +157,18 @@ jobs: cmake --build . --config $BUILD_TYPE --parallel cpack + - name: Deploy DEB + uses: actions/upload-artifact@v2 + with: + name: 'tic80-linux-deb-pro' + path: build/tic80.deb + + - name: Deploy ZIP + uses: actions/upload-artifact@v2 + with: + name: 'tic80-linux-pro' + path: build/bin/tic80 + # === Ubuntu === linux: runs-on: ubuntu-latest @@ -390,6 +431,18 @@ jobs: cpack cp *.dmg tic80.dmg + - name: Deploy DMG + uses: actions/upload-artifact@v2 + with: + name: 'tic80-macos-dmg-pro' + path: build/tic80.dmg + + - name: Deploy + uses: actions/upload-artifact@v2 + with: + name: 'tic80-macos-pro' + path: build/bin/tic80 + # === Android === android: runs-on: ubuntu-latest @@ -606,11 +659,15 @@ jobs: uses: geekyeggo/delete-artifact@v1 with: name: | - tic80-rpi - tic80-macos tic80-winxp-stub tic80-windows-stub tic80-linux-stub tic80-rpi-stub tic80-macos-stub tic80-wasm-stub +# tic80-macos-pro +# tic80-macos-dmg-pro +# tic80-winxp-pro +# tic80-windows-pro +# tic80-linux-deb-pro +# tic80-linux-pro
Fix copy-dlls.bat script.
:: Script to copy dependent DLLs to the named build directory copy packages\libcups2_native.redist.2.4.0.1\build\native\bin\x64\Debug\*.dll %1 copy packages\libjpeg-turbo-v142.2.0.4.3\build\native\bin\x64\v142\Debug\*.dll %1 -copy packages\libpng_native.redist.1.6.0\build\native\bin\x64\Debug\*.dll %1 -copy packages\libpng_native.redist.1.6.0\build\native\bin\x64\Release\*.dll %1 +copy packages\libpng_native.redist.1.6.30\build\native\bin\x64\Debug\*.dll %1 +copy packages\libpng_native.redist.1.6.30\build\native\bin\x64\Release\*.dll %1 copy packages\zlib_native.redist.1.2.11\build\native\bin\x64\Debug\*.dll %1 copy packages\zlib_native.redist.1.2.11\build\native\bin\x64\Release\*.dll %1
DDF support Danalock variant (V3-BTZB)
{ "schema": "devcap1.schema.json", - "manufacturername": "Danalock", - "modelid": "V3-BTZBE", + "manufacturername": ["Danalock", "Danalock"], + "modelid": ["V3-BTZBE", "V3-BTZB"], "product": "Danalock V3", "sleeper": true, "status": "Gold",
Update copyright year in mkerr.pl
#! /usr/bin/env perl -# Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -702,7 +702,7 @@ if ( $newstate ) { open(OUT, ">$statefile.new") || die "Can't write $statefile.new, $!"; print OUT <<"EOF"; -# Copyright 1999-2017 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 1999-$YEAR The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy
Node.js: reworked installation procedure. Now by default "make install" installs the module globally. The "--local" configure option added for local installation.
@@ -15,6 +15,7 @@ for nxt_option; do --node=*) NXT_NODE="$value" ;; --npm=*) NXT_NPM="$value" ;; --node-gyp=*) NXT_NODE_GYP="$value" ;; + --local=*) NXT_NODE_LOCAL="$value" ;; --help) cat << END @@ -22,6 +23,7 @@ for nxt_option; do --node=FILE set node executable --npm=FILE set npm executable --node-gyp=FILE set node-gyp executable + --local=DIRECTORY set directory path for local installation END exit 0 @@ -52,6 +54,7 @@ fi NXT_NODE=${NXT_NODE=node} NXT_NPM=${NXT_NPM=npm} NXT_NODE_GYP=${NXT_NODE_GYP=node-gyp} +NXT_NODE_LOCAL=${NXT_NODE_LOCAL=} $echo "configuring nodejs module" @@ -123,12 +126,19 @@ NXT_NODE_TARBALL=${NXT_BUILD_DIR}/${NXT_NODE}-unit-http.tar.gz NXT_NODE_EXPORTS="export UNIT_SRC_PATH=${PWD}/src && \ export UNIT_LIB_STATIC_PATH=${PWD}/${NXT_BUILD_DIR}/libunit.a" +if [ -n "$NXT_NODE_LOCAL" ]; then + NXT_NODE_INSTALL=local-install +else + NXT_NODE_INSTALL=install +fi + cat << END >> $NXT_MAKEFILE .PHONY: ${NXT_NODE} .PHONY: ${NXT_NODE}-copy .PHONY: ${NXT_NODE}-install .PHONY: ${NXT_NODE}-uninstall +.PHONY: ${NXT_NODE}-local-check .PHONY: ${NXT_NODE}-local-install .PHONY: ${NXT_NODE}-build .PHONY: ${NXT_NODE}-publish @@ -146,6 +156,8 @@ ${NXT_NODE_TARBALL}: ${NXT_NODE}-copy tar -zcvf ${NXT_NODE_TARBALL} -C ${NXT_NODE_TMP} . +install: ${NXT_NODE}-$NXT_NODE_INSTALL + ${NXT_NODE}-install: ${NXT_NODE_TARBALL} \ $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC ${NXT_NODE_EXPORTS} && \\ @@ -154,11 +166,21 @@ ${NXT_NODE}-install: ${NXT_NODE_TARBALL} \ ${NXT_NODE}-uninstall: ${NXT_NPM} uninstall -g unit-http -${NXT_NODE}-local-install: ${NXT_NODE_TARBALL} \ +${NXT_NODE}-local-check: + @test -n "\$(DESTDIR)$NXT_NODE_LOCAL" \\ + || (echo; \\ + echo "error: to make ${NXT_NODE}-local-install you need either"; \\ + echo " to configure --local option"; \\ + echo " or to set DESTDIR environment variable."; \\ + echo; \\ + exit 1) + +${NXT_NODE}-local-install: ${NXT_NODE_TARBALL} ${NXT_NODE}-local-check \ $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC ${NXT_NODE_EXPORTS} && \\ - mkdir -p \$(DESTDIR) && \\ - cd \$(DESTDIR) && ${NXT_NPM} install ${PWD}/${NXT_NODE_TARBALL} + mkdir -p \$(DESTDIR)${NXT_NODE_LOCAL} && \\ + cd \$(DESTDIR)${NXT_NODE_LOCAL} && \\ + ${NXT_NPM} install ${PWD}/${NXT_NODE_TARBALL} ${NXT_NODE}-build: ${NXT_NODE}
build: fix broken debian dependencies on ubuntu-18.04 & debian-9 Installation vpp-plugin-core from packagecloud.io/master & packagecloud.io/2009 breaks due to invalid dependencies on newer versions of libmbedtls & libmbedcrypto Type: fix Fixes:
@@ -51,9 +51,9 @@ Description: Vector Packet Processing--runtime libraries Package: vpp-plugin-core Architecture: any Depends: vpp (= ${source:Version}), - libmbedtls12, + libmbedtls12 | libmbedtls10, libmbedx509-0, - libmbedcrypto3, + libmbedcrypto3 | libmbedcrypto1 | libmbedcrypto0, ${shlibs:Depends} Description: Vector Packet Processing--runtime core plugins This package contains VPP core plugins
sort -I output by physical interface, MAC, spoofed MAC (if detected), interface name, driver
@@ -7793,19 +7793,20 @@ else memset(&drivername, 0, 32); if(get_perm_addr(ifa->ifa_name, permaddr, virtaddr, drivername) == true) { - for (p = 0; p < 6; p++) fprintf(stdout, "%02x", (permaddr[p])); strncpy(interfacename, ifa->ifa_name, IFNAMSIZ); memset(phyinterfacename, 0 , PHYIFNAMESIZE); getphyifname(); if(phyinterfacename[0] == 0) memcpy(&phyinterfacename, notavailablestr, 3); - if(checkmonitorinterface(ifa->ifa_name) == false) fprintf(stdout, " %s %s (%s)", phyinterfacename, ifa->ifa_name, drivername); - else fprintf(stdout, " %s (%s) warning:probably a virtual monitor interface!", phyinterfacename, drivername); + fprintf(stdout, "%s\t", phyinterfacename); + for(p = 0; p < 6; p++) fprintf(stdout, "%02x", (permaddr[p])); if(memcmp(&permaddr, &virtaddr, 6) != 0) { - fprintf(stdout, " warning:spoofed MAC "); + fprintf(stdout, "\t(spoofed MAC:"); for (p = 0; p < 6; p++) printf("%02x", (virtaddr[p])); - fprintf(stdout, " detected"); + fprintf(stdout, " detected)"); } + if(checkmonitorinterface(ifa->ifa_name) == false) fprintf(stdout, "\t%s\t(driver:%s)", ifa->ifa_name, drivername); + else fprintf(stdout, "\t%s\t(driver:%s) warning:probably a virtual monitor interface!", ifa->ifa_name, drivername); fprintf(stdout, "\n"); } }
Fix case fall through. CID
@@ -27,6 +27,7 @@ static int on_config_debug_state(h2o_configurator_command_t *cmd, h2o_configurat switch (h2o_configurator_get_one_of(cmd, node, "minimum,hpack")) { case 0: /* minimum */ h2o_http2_debug_state_register(ctx->hostconf, 0); + return 0; case 1: /* with hpack state*/ h2o_http2_debug_state_register(ctx->hostconf, 1); return 0;
extmod/modrobotics: fix stop type object This was still using the legacy integer stop type.
@@ -141,10 +141,10 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(robotics_DriveBase_drive_obj, 1, robotics_Driv STATIC mp_obj_t robotics_DriveBase_stop(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { PB_PARSE_ARGS_METHOD(n_args, pos_args, kw_args, robotics_DriveBase_obj_t, self, - PB_ARG_DEFAULT_INT(stop_type, PBIO_ACTUATION_COAST) + PB_ARG_DEFAULT_OBJ(stop_type, pb_Stop_COAST_obj) ); - pbio_actuation_t after_stop = mp_obj_get_int(stop_type); + pbio_actuation_t after_stop = pb_type_enum_get_value(stop_type, &pb_enum_type_Stop); pb_assert(pbio_drivebase_stop(self->db, after_stop)); return mp_const_none;
`endCapture` shouldn't handle `lexerState->atLineStart` `startCapture` did not initialize `lexerState->atLineStart`; its final value is a consequence of the separate but similar behaviors within `lexer_CaptureRept` and `lexer_CaptureMacroBody`.
@@ -2431,7 +2431,6 @@ static void endCapture(struct CaptureBody *capture) lexerState->captureBuf = NULL; lexerState->disableMacroArgs = false; lexerState->disableInterpolation = false; - lexerState->atLineStart = false; } bool lexer_CaptureRept(struct CaptureBody *capture) @@ -2490,6 +2489,8 @@ bool lexer_CaptureRept(struct CaptureBody *capture) finish: endCapture(capture); + /* ENDR or EOF puts us past the start of the line */ + lexerState->atLineStart = false; /* Returns true if an ENDR terminated the block, false if it reached EOF first */ return c != EOF; @@ -2545,6 +2546,8 @@ bool lexer_CaptureMacroBody(struct CaptureBody *capture) finish: endCapture(capture); + /* ENDM or EOF puts us past the start of the line */ + lexerState->atLineStart = false; /* Returns true if an ENDM terminated the block, false if it reached EOF first */ return c != EOF;
parallel-libs/slepc: update license file name
@@ -134,6 +134,6 @@ rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root,-) %{OHPC_PUB} -%doc COPYING COPYING.LESSER README docs/slepc.pdf +%doc LICENSE README docs/slepc.pdf %changelog
nx: Migrate P9 RNG BAR assignment to phys_map_get() Keeps existing address. No functional change.
#include <nx.h> #include <chip.h> #include <xscom-p9-regs.h> - -#define MMIO_CALC(__c, __b) \ - (MMIO_CHIP_STRIDE * (__c) | __b) +#include <phys-map.h> extern void nx_p9_rng_init(void); @@ -52,7 +50,7 @@ void nx_p9_rng_init(void) */ for_each_chip(chip) { /* 1) NX RNG BAR */ - bar = MMIO_CALC(chip->id, P9X_NX_MMIO_OFFSET); + phys_map_get(chip, NX_RNG, 0, &bar, NULL); xscom_write(chip->id, P9X_NX_MMIO_BAR, bar | P9X_NX_MMIO_BAR_EN); /* Read config register for pace info */
iokernel: use larger IPI wait interval (pmc not ready ratio is nearly 0).
@@ -27,7 +27,7 @@ static DEFINE_BITMAP(mis_sampled_cores, NCPU); /* poll the global (system-wide) memory bandwidth over this time interval */ #define MIS_BW_MEASURE_INTERVAL 25 /* wait for performance counter results over this time interval */ -#define MIS_BW_PUNISH_INTERVAL 10 +#define MIS_BW_PUNISH_INTERVAL 20 /* FIXME: should not be hard coded */ #define MIS_BW_HIGH_WATERMARK 0.105 /* FIXME: should not be hard coded */ @@ -414,18 +414,28 @@ static struct mis_data *mis_choose_bandwidth_victim(void) float highest_l3miss; uint64_t pmc; int i; + int has_not_ready = 0; + static int invoked_cnt = 0; + static int not_ready_cnt = 0; bitmap_for_each_set(mis_sampled_cores, NCPU, i) { sd = cores[sched_siblings[i]]; if (unlikely(!ksched_poll_pmc(i, &pmc))) { - if (sd) + if (sd) { + has_not_ready = 1; sd->threads_monitored--; + } continue; } if (sd) sd->llc_misses += pmc; } + not_ready_cnt += has_not_ready; + invoked_cnt++; + log_ratelimited(LOG_INFO, "not ready ratio = %f", + (float)not_ready_cnt / (float)invoked_cnt); + list_for_each(&all_procs, sd, all_link) { if (!sd->threads_monitored) { // pmc not ready, pass
don't paint 0 coordinates
@@ -138,6 +138,9 @@ void * GuiThread( void * v ) // g = (g * (5-buffertimeto[i][nn])) / 5 ; // b = (b * (5-buffertimeto[i][nn])) / 5 ; CNFGColor( (b<<16) | (g<<8) | r ); + + if (bufferpts[i*2+0][nn] == 0 || bufferpts[i*2+1][nn]==0) continue; //do not draw if aither coordinate is 0 + CNFGTackRectangle( bufferpts[i*2+0][nn], bufferpts[i*2+1][nn], bufferpts[i*2+0][nn] + 5, bufferpts[i*2+1][nn] + 5 ); CNFGPenX = bufferpts[i*2+0][nn]; CNFGPenY = bufferpts[i*2+1][nn]; CNFGDrawText( buffermts, 2 );
clarfications in mobafit
#endif -static const char help_str[] = "Pixel-wise fitting of sequence models."; +static const char help_str[] = "Pixel-wise fitting of physical signal models."; int main_mobafit(int argc, char* argv[argc]) { @@ -46,13 +46,13 @@ int main_mobafit(int argc, char* argv[argc]) const char* TE_file = NULL; const char* echo_file = NULL; - const char* param_file = NULL; + const char* coeff_file = NULL; struct arg_s args[] = { ARG_INFILE(true, &TE_file, "TE"), - ARG_INFILE(true, &echo_file, "echo images"), - ARG_OUTFILE(false, &param_file, "paramters"), + ARG_INFILE(true, &echo_file, "echo/contrast images"), + ARG_OUTFILE(false, &coeff_file, "coefficients"), }; @@ -98,7 +98,7 @@ int main_mobafit(int argc, char* argv[argc]) x_dims[COEFF_DIM] = get_num_of_coeff(mgre_model); - complex float* x = create_cfl(param_file, DIMS, x_dims); + complex float* x = create_cfl(coeff_file, DIMS, x_dims); md_clear(DIMS, x_dims, x, CFL_SIZE);
wireless: fix relative path CI error error: Path relative to repository other than nuttx must begin with the root directory
/**************************************************************************** - * wireless/ieee802154/i8shark/i8shark_main.c + * apps/wireless/ieee802154/i8shark/i8shark_main.c * * Copyright (C) 2017 Verge Inc. All rights reserved. * Author: Anthony Merlino <[email protected]>
Redirecting 7z output to nul
@@ -83,7 +83,7 @@ curl -fsSL -o benchmark.zip %BENCHFILES_URL% :: extract tests, benchmarks, and manifest 7z x examples.zip *\epanet-tests\* > nul 7z x benchmark.zip -obenchmark\ > nul -7z e benchmark.zip -o. manifest.json -r +7z e benchmark.zip -o. manifest.json -r > nul :: set up symlink for tests directory
parser: Properly drop depth after calling `__main__`.
@@ -5379,7 +5379,7 @@ static void main_func_setup(lily_parse_state *parser) static void main_func_teardown(lily_parse_state *parser) { parser->vm->call_chain = parser->vm->call_chain->prev; - parser->vm->call_depth = 1; + parser->vm->call_depth--; parser->executing = 0; }
Fix the check of UI_method_set_ex_data UI_method_set_ex_data returns 0 and 1 instead of negative numbers.
@@ -153,7 +153,7 @@ UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int rwflag) || UI_method_set_writer(ui_method, ui_write) < 0 || UI_method_set_closer(ui_method, ui_close) < 0 || !RUN_ONCE(&get_index_once, ui_method_data_index_init) - || UI_method_set_ex_data(ui_method, ui_method_data_index, data) < 0) { + || !UI_method_set_ex_data(ui_method, ui_method_data_index, data)) { UI_destroy_method(ui_method); OPENSSL_free(data); return NULL;
fix `git describe` We're getting a shallow clone of the repo from `actions/checkout` and when we use `git describe` in the build, it's failing because there's no history in the clone.
@@ -17,6 +17,7 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v2 + - run: git fetch --prune --unshallow - name: Install Go uses: actions/setup-go@v2
YAy PEG: Correct minor spelling mistake in ReadMe
@@ -57,7 +57,7 @@ sudo kdb mount config.yaml user/tests/yaypeg yaypeg # Manually add some values printf 'ponies:\n' > `kdb file user/tests/yaypeg` -printf ' - Flutter Shy # Yay!\n' >> `kdb file user/tests/yaypeg` +printf ' - Fluttershy # Yay!\n' >> `kdb file user/tests/yaypeg` printf ' - Pinkie Pie\n' >> `kdb file user/tests/yaypeg` printf ' - Maud Pie' >> `kdb file user/tests/yaypeg`
I corrected the title placement for vertical axes. This resolves
@@ -516,6 +516,9 @@ void vtkVisItAxisActor2D::PrintSelf(ostream& os, vtkIndent indent) // Create a new vtkTextProperty when updating the properties // of the TitleActor. Fixes bug with triad letters. // +// Eric Brugger, Thu Jun 14 09:02:39 PDT 2018 +// Correct the title placement for vertical axes for the VTK8 upgrade. +// // **************************************************************************** void vtkVisItAxisActor2D::BuildAxis(vtkViewport *viewport) @@ -917,13 +920,13 @@ void vtkVisItAxisActor2D::BuildAxis(vtkViewport *viewport) this->TitleActor->SetPosition(pos[0], pos[1]); if(this->TitleAtEnd) { - titleTprop->SetJustificationToCentered(); - titleTprop->SetVerticalJustificationToBottom(); + titleTprop->SetJustificationToLeft(); + titleTprop->SetVerticalJustificationToCentered(); } else { - titleTprop->SetJustificationToRight(); - titleTprop->SetVerticalJustificationToCentered(); + titleTprop->SetJustificationToCentered(); + titleTprop->SetVerticalJustificationToBottom(); } } else
fix issue Issue when running kernel created from binary (with a peeled loop) with local size (1,1,1)
@@ -251,19 +251,26 @@ WorkitemLoops::CreateLoopAround IRBuilder<> builder(forInitBB); - if (peeledFirst) - { + if (peeledFirst) { builder.CreateStore(builder.CreateLoad(localIdXFirstVar), localIdVar); builder.CreateStore (ConstantInt::get(IntegerType::get(C, size_t_width), 0), localIdXFirstVar); + + if (WGDynamicLocalSize) { + llvm::Value *cmpResult; + cmpResult = builder.CreateICmpULT(builder.CreateLoad(localIdVar), + builder.CreateLoad(DynamicLocalSize)); + + builder.CreateCondBr(cmpResult, loopBodyEntryBB, loopEndBB); + } else { + builder.CreateBr(loopBodyEntryBB); } - else - { + } else { builder.CreateStore (ConstantInt::get(IntegerType::get(C, size_t_width), 0), localIdVar); - } builder.CreateBr(loopBodyEntryBB); + } exitBB->getTerminator()->replaceUsesOfWith(oldExit, forCondBB); if (addIncBlock)
board/servo_v4p1/pi3usb9201.h: Format with clang-format BRANCH=none TEST=none
#ifndef __CROS_EC_PI3USB9201_H #define __CROS_EC_PI3USB9201_H -enum pi3usb9201_reg_t { - CTRL_REG1, - CTRL_REG2, - CLIENT_STATUS, - HOST_STATUS -}; +enum pi3usb9201_reg_t { CTRL_REG1, CTRL_REG2, CLIENT_STATUS, HOST_STATUS }; enum pi3usb9201_dat_t { POWER_DOWN = 0x0, @@ -22,7 +17,6 @@ enum pi3usb9201_dat_t { USB_PATH_ON = 0xe }; - /* Client Status bits */ #define CS_DCP BIT(7) #define CS_SDP BIT(6)
travis: dump config.log when configure dies
@@ -16,7 +16,7 @@ matrix: script: # workaround git not retaining mtimes and bison/flex not being uptodate - touch conffile.yy.c conffile.tab.c conffile.tab.h - - ./configure + - ./configure || cat config.log - make check env:
SidebarList: fix comet rendering
@@ -78,7 +78,7 @@ function getItems(associations: Associations, workspace: Workspace, inbox: Graph } }); const direct: string[] = workspace.type !== 'messages' ? [] - : inbox.keys().map(x => patp(x.toJSNumber())) + : inbox.keys().map(x => patp(x.toString())) return [...filtered, ...direct];
graphics/pdcurs34: Fix compile error Fix a compile error when CONFIG_SYSTEM_TERMCURSES=y.
@@ -838,7 +838,7 @@ static void PDC_transform_line_term(FAR SCREEN *s, int lineno, int x, /* Move to the specified line / col */ - PDC_gotoyx_term(sp, lineno, x); + PDC_gotoyx_term(s, lineno, x); /* Loop through all characters to be displayed */
move max frag error to S2N_ERR_T_PROTO
@@ -79,6 +79,8 @@ typedef enum { S2N_ERR_RECORD_LIMIT, S2N_ERR_CERT_UNTRUSTED, S2N_ERR_CERT_TYPE_UNSUPPORTED, + S2N_ERR_INVALID_MAX_FRAG_LEN, + S2N_ERR_MAX_FRAG_LEN_MISMATCH, /* S2N_ERR_T_INTERNAL */ S2N_ERR_MADVISE = S2N_ERR_T_INTERNAL_START, S2N_ERR_ALLOC, @@ -141,8 +143,6 @@ typedef enum { S2N_ERR_INVALID_SCT_LIST, S2N_ERR_INVALID_OCSP_RESPONSE, S2N_ERR_CANCELLED, - S2N_ERR_INVALID_MAX_FRAG_LEN, - S2N_ERR_MAX_FRAG_LEN_MISMATCH, } s2n_error; #define S2N_DEBUG_STR_LEN 128
[NFSC] motion blur readme update
@@ -852,7 +852,7 @@ The usage is as simple as inserting the files into game's root directory. Uninst ![](https://habrastorage.org/webt/d_/eg/ym/d_egymd6w_tem2erocab-e9ikna.png) Added an option to improve gamepad support (gamepad icons, fixed bindings etc) -![](https://habrastorage.org/webt/d_/eg/ym/d_egymd6w_tem2erocab-e9ikna.png) Added an option to disable motion blur +![](https://habrastorage.org/webt/d_/eg/ym/d_egymd6w_tem2erocab-e9ikna.png) Added an option to disable motion blur without losing other effects ![](https://habrastorage.org/webt/d_/eg/ym/d_egymd6w_tem2erocab-e9ikna.png) Added an option to change fps limit
king: my god, actually reverse ip addrs
@@ -25,7 +25,6 @@ module Urbit.Arvo.Common import Urbit.Prelude import Control.Monad.Fail (fail) -import Data.Bits import Data.Serialize import qualified Network.HTTP.Types.Method as H @@ -185,9 +184,9 @@ newtype Ipv4 = Ipv4 { unIpv4 :: N.HostAddress } deriving newtype (Eq, Ord, Enum) instance Serialize Ipv4 where - get = Ipv4 <$> N.tupleToHostAddress - <$> ((,,,) <$> getWord8 <*> getWord8 <*> getWord8 <*> getWord8) - put (Ipv4 (N.hostAddressToTuple -> (a, b, c, d))) = for_ [a, b, c, d] putWord8 + get = (\a b c d -> Ipv4 $ N.tupleToHostAddress $ (d, c, b, a)) + <$> getWord8 <*> getWord8 <*> getWord8 <*> getWord8 + put (Ipv4 (N.hostAddressToTuple -> (a, b, c, d))) = for_ [d, c, b, a] putWord8 instance ToNoun Ipv4 where toNoun = serializeToNoun @@ -196,11 +195,11 @@ instance FromNoun Ipv4 where parseNoun = serializeParseNoun "Ipv4" 4 instance Show Ipv4 where - show (Ipv4 i) = - show ((shiftR i 24) .&. 0xff) ++ "." ++ - show ((shiftR i 16) .&. 0xff) ++ "." ++ - show ((shiftR i 8) .&. 0xff) ++ "." ++ - show (i .&. 0xff) + show (Ipv4 (N.hostAddressToTuple -> (a, b, c, d))) = + show a ++ "." ++ + show b ++ "." ++ + show c ++ "." ++ + show d -- @is -- should probably use hostAddress6ToTuple here, but no one uses it right now
system/composite: Eliminate warning about dumptrace being defined but not used.
* Pre-processor Definitions ****************************************************************************/ +/* A lot of effort to avoid warning about dumptrace() not being used */ + +#undef NEED_DUMPTRACE +#ifdef CONFIG_USBDEV_TRACE +# if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_DISABLE_SIGNALS) +# define NEED_DUMPTRACE 1 +# elif CONFIG_USBDEV_TRACE_INITIALIDSET != 0 +# define NEED_DUMPTRACE 1 +# endif +#endif + /**************************************************************************** * Private Data ****************************************************************************/ @@ -166,7 +177,7 @@ static void final_memory_usage(FAR const char *msg) * Name: composite_enumerate ****************************************************************************/ -#ifdef CONFIG_USBDEV_TRACE +#ifdef NEED_DUMPTRACE static int composite_enumerate(struct usbtrace_s *trace, void *arg) { switch (trace->event) @@ -365,7 +376,7 @@ static int composite_enumerate(struct usbtrace_s *trace, void *arg) * ****************************************************************************/ -#ifdef CONFIG_USBDEV_TRACE +#ifdef NEED_DUMPTRACE static int dumptrace(void) { int ret;
Used DEBUG instead of NDEBUG in common/stackTrace module. In some testing cases these might not be in sync, which causes unpredictable behavior.
@@ -53,10 +53,10 @@ Internal Functions LogLevel stackTracePush(const char *fileName, const char *functionName, LogLevel functionLogLevel); // Pop a function from the trace stack -#ifdef NDEBUG - void stackTracePop(void); -#else +#ifdef DEBUG void stackTracePop(const char *fileName, const char *functionName, bool test); +#else + void stackTracePop(void); #endif // Generate the stack trace
Add Cygwin build test
@@ -87,3 +87,21 @@ jobs: - name: Run tests run: | ./build/hiredis-test.exe + + - name: Setup cygwin + uses: egor-tensin/setup-cygwin@v3 + with: + platform: x64 + packages: cmake gcc-core gcc-g++ + + - name: Build in cygwin + env: + HIREDIS_PATH: ${{ github.workspace }} + run: | + build_hiredis() { + cd $(cygpath -u $HIREDIS_PATH) + rm -rf build && mkdir build && cd build + cmake .. -G "Unix Makefiles" && make VERBOSE=1 + } + build_hiredis + shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
README.md: about using `+`
@@ -191,6 +191,7 @@ Parameters that are enabled by default have to be explicitly disabled. These (cu | `blacklist` | Add a program to the blacklist. e.g `blacklist=vkcube,WatchDogs2.exe` | Example: `MANGOHUD_CONFIG=cpu_temp,gpu_temp,position=top-right,height=500,font_size=32` +Because comma is also used as option delimiter and needs to be escaped for values with a backslash, you can use `+` like `MANGOHUD_CONFIG=fps_limit=60+30+0` instead. Note: Width and Height are set automatically based on the font_size, but can be overridden. ## Vsync
OGR wrapper fixes
#ifdef _CARTO_GDAL_SUPPORT -!proxy_imports(carto::OGRVectorDataSource, core.MapBounds, core.StringVector, datasources.VectorDataSource, datasources.components.VectorData, datasources.OGRVectorDataBase, datasources.OGRFieldType, datasources.OGRGeometryType, geometry.GeometrySimplifier, projections.Projection, renderers.components.CullState, styles.StyleSelector) +!proxy_imports(carto::OGRVectorDataSource, core.MapBounds, core.StringVector, datasources.VectorDataSource, datasources.components.VectorData, datasources.OGRVectorDataBase, datasources.OGRFieldType, datasources.OGRGeometryType, geometry.GeometrySimplifier, projections.Projection, renderers.components.CullState, styles.StyleSelector, vectorelements.VectorElement, vectorelements.VectorElementVector) %{ #include "datasources/OGRVectorDataSource.h" %attributeval(carto::OGRVectorDataSource, std::vector<std::string>, FieldNames, getFieldNames) %attributestring(carto::OGRVectorDataSource, std::string, CodePage, getCodePage, setCodePage) !attributestring_polymorphic(carto::OGRVectorDataSource, geometry.GeometrySimplifier, GeometrySimplifier, getGeometrySimplifier, setGeometrySimplifier) -%std_io_exceptions(carto::OGRVectorDataSource::OGRVectorDataSource) +%std_exceptions(carto::OGRVectorDataSource::OGRVectorDataSource) %std_exceptions(carto::OGRVectorDataSource::add) %std_exceptions(carto::OGRVectorDataSource::remove)
Fix for iHorn sensors not being created
@@ -3762,9 +3762,12 @@ void DeRestPluginPrivate::addSensorNode(const deCONZ::Node *node, const deCONZ:: QList<deCONZ::SimpleDescriptor>::const_iterator i = node->simpleDescriptors().constBegin(); QList<deCONZ::SimpleDescriptor>::const_iterator end = node->simpleDescriptors().constEnd(); - // Trust specific + // Trust and iHorn specific if (node->nodeDescriptor().manufacturerCode() == VENDOR_JENNIC && modelId.isEmpty()) { + int inClusterCount = i->inClusters().size(); + int outClusterCount = i->outClusters().size(); + // check Trust remote control ZYCT-202 if (node->simpleDescriptors().size() == 2 && node->simpleDescriptors()[0].endpoint() == 0x01 && @@ -3781,6 +3784,16 @@ void DeRestPluginPrivate::addSensorNode(const deCONZ::Node *node, const deCONZ:: modelId = QLatin1String("ZYCT-202"); // the modelid returned by device is empty manufacturer = QLatin1String("Trust"); } + // check iHorn temperature and humidity sensor 113D + if (node->simpleDescriptors().size() == 1 && + node->simpleDescriptors()[0].endpoint() == 0x01 && + node->simpleDescriptors()[0].profileId() == HA_PROFILE_ID && + node->simpleDescriptors()[0].deviceId() == 0x0302 && + inClusterCount == 9 && outClusterCount == 11) + { + modelId = QLatin1String("113D"); // the modelid returned by device is empty + manufacturer = QLatin1String("iHorn"); + } } for (;i != end; ++i) @@ -5988,8 +6001,7 @@ void DeRestPluginPrivate::updateSensorNode(const deCONZ::NodeEvent &event) i->modelId().startsWith(QLatin1String("1116-S")) || // iris contact sensor v3 i->modelId().startsWith(QLatin1String("1117-S")) || // iris motion sensor v3 i->modelId().startsWith(QLatin1String("3326-L")) || // iris motion sensor v2 - i->modelId().startsWith(QLatin1String("lumi.sen_ill")) ||// Xiaomi ZB3.0 light sensor - i->modelId() == QLatin1String("113D")) // iHorn (Huawei) temperature and humidity sensor + i->modelId().startsWith(QLatin1String("lumi.sen_ill")))// Xiaomi ZB3.0 light sensor { } else {
Switch to using Ninja to build toolchain in the setup script The instructions for building the toolchain standalone already use Ninja. Since that is what I do most of my testing on anyway, it has better coverage. [ci skip]
@@ -58,10 +58,10 @@ if [ ! -d tools/NyuziToolchain/Makefile ]; then # created, cmake will reconfigure on its own if necessary when make is # invoked. cd tools/NyuziToolchain/build - cmake -DCMAKE_BUILD_TYPE=Release .. || fail "Error configuring toolchain" + cmake -G Ninja -DCMAKE_BUILD_TYPE=Release .. || fail "Error configuring toolchain" else cd tools/NyuziToolchain/build fi -make || fail "Error building toolchain" -sudo make install || fail "Error installing toolchain" +ninja || fail "Error building toolchain" +sudo ninja install || fail "Error installing toolchain"
[mod_auth] close connection after bad password mitigation slows down brute force password attacks x-ref: "Possible feature: authentication brute force hardening"
@@ -601,6 +601,7 @@ static handler_t mod_auth_check_basic(server *srv, connection *con, void *p_d, c case HANDLER_ERROR: default: log_error_write(srv, __FILE__, __LINE__, "sbsBsB", "password doesn't match for", con->uri.path, "username:", username, ", IP:", con->dst_addr_buf); + con->keep_alive = 0; /*(disable keep-alive if bad password)*/ rc = HANDLER_UNSET; break; } @@ -1122,6 +1123,7 @@ static handler_t mod_auth_check_digest(server *srv, connection *con, void *p_d, return HANDLER_FINISHED; case HANDLER_ERROR: default: + con->keep_alive = 0; /*(disable keep-alive if unknown user)*/ buffer_free(b); return mod_auth_send_401_unauthorized_digest(srv, con, require, 0); } @@ -1132,6 +1134,7 @@ static handler_t mod_auth_check_digest(server *srv, connection *con, void *p_d, /* digest not ok */ log_error_write(srv, __FILE__, __LINE__, "sssB", "digest: auth failed for ", username, ": wrong password, IP:", con->dst_addr_buf); + con->keep_alive = 0; /*(disable keep-alive if bad password)*/ buffer_free(b); return mod_auth_send_401_unauthorized_digest(srv, con, require, 0);
ci: retry download if catched IOError/EOFError
@@ -4,6 +4,7 @@ import argparse import tempfile import tarfile import zipfile +from functools import wraps import gitlab @@ -11,6 +12,8 @@ import gitlab class Gitlab(object): JOB_NAME_PATTERN = re.compile(r"(\w+)(\s+(\d+)/(\d+))?") + DOWNLOAD_ERROR_MAX_RETRIES = 3 + def __init__(self, project_id=None): config_data_from_env = os.getenv("PYTHON_GITLAB_CONFIG") if config_data_from_env: @@ -64,6 +67,31 @@ class Gitlab(object): with zipfile.ZipFile(temp_file.name, "r") as archive_file: archive_file.extractall(destination) + def retry_download(func): + """ + This wrapper will only catch IOError and retry the whole function. + + So only use it with download functions, read() inside and atomic + functions + """ + @wraps(func) + def wrapper(self, *args, **kwargs): + retried = 0 + while True: + try: + res = func(self, *args, **kwargs) + except (IOError, EOFError) as e: + retried += 1 + if retried > self.DOWNLOAD_ERROR_MAX_RETRIES: + raise e # get out of the loop + else: + print('Retried for the {} time'.format(retried)) + continue + else: + break + return res + return wrapper + def download_artifact(self, job_id, artifact_path, destination=None): """ download specific path of job artifacts and extract to destination. @@ -118,6 +146,7 @@ class Gitlab(object): job_id_list.append({"id": job.id, "parallel_num": match.group(3)}) return job_id_list + @retry_download def download_archive(self, ref, destination, project_id=None): """ Download archive of certain commit of a repository and extract to destination path
[viogpudo] clean up the scanour reset code
@@ -3217,16 +3217,10 @@ void VioGpuAdapter::DestroyFrameBufferObj(BOOLEAN bReset) if (m_pFrameBuf != NULL) { resid = (UINT)m_pFrameBuf->GetId(); - //if (bReset == TRUE) { - // m_CtrlQueue.SetScanout(0/*FIXME m_Id*/, resid, 1024, 768, 0, 0); - // m_CtrlQueue.TransferToHost2D(resid, 0, 1024, 768, 0, 0, NULL); - // m_CtrlQueue.ResFlush(resid, 1024, 768, 0, 0); - //} -// m_CtrlQueue.SetScanout(0/*FIXME m_Id*/, resid, 1024, 768, 0, 0); m_CtrlQueue.InvalBacking(resid); m_CtrlQueue.UnrefResource(resid); if (bReset == TRUE) { - m_CtrlQueue.SetScanout(0/*FIXME m_Id*/, 0, 0, 0, 0, 0); + m_CtrlQueue.SetScanout(0, 0, 0, 0, 0, 0); } delete m_pFrameBuf; m_pFrameBuf = NULL;