message
stringlengths
6
474
diff
stringlengths
8
5.22k
naive: add parse raw tx in aggregator submit action
|= =part-tx ^- [octs tx:naive] ?+ -.part-tx !! - :: %raw [+.part-tx (decode-tx:naive +.part-tx)] + %raw + ?~ batch=(parse-raw-tx:naive q.raw.part-tx) + ~& %parse-failed + :: TODO: maybe return a unit if parsing fails? + :: + !! + [raw tx]:-.u.batch :: %don [(encode-tx:naive +.part-tx) +.part-tx] %ful +.part-tx ==
bugId:17646749:[mqtt]improve log level
@@ -1225,7 +1225,7 @@ static int iotx_mc_read_packet(iotx_mc_client_t *c, iotx_time_t *timer, unsigned HAL_MutexUnlock(c->lock_read_buf); return SUCCESS_RETURN; } else if (1 != rc) { - mqtt_debug("mqtt read error, rc=%d", rc); + mqtt_err("mqtt read error, rc=%d", rc); HAL_MutexUnlock(c->lock_read_buf); return MQTT_NETWORK_ERROR; } @@ -1836,14 +1836,14 @@ static int iotx_mc_cycle(iotx_mc_client_t *c, iotx_time_t *timer) state = iotx_mc_get_client_state(c); if (state != IOTX_MC_STATE_CONNECTED) { - mqtt_debug("state = %d", state); + mqtt_info("state = %d", state); return MQTT_STATE_ERROR; } if (IOTX_MC_KEEPALIVE_PROBE_MAX < c->keepalive_probes) { iotx_mc_set_client_state(c, IOTX_MC_STATE_DISCONNECTED); c->keepalive_probes = 0; - mqtt_debug("keepalive_probes more than %u, disconnected\n", IOTX_MC_KEEPALIVE_PROBE_MAX); + mqtt_warning("keepalive_probes more than %u, disconnected\n", IOTX_MC_KEEPALIVE_PROBE_MAX); } /* read the socket, see what work is due */ @@ -1853,7 +1853,7 @@ static int iotx_mc_cycle(iotx_mc_client_t *c, iotx_time_t *timer) _reset_recv_buffer(c); HAL_MutexUnlock(c->lock_read_buf); iotx_mc_set_client_state(c, IOTX_MC_STATE_DISCONNECTED); - mqtt_debug("readPacket error,result = %d", rc); + mqtt_err("readPacket error,result = %d", rc); return rc; } @@ -2610,7 +2610,7 @@ static void iotx_mc_keepalive(iotx_mc_client_t *pClient) HAL_MutexUnlock(pClient->lock_generic); rc = iotx_mc_handle_reconnect(pClient); if (SUCCESS_RETURN != rc) { - mqtt_debug("reconnect network fail, rc = %d", rc); + mqtt_err("reconnect network fail, rc = %d", rc); } else { mqtt_info("network is reconnected!"); iotx_mc_reconnect_callback(pClient); @@ -2868,7 +2868,7 @@ int iotx_mc_disconnect(iotx_mc_client_t *pClient) if (iotx_mc_check_state_normal(pClient)) { rc = MQTTDisconnect(pClient); - mqtt_debug("rc = MQTTDisconnect() = %d", rc); + mqtt_info("rc = MQTTDisconnect() = %d", rc); (void)rc; } @@ -3406,7 +3406,7 @@ int IOT_MQTT_Subscribe_Sync(void *handle, } HAL_MutexUnlock(client->lock_generic); } while (!utils_time_is_expired(&timer)); - mqtt_debug("time out!!"); + mqtt_warning("sync subscirbe time out!!"); mqtt_sub_node_t *node = NULL; mqtt_sub_node_t *next = NULL;
Fix event ownership comment
@@ -75,7 +75,7 @@ control_event_queue_is_empty(const struct control_event_queue *queue); bool control_event_queue_is_full(const struct control_event_queue *queue); -// event is copied, the queue does not use the event after the function returns +// the event is "moved": the queue takes ownership of its fields bool control_event_queue_push(struct control_event_queue *queue, const struct control_event *event);
kernel/os; minor fixes to comments. Remove obsolete define.
extern "C" { #endif -#define OS_CALLOUT_F_QUEUED (0x01) - #include "os/os_eventq.h" #include <stddef.h> @@ -101,8 +99,8 @@ void os_callout_stop(struct os_callout *); */ int os_callout_reset(struct os_callout *, int32_t); -/* - * Returns the number of ticks which remains to callout.. +/** + * Returns the number of ticks which remains to callout. * * @param c The callout to check * @param now The current time in OS ticks @@ -111,10 +109,8 @@ int os_callout_reset(struct os_callout *, int32_t); */ os_time_t os_callout_remaining_ticks(struct os_callout *, os_time_t); - /** - * Returned whether or not the callout has been posted to it's - * event queue. + * Returns whether the callout is pending or not. * * @param c The callout to check *
change it to PA6 as the bootload active pin.
#include <stdint.h> #define FLASH_START_ADDR 0x00200000 -#define BOOTLOADER_BACKDOOR_ENABLE 0xF7FFFFFF // ENABLED: PORT A, PIN 6, LOW +#define BOOTLOADER_BACKDOOR_ENABLE 0xF6FFFFFF // ENABLED: PORT A, PIN 6, LOW #define BOOTLOADER_BACKDOOR_DISABLE 0xEFFFFFFF #define SYS_CTRL_EMUOVR 0x400D20B4 #define SYS_CTRL_I_MAP 0x400D2098
Fixes return value defect
@@ -2297,6 +2297,7 @@ ACVP_RESULT acvp_enable_rsa_keygen_cap_parm (ACVP_CTX *ctx, break; case ACVP_RAND_PQ: case ACVP_FIXED_PUB_EXP_VAL: + rv = ACVP_INVALID_ARG; ACVP_LOG_ERR("Use acvp_enable_rsa_keygen_mode() or acvp_enable_rsa_keygen_exp_parm() API to enable a new randPQ or exponent."); break; default:
tools/tcplife: Remove dead code
from __future__ import print_function from bcc import BPF import argparse -from socket import inet_ntop, ntohs, AF_INET, AF_INET6 +from socket import inet_ntop, AF_INET, AF_INET6 from struct import pack from time import strftime @@ -191,7 +191,7 @@ int kprobe__tcp_set_state(struct pt_regs *ctx, struct sock *sk, int state) FILTER_PID // get throughput stats. see tcp_get_info(). - u64 rx_b = 0, tx_b = 0, sport = 0; + u64 rx_b = 0, tx_b = 0; struct tcp_sock *tp = (struct tcp_sock *)sk; rx_b = tp->bytes_received; tx_b = tp->bytes_acked; @@ -323,7 +323,7 @@ TRACEPOINT_PROBE(sock, inet_sock_set_state) FILTER_FAMILY // get throughput stats. see tcp_get_info(). - u64 rx_b = 0, tx_b = 0, sport = 0; + u64 rx_b = 0, tx_b = 0; struct tcp_sock *tp = (struct tcp_sock *)sk; rx_b = tp->bytes_received; tx_b = tp->bytes_acked;
hw/mcu/nrf5340_net: Remove enable/disable from init
@@ -466,15 +466,6 @@ hal_spi_init(int spi_num, void *cfg, uint8_t spi_type) return EINVAL; } - rc = hal_spi_disable(spi_num); - if (rc) { - return rc; - } - rc = hal_spi_enable(spi_num); - if (rc) { - return rc; - } - return hal_spi_init_master(spi, (struct nrf5340_net_hal_spi_cfg *)cfg); #endif @@ -483,11 +474,6 @@ hal_spi_init(int spi_num, void *cfg, uint8_t spi_type) return EINVAL; } - rc = hal_spi_disable(spi_num); - if (rc) { - return rc; - } - return hal_spi_init_slave(spi, (struct nrf5340_net_hal_spi_cfg *)cfg); #endif }
build: fix RPM package name
@@ -665,8 +665,6 @@ set(CPACK_PACKAGE_VENDOR "Treasure Data") set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/td-agent-bit") set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") set(CPACK_PACKAGING_INSTALL_PREFIX "/") -set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}") - # RPM Generation information set(CPACK_RPM_PACKAGE_GROUP "System Environment/Daemons") @@ -689,6 +687,9 @@ set(CPACK_RPM_USER_FILELIST "%ignore /opt" "%ignore /etc") set(CPACK_RPM_PACKAGE_AUTOREQ ON) +if(CPACK_GENERATOR MATCHES "RPM") + set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}") +endif() # CPack: DEB set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
Orchestra: add missing 'extern' to Orchestra rule declarations
@@ -51,11 +51,11 @@ struct orchestra_rule { const char *name; }; -struct orchestra_rule eb_per_time_source; -struct orchestra_rule unicast_per_neighbor_rpl_storing; -struct orchestra_rule unicast_per_neighbor_rpl_ns; -struct orchestra_rule unicast_per_neighbor_link_based; -struct orchestra_rule default_common; +extern struct orchestra_rule eb_per_time_source; +extern struct orchestra_rule unicast_per_neighbor_rpl_storing; +extern struct orchestra_rule unicast_per_neighbor_rpl_ns; +extern struct orchestra_rule unicast_per_neighbor_link_based; +extern struct orchestra_rule default_common; extern linkaddr_t orchestra_parent_linkaddr; extern int orchestra_parent_knows_us;
Sort last processing queue on backup from standby. The last queue was not being sorted when a primary queue was added first. This did not affect the backup or integrity but could lead to slightly lower performance since large files were not always copied first.
@@ -1381,8 +1381,8 @@ backupProcessQueue(Manifest *manifest, List **queueList) THROW(FileMissingError, "no files have changed since the last backup - this seems unlikely"); // Sort the queues - for (unsigned int targetIdx = 0; targetIdx < strLstSize(targetList); targetIdx++) - lstSort(*(List **)lstGet(*queueList, targetIdx), sortOrderDesc); + for (unsigned int queueIdx = 0; queueIdx < lstSize(*queueList); queueIdx++) + lstSort(*(List **)lstGet(*queueList, queueIdx), sortOrderDesc); // Move process queues to prior context lstMove(*queueList, memContextPrior());
Rename some vars for consistency.
@@ -14,14 +14,14 @@ import ( type facts []*a.Expr -func (z *facts) appendFact(x *a.Expr) { +func (z *facts) appendFact(fact *a.Expr) { // TODO: make this faster than O(N) by keeping facts sorted somehow? - for _, f := range *z { - if f.Eq(x) { + for _, x := range *z { + if x.Eq(fact) { return } } - *z = append(*z, x) + *z = append(*z, fact) } // update applies f to each fact, replacing the slice element with the result @@ -47,13 +47,13 @@ func (z facts) refine(n *a.Expr, nMin *big.Int, nMax *big.Int) (*big.Int, *big.I return nMin, nMax } - for _, f := range z { - fMin, fMax := refine(f, n.ID1()) - if fMin != nil && nMin.Cmp(fMin) < 0 { - nMin = fMin + for _, x := range z { + xMin, xMax := refine(x, n.ID1()) + if xMin != nil && nMin.Cmp(xMin) < 0 { + nMin = xMin } - if fMax != nil && nMax.Cmp(fMax) > 0 { - nMax = fMax + if xMax != nil && nMax.Cmp(xMax) > 0 { + nMax = xMax } } return nMin, nMax @@ -177,17 +177,17 @@ func (q *checker) proveBinaryOp(op t.Key, lhs *a.Expr, rhs *a.Expr) (ok bool) { } } - for _, f := range q.facts { - if !f.LHS().Expr().Eq(lhs) { + for _, x := range q.facts { + if !x.LHS().Expr().Eq(lhs) { continue } - factOp := f.ID0().Key() - if factOp == op && f.RHS().Expr().Eq(rhs) { + factOp := x.ID0().Key() + if factOp == op && x.RHS().Expr().Eq(rhs) { return true } if factOp == t.KeyXBinaryEqEq && rhsCV != nil { - if factCV := f.RHS().Expr().ConstValue(); factCV != nil { + if factCV := x.RHS().Expr().ConstValue(); factCV != nil { switch op { case t.KeyXBinaryNotEq: return factCV.Cmp(rhsCV) != 0
init.cpp fixes
@@ -949,7 +949,9 @@ bool AppInit2() // ********************************************************* Step 11: start node if (!CheckDiskSpace()) - return false; + { + return InitError(_("Error: not enough disk space to start Denarius.")); + } if (!strErrors.str().empty()) return InitError(strErrors.str()); @@ -987,10 +989,6 @@ bool AppInit2() } } - if(fMasterNode){ - return InitError("You can not start a masternode"); - } - printf("fMasterNode %d\n", fMasterNode); //Threading still needs reworking @@ -998,11 +996,11 @@ bool AppInit2() RandAddSeedPerfmon(); - // reindex addresses found in blockchain if(GetBoolArg("-reindexaddr", false)) { uiInterface.InitMessage(_("Rebuilding address index...")); + nStart = GetTimeMillis(); CBlockIndex *pblockAddrIndex = pindexBest; CTxDB txdbAddr("rw"); while(pblockAddrIndex) @@ -1014,6 +1012,9 @@ bool AppInit2() pblockAddr.RebuildAddressIndex(txdbAddr); pblockAddrIndex = pblockAddrIndex->pprev; } + + printf("Rebuilt address index of %i blocks in %"PRId64"ms\n", + pblockAddrIndex->nHeight, GetTimeMillis() - nStart); } //// debug print
naive: add pending-by-address to aggregator
:: on %tx diff from naive, remove the matching tx from the frozen group. :: ::TODO remaining general work: -:: - hook up timer callbacks :: ::TODO questions: :: - it's a bit weird how we just assume the raw and tx in raw-tx to match... :: /- *aggregator -/+ azimuth, naive, default-agent, ethereum, dbug, verb, lib=naive-transactions +/+ azimuth, + naive, + lib=naive-transactions, + default-agent, + ethereum, + dbug, + verb :: |% +$ state-0 ``noun+!>(pending) %+ skim pending |= pend-tx - ::TODO deduce address from sig.raw-tx ? - !! + =(u.wer (get-l1-address tx.raw-tx pre)) :: by-ship :: =; pending=(list pend-tx)
instanceid keys DOC fix param doc
@@ -47,9 +47,9 @@ struct lyd_value_instance_identifier_keys { }; /** - * @brief Print xpath1.0 value in the specific format. + * @brief Print instance-id-keys value in the specific format. * - * @param[in] xp_val xpath1.0 value structure. + * @param[in] val instance-id-keys value structure. * @param[in] format Format to print in. * @param[in] prefix_data Format-specific prefix data. * @param[out] str_value Printed value.
Ensure that %remove diffs actually get sent out for those interested in config. In the future, this should also go out to those interested in group, and delete the remote group when it is received.
$bear (so-bear bur.rum) $peer (so-delta-our rum) $gram (so-open src nev.rum) - $remove (so-delta-our %config src %remove ~) + $remove ::TODO should also remove from {remotes}? + (so-delta-our %config src %remove ~) :: $new ?: =(src so-cir) ?+ -.det %hasnot $gram %grams $new %config-l + $remove %config-l $config ?: =(cir.det [our.bol nom]) %config-l %config-r $status ?: =(cir.det [our.bol nom]) ?. =(nom.qer nom.det) ~ ?. %- circle-feel-story [wer.qer wat.qer nom.det det.det] ~ - =/ sor (~(got by stories) nom.qer) - ?. =< in %. ran.qer - ~(so-in-range so:ta nom.qer ~ sor) ~ - ?. ?=(?($gram $new $config $status) -.det.det) ~ + ?. ?| ?=($remove -.det.det) + :: + =< in %. ran.qer + =+ soy=(~(got by stories) nom.qer) + ~(so-in-range so:ta nom.qer ~ soy) + == + ~ + =+ out=?($gram $new $config $status $remove) + ?. ?=(out -.det.det) ~ :+ ~ %circle ?+ det.det det.det {$gram *}
vsyscall test build missing __stack_chk_guard
@@ -113,7 +113,9 @@ SRCS-udploop= \ $(SRCDIR)/runtime/tuple.c LDFLAGS-udploop= -static -SRCS-vsyscall= $(CURDIR)/vsyscall.c +SRCS-vsyscall= \ + $(CURDIR)/vsyscall.c \ + $(SRCDIR)/unix_process/ssp.c LDFLAGS-vsyscall= -static SRCS-web= \
abis/linux: fix struct stat on aarch64 This is not an ABI break as this struct is not used by anyone yet.
extern "C" { #endif -#if defined(__x86_64__) || defined(__aarch64__) +#if defined(__x86_64__) -// TODO: Is this correct for AArch64? struct stat { dev_t st_dev; ino_t st_ino; @@ -63,7 +62,7 @@ struct stat { long __unused[3]; }; -#elif defined(__riscv) && __riscv_xlen == 64 +#elif (defined(__riscv) && __riscv_xlen == 64) || defined (__aarch64__) struct stat { dev_t st_dev;
extmod/moductypes: Use mp_obj_is_dict_or_ordereddict to simplify code.
@@ -160,11 +160,7 @@ STATIC void uctypes_struct_print(const mp_print_t *print, mp_obj_t self_in, mp_p (void)kind; mp_obj_uctypes_struct_t *self = MP_OBJ_TO_PTR(self_in); const char *typen = "unk"; - if (mp_obj_is_type(self->desc, &mp_type_dict) - #if MICROPY_PY_COLLECTIONS_ORDEREDDICT - || mp_obj_is_type(self->desc, &mp_type_ordereddict) - #endif - ) { + if (mp_obj_is_dict_or_ordereddict(self->desc)) { typen = "STRUCT"; } else if (mp_obj_is_type(self->desc, &mp_type_tuple)) { mp_obj_tuple_t *t = MP_OBJ_TO_PTR(self->desc); @@ -258,11 +254,7 @@ STATIC mp_uint_t uctypes_struct_agg_size(mp_obj_tuple_t *t, int layout_type, mp_ } STATIC mp_uint_t uctypes_struct_size(mp_obj_t desc_in, int layout_type, mp_uint_t *max_align, mp_uint_t *offset_to_set) { - if (!mp_obj_is_type(desc_in, &mp_type_dict) - #if MICROPY_PY_COLLECTIONS_ORDEREDDICT - && !mp_obj_is_type(desc_in, &mp_type_ordereddict) - #endif - ) { + if (!mp_obj_is_dict_or_ordereddict(desc_in)) { if (mp_obj_is_type(desc_in, &mp_type_tuple)) { return uctypes_struct_agg_size((mp_obj_tuple_t *)MP_OBJ_TO_PTR(desc_in), layout_type, max_align, offset_to_set); } else if (mp_obj_is_small_int(desc_in)) { @@ -508,11 +500,7 @@ STATIC void set_aligned(uint val_type, void *p, mp_int_t index, mp_obj_t val) { STATIC mp_obj_t uctypes_struct_attr_op(mp_obj_t self_in, qstr attr, mp_obj_t set_val) { mp_obj_uctypes_struct_t *self = MP_OBJ_TO_PTR(self_in); - if (!mp_obj_is_type(self->desc, &mp_type_dict) - #if MICROPY_PY_COLLECTIONS_ORDEREDDICT - && !mp_obj_is_type(self->desc, &mp_type_ordereddict) - #endif - ) { + if (!mp_obj_is_dict_or_ordereddict(self->desc)) { mp_raise_TypeError(MP_ERROR_TEXT("struct: no fields")); }
Disabled pcap on windows
@@ -137,6 +137,7 @@ IF(USE_LAPACKE) LIST(APPEND PLUGINS poser_sba) ENDIF() +IF(NOT WIN32) find_library(PCAP_LIBRARY pcap) if(PCAP_LIBRARY) list(APPEND PLUGINS driver_usbmon) @@ -144,6 +145,7 @@ if(PCAP_LIBRARY) else() message("Can't build usbmon plugin -- pcap library was not found") endif() +endif() if(UNIX) list(APPEND PLUGINS driver_udp)
Extract video size computation One method, one thing.
@@ -40,18 +40,23 @@ public final class Device { return screenInfo; } - @SuppressWarnings("checkstyle:MagicNumber") private ScreenInfo computeScreenInfo(int maxSize) { + DisplayInfo displayInfo = serviceManager.getDisplayManager().getDisplayInfo(); + boolean rotated = (displayInfo.getRotation() & 1) != 0; + Size deviceSize = displayInfo.getSize(); + Size videoSize = computeVideoSize(deviceSize, maxSize); + return new ScreenInfo(deviceSize, videoSize, rotated); + } + + @SuppressWarnings("checkstyle:MagicNumber") + private static Size computeVideoSize(Size inputSize, int maxSize) { // Compute the video size and the padding of the content inside this video. // Principle: // - scale down the great side of the screen to maxSize (if necessary); // - scale down the other side so that the aspect ratio is preserved; // - round this value to the nearest multiple of 8 (H.264 only accepts multiples of 8) - DisplayInfo displayInfo = serviceManager.getDisplayManager().getDisplayInfo(); - boolean rotated = (displayInfo.getRotation() & 1) != 0; - Size deviceSize = displayInfo.getSize(); - int w = deviceSize.getWidth() & ~7; // in case it's not a multiple of 8 - int h = deviceSize.getHeight() & ~7; + int w = inputSize.getWidth() & ~7; // in case it's not a multiple of 8 + int h = inputSize.getHeight() & ~7; if (maxSize > 0) { if (BuildConfig.DEBUG && maxSize % 8 != 0) { throw new AssertionError("Max size must be a multiple of 8"); @@ -68,8 +73,7 @@ public final class Device { w = portrait ? minor : major; h = portrait ? major : minor; } - Size videoSize = new Size(w, h); - return new ScreenInfo(deviceSize, videoSize, rotated); + return new Size(w, h); } public Point getPhysicalPoint(Position position) {
client session BUGFIX handle data rpc replies with only default values Fixes
@@ -1661,13 +1661,8 @@ parse_reply(struct ly_ctx *ctx, struct lyxml_elem *xml, struct nc_rpc *rpc, int struct nc_rpc_act_generic *rpc_gen; int i, data_parsed = 0; - if (!xml->child) { - ERR("An empty <rpc-reply>."); - return NULL; - } - /* rpc-error */ - if (!strcmp(xml->child->name, "rpc-error") && xml->child->ns && !strcmp(xml->child->ns->value, NC_NS_BASE)) { + if (xml->child && !strcmp(xml->child->name, "rpc-error") && xml->child->ns && !strcmp(xml->child->ns->value, NC_NS_BASE)) { /* count and check elements */ i = 0; LY_TREE_FOR(xml->child, iter) { @@ -1707,7 +1702,7 @@ parse_reply(struct ly_ctx *ctx, struct lyxml_elem *xml, struct nc_rpc *rpc, int } /* ok */ - } else if (!strcmp(xml->child->name, "ok") && xml->child->ns && !strcmp(xml->child->ns->value, NC_NS_BASE)) { + } else if (xml->child && !strcmp(xml->child->name, "ok") && xml->child->ns && !strcmp(xml->child->ns->value, NC_NS_BASE)) { if (xml->child->next) { ERR("<rpc-reply> content mismatch (<ok> and <%s>).", xml->child->next->name); return NULL; @@ -1742,7 +1737,8 @@ parse_reply(struct ly_ctx *ctx, struct lyxml_elem *xml, struct nc_rpc *rpc, int case NC_RPC_GETCONFIG: case NC_RPC_GET: - if (!xml->child->child) { + /* we should definitely have received at least an empty "data" element even on empty reply, but fine */ + if (!xml->child || !xml->child->child) { /* we did not receive any data */ data_rpl = malloc(sizeof *data_rpl); if (!data_rpl) { @@ -1786,7 +1782,7 @@ parse_reply(struct ly_ctx *ctx, struct lyxml_elem *xml, struct nc_rpc *rpc, int case NC_RPC_VALIDATE: case NC_RPC_SUBSCRIBE: /* there is no output defined */ - ERR("Unexpected data reply (root elem \"%s\").", xml->child->name); + ERR("Unexpected data reply (root elem \"%s\").", xml->child ? xml->child->name : NULL); return NULL; default: ERRINT; @@ -1804,6 +1800,13 @@ parse_reply(struct ly_ctx *ctx, struct lyxml_elem *xml, struct nc_rpc *rpc, int if (!data_parsed) { data_rpl->data = lyd_parse_xml(ctx, &xml->child, LYD_OPT_RPCREPLY | LYD_OPT_DESTRUCT | parseroptions, rpc_act, NULL); + if (!ly_errno && !data_rpl->data->child) { + ERR("An empty data <rpc-reply>."); + lyd_free_withsiblings(rpc_act); + lyd_free(data_rpl->data); + free(data_rpl); + return NULL; + } } else { /* <get>, <get-config> */ data_rpl->data = data;
esp8266/machine_pin: Disable ets_loop_iter during hard IRQ handler. Otherwise ets_loop_iter may be reentered. Related to issue
#include "py/gc.h" #include "py/mphal.h" #include "extmod/virtpin.h" +#include "ets_alt_task.h" #include "modmachine.h" #define GET_TRIGGER(phys_port) \ @@ -103,23 +104,26 @@ void pin_init0(void) { } void pin_intr_handler(uint32_t status) { - mp_sched_lock(); - gc_lock(); status &= 0xffff; for (int p = 0; status; ++p, status >>= 1) { if (status & 1) { mp_obj_t handler = MP_STATE_PORT(pin_irq_handler)[p]; if (handler != MP_OBJ_NULL) { if (pin_irq_is_hard[p]) { + int orig_ets_loop_iter_disable = ets_loop_iter_disable; + ets_loop_iter_disable = 1; + mp_sched_lock(); + gc_lock(); mp_call_function_1_protected(handler, MP_OBJ_FROM_PTR(&pyb_pin_obj[p])); + gc_unlock(); + mp_sched_unlock(); + ets_loop_iter_disable = orig_ets_loop_iter_disable; } else { mp_sched_schedule(handler, MP_OBJ_FROM_PTR(&pyb_pin_obj[p])); } } } } - gc_unlock(); - mp_sched_unlock(); } pyb_pin_obj_t *mp_obj_get_pin_obj(mp_obj_t pin_in) {
schema BUGFIX handling empty array of features Beasides NULL, accept also the array of size 1 with the NULL pointer.
@@ -522,7 +522,7 @@ lys_enable_features(struct lysp_module *pmod, const char **features) uint32_t i = 0; struct lysp_feature *f = 0; - if (!features) { + if (!features || !features[0]) { /* keep all features disabled */ return LY_SUCCESS; }
kakadu: update led pwm duty Set led pwm duty to max to get full brightness. BRANCH=kukui TEST=make -j BOARD=kakadu TEST=make buildall TEST=Check LED on kakadu.
@@ -116,8 +116,8 @@ static void kakadu_led_init(void) mt6370_led_set_dim_mode(LED_GREEN, dim); mt6370_led_set_pwm_frequency(LED_RED, freq); mt6370_led_set_pwm_frequency(LED_GREEN, freq); - mt6370_led_set_pwm_dim_duty(LED_RED, 0); - mt6370_led_set_pwm_dim_duty(LED_GREEN, 0); + mt6370_led_set_pwm_dim_duty(LED_RED, 12); + mt6370_led_set_pwm_dim_duty(LED_GREEN, 31); } DECLARE_HOOK(HOOK_INIT, kakadu_led_init, HOOK_PRIO_DEFAULT);
Update default theme window styles
@@ -886,6 +886,9 @@ BOOLEAN CALLBACK PhpThemeWindowEnumChildWindows( } else if (PhEqualStringZ(className, L"SysListView32", FALSE)) { + PhSetWindowStyle(WindowHandle, WS_BORDER, 0); + PhSetWindowExStyle(WindowHandle, WS_EX_CLIENTEDGE, 0); + ListView_SetBkColor(WindowHandle, RGB(30, 30, 30)); ListView_SetTextBkColor(WindowHandle, RGB(30, 30, 30)); ListView_SetTextColor(WindowHandle, RGB(0xff, 0xff, 0xff)); @@ -894,6 +897,11 @@ BOOLEAN CALLBACK PhpThemeWindowEnumChildWindows( { NOTHING; } + else if (PhEqualStringZ(className, L"PhTreeNew", FALSE)) + { + PhSetWindowStyle(WindowHandle, WS_BORDER, 0); + PhSetWindowExStyle(WindowHandle, WS_EX_CLIENTEDGE, 0); + } return TRUE; }
ToDo: Mention `cpptemplate` plugin
@@ -628,15 +628,15 @@ DEFAULT_BACKEND -> (+ make it work) good out-of-the-box behaviour -## CPPPLUGIN ## +## CPPTEMPLATE ## -cppplugin: - make a nice and easy cpp solution for plugins +cpptemplate: + make a nice and easy cpp solution for plugins (improve current template) (integration into cpp binding) assemble C symbols with macros keep C->C++ problems at one place to be included -C++: (FINISH cppplugin) +C++: (FINISH cpptemplate) how to write backends in C++ Exceptions propagations (C++ Exceptions to error codes)
rollback: Fix compile warning when local entropy is disabled. BRANCH=none TEST=make buildall -j
@@ -168,8 +168,10 @@ static int add_entropy(uint8_t *dst, const uint8_t *src, BUILD_ASSERT(SHA256_DIGEST_SIZE == CONFIG_ROLLBACK_SECRET_SIZE); struct sha256_ctx ctx; uint8_t *hash; +#ifdef CONFIG_ROLLBACK_SECRET_LOCAL_ENTROPY_SIZE uint8_t extra; int i; +#endif SHA256_init(&ctx); SHA256_update(&ctx, src, CONFIG_ROLLBACK_SECRET_SIZE);
Print current values of stat counters as well. For some reasons unknown to me the current values of stat counters are never printed. This makes is quite hard to use printing during the debugging in the middle of program run.
@@ -167,6 +167,7 @@ static void mi_print_count(int64_t n, int64_t unit, mi_output_fun* out, void* ar static void mi_stat_print(const mi_stat_count_t* stat, const char* msg, int64_t unit, mi_output_fun* out, void* arg ) { _mi_fprintf(out, arg,"%10s:", msg); if (unit>0) { + mi_print_amount(stat->current, unit, out, arg); mi_print_amount(stat->peak, unit, out, arg); mi_print_amount(stat->allocated, unit, out, arg); mi_print_amount(stat->freed, unit, out, arg); @@ -178,6 +179,7 @@ static void mi_stat_print(const mi_stat_count_t* stat, const char* msg, int64_t _mi_fprintf(out, arg, " ok\n"); } else if (unit<0) { + mi_print_amount(stat->current, -1, out, arg); mi_print_amount(stat->peak, -1, out, arg); mi_print_amount(stat->allocated, -1, out, arg); mi_print_amount(stat->freed, -1, out, arg); @@ -194,6 +196,7 @@ static void mi_stat_print(const mi_stat_count_t* stat, const char* msg, int64_t _mi_fprintf(out, arg, " ok\n"); } else { + mi_print_amount(stat->current, 1, out, arg); mi_print_amount(stat->peak, 1, out, arg); mi_print_amount(stat->allocated, 1, out, arg); _mi_fprintf(out, arg, "\n"); @@ -215,7 +218,7 @@ static void mi_stat_counter_print_avg(const mi_stat_counter_t* stat, const char* static void mi_print_header(mi_output_fun* out, void* arg ) { - _mi_fprintf(out, arg, "%10s: %10s %10s %10s %10s %10s\n", "heap stats", "peak ", "total ", "freed ", "unit ", "count "); + _mi_fprintf(out, arg, "%10s: %10s %10s %10s %10s %10s %10s\n", "heap stats", "current ", "peak ", "total ", "freed ", "unit ", "count "); } #if MI_STAT>1
Drop incorrect skipping of some evp_test testcases with no-gost
@@ -26,7 +26,6 @@ my $no_des = disabled("des"); my $no_dh = disabled("dh"); my $no_dsa = disabled("dsa"); my $no_ec = disabled("ec"); -my $no_gost = disabled("gost"); my $no_sm2 = disabled("sm2"); my $no_siv = disabled("siv"); @@ -78,7 +77,7 @@ push @files, qw( evppkey_ecdsa.txt evppkey_kas.txt evppkey_mismatch.txt - ) unless $no_ec || $no_gost; + ) unless $no_ec; # A list of tests that only run with the default provider # (i.e. The algorithms are not present in the fips provider)
refactor: use new github function names
#include <string.h> #include <curl/curl.h> -#include "github-v3.h" +#include "github.h" #include "orka-utils.h" #include "orka-config.h" @@ -49,8 +49,8 @@ int main (int argc, char ** argv) } - struct github_v3_git_op_file ** files = NULL; - files = (struct github_v3_git_op_file**)ntl_calloc(argc-optind, sizeof(struct github_v3_git_op_file)); + struct github_git_op_file ** files = NULL; + files = (struct github_git_op_file**)ntl_calloc(argc-optind, sizeof(struct github_git_op_file)); for (int i = 0; files[i]; ++i) files[i]->path = argv[optind + i]; @@ -62,20 +62,20 @@ int main (int argc, char ** argv) char *username = orka_config_get_field(&config, "github.username"); char *token = orka_config_get_field(&config, "github.token"); - struct github_v3_git_op *data = github_v3_git_op_init(username, token, ".cee-repo"); + struct github_git_op *data = github_git_op_init(username, token, ".cee-repo"); - github_v3_git_op_update_my_fork(data); - github_v3_git_op_create_blobs(data, files); - char * head_commit_sha = github_v3_git_op_get_head_commit(data); - char * base_tree_sha = github_v3_git_op_get_tree_sha(data, head_commit_sha); - char * tree_sha = github_v3_git_op_create_tree(data, base_tree_sha, files); + github_git_op_update_my_fork(data); + github_git_op_create_blobs(data, files); + char * head_commit_sha = github_git_op_get_head_commit(data); + char * base_tree_sha = github_git_op_get_tree_sha(data, head_commit_sha); + char * tree_sha = github_git_op_create_tree(data, base_tree_sha, files); char * commit_sha = - github_v3_git_op_create_a_commit(data, tree_sha, head_commit_sha, commit_msg); + github_git_op_create_a_commit(data, tree_sha, head_commit_sha, commit_msg); char new_branch[256]; snprintf(new_branch, sizeof(new_branch), "n%ld", time(NULL)); - github_v3_git_op_create_a_branch(data, head_commit_sha, new_branch); - github_v3_git_op_update_a_commit(data, new_branch, commit_sha); - github_v3_git_op_create_a_pull_request(data, new_branch, commit_msg); + github_git_op_create_a_branch(data, head_commit_sha, new_branch); + github_git_op_update_a_commit(data, new_branch, commit_sha); + github_git_op_create_a_pull_request(data, new_branch, commit_msg); return 0; }
tools: added realpath_int() for MacOS script path resolution JIRA
# This script should be sourced, not executed. +function realpath_int() { + wdir="$PWD"; [ "$PWD" = "/" ] && wdir="" + case "$0" in + /*) scriptdir="${0}";; + *) scriptdir="$wdir/${0#./}";; + esac + scriptdir="${scriptdir%/*}" + echo "$scriptdir" +} + + function idf_export_main() { # The file doesn't have executable permissions, so this shouldn't really happen. # Doing this in case someone tries to chmod +x it and execute... @@ -14,8 +25,13 @@ function idf_export_main() { # If using bash, try to guess IDF_PATH from script location if [[ -n "${BASH_SOURCE}" ]] then + if [[ "$OSTYPE" == "darwin"* ]]; then + script_dir="$(realpath_int $BASH_SOURCE)" + else script_name="$(readlink -f $BASH_SOURCE)" - export IDF_PATH="$(dirname ${script_name})" + script_dir="$(dirname $script_name)" + fi + export IDF_PATH="${script_dir}" else echo "IDF_PATH must be set before sourcing this script" return 1 @@ -67,6 +83,7 @@ function idf_export_main() { unset path_entry unset IDF_ADD_PATHS_EXTRAS unset idf_exports + # Not unsetting IDF_PYTHON_ENV_PATH, it can be used by IDF build system # to check whether we are using a private Python environment @@ -79,4 +96,5 @@ function idf_export_main() { idf_export_main +unset realpath_int unset idf_export_main
VERSION bump to version 1.4.44
@@ -37,7 +37,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 4) -set(SYSREPO_MICRO_VERSION 43) +set(SYSREPO_MICRO_VERSION 44) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
Remove obsolete test in common/memContext. Once upon a time the allocation array was allocated up front so this test was required for the top context, which did not allocate up front. Now allocations are done on demand so this case is covered for every context that does not allocate memory.
@@ -155,12 +155,6 @@ testRun(void) TEST_RESULT_VOID(memContextSwitch(memContextTop()), "switch to top"); TEST_RESULT_VOID(memContextFree(memContextTop()), "free top"); - - MemContext *noAllocation = memContextNewP("empty"); - memContextKeep(); - noAllocation->allocListSize = 0; - free(noAllocation->allocList); - TEST_RESULT_VOID(memContextFree(noAllocation), "free context with no allocations"); } // *****************************************************************************************************************************
Cerise: Modify DC S3 Batled behavior Change DC S3 Batled 1s on/3s off BRANCH=firmware-kukui-12573.B TEST=test firmware branch, DC S3 batled behavior ok
@@ -23,8 +23,8 @@ struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_WHITE, LED_INDEFINITE} }, [STATE_DISCHARGE_S0] = {{EC_LED_COLOR_WHITE, LED_INDEFINITE} }, - [STATE_DISCHARGE_S3] = {{EC_LED_COLOR_WHITE, 2 * LED_ONE_SEC}, - {LED_OFF, 2 * LED_ONE_SEC} }, + [STATE_DISCHARGE_S3] = {{EC_LED_COLOR_WHITE, 1 * LED_ONE_SEC}, + {LED_OFF, 3 * LED_ONE_SEC} }, [STATE_DISCHARGE_S5] = {{LED_OFF, LED_INDEFINITE} }, [STATE_DISCHARGE_S0_BAT_LOW] = {{EC_LED_COLOR_AMBER, 1 * LED_ONE_SEC}, {LED_OFF, 3 * LED_ONE_SEC} },
explicitly cast htons value
@@ -4630,7 +4630,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, } else { ip6h->ip6_nxt = IPPROTO_SCTP; } - ip6h->ip6_plen = htons(packet_length - sizeof(struct ip6_hdr)); + ip6h->ip6_plen = htons((uint16_t)(packet_length - sizeof(struct ip6_hdr))); ip6h->ip6_dst = sin6->sin6_addr; /* @@ -11899,7 +11899,7 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockaddr *dst, #endif #ifdef INET6 case AF_INET6: - ip6->ip6_plen = htons(len - sizeof(struct ip6_hdr)); + ip6->ip6_plen = htons((uint16_t)(len - sizeof(struct ip6_hdr))); if (port) { shout->checksum = sctp_calculate_cksum(mout, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); SCTP_STAT_INCR(sctps_sendswcrc);
fix potential deadlock in block.c
@@ -1030,7 +1030,6 @@ static void *work_thread(void *arg) } pthread_mutex_lock(&block_mutex); - pthread_mutex_lock(&g_transport_mutex); if (g_xdag_state == XDAG_STATE_REST) { g_xdag_sync_on = 0; @@ -1057,7 +1056,9 @@ static void *work_thread(void *arg) conn_time = sync_time = 0; goto begin; - } else if (t > (g_xdag_last_received << 10) && t - (g_xdag_last_received << 10) > 3 * MAIN_CHAIN_PERIOD) { + } else { + pthread_mutex_lock(&g_transport_mutex); + if (t > (g_xdag_last_received << 10) && t - (g_xdag_last_received << 10) > 3 * MAIN_CHAIN_PERIOD) { g_xdag_state = (g_light_mode ? (g_xdag_testnet ? XDAG_STATE_TTST : XDAG_STATE_TRYP) : (g_xdag_testnet ? XDAG_STATE_WTST : XDAG_STATE_WAIT)); conn_time = sync_time = 0; @@ -1083,13 +1084,14 @@ static void *work_thread(void *arg) g_xdag_state = (g_xdag_testnet ? XDAG_STATE_STST : XDAG_STATE_SYNC); } } + pthread_mutex_unlock(&g_transport_mutex); + } if (!g_light_mode) { check_new_main(); } struct block_internal *ours = ourfirst; - pthread_mutex_unlock(&g_transport_mutex); pthread_mutex_unlock(&block_mutex); xdag_show_state(ours ? ours->hash : 0);
Fix typo in variable name Rust_CARGO_EXECUTABLE in rs_loader's CMakeLists
@@ -49,12 +49,12 @@ add_custom_target(${target}_runtime add_custom_target(${target} ALL WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${CARGO_EXECUTABLE} build ${TARGET_BUILD_TYPE} + COMMAND ${Rust_CARGO_EXECUTABLE} build ${TARGET_BUILD_TYPE} # TODO: $ORIGIN does not work, but even using absolute path, the library librustc_driver depends on libstd and libLLVM # but they have the rpath hardcoded to the rustup folder, for mitigating this, we are using LD_LIBRARY_PATH in the test # although it may cause problems in the future in the distributable or docker builds, this must be reviewed - # COMMAND ${CMAKE_COMMAND} -E env RUSTFLAGS='-C link-arg=-Wl,-rpath,${TARGET_OUTPUT_PATH}' ${CARGO_EXECUTABLE} build ${TARGET_BUILD_TYPE} - # COMMAND ${CMAKE_COMMAND} -E env RUSTFLAGS='-C link-arg=-Wl,-rpath,\$ORIGIN' ${CARGO_EXECUTABLE} build ${TARGET_BUILD_TYPE} + # COMMAND ${CMAKE_COMMAND} -E env RUSTFLAGS='-C link-arg=-Wl,-rpath,${TARGET_OUTPUT_PATH}' ${Rust_CARGO_EXECUTABLE} build ${TARGET_BUILD_TYPE} + # COMMAND ${CMAKE_COMMAND} -E env RUSTFLAGS='-C link-arg=-Wl,-rpath,\$ORIGIN' ${Rust_CARGO_EXECUTABLE} build ${TARGET_BUILD_TYPE} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${TARGET_BUILD_PATH} ${TARGET_OUTPUT} DEPENDS ${target}_runtime )
Fix bug with input()
@@ -119,8 +119,8 @@ static Value inputNative(VM *vm, int argCount, Value *args) { printf("%s", AS_CSTRING(prompt)); } - uint8_t current_size = 128; - char *line = malloc(current_size); + uint64_t currentSize = 128; + char *line = malloc(currentSize); if (line == NULL) { runtimeError(vm, "Memory error on input()!"); @@ -128,13 +128,13 @@ static Value inputNative(VM *vm, int argCount, Value *args) { } int c = EOF; - uint8_t i = 0; + uint64_t i = 0; while ((c = getchar()) != '\n' && c != EOF) { line[i++] = (char) c; - if (i == current_size) { - current_size = GROW_CAPACITY(current_size); - line = realloc(line, current_size); + if (i + 1 == currentSize) { + currentSize = GROW_CAPACITY(currentSize); + line = realloc(line, currentSize); if (line == NULL) { printf("Unable to allocate memory\n");
[lwIP] code cleanup for Kconfig. 1. code cleanup for Kconfig. 2. fix the compiling warning for BYTE_ORDER.
#define LWIP_HAVE_LOOPIF 0 #define LWIP_PLATFORM_BYTESWAP 0 + +#ifndef BYTE_ORDER #define BYTE_ORDER LITTLE_ENDIAN +#endif /* #define RT_LWIP_DEBUG */
[numerics] add DEBUG verbose
@@ -47,8 +47,6 @@ int gfc3d_compute_error(GlobalFrictionContactProblem* problem, if (problem == NULL || globalVelocity == NULL) numerics_error("gfc3d_compute_error", "null input"); - - /* Computes error = dnorm2( GlobalVelocity -M^-1( q + H reaction)*/ int nc = problem->numberOfContacts; int m = nc * 3; @@ -60,8 +58,6 @@ int gfc3d_compute_error(GlobalFrictionContactProblem* problem, DEBUG_EXPR(NV_display(reaction,m)); DEBUG_EXPR(NV_display(velocity,m)); - - NumericsMatrix *H = problem->H; NumericsMatrix *M = problem->M; @@ -71,8 +67,6 @@ int gfc3d_compute_error(GlobalFrictionContactProblem* problem, } double* tmp = options->dWork; - - cblas_dcopy_msan(n, q, 1, tmp , 1); if (nc >0) { @@ -86,9 +80,10 @@ int gfc3d_compute_error(GlobalFrictionContactProblem* problem, DEBUG_PRINTF("square norm of -M v + H R + q = %e\n", *error); /* CHECK_RETURN(!NM_gesv_expert(problem->M, globalVelocity, NM_KEEP_FACTORS)); */ - - - if (nc >0) +#ifdef DEBUG_MESSAGES + double error_equilibria =0.0; +#endif + DEBUG_EXPR_WE(error_equilibria = *error; ); { /* Checks inputs */ if (reaction == NULL || velocity == NULL) @@ -106,7 +101,7 @@ int gfc3d_compute_error(GlobalFrictionContactProblem* problem, } DEBUG_PRINTF("square of the error = %e\n", *error); - + DEBUG_PRINTF("square of the error in complementarity = %e\n", *error- error_equilibria); /* Done, taking the square root */ *error = sqrt(*error);
elektrad: install eslint-plugin-standard
"babel-eslint": "^7.1.1", "babel-watch": "^2.0.2", "eslint": "^3.11.1", - "eslint-config-standard": "^6.2.1" + "eslint-config-standard": "^6.2.1", + "eslint-plugin-standard": "^2.0.1" } }
maint: better flakey example diagnostics. Fixes Fixes * spec/posix_spec.yaml (fcntl): Show unexpected errno string.
@@ -463,23 +463,23 @@ specify posix: - it returns error if cannot lock file with F_SETLK: | parent_fd = open(path, O_RDWR) result = fcntl(parent_fd, F_SETLK, write_lock) - expect(result).to_be(0) + expect(result).to_be(SUCCESS) process = fork() if process == P_CHILD then child_fd = open(path, O_RDWR) - result = fcntl(child_fd, F_SETLK, write_lock) + result, errmsg, errcode = fcntl(child_fd, F_SETLK, write_lock) close(child_fd) --(not sure how to expect() in subprocess) if result == SUCCESS then - os.exit(10) - elseif errno() ~= errno(EACCES) and errno() ~= errno(EAGAIN) then - os.exit(11) + os.exit(100) + elseif result == nil and errcode ~= EACCES and errcode ~= EAGAIN then + os.exit(errcode) else - os.exit(12) + os.exit(101) end else _, _, exit_code = wait(process) - expect(exit_code).to_be(12) + expect({exit_code, errno(exit_code)}).to_equal {101, errno(101)} end close(parent_fd)
fix ksi uninstall
@@ -36,7 +36,9 @@ NTSTATUS SetupUninstallBuild( if (!NT_SUCCESS(PhDeleteDirectoryWin32(Context->SetupInstallPath))) { static PH_STRINGREF ksiFileName = PH_STRINGREF_INIT(L"ksi.dll"); + static PH_STRINGREF ksiOldFileName = PH_STRINGREF_INIT(L"ksi.dll-old"); PPH_STRING ksiFile; + PPH_STRING ksiOldFile; ksiFile = PhConcatStringRef3( &Context->SetupInstallPath->sr, @@ -44,9 +46,18 @@ NTSTATUS SetupUninstallBuild( &ksiFileName ); - MoveFileExW(PhGetString(ksiFile), NULL, MOVEFILE_DELAY_UNTIL_REBOOT); + ksiOldFile = PhConcatStringRef3( + &Context->SetupInstallPath->sr, + &PhNtPathSeperatorString, + &ksiOldFileName + ); + + PhMoveFileWin32(PhGetString(ksiFile), PhGetString(ksiOldFile)); + + MoveFileExW(PhGetString(ksiOldFile), NULL, MOVEFILE_DELAY_UNTIL_REBOOT); MoveFileExW(PhGetString(Context->SetupInstallPath), NULL, MOVEFILE_DELAY_UNTIL_REBOOT); + PhDereferenceObject(ksiOldFile); PhDereferenceObject(ksiFile); Context->NeedsReboot = TRUE;
Fix issue when algotithm header is not present
@@ -1351,6 +1351,9 @@ void esp_http_client_add_auth(esp_http_client_handle_t client) client->auth_data->nc = 1; client->auth_data->realm = http_utils_get_string_between(auth_header, "realm=\"", "\""); client->auth_data->algorithm = http_utils_get_string_between(auth_header, "algorithm=", ","); + if (client->auth_data->algorithm == NULL) { + client->auth_data->algorithm = strdup("MD5"); + } client->auth_data->qop = http_utils_get_string_between(auth_header, "qop=\"", "\""); client->auth_data->nonce = http_utils_get_string_between(auth_header, "nonce=\"", "\""); client->auth_data->opaque = http_utils_get_string_between(auth_header, "opaque=\"", "\"");
fixed calculation of AES-128-CMAC
@@ -461,6 +461,11 @@ else if(keyver == 3) memcpy (pkeptr +34, wpak->nonce, 32); memcpy (pkeptr +66, zeiger->nonce, 32); } + pkedata_prf[0] = 1; + pkedata_prf[1] = 0; + memcpy (pkedata_prf + 2, pkedata, 98); + pkedata_prf[100] = 0x80; + pkedata_prf[101] = 1; HMAC(EVP_sha256(), &pmkpbkdf2, 32, pkedata_prf, 2 + 98 + 2, ptk, NULL); omac1_aes_128(ptk, zeiger->eapol, zeiger->eapauthlen, mymic); if(memcmp(zeiger->hash, &mymic, 16) == 0)
Create .buildtools file once the tools have been installed
@@ -29,4 +29,5 @@ if exist ".buildtools" ( echo y | call sdkmanager.bat --install --include_obsolete --verbose --sdk_root=%ANDROID_SDK_ROOT% "ndk-bundle" "cmake;3.10.2.4988404" "ndk;21.1.6352462" popd popd + copy NUL .buildtools )
sds: fix sds_printf() prototype in declaration
@@ -83,6 +83,6 @@ flb_sds_t flb_sds_cat_utf8(flb_sds_t *s, char *str, int len); flb_sds_t flb_sds_increase(flb_sds_t s, size_t len); flb_sds_t flb_sds_copy(flb_sds_t s, char *str, int len); void flb_sds_destroy(flb_sds_t s); -flb_sds_t flb_sds_printf(flb_sds_t s, const char *fmt, ...); +flb_sds_t flb_sds_printf(flb_sds_t *s, const char *fmt, ...); #endif
stats: fix memory leak in statseg config Type: fix
@@ -746,23 +746,18 @@ statseg_config (vlib_main_t * vm, unformat_input_t * input) { stat_segment_main_t *sm = &stat_segment_main; - /* set default socket file name when statseg config stanza is empty. */ - sm->socket_name = format (0, "%s", STAT_SEGMENT_SOCKET_FILE); - /* - * NULL-terminate socket name string - * clib_socket_init()->socket_config() use C str* - */ - vec_add1 (sm->socket_name, 0); - while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) { if (unformat (input, "socket-name %s", &sm->socket_name)) ; else if (unformat (input, "default")) - sm->socket_name = format (0, "%s", STAT_SEGMENT_SOCKET_FILE); - else - if (unformat - (input, "size %U", unformat_memory_size, &sm->memory_size)) + { + vec_reset_length (sm->socket_name); + sm->socket_name = format (sm->socket_name, "%s", + STAT_SEGMENT_SOCKET_FILE); + } + else if (unformat (input, "size %U", + unformat_memory_size, &sm->memory_size)) ; else if (unformat (input, "per-node-counters on")) sm->node_counters_enabled = 1; @@ -772,6 +767,17 @@ statseg_config (vlib_main_t * vm, unformat_input_t * input) return clib_error_return (0, "unknown input `%U'", format_unformat_error, input); } + + /* set default socket file name when statseg config stanza is empty. */ + if (!vec_len (sm->socket_name)) + sm->socket_name = format (sm->socket_name, "%s", + STAT_SEGMENT_SOCKET_FILE); + /* + * NULL-terminate socket name string + * clib_socket_init()->socket_config() use C str* + */ + vec_terminate_c_string (sm->socket_name); + return 0; }
upsampling: rm asserts w/REDUCE_CSP+OMIT_C_CODE with WEBP_NEON_OMIT_C_CODE the default _C functions won't be set and with WEBP_REDUCE_CSP the NEON functions won't be either triggering an assert for an empty table member.
@@ -322,6 +322,7 @@ WEBP_TSAN_IGNORE_FUNCTION void WebPInitUpsamplers(void) { assert(WebPUpsamplers[MODE_BGRA] != NULL); assert(WebPUpsamplers[MODE_rgbA] != NULL); assert(WebPUpsamplers[MODE_bgrA] != NULL); +#if !defined(WEBP_REDUCE_CSP) || !WEBP_NEON_OMIT_C_CODE assert(WebPUpsamplers[MODE_RGB] != NULL); assert(WebPUpsamplers[MODE_BGR] != NULL); assert(WebPUpsamplers[MODE_ARGB] != NULL); @@ -329,6 +330,7 @@ WEBP_TSAN_IGNORE_FUNCTION void WebPInitUpsamplers(void) { assert(WebPUpsamplers[MODE_RGB_565] != NULL); assert(WebPUpsamplers[MODE_Argb] != NULL); assert(WebPUpsamplers[MODE_rgbA_4444] != NULL); +#endif #endif // FANCY_UPSAMPLING upsampling_last_cpuinfo_used2 = VP8GetCPUInfo;
apps/btc/bip143: remove needless "static" keyword Must have been a copy/paste error, ctx can be a stack var instead.
@@ -32,7 +32,7 @@ void btc_bip143_sighash( uint8_t* out // 32 bytes result ) { - static sha256_context_t ctx = {0}; + sha256_context_t ctx = {0}; sha256_reset(&ctx); // https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki#specification // 1.
added x4y4 to the snap_pblock
@@ -25,5 +25,6 @@ resize_pblock pblock_action -remove CLOCKREGION_X3Y3:CLOCKREGION_X3Y4 #enlarge SNAP PBLOCK for DDR resize_pblock pblock_snap -add CLOCKREGION_X3Y3:CLOCKREGION_X3Y4 +resize_pblock pblock_snap -add CLOCKREGION_X4Y4:CLOCKREGION_X4Y4 add_cells_to_pblock pblock_snap [get_cells [list a0/axi_clock_converter_i]] -clear_locs add_cells_to_pblock pblock_snap [get_cells [list a0/ddr3sdram_bank0]] -clear_locs
fib: remove unsued path flag Type: refactor
@@ -140,10 +140,6 @@ typedef enum fib_path_oper_attribute_t_ { * The path is resolved */ FIB_PATH_OPER_ATTRIBUTE_RESOLVED, - /** - * The path is attached, despite what the next-hop may say. - */ - FIB_PATH_OPER_ATTRIBUTE_ATTACHED, /** * The path has become a permanent drop. */ @@ -178,7 +174,6 @@ typedef enum fib_path_oper_flags_t_ { FIB_PATH_OPER_FLAG_RECURSIVE_LOOP = (1 << FIB_PATH_OPER_ATTRIBUTE_RECURSIVE_LOOP), FIB_PATH_OPER_FLAG_DROP = (1 << FIB_PATH_OPER_ATTRIBUTE_DROP), FIB_PATH_OPER_FLAG_RESOLVED = (1 << FIB_PATH_OPER_ATTRIBUTE_RESOLVED), - FIB_PATH_OPER_FLAG_ATTACHED = (1 << FIB_PATH_OPER_ATTRIBUTE_ATTACHED), } __attribute__ ((packed)) fib_path_oper_flags_t; /**
Print some more informative text when assertion fails
@@ -37,6 +37,8 @@ _xassert(const char *file, int lineno) printf("Assertion failed: file %s, line %d.\n", file, lineno); #if !ASSERT_RETURNS + printf("The firmware will stop running\n"); + printf("A watchdog timer may restart this device\n"); while(1); #endif }
CI/CD: install libsgx-headers*.deb in Dockerfile-ubuntu18.04 libsgx-header*.deb is needed by libsgx-dcap-quote-verify*.deb. If libsgx-dcap-quote-verify*.deb isn't installed by apt-get install but installed by dpkg, we also need to install libsgx-headers explicitly.
@@ -36,3 +36,9 @@ RUN apt-get install -y apt-transport-https ca-certificates curl software-propert # configure docker RUN mkdir -p /etc/docker && \ echo "{\n\t\"runtimes\": {\n\t\t\"rune\": {\n\t\t\t\"path\": \"/usr/local/bin/rune\",\n\t\t\t\"runtimeArgs\": []\n\t\t}\n\t},\n\t\"storage-driver\": \"vfs\"\n}" >> /etc/docker/daemon.json + +# configure SGX apt source +RUN echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu bionic main' | tee /etc/apt/sources.list.d/intel-sgx.list && wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | apt-key add - + +# install libsgx-headers which is needed by libsgx-dcap-quote-verify*.deb +RUN apt-get update -y && apt-get remove -y libsgx-dcap-ql-dev && apt-get install -y libsgx-headers=2.12.100.3-bionic1
minor timeout review tweak
@@ -3315,8 +3315,11 @@ static void fio_review_timeout(void *arg, void *ignr) { if (!fd_data(fd).protocol || (fd_data(fd).active + timeout >= review)) goto finish; tmp = protocol_try_lock(fd, FIO_PR_LOCK_STATE); - if (!tmp) + if (!tmp) { + if (errno == EBADF) + goto finish; goto reschedule; + } if (prt_meta(tmp).locks[FIO_PR_LOCK_TASK] || prt_meta(tmp).locks[FIO_PR_LOCK_WRITE]) goto unlock;
Fix wolfssl BIO file memory leak
@@ -56,12 +56,6 @@ int new_session_cb(WOLFSSL *ssl, WOLFSSL_SESSION *session) { std::numeric_limits<uint32_t>::max()) { std::cerr << "max_early_data_size is not 0xffffffff" << std::endl; } - auto f = wolfSSL_BIO_new_file(config.session_file, "w"); - if (f == nullptr) { - std::cerr << "Could not write TLS session in " << config.session_file - << std::endl; - return 0; - } unsigned char sbuffer[16 * 1024], *data; unsigned int sz; @@ -78,12 +72,20 @@ int new_session_cb(WOLFSSL *ssl, WOLFSSL_SESSION *session) { data = sbuffer; sz = wolfSSL_i2d_SSL_SESSION(session, &data); + auto f = wolfSSL_BIO_new_file(config.session_file, "w"); + if (f == nullptr) { + std::cerr << "Could not write TLS session in " << config.session_file + << std::endl; + return 0; + } + + auto f_d = defer(wolfSSL_BIO_free, f); + if (!wolfSSL_PEM_write_bio(f, "WOLFSSL SESSION PARAMETERS", "", sbuffer, sz)) { std::cerr << "Unable to write TLS session to file" << std::endl; return 0; } - wolfSSL_BIO_free(f); std::cerr << "new_session_cb: wrote " << sz << " of session data" << std::endl; #else
Fix luv_prep_bufs declaration
@@ -128,7 +128,7 @@ static void luv_alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* b /* From misc.c */ static void luv_prep_buf(lua_State *L, int idx, uv_buf_t *pbuf); -static uv_buf_t* luv_prep_bufs(lua_State* L, int index, size_t *count); +static uv_buf_t* luv_prep_bufs(lua_State* L, int index, size_t *count, int **refs); static uv_buf_t* luv_check_bufs(lua_State* L, int index, size_t *count, luv_req_t* req_data); static uv_buf_t* luv_check_bufs_noref(lua_State* L, int index, size_t *count);
[kernel] add GlobalRollingFrictionContact in python swig interface
PY_REGISTER(FrictionContact, Kernel); \ PY_REGISTER(GlobalFrictionContact, Kernel); \ PY_REGISTER(RollingFrictionContact, Kernel); \ + PY_REGISTER(GlobalRollingFrictionContact, Kernel); \ PY_REGISTER(EulerMoreauOSI, Kernel); \ PY_REGISTER(MoreauJeanOSI, Kernel); \ PY_REGISTER(MoreauJeanBilbaoOSI, Kernel); \
BugID:19037404: Modify the kv module init function
@@ -36,7 +36,7 @@ extern int vfs_device_init(void); #include "aos/yloop.h" extern aos_loop_t aos_loop_init(void); #endif -extern int aos_kv_init(void); +extern int32_t kv_init(void); extern void ota_service_init(void); extern void dumpsys_cli_init(void); extern int application_start(int argc, char **argv); @@ -275,7 +275,7 @@ int aos_components_init(kinit_t *kinit) #endif #ifdef AOS_COMP_KV - aos_kv_init(); + kv_init(); #endif #ifdef WITH_SAL
Windows build script fix: always check for working nuget, even when not building .nupkg
@@ -201,10 +201,11 @@ if not checkExecutable(args.msbuild, '/?'): print('Failed to find msbuild executable. Use --msbuild to specify its location') sys.exit(-1) -if args.buildnuget: if not checkExecutable(args.nuget, 'help'): print('Failed to find nuget executable. Use --nuget to specify its location') sys.exit(-1) + +if args.buildnuget: if not checkExecutable(args.corflags, '/?'): print('Failed to find corflags executable. Use --corflags to specify its location') sys.exit(-1)
replace "FILENAME_MAX" with "H2O_TMP_FILE_TEMPLATE_MAX" see issues
@@ -131,9 +131,10 @@ typedef struct st_h2o_buffer_t { char _buf[1]; } h2o_buffer_t; +#define H2O_TMP_FILE_TEMPLATE_MAX 256 typedef struct st_h2o_buffer_mmap_settings_t { size_t threshold; - char fn_template[FILENAME_MAX]; + char fn_template[H2O_TMP_FILE_TEMPLATE_MAX]; } h2o_buffer_mmap_settings_t; struct st_h2o_buffer_prototype_t {
s5j/irq: remove macro definitions not in use Remove macro definitions that are not in use for better readability.
#ifndef __ARCH_ARM_INCLUDE_S5J_S5JT200_IRQ_H #define __ARCH_ARM_INCLUDE_S5J_S5JT200_IRQ_H -#define NR_VECTORS 512 #define NR_IRQS 512 -#define S5J_IRQ_INVALID 0x3FF #define IRQ_INVALID 0x3FF - #define IRQ_SPI(x) (32 + (x)) #define IRQ_EINT0 IRQ_SPI(0)
pb ll_service
@@ -55,6 +55,9 @@ void selftest_SetRxFlag(void) void selftest_init(void) { Luos_Init(); + revision_t revision = {.major = 1, .minor = 0, .build = 0}; + + Luos_CreateService(NULL, VOID_TYPE, "Selftest", revision); } /****************************************************************************** @@ -67,7 +70,7 @@ result_t selftest_com(void) msg_t msg; msg.header.target = 1; msg.header.target_mode = NODEID; - msg.header.cmd = IO_STATE; + msg.header.cmd = REVISION; msg.header.size = 5 * sizeof(uint8_t); msg.data[0] = 0xAA; msg.data[1] = 0x55;
Update RELEASE.md for catboost 0.11.1
+# Release 0.11.1 +## Changes: +* Accelerated formula evaluation by ~15% +* Improved model application interface +* Improved compilation time for building GPU version +* Better handling of stray commas in list arguments +* Added a benchmark that employs Rossman Store Sales dataset to compare quality of GBDT packages +* Added references to Catboost papers in R-package CITATION file +* Fixed a build issue in compilation for GPU +* Fixed a bug in model applicator +* Fixed model conversion, #533 + # Release 0.11.0 ## Changes: * Changed default border count for float feature binarization to 254 on CPU to achieve better quality
VERSION bump to version 0.9.11
@@ -28,7 +28,7 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0") # set version set(LIBNETCONF2_MAJOR_VERSION 0) set(LIBNETCONF2_MINOR_VERSION 9) -set(LIBNETCONF2_MICRO_VERSION 10) +set(LIBNETCONF2_MICRO_VERSION 11) set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION}) set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
system: nxrecorder: Fix compile warnings in nxrecorder.c
@@ -216,7 +216,7 @@ static int nxrecorder_enqueuebuffer(FAR struct nxrecorder_s *precorder, bufdesc.session = precorder->session; #endif bufdesc.numbytes = apb->nbytes; - bufdesc.u.pbuffer = apb; + bufdesc.u.buffer = apb; ret = ioctl(precorder->dev_fd, AUDIOIOC_ENQUEUEBUFFER, (unsigned long)&bufdesc); @@ -576,7 +576,7 @@ err_out: #ifdef CONFIG_AUDIO_MULTI_SESSION buf_desc.session = pplayer->session; #endif - buf_desc.u.pbuffer = pbuffers[x]; + buf_desc.u.buffer = pbuffers[x]; ioctl(precorder->dev_fd, AUDIOIOC_FREEBUFFER, (unsigned long) &buf_desc);
[chainmaker][#412]deal with return result NULL
@@ -518,14 +518,18 @@ BOAT_RESULT BoatHlchainmakerContractQuery(BoatHlchainmakerTx *tx_ptr, char* meth memset(query_reponse->message, 0, BOAT_RESPONSE_MESSAGE_MAX_LEN); memcpy(query_reponse->message, tx_reponse->message, strlen(tx_reponse->message)); + memset(query_reponse->contract_result, 0, BOAT_RESPONSE_CONTRACT_RESULT_MAX_LEN); - if (strlen((BCHAR*)tx_reponse->contract_result->result.data) > BOAT_RESPONSE_CONTRACT_RESULT_MAX_LEN) { + if (tx_reponse->contract_result->result.len != 0) + { + if (tx_reponse->contract_result->result.len > BOAT_RESPONSE_CONTRACT_RESULT_MAX_LEN) + { BoatLog(BOAT_LOG_CRITICAL, "tx_reponse->contract_result->result.datais too long"); boat_throw(BOAT_ERROR_OUT_OF_MEMORY, BoatHlchainmakerContractQuery_exception); } - - memset(query_reponse->contract_result, 0, BOAT_RESPONSE_CONTRACT_RESULT_MAX_LEN); memcpy(query_reponse->contract_result, tx_reponse->contract_result->result.data, strlen((BCHAR*)tx_reponse->contract_result->result.data)); + } + query_reponse->gas_used = tx_reponse->contract_result->gas_used; /* boat catch handle */
Fix Coverity memory accesses These are all false positives result from Coverity not understanding our up_ref and free pairing.
@@ -332,7 +332,11 @@ int EVP_PKEY_derive_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]) /* No more legacy from here down to legacy: */ + /* A Coverity false positive with up_ref/down_ref and free */ + /* coverity[use_after_free] */ ctx->op.kex.exchange = exchange; + /* A Coverity false positive with up_ref/down_ref and free */ + /* coverity[deref_arg] */ ctx->op.kex.algctx = exchange->newctx(ossl_provider_ctx(exchange->prov)); if (ctx->op.kex.algctx == NULL) { /* The provider key can stay in the cache */ @@ -420,6 +424,8 @@ int EVP_PKEY_derive_set_peer_ex(EVP_PKEY_CTX *ctx, EVP_PKEY *peer, EVP_KEYMGMT_get0_name(ctx->keymgmt), ctx->propquery); if (tmp_keymgmt != NULL) + /* A Coverity issue with up_ref/down_ref and free */ + /* coverity[pass_freed_arg] */ provkey = evp_pkey_export_to_provider(peer, ctx->libctx, &tmp_keymgmt, ctx->propquery); EVP_KEYMGMT_free(tmp_keymgmt_tofree);
vabtool: Fix the format of the usage message Recent additions to the vabtool and the usage message left the usage message in a bad state (a missing end-brace at the end of the parameter list). This change replaces the final comma with "} ..."
@@ -292,7 +292,7 @@ help() { printf "Usage: vabtool {sr_key_provision, sr_status,\n" printf " pr_key_provision, pr_status,\n" printf " sr_key_cancel, sr_cancel_status,\n" - printf " pr_key_cancel, pr_cancel_status,\n" + printf " pr_key_cancel, pr_cancel_status} ...\n" printf "\n" printf "\tPerform Vendor Authorized Boot flows for Intel Acceleration Development Platform\n" printf "\n"
in_nginx_exporter_metrics: fix data types
@@ -73,16 +73,16 @@ static int nginx_parse_stub_status(flb_sds_t buf, struct nginx_status *status) goto error; } - rc = sscanf(lines[0], "Active connections: %lu \n", &status->active); + rc = sscanf(lines[0], "Active connections: %" PRIu64 " \n", &status->active); if (rc != 1) { goto error; } - rc = sscanf(lines[2], " %lu %lu %lu \n", + rc = sscanf(lines[2], " %" PRIu64 " %" PRIu64 " %" PRIu64 " \n", &status->accepts, &status->handled, &status->requests); if (rc != 3) { goto error; } - rc = sscanf(lines[3], "Reading: %lu Writing: %lu Waiting: %lu \n", + rc = sscanf(lines[3], "Reading: %" PRIu64 " Writing: %" PRIu64 " Waiting: %" PRIu64 " \n", &status->reading, &status->writing, &status->waiting); if (rc != 3) { goto error;
validation BUGFIX do not validate operation itself When validating a reply. The operation should have been validated as part of operation (input) validation.
@@ -1492,7 +1492,7 @@ API LY_ERR lyd_validate_op(struct lyd_node *op_tree, const struct lyd_node *tree, LYD_VALIDATE_OP op, struct lyd_node **diff) { LY_ERR ret; - struct lyd_node *tree_sibling, *tree_parent, *op_subtree, *op_node, *op_parent; + struct lyd_node *tree_sibling, *tree_parent, *op_subtree, *op_node, *op_parent, *child; struct ly_set type_check = {0}, type_meta_check = {0}, when_check = {0}; LY_CHECK_ARG_RET(NULL, op_tree, !op_tree->parent, !tree || !tree->parent, @@ -1538,9 +1538,18 @@ lyd_validate_op(struct lyd_node *op_tree, const struct lyd_node *tree, LYD_VALID LOG_LOCSET(NULL, op_node, NULL, NULL); + if (op == LYD_VALIDATE_OP_REPLY) { + /* add output children defaults */ + LY_CHECK_RET(lyd_new_implicit_r(op_node, lyd_node_children_p(op_node), NULL, NULL, NULL, NULL, LYD_IMPLICIT_OUTPUT, diff)); + + /* skip validating the operation itself, go to children directly */ + LY_LIST_FOR(lyd_child(op_node), child) { + LY_CHECK_GOTO(ret = lyd_validate_subtree(child, &type_check, &type_meta_check, &when_check, 0, diff), cleanup); + } + } else { /* prevalidate whole operation subtree */ - LY_CHECK_GOTO(ret = lyd_validate_subtree(op_node, &type_check, &type_meta_check, &when_check, - op == LYD_VALIDATE_OP_REPLY ? LYD_IMPLICIT_OUTPUT : 0, diff), cleanup); + LY_CHECK_GOTO(ret = lyd_validate_subtree(op_node, &type_check, &type_meta_check, &when_check, 0, diff), cleanup); + } /* finish incompletely validated terminal values/attributes and when conditions on the full tree */ LY_CHECK_GOTO(ret = lyd_validate_unres((struct lyd_node **)&tree, NULL, &when_check, &type_check, &type_meta_check,
lint RTC example
from pimoroni_i2c import PimoroniI2C from breakout_rtc import BreakoutRTC -import time import machine PINS_BREAKOUT_GARDEN = {"sda": 4, "scl": 5} # i2c pins 4, 5 for Breakout Garden @@ -19,7 +18,7 @@ rtcbreakout.setup() print(f"Getting time from Pico RTC/Thonny: {rtcpico.datetime()}") year, month, day, weekday, hour, minute, second, microsecond = rtcpico.datetime() -print(f"Setting the breakout RTC!") +print("Setting the breakout RTC!") rtcbreakout.set_time(second, minute, hour, weekday, day, month, year) print(f"New breakout time: {rtcbreakout.string_date()} {rtcbreakout.string_time()}")
zephyr: volteer: disable chargen/chgramp commands Disable the chargen and chgramp console commands to match the Chromium EC configuration. BRANCH=none TEST=zmake testall
@@ -26,6 +26,7 @@ CONFIG_PLATFORM_EC_CBI=y CONFIG_PLATFORM_EC_CONSOLE_CMD_HCDEBUG=n CONFIG_PLATFORM_EC_CONSOLE_CMD_RTC=n CONFIG_PLATFORM_EC_CONSOLE_CMD_RTC_ALARM=n +CONFIG_PLATFORM_EC_CONSOLE_CMD_CHGRAMP=n # Keyboard CONFIG_PLATFORM_EC_KEYBOARD=y @@ -97,7 +98,6 @@ CONFIG_HAS_TASK_KEYPROTO=y CONFIG_HAS_TASK_POWERBTN=y # Miscellaneous configs -CONFIG_PLATFORM_EC_CONSOLE_CMD_CHARGEN=y # MKBP event CONFIG_PLATFORM_EC_MKBP_EVENT=y
Updated xUnit plugin in Jenkinsfile.
@@ -1335,7 +1335,7 @@ def cnokdbtest() { * @param p Pattern to scan for */ def xunitUpload(p = 'build/Testing/**/*.xml') { - step([$class: 'XUnitBuilder', + step([$class: 'XUnitPublisher', thresholds: [ [$class: 'SkippedThreshold', failureThreshold: '0'], [$class: 'FailedThreshold', failureThreshold: '0']
fix typo on pipe_common
/**************************************************************************** * - * Copyright 2016 Samsung Electronics All Rights Reserved. + * Copyright 2016-2017 Samsung Electronics All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -330,7 +330,7 @@ int pipecommon_close(FAR struct file *filep) } } - /* What is the buffer management policy? Do we free the buffe when the + /* What is the buffer management policy? Do we free the buffer when the * last client closes the pipe policy 0, or when the buffer becomes empty. * In the latter case, the buffer data will remain valid and can be * obtained when the pipe is re-opened.
Pull Request Template: Use code style for filepath
Do not describe the purpose here but: - [ ] Short descriptions should be in the release notes (added as entry in - doc/news/_preparation_next_release.md which contains `*(my name)*`) + `doc/news/_preparation_next_release.md` which contains `*(my name)*`) **Please always add something to the the release notes.** - [ ] Longer descriptions should be in documentation or in design decisions. - [ ] Describe details of how you changed the code in commit messages
hark-store: address L style review
|= [time=@da =index:store read=?] ^+ poke-core =. poke-core (upd-cache read time index) - =/ t=(unit timebox:store) + =/ tib=(unit timebox:store) (get:orm notifications time) - ?~ t poke-core - =/ n=(unit notification:store) - (~(get by u.t) index) - ?~ n poke-core + ?~ tib poke-core + =/ not=(unit notification:store) + (~(get by u.tib) index) + ?~ not poke-core =? poke-core :: cache is inconsistent iff we didn't directly :: call this through %read-note or %unread-note - &(=(read read.u.n) !?=(?(%read-note %unread-note) -.in)) + &(=(read read.u.not) !?=(?(%read-note %unread-note) -.in)) rebuild-cache - =. u.t - (~(put by u.t) index u.n(read read)) + =. u.tib + (~(put by u.tib) index u.not(read read)) =. notifications - (put:orm notifications time u.t) + (put:orm notifications time u.tib) poke-core :: ++ read-note
bcc: remove trailing semicolon of macro The trailing semicolon of a do-while style macro will cause a if-else condition without braces failed to compile. Meanwhile, also align with other do-while style macros.
@@ -1347,20 +1347,20 @@ static int ____##name(unsigned long long *ctx, ##args) do { \ unsigned short __offset = args->data_loc_##field & 0xFFFF; \ bpf_probe_read((void *)dst, length, (char *)args + __offset); \ - } while (0); + } while (0) #define TP_DATA_LOC_READ(dst, field) \ do { \ unsigned short __offset = args->data_loc_##field & 0xFFFF; \ unsigned short __length = args->data_loc_##field >> 16; \ bpf_probe_read((void *)dst, __length, (char *)args + __offset); \ - } while (0); + } while (0) #define TP_DATA_LOC_READ_STR(dst, field, length) \ do { \ unsigned short __offset = args->data_loc_##field & 0xFFFF; \ bpf_probe_read_str((void *)dst, length, (char *)args + __offset); \ - } while (0); + } while (0) #endif )********"
Fake headset doesn't stomp on existing glfw callbacks;
@@ -113,9 +113,14 @@ static void updateWindow() { state.window = window; if (window) { - glfwSetMouseButtonCallback(window, onMouseButton); - glfwSetCursorPosCallback(window, onMouseMove); - glfwSetWindowFocusCallback(window, onFocus); + GLFWmousebuttonfun prevMouseButton = glfwSetMouseButtonCallback(window, onMouseButton); + if (prevMouseButton) glfwSetMouseButtonCallback(window, prevMouseButton); + + GLFWcursorposfun prevMouseMove = glfwSetCursorPosCallback(window, onMouseMove); + if (prevMouseMove) glfwSetCursorPosCallback(window, prevMouseMove); + + GLFWwindowfocusfun prevFocus = glfwSetWindowFocusCallback(window, onFocus); + if (prevFocus) glfwSetWindowFocusCallback(window, onFocus); if (state.mouselook) { enableMouselook(window);
Update `pyto_ui.py`
@@ -1858,7 +1858,7 @@ class ButtonItem: self.__py_item__.title = new_value @property - def image(self) -> "Image": + def image(self) -> "Image.Image": """ A ``PIL`` image object displayed on screen. May also be an ``UIKit`` ``UIImage`` symbol. See :func:`~pyto_ui.image_with_system_name`. @@ -4178,7 +4178,7 @@ class Button(Control): self.__py_view__.titleColor = new_value.__py_color__ @property - def image(self) -> "Image": + def image(self) -> "Image.Image": """ The image displayed on the button. Can be a ``PIL`` image or an ``UIKit`` symbol image. For more information about symbols, see :func:`~pyto_ui.image_with_system_name`. @@ -4491,18 +4491,6 @@ class TextField(Control): ################### -def __pil_image_from_ui_image__(image): - - from PIL import Image - - if image is None: - return None - - img_str = str(image.data.base64EncodedStringWithOptions(0)) - msg = base64.b64decode(img_str) - return Image.open(BytesIO(msg)) - - def font_family_names() -> List[str]: """ Returns all font family names that can be used to initialize a font.
components/freertos: removed CONFIG_FREERTOS_ISR_STATS the ISR test is now self contained
@@ -435,18 +435,8 @@ menu "FreeRTOS" would be checked to be in compliance with Vanilla FreeRTOS. e.g Calling port*_CRITICAL from ISR context would cause assert failure -<<<<<<< HEAD config FREERTOS_DEBUG_OCDAWARE bool help Hidden option, gets selected by CONFIG_ESPxx_DEBUG_OCDAWARE - -======= - config FREERTOS_ISR_STATS - bool "Enable cycle measurement inside ISR" - default n - help - If enabled, every context save operation will have its time - spent in cycles, measured. ->>>>>>> 0f141ba8a... freertos/xtensa_context: added conditional compiling option around isr cycle measurement endmenu
input: chunk: add extra checks to chunk status and types casting
@@ -68,7 +68,7 @@ struct flb_input_chunk *flb_input_chunk_map(struct flb_input_instance *in, { int ret; int records; - const char *buf_data; + char *buf_data; size_t buf_size; struct flb_input_chunk *ic; @@ -132,7 +132,7 @@ struct flb_input_chunk *flb_input_chunk_create(struct flb_input_instance *in, } /* Write tag into metadata section */ - ret = cio_meta_write(chunk, tag, tag_len); + ret = cio_meta_write(chunk, (char *) tag, tag_len); if (ret == -1) { flb_error("[input chunk] could not write metadata"); cio_chunk_close(chunk, CIO_TRUE); @@ -184,7 +184,7 @@ static struct flb_input_chunk *input_chunk_get(const char *tag, int tag_len, continue; } - if (cio_meta_cmp(ic->chunk, tag, tag_len) != 0) { + if (cio_meta_cmp(ic->chunk, (char *) tag, tag_len) != 0) { ic = NULL; continue; } @@ -193,7 +193,7 @@ static struct flb_input_chunk *input_chunk_get(const char *tag, int tag_len, /* No chunk was found, we need to create a new one */ if (!ic) { - ic = flb_input_chunk_create(in, tag, tag_len); + ic = flb_input_chunk_create(in, (char *) tag, tag_len); if (!ic) { return NULL; } @@ -436,7 +436,7 @@ int flb_input_chunk_append_raw(struct flb_input_instance *in, } #ifdef FLB_HAVE_STREAM_PROCESSOR else if (in->config->stream_processor_ctx) { - const char *c_data; + char *c_data; size_t c_size; /* Retrieve chunk (filtered) output content */ @@ -466,7 +466,9 @@ int flb_input_chunk_append_raw(struct flb_input_instance *in, si = (struct flb_storage_input *) in->storage; if (flb_input_chunk_is_overlimit(in) == FLB_TRUE && si->type == CIO_STORE_FS) { + if (cio_chunk_is_up(ic->chunk) == CIO_TRUE) { cio_chunk_down(ic->chunk); + } return 0; } @@ -478,7 +480,7 @@ int flb_input_chunk_append_raw(struct flb_input_instance *in, const void *flb_input_chunk_flush(struct flb_input_chunk *ic, size_t *size) { int ret; - const char *buf = NULL; + char *buf = NULL; if (cio_chunk_is_up(ic->chunk) == CIO_FALSE) { ret = cio_chunk_up(ic->chunk); @@ -523,6 +525,6 @@ int flb_input_chunk_release_lock(struct flb_input_chunk *ic) int flb_input_chunk_get_tag(struct flb_input_chunk *ic, const char **tag_buf, int *tag_len) { - return cio_meta_read(ic->chunk, tag_buf, tag_len); + return cio_meta_read(ic->chunk, (char **) tag_buf, tag_len); }
Remove duplicate SSL_CTX_clear_options
@@ -1848,8 +1848,6 @@ SSL_CTX *create_ssl_ctx() { SSL_CTX_set_min_proto_version(ssl_ctx, TLS1_3_VERSION); SSL_CTX_set_max_proto_version(ssl_ctx, TLS1_3_VERSION); - SSL_CTX_clear_options(ssl_ctx, SSL_OP_ENABLE_MIDDLEBOX_COMPAT); - // This makes OpenSSL client not send CCS after an initial // ClientHello. SSL_CTX_clear_options(ssl_ctx, SSL_OP_ENABLE_MIDDLEBOX_COMPAT);
super-rsu: fix logic for determining 'force' opt. This changes behavior of determining whether or not to force a flash operation. Without this change, if 'force' is present in a flash spec, this value (True or False) will always be used and not the command line argument '--force-flash'.
@@ -682,7 +682,7 @@ class pac(object): flash_type = flash_info['type'] flash_rev = flash_info.get('revision', '') filename = flash_info['filename'] - force = flash_info.get('force', args.force_flash) + force = flash_info.get('force', False) or args.force_flash if os.path.exists(os.path.join(flash_dir, filename)): filename = os.path.join(flash_dir, filename)
chat: set code toggle only at start of input
@@ -454,7 +454,9 @@ export class ChatInput extends Component { ? this.completePatp(state.selectedSuggestion) : this.messageSubmit(), 'Shift-3': (cm) => - this.toggleCode() + cm.getValue().length === 0 + ? this.toggleCode() + : CodeMirror.Pass } };
Fix compile error on older Qt versions QDateTime::toSecsSinceEpoch() was added later.
@@ -248,7 +248,7 @@ int DeRestPluginPrivate::getSensorData(const ApiRequest &req, ApiResponse &rsp) return REQ_READY_SEND; } - qint64 fromTime = dt.toSecsSinceEpoch(); + qint64 fromTime = dt.toMSecsSinceEpoch() / 1000; openDb(); loadSensorDataFromDb(sensor, rsp.list, fromTime, maxRecords);
Fixes syntax error I introduced
@@ -5860,15 +5860,15 @@ zoom(const Arg *arg) XRaiseWindow(dpy, c->win); if (!selmon->lt[selmon->sellt]->arrange - || (selmon->sel && selmon->sel->isfloating)) - return; - if (c == nexttiled(selmon->clients)) - if (!c || !(c = nexttiled(c->next))) + || (selmon->sel && selmon->sel->isfloating) + || (c == nexttiled(selmon->clients)) + || !(c = nexttiled(c->next))) return; pop(c); } + void resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst) {
Return translated PSA error in PSA version of ssl_get_ecdh_params_from_cert()
@@ -2886,7 +2886,7 @@ static int ssl_get_ecdh_params_from_cert( mbedtls_ssl_context *ssl ) status = psa_get_key_attributes( ssl->handshake->ecdh_psa_privkey, &key_attributes ); if( status != PSA_SUCCESS) - return( MBEDTLS_ERR_PK_BAD_INPUT_DATA ); + return( psa_ssl_status_to_mbedtls( status ) ); ssl->handshake->ecdh_psa_type = psa_get_key_type( &key_attributes ); ssl->handshake->ecdh_bits = psa_get_key_bits( &key_attributes );
Added Cortex-M1
@@ -756,6 +756,16 @@ to verify a minimum version or ensure that the right processor core is used. \endcode +\b core_cm1.h +\code +#define __CM1_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM1_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM1_CMSIS_VERSION ((__CM1_CMSIS_VERSION_MAIN << 16U) | \ + __CM1_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (1U) /*!< Cortex-M Core */ +\endcode + \b core_cm3.h \code #define __CM3_CMSIS_VERSION_MAIN (5U) /* [31:16] CMSIS HAL main version */
Remove sudo in readme
@@ -33,7 +33,7 @@ This will run `make install_tests` and `make run_tests` To run a specific tests (here the send test): ``` cd tests -sudo jest --runInBand --detectOpenHandles src/send.test.js +jest --runInBand --detectOpenHandles src/send.test.js ``` Make sure you're in the `tests` folder before running `jest` or `yarn test`.
doc: update doc version selector for v2.3
@@ -197,6 +197,7 @@ html_context = { 'docs_title': docs_title, 'is_release': is_release, 'versions': ( ("latest", "/latest/"), + ("2.3", "/2.3/"), ("2.2", "/2.2/"), ("2.1", "/2.1/"), ("2.0", "/2.0/"),
Fixed rebuilding of Dockerfiles.
@@ -49,7 +49,7 @@ dockerfiles: $(addprefix Dockerfile., $(MODULES)) build: dockerfiles $(addprefix build-,$(MODULES)) push: build $(addprefix push-,$(MODULES)) latest -Dockerfile.%: ../../src/nxt_main.h +Dockerfile.%: ../../version @echo "===> Building $@" cat Dockerfile.tmpl | sed \ -e 's,@@UNITPACKAGES@@,$(MODULE_$*),g' \
doc: remove build problem in release notes when an XML option was removed, it will break documentation links to that option information. We'll remove the link in the old release notes to fix this problem.
@@ -109,7 +109,7 @@ Add New Configuration Options In v2.5, the following elements are added to scenario XML files: -- :option:`hv.FEATURES.NVMX_ENABLED` +- ``hv.FEATURES.NVMX_ENABLED`` - :option:`vm.PTM` The following element is renamed: @@ -118,7 +118,7 @@ The following element is renamed: Constraints on values of the following element have changed: -- :option:`vm.guest_flags.guest_flag` no longer accepts an empty text. For VMs +- ``vm.guest_flags.guest_flag`` no longer accepts an empty text. For VMs with no guest flag set, set the value to ``0``. Document Updates
Fix container image Missed commit from
@@ -13,7 +13,7 @@ RUN curl -o /tmp/dc-downloads/cmake.sh $CMAKE_SCRIPT \ && chmod +x /tmp/dc-downloads/cmake.sh \ && bash /tmp/dc-downloads/cmake.sh --skip-license --prefix=/tmp/dc-extracted/cmake -FROM ghcr.io/linuxcontainers/alpine:latest AS devcontainer +FROM ghcr.io/linuxcontainers/debian-slim:latest AS devcontainer # Avoid warnings by switching to noninteractive ENV DEBIAN_FRONTEND=noninteractive
make flush-all.t more reliable can end up sitting on the border of a second. better fix would be to poll the server until it thinks at least 4s have passed, since in weird/slow scenarios the tests can run faster than the daemon.
@@ -40,7 +40,7 @@ is(scalar <$sock>, "OK\r\n", "did flush_all in future"); print $sock "set foo 0 0 4\r\n1234\r\n"; is(scalar <$sock>, "STORED\r\n", "stored foo = '1234'"); mem_get_is($sock, "foo", '1234'); -sleep(3); +sleep(5); mem_get_is($sock, "foo", undef); print $sock "set foo 0 0 5\r\n12345\r\n";
fib: Uninitialised pad in the prefix (coverity warning) Type: fix
@@ -89,6 +89,7 @@ fib_prefix_from_ip46_addr (const ip46_address_t *addr, pfx->fp_len = ((ip46_address_is_ip4(addr) ? 32 : 128)); pfx->fp_addr = *addr; + pfx->___fp___pad = 0; } void @@ -100,6 +101,7 @@ fib_prefix_from_mpls_label (mpls_label_t label, pfx->fp_len = 21; pfx->fp_label = label; pfx->fp_eos = eos; + pfx->___fp___pad = 0; } void
Define INT16_MAX in re.c.
@@ -40,7 +40,6 @@ order to avoid confusion with operating system threads. #include <assert.h> #include <string.h> -#include <limits.h> #include <yara/limits.h> #include <yara/globals.h> @@ -57,6 +56,10 @@ order to avoid confusion with operating system threads. #define EMIT_DONT_SET_FORWARDS_CODE 0x02 #define EMIT_DONT_SET_BACKWARDS_CODE 0x04 +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif + typedef struct _RE_REPEAT_ARGS {
fix error prone + annontation processor 4 jdk 11
@@ -37,6 +37,17 @@ def get_java_version(exe): return None +def get_classpath(cmd): + for i, part in enumerate(cmd): + if part == '-classpath': + i += 1 + if i < len(cmd): + return cmd[i] + else: + return None + return None + + def just_do_it(argv): java, javac, error_prone_tool, javac_cmd = argv[0], argv[1], argv[2], argv[3:] ver = get_java_version(java) @@ -49,6 +60,10 @@ def just_do_it(argv): for f in ERROR_PRONE_FLAGS: if f in javac_cmd: javac_cmd.remove(f) + if '-processor' in javac_cmd: + classpath = get_classpath(javac_cmd) + if classpath: + error_prone_tool = error_prone_tool + os.pathsep + classpath os.execv(javac, [javac] + JAVA10_EXPORTS + ['-processorpath', error_prone_tool, '-XDcompilePolicy=byfile'] + [(' '.join(['-Xplugin:ErrorProne'] + ERROR_PRONE_FLAGS))] + javac_cmd) else: os.execv(java, [java, '-Xbootclasspath/p:' + error_prone_tool, 'com.google.errorprone.ErrorProneCompiler'] + ERROR_PRONE_FLAGS + javac_cmd)
PostContent: use unified graph rendering
import React from 'react'; -import { Col } from '@tlon/indigo-react'; -import { MentionText } from '~/views/components/MentionText'; -import useContactState from '~/logic/state/contact'; +import { Col, Box } from '@tlon/indigo-react'; +import { GraphContentWide } from "~/views/landscape/components/Graph/GraphContentWide"; +import styled from 'styled-components'; +const TruncatedBox = styled(Col)` + display: -webkit-box; + -webkit-line-clamp: ${p => p.truncate ?? 'unset'}; + -webkit-box-orient: vertical; + +`; export function PostContent(props) { const { post, isParent, api, isReply } = props; - const contacts = useContactState(state => state.contacts); return ( - <Col + <TruncatedBox + display="-webkit-box" width="100%" pl="2" pr="2" - pb={isParent || isReply ? "0" : "2"} - maxHeight={ isParent ? "none" : "300px" } + truncate={isParent ? null : 8} textOverflow="ellipsis" overflow="hidden" - display="inline-block"> - <MentionText - contacts={contacts} - content={post.contents} - api={api} + > + <GraphContentWide transcluded={0} + post={post} + api={api} + showOurContact /> - </Col> + </TruncatedBox> ); }