message
stringlengths
6
474
diff
stringlengths
8
5.22k
with asymmetry, server must also decides to use its paths
#define COOLDOWN_RTT_COEF 8 protoop_arg_t path_manager(picoquic_cnx_t* cnx) { - int client_mode = (int) get_cnx(cnx, AK_CNX_CLIENT_MODE, 0); - /* Prevent the server from starting using new paths */ - if (!client_mode) { - return 0; - } + /* Now, even the server MUST itself setup its sending paths */ bpf_data *bpfd = get_bpf_data(cnx); path_data_t *pd = NULL;
Prebuilt -> Pre-built.
@@ -15,7 +15,7 @@ MIT License - see the LICENSE file in the source distribution. ### Installation -#### Prebuilt Binaries +#### Pre-built Binaries Releases can be downloaded from the [releases](https://github.com/msteinbeck/tinyspline/releases) page.
control: remove idle_state
@@ -80,7 +80,6 @@ motor_test_t motor_test = { .value = {0, 0, 0, 0}, }; -static uint8_t idle_state; static uint8_t arming_release; extern int ledcommand; @@ -371,12 +370,6 @@ void control() { flags.throttle_safety = 0; } - if (!rx_aux_on(AUX_IDLE_UP)) { - idle_state = 0; - } else { - idle_state = 1; - } - // CONDITION: armed state variable is 0 so quad is DISARMED if (flags.arm_state == 0) { // override throttle to 0 @@ -391,7 +384,7 @@ void control() { } else { // CONDITION: armed state variable is 1 so quad is ARMED - if (idle_state == 0) { + if (!rx_aux_on(AUX_IDLE_UP)) { // CONDITION: idle up is turned OFF if (state.rx_filtered.throttle < 0.05f) {
OcAppleDiskImageLib: Even more debug logging
@@ -77,6 +77,13 @@ OcAppleDiskImageInitializeContext ( &Trailer ); if (!Result || (Trailer.Signature != SwappedSig)) { + DEBUG (( + DEBUG_INFO, + "Dmg trailer error: %d - %X/%X.\n", + Result, + SwappedSig, + Trailer.Signature + )); return FALSE; }
fixes bug in %eyre proxy config, repairs existing config in +load
:: $init :: register ownership =. our ?~(hov p.kyz (min u.hov p.kyz)) - =. fig [~ ?=(%king our) & &] + =. fig [~ ?=(%king (clan:title our)) & &] +>.$(hov [~ our], top [[our %home ud+0] /web]) :: ?($chis $this) :: inbound request ^+ ..^$ ?- -.old $0 $(old [%1 ~ *http-config [8.080 ~] [~ ~] +.old]) - $1 ..^$(+>- old) + :: + $1 :: XX temporary fix for bad proxy config + :: + =/ rox=? ?~ hov.old + proxy.fig.old + ?=(%king (clan:title u.hov.old)) + ..^$(+>- old(proxy.fig rox)) == :: ++ scry
In --print-ir, explicitly show CallStatic and CallDyn Previously, --print-ir didn't distinguish between CallStatic and CallDyn x2 <- f(x1) Now it shows which one it is. x2 <- CallStatic f(x1) x2 <- CallDyn g(x1)
@@ -219,8 +219,10 @@ local function Cmd(cmd) elseif tag == "ir.Cmd.SetField" then rhs = Val(cmd.src_v) elseif tag == "ir.Cmd.NewClosure" then rhs = Call("NewClosure", { Fun(cmd.f_id) }) elseif tag == "ir.Cmd.InitUpvalues" then rhs = comma_concat(Vals(cmd.srcs)) - elseif tag == "ir.Cmd.CallStatic" then rhs = Call(Val(cmd.src_f), Vals(cmd.srcs)) - elseif tag == "ir.Cmd.CallDyn" then rhs = Call(Val(cmd.src_f), Vals(cmd.srcs)) + elseif tag == "ir.Cmd.CallStatic" then + rhs = "CallStatic ".. Call(Val(cmd.src_f), Vals(cmd.srcs)) + elseif tag == "ir.Cmd.CallDyn" then + rhs = "CallDyn ".. Call(Val(cmd.src_f), Vals(cmd.srcs)) else local tagname = assert(typedecl.match_tag(cmd._tag, "ir.Cmd")) rhs = Call(tagname, Vals(ir.get_srcs(cmd)))
Improving content type handling If request content type not empty, means user expecting something else, do not override it.
@@ -61,6 +61,9 @@ class LoaderInfo extends URLLoader var dot = pendingURL.lastIndexOf("."); var extension = dot > 0 ? pendingURL.substr(dot + 1).toLowerCase() : ""; + if(request.contentType == null || + request.contentType.length == 0 || + request.contentType == "application/x-www-form-urlencoded") contentType = switch(extension) { case "swf": "application/x-shockwave-flash"; @@ -71,6 +74,7 @@ class LoaderInfo extends URLLoader throw "Unrecognized file " + pendingURL; } + url = null; super.load(request);
fixed code selection
@@ -1160,20 +1160,19 @@ static void doTab(Code* code, bool shift, bool crtl) // Add a block-ending keyword or symbol, and put the cursor in the line between. static void newLineAutoClose(Code* code) { - newLine(code); - const char* blockEnd = tic_core_script_config(code->tic)->blockEnd; if (blockEnd != NULL) { newLine(code); - for(size_t i = 0; i < strlen(blockEnd); i++) - inputSymbol(code, blockEnd[i]); + + while(*blockEnd) + inputSymbol(code, *blockEnd++); + upLine(code); goEnd(code); - } - doTab(code, false, true); } +} static void setFindMode(Code* code) { @@ -1589,11 +1588,6 @@ static void processKeyboard(Code* code) else if(keyWasPressed(tic_key_backspace)) backspaceWord(code); else usedKeybinding = false; } - else if(shift) - { - if(keyWasPressed(tic_key_return)) newLineAutoClose(code); - else usedKeybinding = false; - } else if(alt) { if(keyWasPressed(tic_key_left)) leftWord(code); @@ -1617,6 +1611,15 @@ static void processKeyboard(Code* code) else usedKeybinding = false; } + if(!usedKeybinding) + { + if(shift && keyWasPressed(tic_key_return)) + { + newLineAutoClose(code); + usedKeybinding = true; + } + } + if(usedClipboard || changedSelection || usedKeybinding) updateEditor(code); }
Fix RPZ's get_tld_label maxdnamelen check
@@ -118,13 +118,17 @@ get_tld_label(uint8_t* dname, size_t maxdnamelen) uint8_t* prevlab = dname; size_t dnamelen = 0; + /* one byte needed for label length */ + if(dnamelen+1 > maxdnamelen) + return NULL; + /* only root label */ if(*dname == 0) return NULL; while(*dname) { dnamelen += ((size_t)*dname)+1; - if(dnamelen > maxdnamelen) + if(dnamelen+1 > maxdnamelen) return NULL; dname = dname+((size_t)*dname)+1; if(*dname != 0)
docs/utime: Explicitly describe that ticks_ms(), etc. return small int. I.e. never allocate memory.
@@ -78,7 +78,8 @@ Functions .. function:: ticks_ms() Returns an increasing millisecond counter with an arbitrary reference point, that - wraps around after some value. + wraps around after some value. The returned value is guaranteed to be a `small integer`, + i.e. this function works without memory allocation. The wrap-around value is not explicitly exposed, but we will refer to it as *TICKS_MAX* to simplify discussion. Period of the values is @@ -99,7 +100,8 @@ Functions .. function:: ticks_us() - Just like `ticks_ms()` above, but in microseconds. + Just like `ticks_ms()` above, but in microseconds. The returned value is + guaranteed to be a `small integer`. .. function:: ticks_cpu() @@ -112,6 +114,8 @@ Functions function is intended for very fine benchmarking or very tight real-time loops. Avoid using it in portable code. + The returned value is guaranteed to be a `small integer`. + Availability: Not every port implements this function.
Update sys_a.s SYS_setInterruptMaskLevel also set internal saved int level so it's not overwritten when using SYS_enablesInts()
@@ -46,6 +46,7 @@ SYS_setInterruptMaskLevel: move.w 6(%sp),%d0 | d0 = value andi.w #0x07,%d0 + move.w %d0,intLevelSave | overwrite intLevelSave so we do not lost new interrupt mask ori.w #0x20,%d0 lsl.w #8,%d0 move.w %d0,%sr
Port to new API for
#include "fire.hpp" -using namespace engine; - -using namespace graphics; +using namespace blit; uint8_t logo[16][16] = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, @@ -40,8 +38,8 @@ uint8_t __pb[screen_width * screen_height] __attribute__((section(".fb"))); /* create surfaces */ //surface fb((uint8_t *)__fb, size(screen_width, screen_height), pixel_format::RGB); -surface m((uint8_t *)__m, size(screen_width, screen_height), pixel_format::M); -surface fbb((uint8_t *)__pb, size(screen_width, screen_height), pixel_format::P); +surface m((uint8_t *)__m, pixel_format::M, size(screen_width, screen_height)); +surface fbb((uint8_t *)__pb, pixel_format::P, size(screen_width, screen_height)); /* setup */ void init() { @@ -328,7 +326,7 @@ void render(uint32_t time_ms) { void update(uint32_t time) { - if (pressed(input::A)) { + if (pressed(button::A)) { set_screen_mode(screen_mode::lores); } else {
Update PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE
*/ #define PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE(input_length) \ (PSA_ROUND_UP_TO_MULTIPLE(PSA_BLOCK_CIPHER_BLOCK_MAX_SIZE, \ - (input_length) + PSA_BLOCK_CIPHER_BLOCK_MAX_SIZE)) + (input_length) + 1) + \ + PSA_CIPHER_IV_MAX_SIZE) /** The maximum size of the output of psa_cipher_decrypt(), in bytes. *
Add GPose target
@@ -11,6 +11,7 @@ namespace FFXIVClientStructs.FFXIV.Client.Game.Control { [FieldOffset(0x80)] public GameObject* Target; [FieldOffset(0x88)] public GameObject* SoftTarget; + [FieldOffset(0x98)] public GameObject* GPoseTarget; [FieldOffset(0xD0)] public GameObject* MouseOverTarget; [FieldOffset(0xF8)] public GameObject* FocusTarget; [FieldOffset(0x110)] public GameObject* PreviousTarget;
Change Azure SonarCloud job to run for every PR, rather than only for manual or scheduled builds.
@@ -83,7 +83,6 @@ jobs: # ------------------------------------------------------------------------------ - job: SonarCloud displayName: SonarCloud Ubuntu 16.04 VFX CY2019 - condition: in(variables['Build.Reason'], 'Manual', 'Schedule') timeoutInMinutes: 360 pool: vmImage: 'ubuntu-16.04'
parallel-libs/boost: packaging issues arise with newer version, revert back to v1.71.0
Summary: Boost free peer-reviewed portable C++ source libraries Name: %{pname}-%{compiler_family}-%{mpi_family}%{PROJ_DELIM} -Version: 1.73.0 +Version: 1.71.0 -%define version_exp 1_73_0 +%define version_exp 1_71_0 Release: 1%{?dist} License: BSL-1.0
When element is removed, reset its animation frame to 0
@@ -220,6 +220,7 @@ namespace carto { void BillboardRenderer::removeElement(const std::shared_ptr<Billboard>& element) { std::lock_guard<std::recursive_mutex> lock(_mutex); + element->getDrawData()->setTransition(0.0f); _elements.erase(std::remove(_elements.begin(), _elements.end(), element), _elements.end()); }
media/audiomanager: Fix resampler bug Capture should resample data based on user input.(Contrary case for playback)
@@ -331,12 +331,6 @@ static audio_manager_result_t get_actual_audio_in_card_id() if (g_audio_in_cards[i].config[j].status != AUDIO_CARD_NONE) { if (g_audio_in_cards[i].config[j].status == AUDIO_CARD_IDLE) { cnt++; - } else { - /* found activated one */ - g_audio_in_cards[i].card_id = i; - g_audio_in_cards[i].device_id = j; - g_actual_audio_in_card_id = i; - return AUDIO_MANAGER_SUCCESS; } } } @@ -361,13 +355,6 @@ static audio_manager_result_t get_actual_audio_out_card_id() if (g_audio_out_cards[i].config[j].status != AUDIO_CARD_NONE) { if (g_audio_out_cards[i].config[j].status == AUDIO_CARD_IDLE) { cnt++; - } else { - /* found activated one */ - g_audio_out_cards[i].card_id = i; - g_audio_out_cards[i].device_id = j; - g_actual_audio_out_card_id = i; - return AUDIO_MANAGER_SUCCESS; - } } } @@ -434,7 +421,7 @@ static unsigned int resample_stream_in(audio_card_info_t *card, void *data, unsi while (frames > used_frames) { srcData.data_in = card->resample.buffer + get_card_input_frames_to_byte(used_frames); srcData.input_frames = frames - used_frames; - srcData.data_out = data + get_card_input_frames_to_byte(resampled_frames); + srcData.data_out = data + get_user_input_frames_to_byte(resampled_frames); medvdbg("data_in addr = 0x%x + %d\t", srcData.data_in, get_card_input_frames_to_byte(used_frames)); if (src_simple(card->resample.handle, &srcData) != SRC_ERR_NO_ERROR) { meddbg("Fail to resample in:%d/%d, out:%d, to %u from %u\n", used_frames, frames, srcData.desired_sample_rate, srcData.origin_sample_rate); @@ -481,7 +468,7 @@ static unsigned int resample_stream_out(audio_card_info_t *card, void *data, uns while (frames > used_frames) { srcData.data_in = data + (int)(get_user_output_frames_to_byte(used_frames) * rechanneling_ratio); srcData.input_frames = frames - used_frames; - srcData.data_out = card->resample.buffer + (int)(get_user_output_frames_to_byte(resampled_frames) * rechanneling_ratio); + srcData.data_out = card->resample.buffer + (int)(get_card_output_frames_to_byte(resampled_frames) * rechanneling_ratio); medvdbg("data_out addr = 0x%x ", srcData.data_out); if (src_simple(card->resample.handle, &srcData) != SRC_ERR_NO_ERROR) { meddbg("Fail to resample in:%d/%d to %u from %u\n", used_frames, frames, srcData.desired_sample_rate, srcData.origin_sample_rate);
pocl_binary: add reqd_wg_size informations into pocl_binary_kernel structure
program.bc, so older binaries may fail to run with "undefined symbol" errors. */ /* changes for version 5: added program binary_type into header */ -#define POCLCC_VERSION 5 +/* changes for version 6: added reqd_wg_size informations into + pocl_binary_kernel structure */ +#define POCLCC_VERSION 6 /* pocl binary structures */ * 4) files are written as two strings: | uint32_t | relative filename | uint32_t | content | */ +#define OPENCL_MAX_DIMENSION 3 + typedef struct pocl_binary_kernel_s { /* the first 3 fields are sizes in bytes of the data pieces that follow @@ -92,6 +96,9 @@ typedef struct pocl_binary_kernel_s /* number of kernel local variables */ uint32_t num_locals; + /* required work-group size */ + uint64_t reqd_wg_size[OPENCL_MAX_DIMENSION]; + /* arguments and argument metadata. Note that not everything is stored * in the serialized binary */ struct pocl_argument *dyn_arguments; @@ -407,6 +414,21 @@ pocl_binary_serialize_kernel_to_buffer(cl_kernel kernel, BUFFER_STORE(kernel->num_args, uint32_t); BUFFER_STORE(kernel->num_locals, uint32_t); + if (kernel->reqd_wg_size != NULL) + { + for (i = 0; i < OPENCL_MAX_DIMENSION; i++) + { + BUFFER_STORE(kernel->reqd_wg_size[i], uint64_t); + } + } + else + { + for (i = 0; i < OPENCL_MAX_DIMENSION; i++) + { + BUFFER_STORE((uint64_t)0, uint64_t); + } + } + for (i=0; i < (kernel->num_args + kernel->num_locals); i++) { BUFFER_STORE(kernel->dyn_arguments[i].size, uint64_t); @@ -527,6 +549,11 @@ pocl_binary_deserialize_kernel_from_buffer (unsigned char **buf, BUFFER_READ(kernel->num_args, uint32_t); BUFFER_READ(kernel->num_locals, uint32_t); + for (i = 0; i < OPENCL_MAX_DIMENSION; i++) + { + BUFFER_READ(kernel->reqd_wg_size[i], uint64_t); + } + if (name_len > 0 && name_match) { *buf = *buf + kernel->struct_size; @@ -744,9 +771,14 @@ pocl_binary_get_kernel_metadata (unsigned char *binary, const char *kernel_name, kernel->arg_info = k.arg_info; free (k.kernel_name); - POCL_RETURN_ERROR_COND ((kernel->reqd_wg_size = calloc (3, sizeof (size_t))) + POCL_RETURN_ERROR_COND ((kernel->reqd_wg_size = calloc (OPENCL_MAX_DIMENSION, sizeof (size_t))) == NULL, CL_OUT_OF_HOST_MEMORY); + for (j = 0; j < OPENCL_MAX_DIMENSION; j++) + { + kernel->reqd_wg_size[j] = k.reqd_wg_size[j]; + } + return CL_SUCCESS; }
Directory Value: Do not add leaf for parent key
@@ -59,7 +59,7 @@ static int addDirectoryData (KeySet * output, Key const * const key, Key const * ELEKTRA_LOG_DEBUG ("Key `key` is null"); return ELEKTRA_PLUGIN_STATUS_NO_UPDATE; } - if (keyBaseName (next)[0] == '#' || keyIsBelow (key, next) != 1) + if (keyBaseName (next)[0] == '#' || keyIsBelow (key, next) != 1 || elektraStrCmp (keyName (key), keyName (error)) == 0) { ELEKTRA_LOG_DEBUG ("Key %s is an array or leaf value", keyName (key)); ksAppendKey (output, keyDup (key));
dev-tools/numpy: include python3-devel for latest centos7
@@ -38,6 +38,7 @@ Requires: lmod%{PROJ_DELIM} >= 7.6.1 BuildRequires: fdupes #!BuildIgnore: post-build-checks %else +BuildRequires: python3-devel %if "%{compiler_family}" == "intel" || "%{compiler_family}" == "arm" BuildRequires: python34-build-patch%{PROJ_DELIM} %endif
Add a warning if some but not all of the request-xfr patterns use XoT for a given zone
@@ -506,6 +506,15 @@ xfrd_init_slave_zone(xfrd_state_type* xfrd, struct zone_options* zone_opt) /* set refreshing anyway, if we have data it may be old */ xfrd_set_refresh_now(xzone); + /*Check all or none of acls use XoT*/ + int num=0, num_xot=0; + for (; xzone->master != NULL; xzone->master = xzone->master->next, num++) { + if (xzone->master->tls_auth_options != NULL) num_xot++; + } + if (num_xot != 0 && num != num_xot) + log_msg(LOG_WARNING, "Some but not all request-xfrs for %s have XFR-over-TLS configured", + xzone->apex_str); + xzone->node.key = xzone->apex; rbtree_insert(xfrd->zones, (rbnode_type*)xzone); }
[mod_auth] accept "nonce-secret" & "nonce_secret"
@@ -463,7 +463,8 @@ static handler_t mod_auth_require_parse_array(const array *value, array * const require = &ds->value; } else if (buffer_is_equal_string(&ds->key, CONST_STR_LEN("algorithm"))) { algos = &ds->value; - } else if (buffer_is_equal_string(&ds->key, CONST_STR_LEN("nonce_secret"))) { + } else if (buffer_is_equal_string(&ds->key, CONST_STR_LEN("nonce_secret")) + || buffer_is_equal_string(&ds->key, CONST_STR_LEN("nonce-secret"))) { nonce_secret = &ds->value; } else { log_error(errh, __FILE__, __LINE__,
Fix vulkan driver's patch version
@@ -1808,7 +1808,7 @@ static VkResult overlay_CreateSwapchainKHR( ss << "." << "0"; } else { ss << "." << VK_VERSION_MINOR(prop.driverVersion); - ss << "." << VK_VERSION_PATCH(prop.driverVersion) + 1; + ss << "." << VK_VERSION_PATCH(prop.driverVersion); } }
VERSION bump to version 2.0.226
@@ -61,7 +61,7 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) # set version of the project set(LIBYANG_MAJOR_VERSION 2) set(LIBYANG_MINOR_VERSION 0) -set(LIBYANG_MICRO_VERSION 225) +set(LIBYANG_MICRO_VERSION 226) set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION}) # set version of the library set(LIBYANG_MAJOR_SOVERSION 2)
bricks/stm32: disable scheduler movehub fw size -456
#define MICROPY_CPYTHON_COMPAT (0) #define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE) #define MICROPY_KBD_EXCEPTION (1) -#define MICROPY_ENABLE_SCHEDULER (1) +#define MICROPY_ENABLE_SCHEDULER (0) #define MICROPY_PY_UERRNO (1) #define MICROPY_PY_UERRNO_LIST \
display: Don't allow time_left to go below 0
@@ -178,6 +178,9 @@ static void display_displayLocked(honggfuzz_t * hfuzz) display_put("\n Run Time : " ESC_BOLD "%s" ESC_RESET, time_elapsed_str); if (hfuzz->runEndTime > 0) { time_t time_left = hfuzz->runEndTime - time(NULL); + if (time_left < 0) { + time_left = 0; + } if (time_left > 3600) { char end_time_str[512]; util_getLocalTime("%F %H:%M:%S", end_time_str, sizeof(end_time_str), hfuzz->runEndTime);
ulDNSHandlePacket() - check length before calculating payload size
@@ -916,7 +916,13 @@ for testing purposes, by the module iot_test_freertos_tcp.c uint32_t ulDNSHandlePacket( NetworkBufferDescriptor_t *pxNetworkBuffer ) { DNSMessage_t *pxDNSMessageHeader; -size_t uxPayloadSize = pxNetworkBuffer->xDataLength - sizeof( UDPPacket_t ); +size_t uxPayloadSize; + + /* Only proceed if the payload length indicated in the header + appears to be valid. */ + if( pxNetworkBuffer->xDataLength >= sizeof( UDPPacket_t ) ) + { + uxPayloadSize = pxNetworkBuffer->xDataLength - sizeof( UDPPacket_t ); if( uxPayloadSize >= sizeof( DNSMessage_t ) ) { @@ -928,6 +934,7 @@ size_t uxPayloadSize = pxNetworkBuffer->xDataLength - sizeof( UDPPacket_t ); uxPayloadSize, pdFALSE ); } + } /* The packet was not consumed. */ return pdFAIL;
DA: Ignore empty parse and read function parameters
@@ -744,7 +744,9 @@ ParseFunction_t DA_GetParseFunction(const std::vector<QVariant> &params) if (params.size() == 1 && params.front().type() == QVariant::Map) { const auto params1 = params.front().toMap(); - if (params1.contains("fn")) + if (params1.isEmpty()) + { } + else if (params1.contains("fn")) { fnName = params1["fn"].toString(); } @@ -780,7 +782,9 @@ ReadFunction_t DA_GetReadFunction(const std::vector<QVariant> &params) if (params.size() == 1 && params.front().type() == QVariant::Map) { const auto params1 = params.front().toMap(); - if (params1.contains("fn")) + if (params1.isEmpty()) + { } + else if (params1.contains("fn")) { fnName = params1["fn"].toString(); }
pid: fix typo in next_pid_term
@@ -372,11 +372,11 @@ int next_pid_term() { switch (current_pid_term) { case 0: - current_pid_term_pointer = profile.pid.ki.axis; + current_pid_term_pointer = profile.pid.kp.axis; current_pid_term = 1; break; case 1: - current_pid_term_pointer = profile.pid.kd.axis; + current_pid_term_pointer = profile.pid.ki.axis; current_pid_term = 2; break; case 2:
Pointer over the set location to seem buttonish
@@ -65,7 +65,7 @@ export default class WeatherTile extends Component { style={{left: 8, top: 4}}> Weather </p> - <p className="absolute w-100 flex-col body-regular white" style={{verticalAlign: "bottom", bottom: 8, left: 8, cursor: "default"}}>Set location</p> + <p className="absolute w-100 flex-col body-regular white" style={{verticalAlign: "bottom", bottom: 8, left: 8, cursor: "pointer"}}>Set location</p> </div> )); }
fix bug in multipart data
#include "rhodes/JNINetRequest.h" #include <common/RhodesApp.h> +#include <common/RhoFilePath.h> #include <common/RhoConf.h> #include <net/URI.h> @@ -293,8 +294,8 @@ size_t rho::net::JNINetRequest::processMultipartItems(VectorPtr<CMultipartItem*> if ( oItem.m_strFileName.length() == 0 ) { if (oItem.m_strFilePath.length() > 0) { - //common::CFilePath oPath(oItem.m_strFilePath); - //oItem.m_strFileName = oPath.getBaseName(); + common::CFilePath oPath(oItem.m_strFilePath); + oItem.m_strFileName = oPath.getBaseName(); } }
Fixing failure to invalidate indicator
@@ -950,6 +950,8 @@ static void next_color_mode(lv_obj_t * cpicker) static void refr_indic_pos(lv_obj_t * cpicker) { + invalidate_indic(cpicker); + lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker); lv_coord_t w = lv_obj_get_width(cpicker); lv_coord_t h = lv_obj_get_height(cpicker);
remove guards for write_key_share
@@ -798,7 +798,7 @@ static int ssl_tls13_write_selected_version_ext( mbedtls_ssl_context *ssl, return( 0 ); } -#if defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED) + /* Generate and export a single key share. For hybrid KEMs, this can * be called multiple times with the different components of the hybrid. */ @@ -894,7 +894,7 @@ static int ssl_tls13_write_key_share_ext( mbedtls_ssl_context *ssl, *out_len = p - buf; return( 0 ); } -#endif /* MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED */ + /* * Structure of ServerHello message: @@ -920,8 +920,7 @@ static int ssl_tls13_write_server_hello_body( mbedtls_ssl_context *ssl, /* Buffer management */ unsigned char *p = buf; - unsigned char *start = buf; - unsigned char *extension_start; + unsigned char *p_extensions_len; *out_len = 0; @@ -985,7 +984,7 @@ static int ssl_tls13_write_server_hello_body( mbedtls_ssl_context *ssl, /* Extensions */ MBEDTLS_SSL_CHK_BUF_PTR( p, end, 2 ); - extension_start = p; + p_extensions_len = p; p += 2; /* Add supported_version extension */ @@ -998,7 +997,6 @@ static int ssl_tls13_write_server_hello_body( mbedtls_ssl_context *ssl, } p += output_len; -#if defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED) if( mbedtls_ssl_conf_tls13_some_ephemeral_enabled( ssl ) ) { ret = ssl_tls13_write_key_share_ext( ssl, p, end, &output_len ); @@ -1006,16 +1004,16 @@ static int ssl_tls13_write_server_hello_body( mbedtls_ssl_context *ssl, return( ret ); p += output_len; } -#endif /* MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED */ /* Write length information */ - MBEDTLS_PUT_UINT16_BE( p - extension_start - 2, extension_start, 0 ); + MBEDTLS_PUT_UINT16_BE( p - p_extensions_len - 2, p_extensions_len, 0 ); - MBEDTLS_SSL_DEBUG_BUF( 4, "server hello extensions", extension_start, p - extension_start ); + MBEDTLS_SSL_DEBUG_BUF( 4, "server hello extensions", + p_extensions_len, p - p_extensions_len ); - *out_len = p - start; + *out_len = p - buf; - MBEDTLS_SSL_DEBUG_BUF( 3, "server hello", start, *out_len ); + MBEDTLS_SSL_DEBUG_BUF( 3, "server hello", buf, *out_len ); return( ret ); }
Fix compiler warning from Clang. Per build farm. Discussion:
@@ -2238,7 +2238,7 @@ static struct config_int ConfigureNamesInt[] = GUC_UNIT_MB }, &min_dynamic_shared_memory, - 0, 0, Min(INT_MAX, SIZE_MAX / 1024 / 1024), + 0, 0, (int) Min((size_t) INT_MAX, SIZE_MAX / (1024 * 1024)), NULL, NULL, NULL },
Java: fixing typo in context initialization.
@@ -55,7 +55,7 @@ nxt_java_initContext(JNIEnv *env, jobject cl) } nxt_java_Context_stop = (*env)->GetMethodID(env, cls, "stop", "()V"); - if (nxt_java_Context_service == NULL) { + if (nxt_java_Context_stop == NULL) { nxt_unit_warn(NULL, "nginx.unit.Context.stop() not found"); goto failed; }
glfs: update the glfs config descritions and add usage of creation
@@ -699,13 +699,25 @@ out: return SAM_STAT_TASK_SET_FULL; } +/* + * For backstore creation + * + * Specify volume, hostname and filepath e.g, + * + * $ targetcli /backstores/user:glfs create $blockname $size \ + * $volume@$hostname/$filepath + * + * volume: must be the name of an existing Gluster volume. + * hostname: the hostname or the IP address + * filepath: is the path of the backing file in Gluster volume. + */ static const char glfs_cfg_desc[] = "glfs config string is of the form:\n" - "\"volume@hostname/filename\"\n" + "\"$volume@$hostname/$filepath\"\n" "where:\n" " volume: The volume on the Gluster server\n" " hostname: The server's hostname\n" - " filename: The backing file"; + " filepath: The path of the backing file"; struct tcmur_handler glfs_handler = { .name = "Gluster glfs handler",
Fix paths to data files
@@ -59,7 +59,7 @@ Defining curves using row index for X coordinate Here are the first 10 lines of an example of a file representing curves where the *abscissa* (e.g. x-coordinate) is implied by the row number (starting from 0) in the file. In this example, the values on each row are separated by commas. -.. literalinclude:: data_examples/curves.csv +.. literalinclude:: data_examples/curves_nox.csv :lines: 1-10 Here is the Python script that created the file. @@ -89,7 +89,7 @@ In this example, the values on each row are separated by spaces. Here are the first 10 lines of an example of a file representing 3D points. -.. literalinclude:: data_examples/points.csv +.. literalinclude:: data_examples/points.txt :lines: 1-10 Here is the Python script that created the file. @@ -133,7 +133,7 @@ The remaining lines consist of rows, where each row represents the values for a Here is an example of a file listing representing 3D points. In this example, the values on each row are separated by spaces. -.. literalinclude:: data_examples/array.csv +.. literalinclude:: data_examples/array.txt Here is the Python script that created the file.
u3: remove unwanted assertions in emergency printf
@@ -98,28 +98,22 @@ _cm_punt(u3_noun tax) } #endif -static void _write(int fd, const void *buf, size_t count) -{ - if (count != write(fd, buf, count)){ - u3l_log("write failed\r\n"); - c3_assert(0); - } -} - - /* _cm_emergency(): write emergency text to stderr, never failing. */ static void _cm_emergency(c3_c* cap_c, c3_l sig_l) { - _write(2, "\r\n", 2); - _write(2, cap_c, strlen(cap_c)); + c3_i ret_i; + + ret_i = write(2, "\r\n", 2); + ret_i = write(2, cap_c, strlen(cap_c)); if ( sig_l ) { - _write(2, ": ", 2); - _write(2, &sig_l, 4); + ret_i = write(2, ": ", 2); + ret_i = write(2, &sig_l, 4); } - _write(2, "\r\n", 2); + + ret_i = write(2, "\r\n", 2); } static void _cm_overflow(void *arg1, void *arg2, void *arg3)
doc: add limitation for UEFI services add limitation for UEFI services
@@ -162,6 +162,11 @@ The Boot process proceeds as follows: bootloader through dm-verity #. Virtual bootloader starts the User-side verified boot process +.. note:: + To avoid hardware resources conflict with ACRN hypervisor, UEFI + services shall not use IOMMU. In addtion, currently we only support + UEFI timer with HPET MSI. + Direct boot mode ================
wsman-soap: account for NULL from ws_xml_get_node_text Bail early if ws_xml_get_node_text returns NULL.
@@ -252,8 +252,18 @@ create_enum_info(SoapOpH op, enumInfo->releaseproc = wsman_get_release_endpoint(epcntx, indoc); to = ws_xml_get_node_text( ws_xml_get_child(header, 0, XML_NS_ADDRESSING, WSA_TO)); + if (to == NULL) { + error("No to node"); + fault_code = WSMAN_INTERNAL_ERROR; + goto DONE; + } uri = ws_xml_get_node_text( ws_xml_get_child(header, 0, XML_NS_WS_MAN, WSM_RESOURCE_URI)); + if (uri == NULL) { + error("No uri node"); + fault_code = WSMAN_INTERNAL_ERROR; + goto DONE; + } enumInfo->epr_to = u_strdup(to); enumInfo->epr_uri = u_strdup(uri); @@ -320,6 +330,12 @@ wsman_verify_enum_info(SoapOpH op, XML_NS_ADDRESSING, WSA_TO)); char *uri= ws_xml_get_node_text(ws_xml_get_child(header, 0, XML_NS_WS_MAN, WSM_RESOURCE_URI)); + if (to == NULL || uri == NULL) { + error("No to or uri node"); + status->fault_code = WSMAN_INTERNAL_ERROR; + status->fault_detail_code = 0; + return 0; + } if (strcmp(enumInfo->epr_to, to) != 0 || strcmp(enumInfo->epr_uri, uri) != 0 ) {
Add host access callback to auth test script.
+def allow_access(environ, host): + print('HOST', host, environ['REQUEST_URI']) + return True + def check_password(environ, user, password): print('USER', user, environ['REQUEST_URI']) if user == 'spy':
fix multiclass in python
@@ -11,6 +11,7 @@ namespace NCatboostCuda { if (TargetHelper) { TargetHelper->MakeTargetAndWeights(!IsTest, &DataProvider.Targets, &DataProvider.Weights); + DataProvider.ClassificationTargetHelper = TargetHelper; } DataProvider.CatFeatureIds.insert(Pool.CatFeatures.begin(), Pool.CatFeatures.end());
uname: Implement error handling
@@ -28,7 +28,14 @@ static void elektraAddUname (KeySet * returned, Key * parentKey) struct utsname buf; - uname (&buf); // TODO: handle error + if (uname (&buf) < 0) + { + dir = keyDup (parentKey, KEY_CP_ALL); + keyAddBaseName (dir, "error"); + keySetString (dir, strerror (errno)); + ksAppendKey (returned, dir); + return; + } dir = keyDup (parentKey, KEY_CP_ALL); keyAddBaseName (dir, "sysname");
YAML CPP: Use explicit imports in read code
#include <sstream> -using namespace std; -using namespace kdb; - namespace { + +using std::istringstream; +using std::ostringstream; +using std::string; +using std::to_string; + +using kdb::Key; +using kdb::KeySet; + /** * @brief This function converts a given number to an array base name. *
Travis: Use latest version of LLVM on Linux
@@ -167,14 +167,14 @@ matrix: addons: apt: sources: - - llvm-toolchain-trusty-6.0 + - llvm-toolchain-trusty-7 - ubuntu-toolchain-r-test packages: - - clang-6.0 + - clang-7 env: - ENABLE_ASAN=ON - - CC_COMPILER=clang-6.0 - - CXX_COMPILER=clang++-6.0 + - CC_COMPILER=clang-7 + - CXX_COMPILER=clang++-7 - TEST_COMMAND='ninja run_all' # FULL: Build full version of Elektra (BUILD_FULL=ON) @@ -240,14 +240,14 @@ matrix: addons: apt: sources: - - llvm-toolchain-trusty-6.0 + - llvm-toolchain-trusty-7 - ubuntu-toolchain-r-test packages: - - clang-6.0 - - clang-format-6.0 + - clang-7 + - clang-format-7 env: - - CC_COMPILER=clang-6.0 - - CXX_COMPILER=clang++-6.0 + - CC_COMPILER=clang-7 + - CXX_COMPILER=clang++-7 # MMAP: Enable mmapstorage as default
Implement Ethereum transaction signing Includes RLP encoding logic.
[%bytes p=octs] == :: + :: raw transaction data + +$ transaction + $: nonce=@ud + gas-price=@ud + gas=@ud + to=address + value=@ud + data=@ux + chain-id=@ux + == + :: :: ethereum address, 20 bytes. ++ address @ux :: =, mimes:html =, ethe |% + ++ sign-transaction + =, crypto + |= [tx=transaction pk=@] + ^- @ux + =/ dat=@ + %- encode-atoms:rlp + tx(chain-id [chain-id.tx 0 0 ~]) + =/ hash=@ + =+ wid=(met 3 dat) + %- keccak-256:keccak + [wid (rev 3 wid dat)] + =+ (ecdsa-raw-sign:secp256k1:secp hash pk) + %- encode-atoms:rlp + tx(chain-id [:(add (mul chain-id.tx 2) 35 v) r s ~]) + :: + :: rlp en/decoding + ::NOTE https://github.com/ethereum/wiki/wiki/RLP + :: + ++ rlp + |% + ::NOTE rlp encoding doesn't really care about leading zeroes, + :: but because we need to disinguish between no-bytes zero + :: and one-byte zero (and also empty list) we end up with + :: this awful type... + +$ item + $% [%l l=(list item)] + [%b b=byts] + == + :: + :: treat atoms as list of items + ++ encode-atoms + |= l=(list @) + %+ encode %l + %+ turn l + |=(a=@ b+[(met 3 a) a]) + :: + ++ encode + |= in=item + ^- @ + ?- -.in + %b + ?: &(=(1 wid.b.in) (lth dat.b.in 0x80)) + dat.b.in + %^ cat 3 dat.b.in + ::TODO unsure if this should pass wid or (met 3 dat)... + (encode-length wid.b.in 0x80) + :: + %l + =/ out=@ + %+ roll l.in + |= [ni=item en=@] + (cat 3 (encode ni) en) + %^ cat 3 out + (encode-length (met 3 out) 0xc0) + == + :: + ++ encode-length + |= [len=@ off=@] + ?: (lth len 56) (add len off) + =- (cat 3 len -) + :(add (met 3 len) off 55) + :: + ::TODO decode + :: + -- + :: :: making calls to nodes :: :: see also the json rpc api spec:
Use sym_FindSymbol() where possible
@@ -207,7 +207,7 @@ struct sSymbol *findsymbol(char *s, struct sSymbol *scope) } /* - * Find a symbol by name and scope + * Find a symbol by name, with automatically determined scope */ struct sSymbol *sym_FindSymbol(char *tzName) { @@ -256,14 +256,7 @@ void sym_Purge(char *tzName) */ uint32_t sym_isConstDefined(char *tzName) { - struct sSymbol *psym, *pscope; - - if (*tzName == '.') - pscope = pScope; - else - pscope = NULL; - - psym = findsymbol(tzName, pscope); + struct sSymbol *psym = sym_FindSymbol(tzName); if (psym && (psym->nType & SYMF_DEFINED)) { uint32_t mask = SYMF_EQU | SYMF_SET | SYMF_MACRO | SYMF_STRING; @@ -280,19 +273,9 @@ uint32_t sym_isConstDefined(char *tzName) uint32_t sym_isDefined(char *tzName) { - struct sSymbol *psym, *pscope; + struct sSymbol *psym = sym_FindSymbol(tzName); - if (*tzName == '.') - pscope = pScope; - else - pscope = NULL; - - psym = findsymbol(tzName, pscope); - - if (psym && (psym->nType & SYMF_DEFINED)) - return 1; - else - return 0; + return (psym && (psym->nType & SYMF_DEFINED)); } /* @@ -300,21 +283,9 @@ uint32_t sym_isDefined(char *tzName) */ uint32_t sym_isConstant(char *s) { - struct sSymbol *psym, *pscope; + struct sSymbol *psym = sym_FindSymbol(s); - if (*s == '.') - pscope = pScope; - else - pscope = NULL; - - psym = findsymbol(s, pscope); - - if (psym != NULL) { - if (psym->nType & SYMF_CONST) - return 1; - } - - return 0; + return (psym && (psym->nType & SYMF_CONST)); } /* @@ -337,14 +308,7 @@ char *sym_GetStringValue(char *tzSym) */ uint32_t sym_GetConstantValue(char *s) { - struct sSymbol *psym, *pscope; - - if (*s == '.') - pscope = pScope; - else - pscope = NULL; - - psym = findsymbol(s, pscope); + struct sSymbol *psym = sym_FindSymbol(s); if (psym != NULL) { if (psym->nType & SYMF_CONST) @@ -363,14 +327,7 @@ uint32_t sym_GetConstantValue(char *s) */ uint32_t sym_GetDefinedValue(char *s) { - struct sSymbol *psym, *pscope; - - if (*s == '.') - pscope = pScope; - else - pscope = NULL; - - psym = findsymbol(s, pscope); + struct sSymbol *psym = sym_FindSymbol(s); if (psym != NULL) { if ((psym->nType & SYMF_DEFINED)) {
VERSION bump to version 1.3.63
@@ -31,7 +31,7 @@ endif() # micro version is changed with a set of small changes or bugfixes anywhere in the project. set(SYSREPO_MAJOR_VERSION 1) set(SYSREPO_MINOR_VERSION 3) -set(SYSREPO_MICRO_VERSION 62) +set(SYSREPO_MICRO_VERSION 63) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
Adding terminal guard around tty column/row calculations
@@ -919,10 +919,13 @@ u3_term_get_blew(c3_l tid_l) c3_l col_l, row_l; struct winsize siz_u; - if ( uty_u && (0 == ioctl(uty_u->fid_i, TIOCGWINSZ, &siz_u)) ) { + if ( (c3y == u3_Host.ops_u.tem) && + uty_u && (0 == ioctl(uty_u->fid_i, TIOCGWINSZ, &siz_u)) ) + { col_l = siz_u.ws_col; row_l = siz_u.ws_row; - } else { + } + else { col_l = 80; row_l = 24; }
Don't capture curloperation in the lambda
@@ -73,9 +73,17 @@ namespace ARIASDK_NS_BEGIN { auto curlOperation = std::make_shared<CurlHttpOperation>(curlRequest->m_method, curlRequest->m_url, callback, requestHeaders, curlRequest->m_body); curlRequest->SetOperation(curlOperation); + auto operationLifetime = std::weak_ptr<CurlHttpOperation>(curlOperation); - // Hold on to 'curlOperation' in lambda to ensure its lifetime until operation completes - curlOperation->SendAsync([this, curlOperation, callback, requestId](CurlHttpOperation& operation) { + // Make sure 'curlOperation' is valid before executing the lambda. + // The liftime of curlOperation is guarnteed by the curlRequest. + curlOperation->SendAsync([this, operationLifetime, callback, requestId](CurlHttpOperation& operation) { + auto curlOperation = operationLifetime.lock(); + if (!curlOperation) + { + LOG_WARN("The curl operation no longer exists."); + return; + } this->EraseRequest(requestId); auto response = std::unique_ptr<SimpleHttpResponse>(new SimpleHttpResponse(requestId));
fix bug in multithreaded quantization exception handling
@@ -64,7 +64,7 @@ static void ApplyBlockImpl( } }; if (executor) { - executor->ExecRange(applyOnBlock, 0, blockParams.GetBlockCount(), TLocalExecutor::WAIT_COMPLETE); + executor->ExecRangeWithThrow(applyOnBlock, 0, blockParams.GetBlockCount(), TLocalExecutor::WAIT_COMPLETE); } else { applyOnBlock(0); } @@ -171,7 +171,7 @@ void TModelCalcerOnPool::ApplyModelMulti( end = Min<int>(end, Model->GetTreeCount()); } - Executor->ExecRange( + Executor->ExecRangeWithThrow( [&, this](int blockId) { const int blockFirstId = BlockParams.FirstId + blockId * BlockParams.GetBlockSize(); const int blockLastId = Min(BlockParams.LastId, blockFirstId + BlockParams.GetBlockSize()); @@ -226,7 +226,7 @@ TModelCalcerOnPool::TModelCalcerOnPool( BlockParams.SetBlockCount(threadCount); QuantizedDataForThreads.resize(BlockParams.GetBlockCount()); - executor->ExecRange( + executor->ExecRangeWithThrow( [this, objectsData](int blockId) { const int blockFirstIdx = BlockParams.FirstId + blockId * BlockParams.GetBlockSize(); const int blockLastIdx = Min(BlockParams.LastId, blockFirstIdx + BlockParams.GetBlockSize()); @@ -317,7 +317,7 @@ static void CalcLeafIndexesMultiImpll( }; if (executor) { - executor->ExecRange(applyOnBlock, 0, blockParams.GetBlockCount(), TLocalExecutor::WAIT_COMPLETE); + executor->ExecRangeWithThrow(applyOnBlock, 0, blockParams.GetBlockCount(), TLocalExecutor::WAIT_COMPLETE); } else { applyOnBlock(0); }
Fix FreeBSD vnet stuff and cleanup debug output.
#ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet/sctputil.c 359288 2020-03-24 23:04:07Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet/sctputil.c 359301 2020-03-25 13:19:41Z tuexen $"); #endif #include <netinet/sctp_os.h> @@ -1746,12 +1746,12 @@ sctp_timeout_handler(void *t) (type != SCTP_TIMER_TYPE_SHUTDOWNGUARD) && (type != SCTP_TIMER_TYPE_ASOCKILL))) { SCTP_INP_DECR_REF(inp); + SCTPDBG(SCTP_DEBUG_TIMER2, + "Timer type %d handler exiting due to closed socket.\n", + type); #if defined(__FreeBSD__) && __FreeBSD_version >= 801000 CURVNET_RESTORE(); #endif - SCTPDBG(SCTP_DEBUG_TIMER2, - "Timer type = %d handler exiting due to closed socket\n", - type); return; } } @@ -1763,12 +1763,12 @@ sctp_timeout_handler(void *t) if (inp) { SCTP_INP_DECR_REF(inp); } + SCTPDBG(SCTP_DEBUG_TIMER2, + "Timer type %d handler exiting due to CLOSED association.\n", + type); #if defined(__FreeBSD__) && __FreeBSD_version >= 801000 CURVNET_RESTORE(); #endif - SCTPDBG(SCTP_DEBUG_TIMER2, - "Timer type = %d handler exiting due to CLOSED association\n", - type); return; } } @@ -1781,12 +1781,12 @@ sctp_timeout_handler(void *t) if (stcb) { atomic_add_int(&stcb->asoc.refcnt, -1); } + SCTPDBG(SCTP_DEBUG_TIMER2, + "Timer type %d handler exiting due to not being active.\n", + type); #if defined(__FreeBSD__) && __FreeBSD_version >= 801000 CURVNET_RESTORE(); #endif - SCTPDBG(SCTP_DEBUG_TIMER2, - "Timer type = %d handler exiting due to not being active\n", - type); return; } tmr->stopped_from = 0xa004; @@ -1801,12 +1801,12 @@ sctp_timeout_handler(void *t) if (inp) { SCTP_INP_DECR_REF(inp); } + SCTPDBG(SCTP_DEBUG_TIMER2, + "Timer type %d handler exiting due to CLOSED association.\n", + type); #if defined(__FreeBSD__) && __FreeBSD_version >= 801000 CURVNET_RESTORE(); #endif - SCTPDBG(SCTP_DEBUG_TIMER2, - "Timer type = %d handler exiting due to CLOSED association\n", - type); return; } } else if (inp != NULL) { @@ -2161,7 +2161,7 @@ out_decr: } out_no_decr: - SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type = %d handler finished\n", type); + SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type %d handler finished.\n", type); #if defined(__FreeBSD__) #if __FreeBSD_version >= 801000 CURVNET_RESTORE();
BugID:23823143: Added ramfs unregister API
@@ -25,6 +25,15 @@ extern "C" { */ int32_t ramfs_register(const char *mount_path); +/** + * ramfs unregister + * + * @return 0 on success, negative error on failure + * + */ +int32_t ramfs_unregister(const char *mount_path); + + /** @} */ #ifdef __cplusplus
Update documentation following review comment
@@ -282,7 +282,7 @@ void mbedtls_mpi_core_shift_r( mbedtls_mpi_uint *X, size_t limbs, * * Calculates `A + B` where `A` and `B` have the same size. * - * This function operates modulo 2^(biL*limbs) and returns the carry + * This function operates modulo `2^(biL*limbs)` and returns the carry * (1 if there was a wraparound, and 0 otherwise). * * \p X may be aliased to \p A or \p B.
update dependencies requirement
@@ -18,15 +18,21 @@ make bot deployment deadly simple. The primary design goals are: ## Build ### Install dependencies: -For Debian and Ubuntu +For Ubuntu ``` sudo apt-get install -y build-essential libssl-dev +sudo apt-get install -y libcurl4-openssl-dev ``` -curl-7.66 or higher is needed. + +For Debian +``` +sudo apt-get install -y build-essential libssl-dev +``` Get the latest libcurl from https://packages.debian.org/unstable/libcurl4-openssl-dev ``` -sudo dpkg -i libcurl4-openssl-dev_7.74.0-1_<your-arch>.deb +wget http://ftp.us.debian.org/debian/pool/main/c/curl/libcurl4-openssl-dev_7.74.0-1_amd64.deb +sudo dpkg -i libcurl4-openssl-dev_7.74.0-1_amd64.deb ```
git-archive-all: Don't include non-submodules in the archive
@@ -220,12 +220,8 @@ superfile=`head -n 1 $TMPFILE` if [ $VERBOSE -eq 1 ]; then echo -n "looking for subprojects..." fi -# find all '.git' dirs, these show us the remaining to-be-archived dirs -# we only want directories that are below the current directory -find . -mindepth 2 -name '.git' -type d -print | sed -e 's/^\.\///' -e 's/\.git$//' >> $TOARCHIVE -# as of version 1.7.8, git places the submodule .git directories under the superprojects .git dir -# the submodules get a .git file that points to their .git dir. we need to find all of these too -find . -mindepth 2 -name '.git' -type f -print | xargs grep -l "gitdir" | sed -e 's/^\.\///' -e 's/\.git$//' >> $TOARCHIVE + +git config --file .gitmodules --get-regexp path | cut -d' ' -f2 | sed -e 's/$/\//' >> $TOARCHIVE if [ $VERBOSE -eq 1 ]; then echo "done" echo " found:"
doc: fix links from Object to values Fix two broken links from the documentation for the Object class to the page describing values.
### **same**(obj1, obj2) Returns `true` if *obj1* and *obj2* are the same. For [value -types](../values.html), this returns `true` if the objects have equivalent +types](../../values.html), this returns `true` if the objects have equivalent state. In other words, numbers, strings, booleans, and ranges compare by value. For all other objects, this returns `true` only if *obj1* and *obj2* refer to @@ -26,7 +26,7 @@ Returns `false`, since most objects are considered [true][]. ### **==**(other) and **!=**(other) operators Compares two objects using built-in equality. This compares [value -types](../values.html) by value, and all other objects are compared by +types](../../values.html) by value, and all other objects are compared by identity&mdash;two objects are equal only if they are the exact same object. ### **is**(class) operator
added correct include
@@ -12,6 +12,21 @@ struct apstaessidlist_s typedef struct apstaessidlist_s apstaessidl_t; #define APSTAESSIDLIST_SIZE (sizeof(apstaessidl_t)) /*===========================================================================*/ +static int sort_apstaessidlist_by_ap_sta(const void *a, const void *b) +{ +const apstaessidl_t *ia = (const apstaessidl_t *)a; +const apstaessidl_t *ib = (const apstaessidl_t *)b; +if(memcmp(ia->mac_ap, ib->mac_ap, 6) > 0) + return 1; +else if(memcmp(ia->mac_ap, ib->mac_ap, 6) < 0) + return -1; +if(memcmp(ia->mac_sta, ib->mac_sta, 6) > 0) + return 1; +else if(memcmp(ia->mac_sta, ib->mac_sta, 6) < 0) + return -1; +return 0; +} +/*===========================================================================*/ static int sort_apstaessidlist_by_ap_essid(const void *a, const void *b) { const apstaessidl_t *ia = (const apstaessidl_t *)a;
OcConsoleControlEntryModeLib: Look for ConsoleControl on other handles
@@ -27,6 +27,7 @@ OcConsoleControlEntryModeInit ( { EFI_STATUS Status; EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl; + // // On several firmwares we need to use legacy console control protocol to // switch to text mode, otherwise a black screen will be shown. @@ -36,6 +37,14 @@ OcConsoleControlEntryModeInit ( &gEfiConsoleControlProtocolGuid, (VOID **) &ConsoleControl ); + if (EFI_ERROR (Status)) { + Status = gBS->LocateProtocol ( + &gEfiConsoleControlProtocolGuid, + NULL, + (VOID **) &ConsoleControl + ); + } + if (!EFI_ERROR (Status)) { ConsoleControl->SetMode ( ConsoleControl,
slock hotkey
@@ -77,6 +77,7 @@ static const Layout layouts[] = { static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ static const char *dmenucmd[] = {"dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL}; static const char *termcmd[] = {"st", NULL}; +static const char *slockcmd[] = {"slock", NULL}; static const char *rangercmd[] = { "st", "-e", "sh", "-c", "ranger", NULL }; #include "push.c" @@ -84,6 +85,7 @@ static Key keys[] = { /* modifier key function argument */ {MODKEY, XK_r, spawn, {.v = rangercmd } }, {MODKEY, XK_p, spawn, {.v = dmenucmd}}, + {MODKEY | ControlMask, XK_l, spawn, {.v = slockcmd}}, {MODKEY | ShiftMask, XK_Return, spawn, {.v = termcmd}}, {MODKEY, XK_b, togglebar, {0}}, {MODKEY, XK_j, focusstack, {.i = +1}},
[persistence] IMPROVE: do not increase the refcount when allocate an hash_item.
@@ -10076,8 +10076,9 @@ item_apply_kv_link(const char *key, const uint32_t nkey, if (ret == ENGINE_SUCCESS) { /* Override the cas with the master's cas. */ item_set_cas(new_it, cas); + } else { + do_item_free(new_it); } - do_item_release(new_it); } else { ret = ENGINE_ENOMEM; if (old_it) { /* Remove inconsistent hash_item */ @@ -10113,7 +10114,9 @@ item_apply_list_link(const char *key, const uint32_t nkey, item_attr *attrp) if (new_it) { /* Link the new item into the hash table */ ret = do_item_link(new_it); - do_item_release(new_it); + if (ret != ENGINE_SUCCESS) { + do_item_free(new_it); + } } else { ret = ENGINE_ENOMEM; } @@ -10152,7 +10155,9 @@ item_apply_set_link(const char *key, const uint32_t nkey, item_attr *attrp) if (new_it) { /* Link the new item into the hash table */ ret = do_item_link(new_it); - do_item_release(new_it); + if (ret != ENGINE_SUCCESS) { + do_item_free(new_it); + } } else { ret = ENGINE_ENOMEM; } @@ -10191,7 +10196,9 @@ item_apply_map_link(const char *key, const uint32_t nkey, item_attr *attrp) if (new_it) { /* Link the new item into the hash table */ ret = do_item_link(new_it); - do_item_release(new_it); + if (ret != ENGINE_SUCCESS) { + do_item_free(new_it); + } } else { ret = ENGINE_ENOMEM; } @@ -10238,7 +10245,9 @@ item_apply_btree_link(const char *key, const uint32_t nkey, item_attr *attrp) } /* Link the new item into the hash table */ ret = do_item_link(new_it); - do_item_release(new_it); + if (ret != ENGINE_SUCCESS) { + do_item_free(new_it); + } } else { ret = ENGINE_ENOMEM; }
jinlon: Update fan table BRANCH=firmware-hatch-12672.B TEST=Thermal team verified thermal policy is expected.
@@ -76,7 +76,7 @@ static const struct fan_step fan_table_clamshell[] = { }, { /* level 6 */ - .on = {65, -1, 62, 40}, + .on = {65, -1, 64, 40}, .off = {62, -1, 61, 39}, .rpm = {5400, 5300}, }, @@ -84,7 +84,7 @@ static const struct fan_step fan_table_clamshell[] = { /* level 7 */ .on = {100, -1, 100, 100}, .off = {65, -1, 62, 40}, - .rpm = {6000, 5900}, + .rpm = {6000, 6150}, }, };
Use StackIndex instead of int for settable index
@@ -972,8 +972,8 @@ setmetatable idx = liftLua $ \l -> lua_setmetatable l (fromStackIndex idx) -- -- See also: -- <https://www.lua.org/manual/5.3/manual.html#lua_settable lua_settable>. -settable :: Int -> Lua () -settable index = liftLua $ \l -> lua_settable l (fromIntegral index) +settable :: StackIndex -> Lua () +settable index = liftLua $ \l -> lua_settable l (fromStackIndex index) -- | Accepts any index, or 0, and sets the stack top to this index. If the new -- top is larger than the old one, then the new elements are filled with nil. If
drivers/serial: remove unreachable statement The slot has the address of fds->priv and fds->priv is checked at previous conditional so that slot can't be null.
@@ -1071,13 +1071,6 @@ int uart_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup) struct pollfd **slot = (struct pollfd **)fds->priv; -#ifdef CONFIG_DEBUG - if (!slot) { - ret = -EIO; - goto errout; - } -#endif - /* Remove all memory of the poll setup */ *slot = NULL;
mousefilter: getting rid of unneeded string.h require
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ #include "m_pd.h" -#include<string.h> #include "hammer/gui.h" //2016 note: now works with anything, pre v3: only floats - Derek Kwan
consistent setting of sin_len
@@ -62,6 +62,9 @@ static int ipaddr_ipany(struct ipaddr *addr, int port, int mode) ipv4->sin_family = AF_INET; ipv4->sin_addr.s_addr = htonl(INADDR_ANY); ipv4->sin_port = htons((uint16_t)port); +#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN + ipv4->sin_len = sizeof(struct sockaddr_in); +#endif return 0; } else { @@ -69,6 +72,9 @@ static int ipaddr_ipany(struct ipaddr *addr, int port, int mode) ipv6->sin6_family = AF_INET6; memcpy(&ipv6->sin6_addr, &in6addr_any, sizeof(in6addr_any)); ipv6->sin6_port = htons((uint16_t)port); +#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN + ipv6->sin6_len = sizeof(struct sockaddr_in6); +#endif return 0; } } @@ -82,6 +88,9 @@ static int ipaddr_ipv4_literal(struct ipaddr *addr, const char *name, if(dill_slow(rc != 1)) {errno = EINVAL; return -1;} ipv4->sin_family = AF_INET; ipv4->sin_port = htons((uint16_t)port); +#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN + ipv4->sin_len = sizeof(struct sockaddr_in); +#endif return 0; } @@ -94,6 +103,9 @@ static int ipaddr_ipv6_literal(struct ipaddr *addr, const char *name, if(dill_slow(rc != 1)) {errno = EINVAL; return -1;} ipv6->sin6_family = AF_INET6; ipv6->sin6_port = htons((uint16_t)port); +#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN + ipv6->sin6_len = sizeof(struct sockaddr_in6); +#endif return 0; }
graph-store: clean up merge artefact
?~ update-log *update-log:store =* start i.t.t.t.t.t.path =* end i.t.t.t.t.t.t.path - ?~ update-log *update-log:store %^ lot:orm-log u.update-log (slaw %da start)
Add printout of total time executing to quicinterop
@@ -1070,7 +1070,9 @@ RunInteropTests() { const uint16_t* Ports = CustomPort == 0 ? PublicPorts : &CustomPort; const uint32_t PortsCount = CustomPort == 0 ? PublicPortsCount : 1; + uint32_t StartTime = 0, StopTime = 0; + StartTime = QuicTimeMs32(); for (uint32_t b = 0; b < PortsCount; ++b) { for (uint32_t c = 0; c < QuicTestFeatureCount; ++c) { if (TestCases & (1 << c)) { @@ -1089,6 +1091,7 @@ RunInteropTests() QuicThreadWait(&Threads[i]); QuicThreadDelete(&Threads[i]); } + StopTime = QuicTimeMs32(); printf("\n%12s %s %s %s\n", "TARGET", QuicTestFeatureCodes, "VERSION", "ALPN"); printf(" ============================================\n"); @@ -1100,6 +1103,11 @@ RunInteropTests() PrintTestResults((uint32_t)EndpointIndex); } printf("\n"); + printf( + "Total execution time: %u.%03us\n", + (StopTime - StartTime) / 1000, + (StopTime - StartTime) % 1000); + printf("\n"); } bool
Warn when using gcc older than version 6.x on platform nRF52840
@@ -16,6 +16,17 @@ ifeq ("$(CC)","arm-none-eabi-gcc") endif endif +# Warn if using anything older than version 6.x of arm-none-eabi-gcc on nrf52840 +ifeq ("$(TARGET)","nrf52840") + ifeq ("$(CC)","arm-none-eabi-gcc") + ifeq ($(shell test $(GCC_MAJOR_VERSION) -lt 6; echo $$?),0) + $(warning Warning: you're using a version of $(CC) that is known to create broken Contiki-NG executables for the nRF52840 platform.) + $(warning Issues reported include the inability to perform any radio communication.) + $(warning We recommend to upgrade your toolchain.) + endif + endif +endif + # Warn if using 4.6.x or older msp430-gcc ifeq ("$(CC)","msp430-gcc") ifeq ($(shell test $(GCC_MAJOR_VERSION) -lt 5; echo $$?),0)
zephyr: frdm_k64f: Remove partition defines Now that the partition table has been added to the device tree for the frdm_k64f in upstream Zephyr, these symbols become redundant defines. Remove them to fully use the partitions defined in Zephyr.
#define FLASH_DRIVER_NAME CONFIG_SOC_FLASH_MCUX_DEV_NAME #define FLASH_ALIGN 8 -#define FLASH_AREA_IMAGE_0_OFFSET 0x20000 -#define FLASH_AREA_IMAGE_0_SIZE 0x60000 -#define FLASH_AREA_IMAGE_1_OFFSET 0x80000 -#define FLASH_AREA_IMAGE_1_SIZE 0x60000 -#define FLASH_AREA_IMAGE_SCRATCH_OFFSET 0xe0000 -#define FLASH_AREA_IMAGE_SCRATCH_SIZE 0x20000 #define FLASH_AREA_IMAGE_SECTOR_SIZE 0x01000
doc: add mitigation description for CVE-2018-12207 in advisory Mitigation for this vulnerability is applied in 1.4 release, update related notes in adviosry.
@@ -6,6 +6,12 @@ Advisory We recommend that all developers upgrade to this v1.4 release, which addresses the following security issues that were discovered in previous releases: +Mitigation for Machine Check Error on Page Size Change + Improper invalidation for page table updates by a virtual guest operating system for multiple Intel(R) Processors may allow an authenticated user to potentially enable denial of service of the host system via local access. Malicious guest kernel could trigger this issue, CVE-2018-12207. + + | **Affected Release:** v1.3 and earlier. + | Upgrade to ACRN release v1.4. + AP Trampoline Is Accessible to the Service VM This vulnerability is triggered when validating the memory isolation between the VM and hypervisor. The AP Trampoline code exists in the LOW_RAM region in the hypervisor but is potentially accessible to the Service VM. This could be used by an attacker to mount DoS
Boten: Increase stack sizes Align boten's stack sizes with those chosen for drawcia, as there is sufficient space. BRANCH=Dedede TEST=make -j buildall
TASK_ALWAYS(HOOKS, hook_task, NULL, VENTI_TASK_STACK_SIZE) \ TASK_ALWAYS(MOTIONSENSE, motion_sense_task, NULL, VENTI_TASK_STACK_SIZE) \ TASK_ALWAYS(USB_CHG_P0, usb_charger_task, 0, LARGER_TASK_STACK_SIZE) \ - TASK_ALWAYS(CHARGER, charger_task, NULL, VENTI_TASK_STACK_SIZE) \ + TASK_ALWAYS(CHARGER, charger_task, NULL, TRENTA_TASK_STACK_SIZE) \ TASK_NOTEST(CHIPSET, chipset_task, NULL, VENTI_TASK_STACK_SIZE) \ - TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \ + TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_ALWAYS(HOSTCMD, host_command_task, NULL, VENTI_TASK_STACK_SIZE) \ TASK_ALWAYS(CONSOLE, console_task, NULL, VENTI_TASK_STACK_SIZE) \ - TASK_ALWAYS(POWERBTN, power_button_task, NULL, VENTI_TASK_STACK_SIZE) \ - TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) \ + TASK_ALWAYS(POWERBTN, power_button_task, NULL, ULTRA_TASK_STACK_SIZE) \ + TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, ULTRA_TASK_STACK_SIZE) \ TASK_ALWAYS(PD_C0, pd_task, NULL, ULTRA_TASK_STACK_SIZE) \ TASK_ALWAYS(PD_INT_C0, pd_interrupt_handler_task, 0, ULTRA_TASK_STACK_SIZE)
build libssl with no-seed
@@ -37,7 +37,7 @@ set(OPENSSL_CONFIG_FLAGS no-comp no-cms no-ct no-srp no-srtp no-ts no-gost no-dso no-ec2m no-tls1 no-tls1_1 no-tls1_2 no-dtls no-dtls1 no-dtls1_2 no-ssl no-ssl3-method no-tls1-method no-tls1_1-method no-tls1_2-method no-dtls1-method no-dtls1_2-method - no-siphash no-whirlpool no-aria no-bf no-blake2 no-sm2 no-sm3 no-sm4 no-camellia no-cast no-md4 no-mdc2 no-ocb no-rc2 no-rmd160 no-scrypt + no-siphash no-whirlpool no-aria no-bf no-blake2 no-sm2 no-sm3 no-sm4 no-camellia no-cast no-md4 no-mdc2 no-ocb no-rc2 no-rmd160 no-scrypt no-seed no-weak-ssl-ciphers no-shared no-tests) if (QUIC_USE_OPENSSL3)
make sure grep filter only omits .h files
@@ -80,7 +80,7 @@ harness_macro_temp: $(HARNESS_SMEMS_CONF) # remove duplicate files and headers in list of simulation file inputs ######################################################################################## $(sim_common_files): $(sim_files) $(sim_top_blackboxes) $(sim_harness_blackboxes) - awk '{print $1;}' $^ | sort -u | grep -v '.*\.h' > $@ + awk '{print $1;}' $^ | sort -u | grep -v '.*\.h$$' > $@ ######################################################################################### # helper rule to just make verilog files
Fix a missing call to SSLfatal Under certain error conditions a call to SSLfatal could accidently be missed.
@@ -2370,10 +2370,14 @@ int tls_construct_server_hello(SSL *s, WPACKET *pkt) if (!WPACKET_sub_memcpy_u8(pkt, session_id, sl) || !s->method->put_cipher_by_char(s->s3->tmp.new_cipher, pkt, &len) - || !WPACKET_put_bytes_u8(pkt, compm) - || !tls_construct_extensions(s, pkt, - s->hello_retry_request - == SSL_HRR_PENDING + || !WPACKET_put_bytes_u8(pkt, compm)) { + SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_CONSTRUCT_SERVER_HELLO, + ERR_R_INTERNAL_ERROR); + return 0; + } + + if (!tls_construct_extensions(s, pkt, + s->hello_retry_request == SSL_HRR_PENDING ? SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST : (SSL_IS_TLS13(s) ? SSL_EXT_TLS1_3_SERVER_HELLO
hdata: Add DIMM actual speed to device tree Recent HDAT provides DIMM actuall speed. Lets add this to device tree. [stewart: use Hz rather than Mhz, consistent with other properties]
-/* Copyright 2013-2014 IBM Corp. +/* Copyright 2013-2018 IBM Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,8 @@ struct HDIF_ram_area_id { #define RAM_AREA_INSTALLED 0x8000 #define RAM_AREA_FUNCTIONAL 0x4000 __be16 flags; + __be32 dimm_id; + __be32 speed; } __packed; struct HDIF_ram_area_size { @@ -286,6 +288,11 @@ static void vpd_add_ram_area(const struct HDIF_common_hdr *msarea) chip_id = add_chip_id_to_ram_area(msarea, ram_node); add_bus_freq_to_ram_area(ram_node, chip_id); + if (ram_sz >= offsetof(struct HDIF_ram_area_id, speed)) { + dt_add_property_cells(ram_node, "frequency", + be32_to_cpu(ram_id->speed)*1000000); + } + vpd_blob = HDIF_get_idata(ramarea, 1, &ram_sz); /* DIMM size */
Added DIAG product. Treated the same as BUDG
@@ -64,7 +64,7 @@ if(kindOfProduct == `GRIB`){ template GRIB "grib[GRIBEditionNumber:l]/boot.def" ; } -if(kindOfProduct == `BUDG`){ +if(kindOfProduct == `BUDG` || kindOfProduct == `DIAG`){ template BUDG "budg/boot.def" ; }
Fix bus input for fpgaconf in bist
@@ -80,7 +80,7 @@ def get_mode_from_path(gbs_path): def load_gbs(gbs_file, bus_num): print "Attempting Partial Reconfiguration:" - cmd = "{} -b {} -v {}".format('fpgaconf', bus_num, gbs_file) + cmd = "{} -b 0x{} -v {}".format('fpgaconf', bus_num, gbs_file) try: subprocess.check_call(cmd, shell=True) except subprocess.CalledProcessError as e:
meta: update chromatic CI for lerna
@@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 - - run: cd 'pkg/interface' && npm i + - run: npm i && npm run bootstrap - name: Publish to Chromatic uses: chromaui/action@v1 with:
apps/blemesh: add missing newline in printf
@@ -171,7 +171,7 @@ static int output_number(bt_mesh_output_action action, uint32_t number) static void prov_complete(void) { - console_printf("Provisioning completed"); + console_printf("Provisioning completed\n"); } static const uint8_t dev_uuid[16] = MYNEWT_VAL(BLE_MESH_DEV_UUID);
hv: Save secure world memory info into vm instead of vm0 A bugfix for saving secure world memory info. Maybe there are multiple UOS, each VM has its own secure world and normal world, should save memory info into individual VM. Acked-by: Eddie Dong
@@ -152,9 +152,9 @@ void create_secure_world_ept(struct vm *vm, uint64_t gpa, /* Backup secure world info, will be used when * destroy secure world */ - vm0->sworld_control.sworld_memory.base_gpa = gpa; - vm0->sworld_control.sworld_memory.base_hpa = hpa; - vm0->sworld_control.sworld_memory.length = size; + vm->sworld_control.sworld_memory.base_gpa = gpa; + vm->sworld_control.sworld_memory.base_hpa = hpa; + vm->sworld_control.sworld_memory.length = size; mmu_invept(vm->current_vcpu); mmu_invept(vm0->current_vcpu);
Homebridge-managed handling
@@ -222,13 +222,24 @@ function checkHomebridge { if [[ -z $HOMEBRIDGE_AUTH ]]; then # generate a new deconz apikey for homebridge-hue addUser + if [[ "$HOMEBRIDGE" != "managed" ]]; then + putHomebridgeUpdated "homebridge" "managed" + HOMEBRIDGE="managed" + fi else # homebridge-hue apikey exists if [ -z $(echo $HOMEBRIDGE_AUTH | grep deconz) ]; then + # homebridge-hue apikey is not made by this script if [[ "$HOMEBRIDGE" != "not-managed" ]]; then putHomebridgeUpdated "homebridge" "not-managed" + HOMEBRIDGE="not-managed" fi [[ $LOG_INFO ]] && echo "${LOG_INFO}existing homebridge hue auth found" + else + if [[ "$HOMEBRIDGE" != "managed" ]]; then + putHomebridgeUpdated "homebridge" "managed" + HOMEBRIDGE="managed" + fi fi fi if [[ -z "$HOMEBRIDGE_PIN" ]]; then
Add script to remove signing directory
@@ -242,6 +242,7 @@ pipeline { usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { sh 'python3 ./signing/macos-client-wrapper.py ${USERNAME} *.zip' + sh 'rm -rf ./signing' } } dir('upload') {
fixed spike~
@@ -22,7 +22,7 @@ static t_class *spike_class; static void spike_tick(t_spike *x) { - outlet_float(((t_object *)x)->ob_outlet, x->x_count * x->x_rcpksr); + outlet_float(((t_object *)x)->ob_outlet, (x->x_count + 1) * x->x_rcpksr); x->x_count = x->x_precount; }
add --backtrace to test in .travis.yml
@@ -38,7 +38,7 @@ script: - cat xmake/core/_xmake_main.lua >> tmp - mv tmp xmake/core/_xmake_main.lua - cp core/build/xmake $(which xmake) || sudo cp core/build/xmake $(which xmake) - - make test + - xmake lua --backtrace tests\test.lua after_success: - luacov
net/oic; when deleting resource, remove it from oc_app_resources list.
@@ -251,6 +251,14 @@ oc_ri_alloc_resource(void) void oc_ri_delete_resource(oc_resource_t *resource) { + oc_resource_t *tmp; + + SLIST_FOREACH(tmp, &oc_app_resources, next) { + if (tmp == resource) { + SLIST_REMOVE(&oc_app_resources, tmp, oc_resource, next); + break; + } + } os_memblock_put(&oc_resource_pool, resource); }
Fix documentation error for Ubuntu 18.04 Fix documentation error for Ubuntu 18.04
@@ -67,7 +67,7 @@ found at [packages.ubuntu.com](https://packages.ubuntu.com/search?suite=default& sudo apt-get install bpfcc-tools linux-headers-$(uname -r) ``` -The tools are installed in `/sbin` with a `-bpfcc` extension. Try running `sudo opensnoop-bpfcc`. +The tools are installed in `/sbin` (`/usr/sbin` in Ubuntu 18.04) with a `-bpfcc` extension. Try running `sudo opensnoop-bpfcc`. **_Note_**: the Ubuntu packages have different names but the package contents, in most cases, conflict and as such _cannot_ be installed alongside upstream packages. Should one choose to use
Make NGTCP2_QLOG_WRITE_FLAG_* macro
@@ -1588,23 +1588,18 @@ typedef struct ngtcp2_cc { typedef void (*ngtcp2_printf)(void *user_data, const char *format, ...); /** - * @enum + * @macro * - * :type:`ngtcp2_qlog_write_flag` defines the set of flags passed to - * :type:`ngtcp2_qlog_write` callback. - */ -typedef enum ngtcp2_qlog_write_flag { - /** - * :enum:`NGTCP2_QLOG_WRITE_FLAG_NONE` indicates no flag set. + * :macro:`NGTCP2_QLOG_WRITE_FLAG_NONE` indicates no flag set. */ - NGTCP2_QLOG_WRITE_FLAG_NONE = 0, +#define NGTCP2_QLOG_WRITE_FLAG_NONE 0 /** - * :enum:`NGTCP2_QLOG_WRITE_FLAG_FIN` indicates that this is the - * final call to :type:`ngtcp2_qlog_write` in the current - * connection. + * @macro + * + * :macro:`NGTCP2_QLOG_WRITE_FLAG_FIN` indicates that this is the + * final call to :type:`ngtcp2_qlog_write` in the current connection. */ - NGTCP2_QLOG_WRITE_FLAG_FIN = 0x01 -} ngtcp2_qlog_write_flag; +#define NGTCP2_QLOG_WRITE_FLAG_FIN 0x01 /** * @struct @@ -1627,7 +1622,8 @@ typedef struct ngtcp2_rand_ctx { * * :type:`ngtcp2_qlog_write` is a callback function which is called to * write qlog |data| of length |datalen| bytes. |flags| is bitwise OR - * of zero or more of :type:`ngtcp2_qlog_write_flag`. + * of zero or more of NGTCP2_QLOG_WRITE_FLAG_*. See + * :macro:`NGTCP2_QLOG_WRITE_FLAG_NONE`. */ typedef void (*ngtcp2_qlog_write)(void *user_data, uint32_t flags, const void *data, size_t datalen);
CONFIG_FLASH_BASE_ADDRESS is defined only for memory-mapped Flash Made FLASH_DEVICE_BASE 0 for non-memory-mapped Flash.
@@ -19,13 +19,14 @@ MCUBOOT_LOG_MODULE_DECLARE(mcuboot); #if (!defined(CONFIG_XTENSA) && defined(DT_FLASH_DEV_NAME)) #define FLASH_DEVICE_ID SOC_FLASH_0_ID +#define FLASH_DEVICE_BASE CONFIG_FLASH_BASE_ADDRESS #elif (defined(CONFIG_XTENSA) && defined(DT_SPI_NOR_DRV_NAME)) #define FLASH_DEVICE_ID SPI_FLASH_0_ID +#define FLASH_DEVICE_BASE 0 #else #error "FLASH_DEVICE_ID could not be determined" #endif -#define FLASH_DEVICE_BASE CONFIG_FLASH_BASE_ADDRESS static struct device *flash_dev; struct device *flash_device_get_binding(char *dev_name)
Add missing set_name()
@@ -124,6 +124,12 @@ typedef const struct clap_preset_discovery_metadata_receiver { // If unset, they are then inherited from the location. void(CLAP_ABI *set_flags)(const struct clap_preset_discovery_metadata_receiver, uint32_t flags); + // Sets the preset name. + // The preset name can be infered from the file name, but it is mandatory to set it for + // container's preset. + void(CLAP_ABI *set_name)(const struct clap_preset_discovery_metadata_receiver *receiver, + const char *name); + // Adds a creator name for the preset. void(CLAP_ABI *add_creator)(const struct clap_preset_discovery_metadata_receiver *receiver, const char *creator);
in_syslog: add more verbosity when failed to parse log message This patch makes the warning message [ warn] [in_syslog] error parsing log message more detailed by showing alias name of input plugin and parser name. It also prints the content of the message not parsed in debug mode.
@@ -104,7 +104,10 @@ int syslog_prot_process(struct syslog_conn *conn) flb_free(out_buf); } else { - flb_warn("[in_syslog] error parsing log message"); + flb_warn("[in_syslog] error parsing log message " + "on \"%s\" with parser '%s')", + flb_input_name(ctx->i_ins), ctx->parser->name); + flb_debug("[in_syslog] unparsed log message: %.*s", len, p); } conn->buf_parsed += len + 1; @@ -139,7 +142,10 @@ int syslog_prot_process_udp(char *buf, size_t size, struct flb_syslog *ctx) flb_free(out_buf); } else { - flb_warn("[in_syslog] error parsing log message"); + flb_warn("[in_syslog] error parsing log message " + "on \"%s\" with parser '%s')", + flb_input_name(ctx->i_ins), ctx->parser->name); + flb_debug("[in_syslog] unparsed log message: %.*s", size, buf); return -1; }
Reduce processing time of ack of ack
@@ -2141,33 +2141,37 @@ static picoquic_packet_t* picoquic_update_rtt(picoquic_cnx_t* cnx, uint64_t larg return packet; } -static void picoquic_process_ack_of_ack_range(picoquic_sack_item_t* first_sack, +static picoquic_sack_item_t* picoquic_process_ack_of_ack_range(picoquic_sack_item_t* first_sack, picoquic_sack_item_t* previous, uint64_t start_of_range, uint64_t end_of_range) { - if (first_sack->start_of_sack_range == start_of_range) { + picoquic_sack_item_t* next = (previous == NULL)? first_sack: previous->next_sack; + + while (next != NULL) { + if (next->start_of_sack_range == start_of_range) { + if (next == first_sack) { if (end_of_range < first_sack->end_of_sack_range) { first_sack->start_of_sack_range = end_of_range + 1; - } else { + } + else { first_sack->start_of_sack_range = first_sack->end_of_sack_range; } - } else { - picoquic_sack_item_t* previous = first_sack; - picoquic_sack_item_t* next = previous->next_sack; - - while (next != NULL) { - if (next->end_of_sack_range == end_of_range && next->start_of_sack_range == start_of_range) { + } + else if (next->end_of_sack_range == end_of_range) { /* Matching range should be removed */ previous->next_sack = next->next_sack; free(next); + } break; } else if (next->end_of_sack_range > end_of_range) { previous = next; next = next->next_sack; - } else { - break; } + else { + break; } } + + return previous; } int picoquic_process_ack_of_ack_frame( @@ -2180,20 +2184,13 @@ int picoquic_process_ack_of_ack_frame( uint64_t num_block; uint64_t remote_time_stamp; - /* Find the oldest ACK range, in order to calibrate the - * extension of the largest number to 64 bits */ - - picoquic_sack_item_t* target_sack = first_sack; - while (target_sack->next_sack != NULL) { - target_sack = target_sack->next_sack; - } - ret = picoquic_parse_ack_header(bytes, bytes_max, &num_block, &largest, &ack_delay, consumed, 0, (has_1wd)?&remote_time_stamp:0); if (ret == 0) { size_t byte_index = *consumed; + picoquic_sack_item_t* previous_sack_item = NULL; /* Process each successive range */ @@ -2224,7 +2221,7 @@ int picoquic_process_ack_of_ack_frame( } if (range > 0) { - picoquic_process_ack_of_ack_range(first_sack, largest + 1 - range, largest); + previous_sack_item = picoquic_process_ack_of_ack_range(first_sack, previous_sack_item, largest + 1 - range, largest); } if (num_block-- == 0)
Enable some tests that were disabled.
@@ -810,12 +810,10 @@ int main(int argc, char** argv) test_include_callback(); test_save_load_rules(); test_scanner(); -// test_ast_callback(); -// //TODO(vmalvarez): Enable these tests. -// //test_rules_stats(); -// -// test_issue_834(); -// test_issue_920(); + test_ast_callback(); + test_rules_stats(); + test_issue_834(); + test_issue_920(); return 0; }
use heap_stat_increase macros when possible
@@ -252,7 +252,7 @@ static mi_page_t* mi_page_fresh_alloc(mi_heap_t* heap, mi_page_queue_t* pq, size // a fresh page was found, initialize it mi_assert_internal(pq==NULL || _mi_page_segment(page)->page_kind != MI_PAGE_HUGE); mi_page_init(heap, page, block_size, heap->tld); - _mi_stat_increase(&heap->tld->stats.pages, 1); + mi_heap_stat_increase(heap, pages, 1); if (pq!=NULL) mi_page_queue_push(heap, pq, page); // huge pages use pq==NULL mi_assert_expensive(_mi_page_is_valid(page)); return page; @@ -688,7 +688,7 @@ static mi_page_t* mi_page_queue_find_free_ex(mi_heap_t* heap, mi_page_queue_t* p page = next; } // for each page - mi_stat_counter_increase(heap->tld->stats.searches, count); + mi_heap_stat_counter_increase(heap, searches, count); if (page == NULL) { _mi_heap_collect_retired(heap, false); // perhaps make a page available @@ -780,12 +780,12 @@ static mi_page_t* mi_huge_page_alloc(mi_heap_t* heap, size_t size) { mi_page_set_heap(page, NULL); if (bsize > MI_HUGE_OBJ_SIZE_MAX) { - _mi_stat_increase(&heap->tld->stats.giant, bsize); - _mi_stat_counter_increase(&heap->tld->stats.giant_count, 1); + mi_heap_stat_increase(heap, giant, bsize); + mi_heap_stat_counter_increase(heap, giant_count, 1); } else { - _mi_stat_increase(&heap->tld->stats.huge, bsize); - _mi_stat_counter_increase(&heap->tld->stats.huge_count, 1); + mi_heap_stat_increase(heap, huge, bsize); + mi_heap_stat_counter_increase(heap, huge_count, 1); } } return page;
Send admin notification on share recorder policy fallback engage
@@ -28,11 +28,13 @@ using System.Net.Sockets; using System.Reactive.Concurrency; using System.Reactive.Linq; using System.Text; +using Autofac.Features.Metadata; using AutoMapper; using MiningCore.Blockchain; using MiningCore.Configuration; using MiningCore.Extensions; using MiningCore.Mining; +using MiningCore.Notifications; using MiningCore.Persistence; using MiningCore.Persistence.Model; using MiningCore.Persistence.Repositories; @@ -51,17 +53,20 @@ namespace MiningCore.Payments { public ShareRecorder(IConnectionFactory cf, IMapper mapper, JsonSerializerSettings jsonSerializerSettings, - IShareRepository shareRepo, IBlockRepository blockRepo) + IShareRepository shareRepo, IBlockRepository blockRepo, + IEnumerable<Meta<INotificationSender, NotificationSenderMetadataAttribute>> notificationSenders) { Contract.RequiresNonNull(cf, nameof(cf)); Contract.RequiresNonNull(mapper, nameof(mapper)); Contract.RequiresNonNull(shareRepo, nameof(shareRepo)); Contract.RequiresNonNull(blockRepo, nameof(blockRepo)); Contract.RequiresNonNull(jsonSerializerSettings, nameof(jsonSerializerSettings)); + Contract.RequiresNonNull(notificationSenders, nameof(notificationSenders)); this.cf = cf; this.mapper = mapper; this.jsonSerializerSettings = jsonSerializerSettings; + this.notificationSenders = notificationSenders; this.shareRepo = shareRepo; this.blockRepo = blockRepo; @@ -73,6 +78,8 @@ namespace MiningCore.Payments private readonly IConnectionFactory cf; private readonly JsonSerializerSettings jsonSerializerSettings; + private readonly IEnumerable<Meta<INotificationSender, NotificationSenderMetadataAttribute>> notificationSenders; + private ClusterConfig clusterConfig; private readonly IMapper mapper; private readonly BlockingCollection<IShare> queue = new BlockingCollection<IShare>(); @@ -85,6 +92,7 @@ namespace MiningCore.Payments private string recoveryFilename; private const int RetryCount = 3; private const string PolicyContextKeyShares = "share"; + private bool notifiedAdminOnPolicyFallback = false; private static readonly ILogger logger = LogManager.GetCurrentClassLogger(); @@ -144,6 +152,8 @@ namespace MiningCore.Payments } } } + + NotifyAdminOnPolicyFallback(); } catch (Exception ex) @@ -263,6 +273,33 @@ namespace MiningCore.Payments } } + private async void NotifyAdminOnPolicyFallback() + { + if (clusterConfig.Notifications?.Admin?.Enabled == true && + clusterConfig.Notifications?.Admin?.NotifyPaymentSuccess == true && + !notifiedAdminOnPolicyFallback) + { + notifiedAdminOnPolicyFallback = true; + + try + { + var adminEmail = clusterConfig.Notifications.Admin.EmailAddress; + + var emailSender = notificationSenders + .Where(x => x.Metadata.NotificationType == NotificationType.Email) + .Select(x => x.Value) + .First(); + + await emailSender.NotifyAsync(adminEmail, "Share Recorder Policy Fallback", $"The Share Recorder's Policy Fallback has been engaged. Check share recovery file {recoveryFilename}."); + } + + catch (Exception ex) + { + logger.Error(ex); + } + } + } + #region API-Surface public void AttachPool(IMiningPool pool) @@ -311,6 +348,8 @@ namespace MiningCore.Payments private void ConfigureRecovery(ClusterConfig clusterConfig) { + this.clusterConfig = clusterConfig; + recoveryFilename = !string.IsNullOrEmpty(clusterConfig.PaymentProcessing?.ShareRecoveryFile) ? clusterConfig.PaymentProcessing.ShareRecoveryFile : "recovered-shares.txt";
Rework the documentation
/// 1. clap_plugin_gui->is_api_supported(), check what can work /// 2. clap_plugin_gui->create(), allocates gui resources /// 3. if the plugin window is floating -/// 4. -> clap_plugin_gui->suggest_title() -/// 5. else -/// 6. -> clap_plugin_gui->set_scale(), if the function pointer is provided by the plugin -/// 7. -> clap_plugin_gui->get_size(), gets initial size -/// 8. clap_plugin_gui->show() -/// 9. clap_plugin_gui->hide()/show() ... -/// 10. clap_plugin_gui->destroy() when done with the gui +/// 4. -> clap_plugin_gui->set_transient() +/// 5. -> clap_plugin_gui->suggest_title() +/// 6. else +/// 7. -> clap_plugin_gui->set_scale(), if the function pointer is provided by the plugin +/// 8. -> clap_plugin_gui->get_size(), gets initial size +/// 9. -> clap_plugin_gui->can_resize() +/// 10. clap_plugin_gui->show() +/// 11. clap_plugin_gui->hide()/show() ... +/// 12. clap_plugin_gui->destroy() when done with the gui /// /// Resizing the window (initiated by the plugin, if embedded): /// 1. Plugins calls clap_host_gui->request_resize() @@ -86,11 +88,12 @@ typedef struct clap_plugin_gui { // Create and allocate all resources necessary for the gui. // // If is_floating is true, then the window will not be managed by the host. The plugin - // can set its window to stays above the parent window. + // can set its window to stays above the parent window, see set_transient(). // - // If is_floating is false, then the plugin has to embbed its window into the parent window. + // If is_floating is false, then the plugin has to embbed its window into the parent window, see + // set_parent(). // - // After this call, the GUI is ready to be shown but it is not yet visible. + // After this call, the GUI may not be visible yet; don't forget to call show(). // // [main-thread] bool (*create)(const clap_plugin_t *plugin, const char *api, bool is_floating);
acrn-config: Add d3hot_reset sub-parameter for passthrough device Add d3hot_reset sub-parameter if passthrough USB device for WaaG.
@@ -416,8 +416,11 @@ def set_dm_pt(names, sel, vmid, config): uos_type = names['uos_types'][vmid] if sel.bdf['usb_xdci'][vmid] and sel.slot['usb_xdci'][vmid]: - print(' -s {},passthru,{}/{}/{} \\'.format(sel.slot["usb_xdci"][vmid], sel.bdf["usb_xdci"][vmid][0:2],\ - sel.bdf["usb_xdci"][vmid][3:5], sel.bdf["usb_xdci"][vmid][6:7]), file=config) + sub_attr = '' + if uos_type == "WINDOWS": + sub_attr = ',d3hot_reset' + print(' -s {},passthru,{}/{}/{}{} \\'.format(sel.slot["usb_xdci"][vmid], sel.bdf["usb_xdci"][vmid][0:2],\ + sel.bdf["usb_xdci"][vmid][3:5], sel.bdf["usb_xdci"][vmid][6:7], sub_attr), file=config) # pass through audio/audio_codec if sel.bdf['audio'][vmid]:
drivers/sdcard: In test use os.umount and machine module instead of pyb. pyb.umount(None, mountpoint) no longer works.
# Test for sdcard block protocol # Peter hinch 30th Jan 2016 -import os, sdcard, pyb +import os, sdcard, machine def sdtest(): - sd = sdcard.SDCard(pyb.SPI(1), pyb.Pin.board.X21) # Compatible with PCB - pyb.mount(sd, '/fc') + spi = machine.SPI(1) + spi.init() # Ensure right baudrate + sd = sdcard.SDCard(spi, machine.Pin.board.X21) # Compatible with PCB + vfs = os.VfsFat(sd) + os.mount(vfs, '/fc') print('Filesystem check') print(os.listdir('/fc')) @@ -38,7 +41,7 @@ def sdtest(): result2 = f.read() print(len(result2), 'bytes read') - pyb.mount(None, '/fc') + os.umount('/fc') print() print('Verifying data read back')
Fixed free functions for structs.
@@ -1087,9 +1087,9 @@ void ts_deboornet_move(tsDeBoorNet *from, tsDeBoorNet *to) void ts_deboornet_free(tsDeBoorNet *deBoorNet) { - if (deBoorNet->points != NULL) - free(deBoorNet->points);/* automatically frees the field result */ - ts_deboornet_default(deBoorNet); + if (deBoorNet->pImpl != NULL) + free(deBoorNet->pImpl); + deBoorNet->pImpl = NULL; } void ts_bspline_default(tsBSpline* bspline) @@ -1105,9 +1105,9 @@ void ts_bspline_default(tsBSpline* bspline) void ts_bspline_free(tsBSpline *bspline) { - if (bspline->ctrlp != NULL) - free(bspline->ctrlp); - ts_bspline_default(bspline); + if (bspline->pImpl != NULL) + free(bspline->pImpl); + bspline->pImpl = NULL; } void ts_bspline_move(tsBSpline* from, tsBSpline* to)