message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Replace uint64_t with uintptr_t in lv_theme.c
This resolves | @@ -73,7 +73,7 @@ void lv_theme_set_current(lv_theme_t * th)
uint16_t i;
lv_style_t ** cur_th_style_p = (lv_style_t **) ¤t_theme;
for(i = 0; i < style_num; i++) {
- uint64_t adr = (uint64_t)&th_styles[i];
+ uintptr_t adr = (uintptr_t)&th_styles[i];
memcpy(&cur_th_style_p[i], &adr, sizeof(lv_style_t *));
}
inited = true;
@@ -84,7 +84,7 @@ void lv_theme_set_current(lv_theme_t * th)
uint16_t i;
lv_style_t ** th_style = (lv_style_t **) th;
for(i = 0; i < style_num; i++) {
- uint64_t s = (uint64_t)th_style[i];
+ uintptr_t s = (uintptr_t)th_style[i];
if(s) memcpy(&th_styles[i], (void *)s, sizeof(lv_style_t));
}
|
GSettings Bindings: Format CMake code | @@ -13,7 +13,6 @@ if (NOT PKG_CONFIG_FOUND)
return ()
endif ()
-
pkg_check_modules (GLIB glib-2.0>=2.42 QUIET)
pkg_check_modules (GMODULE gmodule-2.0>=2.42 QUIET)
pkg_check_modules (GIO gio-2.0>=2.42 QUIET)
@@ -83,15 +82,13 @@ endif ()
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
if (NOT FORCE_IN_SOURCE_BUILD)
- message (FATAL_ERROR
- "In-source builds are not permitted.\n"
+ message (FATAL_ERROR "In-source builds are not permitted.\n"
"Make a separate folder for building:\n"
" mkdir build && cd build && cmake ..\n"
"Before that, remove the files already created:\n"
" rm -rf CMakeCache.txt CMakeFiles\n"
"If you really know what you are doing\n"
"(will overwrite original files!) use:\n"
- " cmake -DFORCE_IN_SOURCE_BUILD=ON\n"
- )
+ " cmake -DFORCE_IN_SOURCE_BUILD=ON\n")
endif (NOT FORCE_IN_SOURCE_BUILD)
endif (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
|
interop: Support zerortt | @@ -26,7 +26,7 @@ if [ "$ROLE" == "client" ]; then
if [ "$TESTCASE" == "versionnegotiation" ]; then
CLIENT_ARGS="$CLIENT_ARGS -v 0xaaaaaaaa"
fi
- if [ "$TESTCASE" == "resumption" ]; then
+ if [ "$TESTCASE" == "resumption" ] || [ "$TESTCASE" == "zerortt" ]; then
CLIENT_ARGS="$CLIENT_ARGS --session-file session.txt --tp-file tp.txt"
REQS=($REQUESTS)
REQUESTS=${REQS[0]}
|
doc: update copyright notices | @@ -50,7 +50,7 @@ master_doc = 'index'
# General information about the project.
project = u'skiboot'
-copyright = u'2016, Stewart Smith, IBM, others'
+copyright = u'2016-2017, IBM, others'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -234,7 +234,7 @@ latex_documents = [
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'skiboot', u'skiboot Documentation',
- [u'Stewart Smith, IBM, others'], 1)
+ [u'IBM, others'], 1)
]
# If true, show URL addresses after external links.
@@ -248,7 +248,7 @@ man_pages = [
# dir menu entry, description, category)
texinfo_documents = [
('index', 'skiboot', u'skiboot Documentation',
- u'Stewart Smith, IBM, others', 'skiboot', 'OPAL (OpenPower Abstraction Layer): boot and runtime firmware for POWER.',
+ u'IBM, others', 'skiboot', 'OPAL (OpenPower Abstraction Layer): boot and runtime firmware for POWER.',
'Miscellaneous'),
]
|
Dockerfile: replace building libyang from source with libyang/libyang-dev package installation | @@ -40,10 +40,11 @@ RUN echo "netconf:netconf" | chpasswd && adduser netconf sudo
# Clearing and setting authorized ssh keys
-RUN echo '' > /home/netconf/.ssh/authorized_keys
-RUN ssh-keygen -A
-RUN ssh-keygen -t dsa -P '' -f /home/netconf/.ssh/id_dsa
-RUN cat /home/netconf/.ssh/id_dsa.pub >> /home/netconf/.ssh/authorized_keys
+RUN \
+ echo '' > /home/netconf/.ssh/authorized_keys && \
+ ssh-keygen -A && \
+ ssh-keygen -t dsa -P '' -f /home/netconf/.ssh/id_dsa && \
+ cat /home/netconf/.ssh/id_dsa.pub >> /home/netconf/.ssh/authorized_keys
# Updating shell to bash
@@ -56,13 +57,11 @@ RUN echo "root:root" | chpasswd
# libyang
RUN \
- cd /opt/dev && \
- git clone https://github.com/CESNET/libyang.git && cd libyang && \
- git checkout master && \
- mkdir build && cd build && \
- cmake -DCMAKE_BUILD_TYPE:String="Release" -DCMAKE_INSTALL_PREFIX:PATH=/usr -DENABLE_BUILD_TESTS=OFF .. && \
- make -j2 && \
- make install
+ sh -c "echo 'deb http://download.opensuse.org/repositories/home:/liberouter/xUbuntu_18.04/ /' > /etc/apt/sources.list.d/home:liberouter.list" && \
+ wget -nv https://download.opensuse.org/repositories/home:liberouter/xUbuntu_18.04/Release.key -O Release.key && \
+ apt-key add - < Release.key && \
+ apt-get update && \
+ apt-get install libyang libyang-dev
# libnetconf2
RUN \
|
[dpos] Add block BP ID verification | @@ -106,9 +106,13 @@ func (dpos *DPoS) IsBlockValid(block *types.Block) error {
return &consensus.ErrorConsensus{Msg: "bad public key in block", Err: err}
}
- if !dpos.bpc.Has(id) {
+ sec := block.GetHeader().GetTimestamp()
+
+ // Check whether the BP ID belongs to those of the current BP members and
+ // its corresponding BP index is consistent with the block timestamp.
+ if idx, ok := dpos.bpc.BpID2Index(id); !ok || !slot.Unix(sec).IsFor(idx) {
return &consensus.ErrorConsensus{
- Msg: fmt.Sprintf("BP %v not in an BP cluster", id.Pretty()),
+ Msg: fmt.Sprintf("BP %v is not permitted for the time slot %v", block.ID(), time.Unix(sec, 0)),
}
}
|
chmod 755 for exported file | @@ -1695,7 +1695,7 @@ static void onNativeExportGet(const HttpGetData* data)
if(embedCart(console, buf, &size)
&& fsWriteFile(path, buf, size))
{
- chmod(path, 0777);
+ chmod(path, 0755);
printFront(console, filename);
printBack(console, " exported :)");
}
|
Add support for Samsung SmartThings plug (IM6001-OTP) | @@ -237,6 +237,7 @@ static const SupportedDevice supportedDevices[] = {
{ VENDOR_LEGRAND, "Remote switch", legrandMacPrefix }, // Legrand wireless switch
{ VENDOR_NETVOX, "Z809AE3R", netvoxMacPrefix }, // Netvox smartplug
{ VENDOR_LDS, "ZB-ONOFFPlug-D0005", silabs2MacPrefix }, // Samsung SmartPlug 2019 (7A-PL-Z-J3)
+ { VENDOR_PHYSICAL, "outletv4", stMacPrefix }, // Samsung SmartThings plug (IM6001-OTP)
{ 0, nullptr, 0 }
};
@@ -6879,7 +6880,8 @@ void DeRestPluginPrivate::updateSensorNode(const deCONZ::NodeEvent &event)
{
power = power == 28000 ? 0 : power / 10;
}
- else if (i->modelId() == QLatin1String("RICI01")) //LifeControl Smart Plug
+ else if (i->modelId() == QLatin1String("RICI01") || // LifeControl Smart Plug
+ i->modelId() == QLatin1String("outletv4")) // Samsung SmartThings IM6001-OTP
{
power /= 10; // 0.1W -> W
}
@@ -6906,7 +6908,8 @@ void DeRestPluginPrivate::updateSensorNode(const deCONZ::NodeEvent &event)
{
voltage += 50; voltage /= 100; // 0.01V -> V
}
- else if (i->modelId() == QLatin1String("RICI01")) //LifeControl Smart Plug
+ else if (i->modelId() == QLatin1String("RICI01") || // LifeControl Smart Plug
+ i->modelId() == QLatin1String("outletv4")) // Samsung SmartThings IM6001-OTP
{
voltage /= 10; // 0.1V -> V
}
@@ -6928,7 +6931,8 @@ void DeRestPluginPrivate::updateSensorNode(const deCONZ::NodeEvent &event)
if (item && current != 65535)
{
- if (i->modelId() == QLatin1String("SP 120")) // innr
+ if (i->modelId() == QLatin1String("SP 120") || // innr
+ i->modelId() == QLatin1String("outletv4")) // Samsung SmartThings IM6001-OTP
{
// already in mA
}
|
kernel: paging_copy_remap: add offset to dest addr for memcpy | @@ -574,7 +574,7 @@ errval_t paging_copy_remap(struct cte *dest_vnode_cte, cslot_t dest_slot,
errval_t err;
// clone existing pages
lvaddr_t toaddr;
- toaddr = local_phys_to_mem(gen_phys_to_local_phys(get_address(src_cap)));
+ toaddr = local_phys_to_mem(gen_phys_to_local_phys(get_address(src_cap))) + offset;
genpaddr_t gpfromaddr = 0;
lvaddr_t fromaddr = 0;
|
YAML CPP: Use explicit type conversion | @@ -254,7 +254,7 @@ std::pair<bool, unsigned long long> isArrayIndex (NameIterator const & nameItera
string const name = *nameIterator;
auto const offsetIndex = ckdb::elektraArrayValidateBaseNameString (name.c_str ());
auto const isArrayElement = offsetIndex >= 1;
- return { isArrayElement, isArrayElement ? stoull (name.substr (offsetIndex)) : 0 };
+ return { isArrayElement, isArrayElement ? stoull (name.substr (static_cast<size_t> (offsetIndex))) : 0 };
}
/**
|
hw/mcu: Fix nRF5340 netcore build with synthesize LF clock
Network core doesn't have secure peripherals. | @@ -88,12 +88,12 @@ hal_system_clock_start(void)
#if MYNEWT_VAL_CHOICE(MCU_LFCLK_SOURCE, LFSYNTH)
/* Must turn on HFLCK for synthesized 32768 crystal */
- if ((NRF_CLOCK_S->HFCLKSTAT & CLOCK_HFCLKSTAT_STATE_Msk) !=
+ if ((NRF_CLOCK_NS->HFCLKSTAT & CLOCK_HFCLKSTAT_STATE_Msk) !=
(CLOCK_HFCLKSTAT_STATE_Running << CLOCK_HFCLKSTAT_STATE_Pos)) {
- NRF_CLOCK_S->EVENTS_HFCLKSTARTED = 0;
- NRF_CLOCK_S->TASKS_HFCLKSTART = 1;
+ NRF_CLOCK_NS->EVENTS_HFCLKSTARTED = 0;
+ NRF_CLOCK_NS->TASKS_HFCLKSTART = 1;
while (1) {
- if ((NRF_CLOCK_S->EVENTS_HFCLKSTARTED) != 0) {
+ if ((NRF_CLOCK_NS->EVENTS_HFCLKSTARTED) != 0) {
break;
}
}
|
Add sceAvPlayerGetStreamInfo prototype and related struct/enum. | @@ -32,6 +32,12 @@ typedef enum SceAvPlayerTrickSpeeds {
SCE_AVPLAYER_TRICK_SPEED_FAST_FORWARD_32X = 3200 //!< Fast Forward 32x
} SceAvPlayerTrickSpeeds;
+typedef enum SceAvPlayerStreamType {
+ SCE_AVPLAYER_VIDEO, //!< Video stream type
+ SCE_AVPLAYER_AUDIO, //!< Audio stream type
+ SCE_AVPLAYER_TIMEDTEXT //!< Timed text (subtitles) stream type
+} SceAvPlayerStreamType;
+
typedef void* (*SceAvPlayerAlloc)(void *arg, uint32_t alignment, uint32_t size);
typedef void (*SceAvPlayerFree)(void *arg, void *ptr);
typedef void* (*SceAvPlayerAllocFrame)(void *arg, uint32_t alignment, uint32_t size);
@@ -120,6 +126,14 @@ typedef struct SceAvPlayerFrameInfo {
SceAvPlayerStreamDetails details; //!< The frame details.
} SceAvPlayerFrameInfo;
+typedef struct SceAvPlayerStreamInfo {
+ uint32_t type; //!< Type of the stream (One of ::SceAvPlayerStreamType)
+ uint32_t reserved; //!< Reserved data
+ SceAvPlayerStreamDetails details; //!< The stream details.
+ uint64_t duration; //!< Total duration of the stream in milliseconds.
+ uint64_t startTime; //!< Starting time of the stream in milliseconds.
+} SceAvPlayerStreamInfo;
+
/**
* @param[in] data - Init data for the video player
*
@@ -224,6 +238,15 @@ int sceAvPlayerJumpToTime(SceAvPlayerHandle handle, uint64_t offset);
*/
int sceAvPlayerSetTrickSpeed(SceAvPlayerHandle handle, int speed);
+/**
+ * @param[in] handle - A player handle created with ::sceAvPlayerInit
+ * @param[in] id - Stream ID to get info for.
+ * @param[out] info - Info retrieved for the requested stream.
+ *
+ * @return 0 on success, < 0 on error.
+ */
+int sceAvPlayerGetStreamInfo(SceAvPlayerHandle handle, uint32_t id, SceAvPlayerStreamInfo *info);
+
#ifdef __cplusplus
}
#endif
|
fix --version-script for good | @@ -325,7 +325,7 @@ if(JANSSON_BUILD_SHARED_LIBS)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--default-symver")
else()
# some linkers may only support --version-script
- file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/jansson.sym" "libjansson.so.${JANSSON_SOVERSION} {
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/jansson.sym" "JANSSON_${JANSSON_SOVERSION} {
global:
*;
};
@@ -341,7 +341,7 @@ if(JANSSON_BUILD_SHARED_LIBS)
VSCRIPT_WORKS
)
list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES "-Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/jansson.sym")
- if (SYMVER_WORKS)
+ if (VSCRIPT_WORKS)
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/jansson.sym")
endif()
endif()
|
Update mac workflow versions | @@ -22,8 +22,8 @@ jobs:
- name: Build and Test
uses: reactivecircus/android-emulator-runner@v2
with:
- api-level: 29
- ndk: 21.0.6113669
+ api-level: 30
+ ndk: 21.0.6528147
cmake: 3.10.2.4988404
working-directory: ./lib/android_build
script: ./testandlog
|
Use normal unix `struct stat` for macos in `last_modified`. | #include <stdlib.h>
#include <errno.h>
#include "system/nth_alloc.h"
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__)
#include <sys/stat.h>
#include <sys/types.h>
#elif defined(_WIN32)
@@ -20,7 +20,7 @@ int last_modified(const char *filepath, time_t *time)
trace_assert(filepath);
trace_assert(time);
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__)
struct stat attr;
if (stat(filepath, &attr) < 0) {
@@ -62,11 +62,6 @@ int last_modified(const char *filepath, time_t *time)
*time = (time_t)(mod_time / WINDOWS_TICK - SEC_TO_UNIX_EPOCH);
return 0;
-#elif defined(__APPLE__)
-
- // TODO(#901): implement last_modified for Mac OS X
- return -1;
-
#else
#error Unsupported OS
|
disable sign mode | <Platform Condition="'$(Platform)' == ''">Win32</Platform>
<RootNamespace>ivshmem</RootNamespace>
<ProjectName>ivshmem</ProjectName>
+ <SignMode>Off</SignMode>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'" Label="Configuration">
|
TCPMv2: Fix typo
This fixes a typo in usb_pd_dpm.
BRANCH=none
TEST=buildall passes | @@ -671,7 +671,7 @@ void dpm_remove_source(int port)
/*
* Note: all ports receive the 1.5 A source offering until they are found to
- * match a criteria on the 3.0 A priority list (ex. though sink capability
+ * match a criteria on the 3.0 A priority list (ex. through sink capability
* probing), at which point they will be offered a new 3.0 A source capability.
*/
__overridable int dpm_get_source_pdo(const uint32_t **src_pdo, const int port)
|
Add sendbuf param to RPS client | @@ -36,6 +36,7 @@ PrintHelp(
" -response:<####> The length of request payloads. (def:%u)\n"
" -threads:<####> The number of threads to use. Defaults and capped to number of cores\n"
" -affinitize:<0/1> Affinitizes threads to a core. (def:0)\n"
+ " -sendbuf:<0/1> Whether to use send buffering. (def:0)\n"
"\n",
RPS_DEFAULT_RUN_TIME,
PERF_DEFAULT_PORT,
@@ -107,6 +108,14 @@ RpsClient::Init(
AffinitizeWorkers = Affinitize != 0;
}
+ uint32_t SendBuf;
+ if (TryGetValue(argc, argv, "sendbuf", &SendBuf)) {
+ MsQuicSettings settings;
+ Configuration.GetSettings(settings);
+ settings.SetSendBufferingEnabled(SendBuf != 0);
+ Configuration.SetSettings(settings);
+ }
+
WorkerCount = CxPlatProcActiveCount();
if (WorkerCount > PERF_MAX_THREAD_COUNT) {
WorkerCount = PERF_MAX_THREAD_COUNT;
|
tree schema BUGFIX missing param
Fixes | @@ -1074,7 +1074,7 @@ search_file:
if (!(ctx->flags & LY_CTX_DISABLE_SEARCHDIRS)) {
/* submodule was not received from the callback or there is no callback set */
lys_parse_localfile(ctx, inc->name, inc->rev[0] ? inc->rev : NULL, pctx,
- pctx->parsed_mod->mod->name, 1, NULL, (void **)&submod);
+ pctx->parsed_mod->mod->name, 1, new_mods, (void **)&submod);
/* update inc pointer - parsing another (YANG 1.0) submodule can cause injecting
* submodule's include into main module, where it is missing */
|
hoon: adds +swat: deferred +slap | %- ~(play ut p.vax)
[%wtgr [%wtts [%leaf %tas -.q.vax] [%& 2]~] [%$ 1]]
(~(fuse ut p.vax) [%cell %noun %noun])
+:: +swat: deferred +slap
+::
+++ swat
+ |= [tap=(trap vase) gen=hoon]
+ ^- (trap vase)
+ =/ gun (~(mint ut p:$:tap) %noun gen)
+ |. ~+
+ [p.gun .*(q:$:tap q.gun)]
::
:::: 5d: parser
::
|
build: enable NATS output plugin by default | @@ -86,7 +86,7 @@ option(FLB_OUT_ES "Enable Elasticsearch output plugin" Yes)
option(FLB_OUT_FORWARD "Enable Forward output plugin" Yes)
option(FLB_OUT_HTTP "Enable HTTP output plugin" Yes)
option(FLB_OUT_INFLUXDB "Enable InfluxDB output plugin" Yes)
-option(FLB_OUT_NATS "Enable NATS output plugin" No)
+option(FLB_OUT_NATS "Enable NATS output plugin" Yes)
option(FLB_OUT_PLOT "Enable Plot output plugin" Yes)
option(FLB_OUT_FILE "Enable file output plugin" Yes)
option(FLB_OUT_TD "Enable Treasure Data output plugin" Yes)
|
py/objint: Remove TODO about checking of int() arg types with 2 args.
The arguments are checked by mp_obj_str_get_data and mp_obj_get_int. | @@ -69,7 +69,6 @@ STATIC mp_obj_t mp_obj_int_make_new(const mp_obj_type_t *type_in, size_t n_args,
case 2:
default: {
// should be a string, parse it
- // TODO proper error checking of argument types
size_t l;
const char *s = mp_obj_str_get_data(args[0], &l);
return mp_parse_num_integer(s, l, mp_obj_get_int(args[1]), NULL);
|
Add ability to use docstrings in estimators
Added ability to use docstrings in CatBoostClassifier and CatBoostRegressor. The functionality was lost earlier because there was code between the docstrings and the class name. | @@ -3618,9 +3618,6 @@ class CatBoost(_CatBoostBase):
self._object._convert_oblivious_to_asymmetric()
class CatBoostClassifier(CatBoost):
-
- _estimator_type = 'classifier'
-
"""
Implementation of the scikit-learn API for CatBoost classification.
@@ -4074,6 +4071,9 @@ class CatBoostClassifier(CatBoost):
text_processing : dict,
Text processging description.
"""
+
+ _estimator_type = 'classifier'
+
def __init__(
self,
iterations=None,
@@ -4621,9 +4621,6 @@ class CatBoostClassifier(CatBoost):
class CatBoostRegressor(CatBoost):
-
- _estimator_type = 'regressor'
-
"""
Implementation of the scikit-learn API for CatBoost regression.
@@ -4640,6 +4637,9 @@ class CatBoostRegressor(CatBoost):
'MAPE'
'Lq:q=value'
"""
+
+ _estimator_type = 'regressor'
+
def __init__(
self,
iterations=None,
|
Fix bug with SSL_read_early_data()
If read_ahead is set, or SSL_MODE_AUTO_RETRY is used then if
SSL_read_early_data() hits an EndOfEarlyData message then it will
immediately retry automatically, but this time read normal data instead
of early data!
Fixes | @@ -1496,6 +1496,8 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf,
*/
if ((s->rlayer.handshake_fragment_len >= 4)
&& !ossl_statem_get_in_handshake(s)) {
+ int ined = (s->early_data_state == SSL_EARLY_DATA_READING);
+
/* We found handshake data, so we're going back into init */
ossl_statem_set_in_init(s, 1);
@@ -1507,6 +1509,14 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf,
return -1;
}
+ /*
+ * If we were actually trying to read early data and we found a
+ * handshake message, then we don't want to continue to try and read
+ * the application data any more. It won't be "early" now.
+ */
+ if (ined)
+ return -1;
+
if (!(s->mode & SSL_MODE_AUTO_RETRY)) {
if (SSL3_BUFFER_get_left(rbuf) == 0) {
/* no read-ahead left? */
|
memif: memif buffer leaks during disconnect.
code added to release the mbuf's to main pool during memif disconnect.
Type: fix | @@ -70,6 +70,7 @@ memif_disconnect (memif_if_t * mif, clib_error_t * err)
{
memif_main_t *mm = &memif_main;
vnet_main_t *vnm = vnet_get_main ();
+ vlib_main_t *vm = vlib_get_main ();
memif_region_t *mr;
memif_queue_t *mq;
int i;
@@ -126,6 +127,18 @@ memif_disconnect (memif_if_t * mif, clib_error_t * err)
memif_log_warn (mif,
"Unable to unassign interface %d, queue %d: rc=%d",
mif->hw_if_index, i, rv);
+ if (mif->flags & MEMIF_IF_FLAG_ZERO_COPY)
+ {
+
+ u16 cur_slot,last_slot, start;
+ u16 ring_size = 1 << mq->log2_ring_size;
+ u16 mask = ring_size - 1;
+ cur_slot = mq->last_tail;
+ last_slot = mq->ring->head - 1 ;
+ start = (mq->last_tail & mask);
+ u16 n_slots = ((last_slot - cur_slot) & mask) + 1;
+ vlib_buffer_free_from_ring(vm,mq->buffers,start,ring_size,n_slots);
+ }
mq->ring = 0;
}
}
@@ -136,7 +149,28 @@ memif_disconnect (memif_if_t * mif, clib_error_t * err)
vec_free (mif->rx_queues);
vec_foreach (mq, mif->tx_queues)
+ {
+ if (mif->flags & MEMIF_IF_FLAG_ZERO_COPY)
+ {
+ memif_ring_t *ring = mq->ring;
+ u16 cur_slot,last_slot, start;
+ u16 ring_size = 1 << mq->log2_ring_size;
+ u16 mask = ring_size - 1;
+ u16 n_slots = ring->tail - mq->last_tail;
+ cur_slot = mq->last_tail;
+ last_slot = mq->ring->head;
+ start = (mq->last_tail & mask);
+ if(last_slot > cur_slot)
+ n_slots = n_slots + ((last_slot - cur_slot)) ;
+ else if (last_slot < cur_slot)
+ n_slots = n_slots + (cur_slot - last_slot);
+ vlib_buffer_free_from_ring_no_next (vm, mq->buffers,
+ start,
+ ring_size, n_slots);
+ }
memif_queue_intfd_close (mq);
+ }
+
vec_free (mif->tx_queues);
/* free memory regions */
|
Fix ST demo config file | /* Default configuration for all demos. Individual demos can override these below */
#define democonfigDEMO_STACKSIZE ( configMINIMAL_STACK_SIZE * 8 )
#define democonfigDEMO_PRIORITY ( tskIDLE_PRIORITY + 5 )
+#define democonfigNETWORK_TYPES ( AWSIOT_NETWORK_TYPE_WIFI )
/* Some individual demos want to override these defaults, that is done in this section */
#if defined(democonfigTCP_ECHO_TASKS_SEPARATE_ENABLED)
|
ble_mesh: stack: the count_log field should be set to 0 when HBS is sent.
For MESH/NODE/CFG/HBS/BV-02-C | @@ -3214,7 +3214,6 @@ static void heartbeat_sub_set(struct bt_mesh_model *model,
cfg->hb_sub.dst = BLE_MESH_ADDR_UNASSIGNED;
cfg->hb_sub.min_hops = BLE_MESH_TTL_MAX;
cfg->hb_sub.max_hops = 0U;
- cfg->hb_sub.count = 0U;
}
period_ms = 0;
@@ -3240,6 +3239,11 @@ static void heartbeat_sub_set(struct bt_mesh_model *model,
hb_sub_send_status(model, ctx, STATUS_SUCCESS);
+ /* For case MESH/NODE/CFG/HBS/BV-02-C, set count_log to 0
+ * when Heartbeat Subscription Status message is sent.
+ */
+ cfg->hb_sub.count = 0U;
+
/* MESH/NODE/CFG/HBS/BV-01-C expects the MinHops to be 0x7f after
* disabling subscription, but 0x00 for subsequent Get requests.
*/
|
[kernel][Konfig]modify Kconfig file | @@ -284,7 +284,6 @@ menu "Memory Management"
endchoice
- if RT_USING_SMALL_MEM
config RT_USING_MEMTRACE
bool "Enable memory trace"
default n
@@ -298,7 +297,6 @@ menu "Memory Management"
And developer also can call memcheck() in each of scheduling
to check memory block to find which thread has wrongly modified
memory.
- endif
config RT_USING_HEAP
bool
|
BugID:17918353: Optimize the tasklist cmd to show real stack size and free size (bytes) | @@ -157,8 +157,8 @@ uint32_t dumpsys_task_func(char *buf, uint32_t len, int32_t detail)
: task->task_state;
taskinfoeach->task_state = taskstate;
taskinfoeach->task_prio = task->prio;
- taskinfoeach->stack_size = task->stack_size;
- taskinfoeach->free_size = free_size;
+ taskinfoeach->stack_size = task->stack_size * sizeof(cpu_stack_t);
+ taskinfoeach->free_size = free_size * sizeof(cpu_stack_t);
taskinfoeach->time_total = time_total;
taskinfoeach->task_cpu_usage = task_cpu_usage;
taskinfoeach->candidate = yes;
|
Avoid adding a spurious dependency on the fortran runtime despite NOFORTRAN=1
for cases where a fortran compiler is present but not wanted (e.g. not fully functional) | @@ -267,9 +267,10 @@ OBJCOPY = $(CROSS_SUFFIX)objcopy
OBJCONV = $(CROSS_SUFFIX)objconv
-# For detect fortran failed, only build BLAS.
+# When fortran support was either not detected or actively deselected, only build BLAS.
ifeq ($(NOFORTRAN), 1)
NO_LAPACK = 1
+override FEXTRALIB =
endif
#
|
sse: added WASM implementation for mm_andnot_ps | @@ -326,6 +326,8 @@ simde_mm_andnot_ps (simde__m128 a, simde__m128 b) {
#if defined(SIMDE_SSE_NEON)
r_.neon_i32 = vbicq_s32(b_.neon_i32, a_.neon_i32);
+#elif defined(SIMDE_SSE_WASM_SIMD128)
+ r_.wasm_v128 = wasm_v128_andnot(b_.wasm_v128, a_.wasm_v128);
#elif defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
r_.i32 = ~a_.i32 & b_.i32;
#else
|
ps8xxx: Remove resolved TODO
This removes a resolved TODO. Based on
there is no
preferred order for writing these registers.
BRANCH=none
TEST=buidlall passes | @@ -736,9 +736,6 @@ __maybe_unused static int ps8815_tcpc_fast_role_swap_enable(int port,
if (!tcpm_tcpc_has_frs_control(port))
return EC_SUCCESS;
- /*
- * TODO(b/183127346): Confirm register write order
- */
status = tcpc_update8(port,
PS8815_REG_RESERVED_F4,
PS8815_REG_RESERVED_F4_FRS_EN,
|
doc: improves in highlevel README
see | @@ -4,7 +4,7 @@ This folder contains an example on how to use the high-level API.
The example is provided for CMake and pkg-config build systems, but you can use any build system you like, as long as you setup
your include directories and linked libraries correctly. The high-level API uses the same include directory as the rest of elektra,
-and you need to link against at least `elektra`, `elektra-highlevel`, `elektra-kdb` and `elektra-ease` (or `elektra-full`).
+and you need to link against at least `elektra-highlevel`, `elektra-kdb` and `elektra-ease` (or, alternatively, `elektra-full`).
## Setup
@@ -12,8 +12,8 @@ Before executing the example you need to run the following snippet. Otherwise th
was provided.
```sh
-sudo kdb mount spec.ini spec/sw/example/highlevel/#0/current ni
-kdb import spec/sw/example/highlevel/#0/current ni < spec.ini
+sudo kdb mount spec.ini 'spec/sw/example/highlevel/#0/current' ni
+sudo kdb import spec/sw/example/highlevel/#0/current ni < spec.ini
sudo kdb spec-mount '/sw/example/highlevel/#0/current'
```
@@ -32,7 +32,7 @@ kdb set /sw/example/highlevel/#0/current/print 1
The pkg-config example will only work for the `BUILD_SHARED` and `BUILD_FULL` variants of Elektra.
To make pkg-config work with `BUILD_STATIC` you need to change the Makefile. You can use a C compiler for compilation, but you need to
-use a C++ Compiler for linking and also need to link with `-ldbus-1`, `-lz` `-lm` and `-pthread`.
+use a C++ Compiler for linking and also need to link with `-ldbus-1` (depending on PLUGINS), `-lz`, `-lm` and `-pthread`.
Note also that in a real-world build you should be careful with using `-Wl,-rpath`. In most cases you should only use it for development
purposes and not in a release build. Therefore you should not use the Makefile provided in the pkg-config example for release builds.
|
khan: redo error logic
No more retries. If something goes wrong, log it and close the channel.
If we receive an unknown message from the vane, crash the process. | @@ -70,7 +70,6 @@ u3_khan_io_init(u3_pier* pir_u)
typedef struct _u3_chan {
struct _u3_moor mor_u; // message handler
c3_l coq_l; // connection number
- c3_w red_w; // retry counter
struct _u3_shan* san_u; // server backpointer
struct _u3_cran* ran_u; // request list
} u3_chan;
@@ -304,28 +303,10 @@ _khan_moor_bail(void* ptr_v, ssize_t err_i, const c3_c* err_c)
u3_chan* can_u = (u3_chan*)ptr_v;
u3_shan* san_u = can_u->san_u;
- if ( err_i == UV_EOF ) {
- _khan_close_chan(can_u, san_u);
- }
- else {
- u3_noun bal;
-
- if ( 3 >= can_u->red_w ) {
- u3l_log("khan: moor fatal %zd %s\n", err_i, err_c);
- _khan_close_chan(can_u, san_u);
- }
- else {
+ if ( err_i != UV_EOF ) {
u3l_log("khan: moor bail %zd %s\n", err_i, err_c);
- can_u->red_w++;
- // TODO: rethink.
- //
- bal = u3nq(c3__bail,
- u3i_string("driver"),
- -err_i & 0x7fffffff,
- u3i_string(err_c));
- _khan_send_noun(can_u, bal);
- }
}
+ _khan_close_chan(can_u, san_u);
}
/* _khan_peek_cb(): scry result handler.
@@ -584,9 +565,8 @@ _khan_ef_handle(u3_khan* kan_u,
_khan_send_noun(can_u, u3nc(rid_l, u3k(dat)));
}
else {
- // TODO u3_king_bail? silently drop it?
- //
can_u->mor_u.bal_f(can_u, -1, "handle-unknown");
+ u3_king_bail();
}
}
else {
|
weird issue where flash only works when DRIVER_NUM set to 27, hardcoded somewhere? | #include "tock.h"
-#define DRIVER_NUM_NONVOLATILE_STORAGE 0x50001
-
#ifdef __cplusplus
extern "C" {
#endif
+#define DRIVER_NUM_NONVOLATILE_STORAGE 0x1b
+
int nonvolatile_storage_internal_read_done_subscribe(subscribe_cb cb, void *userdata);
int nonvolatile_storage_internal_write_done_subscribe(subscribe_cb cb, void *userdata);
|
fix(discord-adapter.c): check 429 response's 'global' field | @@ -135,20 +135,23 @@ discord_adapter_run(
logconf_fatal(&adapter->conf, "METHOD_NOT_ALLOWED: The server couldn't recognize the received HTTP method");
break;
case HTTP_TOO_MANY_REQUESTS: {
+ bool is_global = false;
char message[256] = "";
double retry_after = -1; /* seconds */
struct sized_buffer body = ua_info_get_resp_body(&adapter->err.info);
json_extract(body.start, body.size,
- "(message):s (retry_after):lf",
- message, &retry_after);
+ "(global):b (message):s (retry_after):lf",
+ &is_global, message, &retry_after);
+ VASSERT_S(retry_after != -1, "(NO RETRY-AFTER INCLUDED) %s", message);
- if (retry_after >= 0) { /* retry after attribute received */
+ if (is_global) {
logconf_warn(&adapter->conf, "GLOBAL RATELIMITING (wait: %.2lf ms) : %s", 1000*retry_after, message);
ua_block_ms(adapter->ua, (uint64_t)(1000*retry_after));
}
- else { /* no retry after included, we should abort */
- ERR("(NO RETRY-AFTER INCLUDED) %s", message);
+ else {
+ logconf_warn(&adapter->conf, "429 RATELIMITING (wait: %.2lf ms) : %s", 1000*retry_after, message);
+ cee_sleep_ms((int64_t)(1000*retry_after));
}
break; }
default:
|
fixup! build/configs: Fix all configs after uheap and protected build removal
This file was missing from commit
Because of changing heap management, some configs are renamed.
This commit updates defconfig for that. | @@ -21,8 +21,7 @@ CONFIG_APPS_DIR="../apps"
CONFIG_FRAMEWORK_DIR="../framework"
CONFIG_TOOLS_DIR="../tools"
CONFIG_BUILD_FLAT=y
-# CONFIG_BUILD_PROTECTED is not set
-CONFIG_FLASH_START_ADDR=0x0
+# CONFIG_APP_BINARY_SEPARATION is not set
# CONFIG_BUILD_2PASS is not set
#
@@ -217,9 +216,9 @@ CONFIG_BOOT_RUNFROMFLASH=y
#
# Boot Memory Configuration
#
-CONFIG_RAM_REGIONx_START="0x02023800"
-CONFIG_RAM_REGIONx_SIZE="968704"
-CONFIG_RAM_KREGIONx_HEAP_INDEX="0,"
+CONFIG_RAM_KREGIONx_START="0x02023800"
+CONFIG_RAM_KREGIONx_SIZE="968704"
+CONFIG_RAM_MALLOC_PRIOR_INDEX=0
# CONFIG_DDR is not set
# CONFIG_ARCH_HAVE_SDRAM is not set
@@ -921,6 +920,7 @@ CONFIG_NET_NETMON=y
# Network Manager
#
CONFIG_NET_NETMGR=y
+# CONFIG_NET_NETMGR_ZEROCOPY is not set
# CONFIG_NET_TASK_BIND is not set
#
@@ -1051,10 +1051,11 @@ CONFIG_MTD_SMART_SECTOR_SIZE=512
#
# Memory Management
#
+CONFIG_MM_KERNEL_HEAP=y
# CONFIG_REALLOC_DISABLE_NEIGHBOR_EXTENSION is not set
# CONFIG_MM_SMALL is not set
-CONFIG_MM_REGIONS=1
-CONFIG_MM_NHEAPS=1
+CONFIG_KMM_REGIONS=1
+CONFIG_KMM_NHEAPS=1
# CONFIG_GRAN is not set
#
|
Fix typo in UpnpGlobal.h MYLIB_LARGEFILE_SENSITIVE -> UPNP_... | * \brief Defines constants that for some reason are not defined on some systems.
*/
-#if defined MYLIB_LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 != 64
+#if defined UPNP_LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 != 64
#if defined __GNUC__
#warning libupnp requires largefile mode - use AC_SYS_LARGEFILE
#else
|
Fix warning in custom event description label | @@ -449,7 +449,7 @@ class ScriptEventBlock extends Component {
{
label: customEvent.description
.split("\n")
- .map(text => <div>{text || <div> </div>}</div>)
+ .map((text, index) => <div key={index}>{text || <div> </div>}</div>)
}
]
: [];
|
ASE: added null pointer checking for received message | @@ -517,14 +517,14 @@ int read_fd(int sock_fd)
}
cmsg = CMSG_FIRSTHDR(&msg);
+ if (cmsg == NULL) {
+ ASE_ERR("SIM-C : Null pointer from rcvmsg socket\n");
+ return 1;
+ }
int vector_id = 0;
fdptr = (int *)CMSG_DATA(cmsg);
- if (fdptr == NULL) {
- ASE_ERR("SIM-C : null pointer from rcvmsg socket\n");
- return 1;
- }
if (req.type == REGISTER_EVENT) {
vector_id = req.flags;
|
improve test-stress to run multiple iterations | @@ -19,6 +19,7 @@ terms of the MIT license.
// argument defaults
static int THREADS = 32; // more repeatable if THREADS <= #processors
static int N = 20; // scaling factor
+static int ITER = 10; // N full iterations re-creating all threads
// static int THREADS = 8; // more repeatable if THREADS <= #processors
// static int N = 100; // scaling factor
@@ -159,14 +160,17 @@ int main(int argc, char** argv) {
//bench_start_program();
mi_stats_reset();
+ for (int i = 0; i < ITER; i++) {
memset((void*)transfer, 0, TRANSFERS * sizeof(void*));
run_os_threads(THREADS);
for (int i = 0; i < TRANSFERS; i++) {
free_items((void*)transfer[i]);
}
+ }
#ifndef NDEBUG
mi_collect(false);
#endif
+
mi_stats_print(NULL);
//bench_end_program();
return 0;
|
Pacify perlcritic.
Per buildfarm. | # (The required minimum versions are all quite ancient now,
# but specify them anyway for documentation's sake.)
#
+use strict;
+use warnings;
+
use IPC::Run 0.79;
# Test::More and Time::HiRes are supposed to be part of core Perl,
|
Fix TCOD_tileset_render_to_surface.
The strides were not aligned correctly. | static void render_tile(
const TCOD_Tileset* tileset,
const struct TCOD_ConsoleTile* tile,
- const TCOD_ColorRGBA* out_rgba,
+ struct TCOD_ColorRGBA* out_rgba,
int stride)
{
const TCOD_ColorRGBA* graphic = TCOD_tileset_get_tile(tileset, tile->ch);
@@ -125,8 +125,10 @@ TCOD_Error TCOD_tileset_render_to_surface(
) { continue; }
}
TCOD_ColorRGBA* out = (TCOD_ColorRGBA*)(
- (char*)(*surface_out)->pixels + console_y * (*surface_out)->pitch);
- out += console_x * tileset->tile_width;
+ (char*)(*surface_out)->pixels
+ + console_y * tileset->tile_height * (*surface_out)->pitch
+ + console_x * tileset->tile_width * sizeof(*out)
+ );
render_tile(tileset, tile, out, (*surface_out)->pitch);
}
}
|
Test NotStandalone handlers | @@ -1058,6 +1058,56 @@ START_TEST(test_wfc_undeclared_entity_with_external_subset) {
}
END_TEST
+/* Test that an error is reported if our NotStandalone handler fails */
+static int XMLCALL
+reject_not_standalone_handler(void *UNUSED_P(userData))
+{
+ return XML_STATUS_ERROR;
+}
+
+START_TEST(test_not_standalone_handler_reject)
+{
+ const char *text =
+ "<?xml version='1.0' encoding='us-ascii'?>\n"
+ "<!DOCTYPE doc SYSTEM 'foo'>\n"
+ "<doc>&entity;</doc>";
+ char foo_text[] =
+ "<!ELEMENT doc (#PCDATA)*>";
+
+ XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
+ XML_SetUserData(parser, foo_text);
+ XML_SetExternalEntityRefHandler(parser, external_entity_loader);
+ XML_SetNotStandaloneHandler(parser, reject_not_standalone_handler);
+ if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR)
+ fail("NotStandalone handler failed to reject");
+}
+END_TEST
+
+/* Test that no error is reported if our NotStandalone handler succeeds */
+static int XMLCALL
+accept_not_standalone_handler(void *UNUSED_P(userData))
+{
+ return XML_STATUS_OK;
+}
+
+START_TEST(test_not_standalone_handler_accept)
+{
+ const char *text =
+ "<?xml version='1.0' encoding='us-ascii'?>\n"
+ "<!DOCTYPE doc SYSTEM 'foo'>\n"
+ "<doc>&entity;</doc>";
+ char foo_text[] =
+ "<!ELEMENT doc (#PCDATA)*>";
+
+ XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
+ XML_SetUserData(parser, foo_text);
+ XML_SetExternalEntityRefHandler(parser, external_entity_loader);
+ XML_SetNotStandaloneHandler(parser, accept_not_standalone_handler);
+ if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ xml_failure(parser);
+}
+END_TEST
+
START_TEST(test_wfc_no_recursive_entity_refs)
{
const char *text =
@@ -2791,6 +2841,8 @@ make_suite(void)
tcase_add_test(tc_basic, test_wfc_undeclared_entity_no_external_subset);
tcase_add_test(tc_basic, test_wfc_undeclared_entity_standalone);
tcase_add_test(tc_basic, test_wfc_undeclared_entity_with_external_subset);
+ tcase_add_test(tc_basic, test_not_standalone_handler_reject);
+ tcase_add_test(tc_basic, test_not_standalone_handler_accept);
tcase_add_test(tc_basic,
test_wfc_undeclared_entity_with_external_subset_standalone);
tcase_add_test(tc_basic, test_wfc_no_recursive_entity_refs);
|
[numerics] remove unstable test fc3d__NSGS_ONECONTACT_NSN_GP_Tol_1e-5_Max_100000_inTol_0_inMax_0_BoxesStack1-i100000-32.hdf5__EXPECTED_TO_FAIL | @@ -613,10 +613,10 @@ if(WITH_${COMPONENT}_TESTING)
WILL_FAIL)
# BoxesStack1-i100000-32.hdf5.dat
- NEW_FC_3D_TEST(BoxesStack1-i100000-32.hdf5.dat
- SICONOS_FRICTION_3D_NSGS 1e-5 100000
- SICONOS_FRICTION_3D_ONECONTACT_NSN_GP 0 0
- WILL_FAIL)
+ # NEW_FC_3D_TEST(BoxesStack1-i100000-32.hdf5.dat
+ # SICONOS_FRICTION_3D_NSGS 1e-5 100000
+ # SICONOS_FRICTION_3D_ONECONTACT_NSN_GP 0 0
+ # WILL_FAIL)
NEW_FC_3D_TEST(BoxesStack1-i100000-32.hdf5.dat SICONOS_FRICTION_3D_NSGS 1e-5 10000
SICONOS_FRICTION_3D_ONECONTACT_NSN_GP 0 0
INTERNAL_IPARAM 10 1
|
config: enable ACVP test case if FIPS is enabled. | @@ -532,7 +532,6 @@ my %deprecated_disablables = (
our %disabled = ( # "what" => "comment"
"fips" => "default",
- "acvp-tests" => "default",
"asan" => "default",
"buildtest-c++" => "default",
"crypto-mdebug" => "default",
@@ -638,7 +637,7 @@ my @disable_cascades = (
"cmp" => [ "crmf" ],
- "fips" => [ "fips-securitychecks" ],
+ "fips" => [ "fips-securitychecks", "acvp-tests" ],
"deprecated-3.0" => [ "engine", "srp" ]
);
|
tests CHANGE enhance test of features compilation | @@ -139,14 +139,15 @@ test_feature(void **state)
"feature f4 {if-feature \"f1 or f2\";}\n"
"feature f5 {if-feature \"f1 and f2\";}\n"
"feature f6 {if-feature \"not f1\";}\n"
- "feature f7 {if-feature \"(f2 and f3) or (not f1)\";}}";
+ "feature f7 {if-feature \"(f2 and f3) or (not f1)\";}\n"
+ "feature f8 {if-feature \"f1 or f2 or f3 or f4 or f5\";}}";
assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, 0, &ctx));
assert_int_equal(LY_SUCCESS, yang_parse(ctx, str, &mod.parsed));
assert_int_equal(LY_SUCCESS, lys_compile(mod.parsed, 0, &mod.compiled));
assert_non_null(mod.compiled);
assert_non_null(mod.compiled->features);
- assert_int_equal(7, LY_ARRAY_SIZE(mod.compiled->features));
+ assert_int_equal(8, LY_ARRAY_SIZE(mod.compiled->features));
/* all features are disabled by default */
LY_ARRAY_FOR(mod.compiled->features, struct lysc_feature, f) {
assert_int_equal(0, lysc_feature_value(f));
@@ -194,6 +195,8 @@ test_feature(void **state)
/* complex evaluation of f7: f1 and f3 are disabled, while f2 is enabled */
assert_int_equal(1, lysc_iffeature_value(&mod.compiled->features[6].iffeatures[0]));
+ /* long evaluation of f8 to need to reallocate internal stack for operators */
+ assert_int_equal(1, lysc_iffeature_value(&mod.compiled->features[7].iffeatures[0]));
lysc_module_free(mod.compiled, NULL);
lysp_module_free(mod.parsed);
|
ConnectionFX3: add handle check to send functions
also return true in wait functions if handle is invalid or not used
as there is nothing to wait for | @@ -496,7 +496,7 @@ int ConnectionFX3::BeginDataReading(char *buffer, uint32_t length, int ep)
@brief Waits for asynchronous data reception
@param contextHandle handle of which context data to wait
@param timeout_ms number of miliseconds to wait
- @return 1-data received, 0-data not received
+@return true - wait finished, false - still waiting for transfer to complete
*/
bool ConnectionFX3::WaitForReading(int contextHandle, unsigned int timeout_ms)
{
@@ -520,8 +520,7 @@ bool ConnectionFX3::WaitForReading(int contextHandle, unsigned int timeout_ms)
return contexts[contextHandle].done.load() == true;
#endif
}
- else
- return 0;
+ return true; //there is nothing to wait for (signal wait finished)
}
/**
@@ -631,11 +630,11 @@ int ConnectionFX3::BeginDataSending(const char *buffer, uint32_t length, int ep)
@brief Waits for asynchronous data sending
@param contextHandle handle of which context data to wait
@param timeout_ms number of miliseconds to wait
- @return 1-data received, 0-data not received
+@return true - wait finished, false - still waiting for transfer to complete
*/
bool ConnectionFX3::WaitForSending(int contextHandle, unsigned int timeout_ms)
{
- if( contextsToSend[contextHandle].used == true )
+ if(contextHandle >= 0 && contextsToSend[contextHandle].used == true )
{
# ifndef __unix__
int status = 0;
@@ -655,7 +654,7 @@ bool ConnectionFX3::WaitForSending(int contextHandle, unsigned int timeout_ms)
return contextsToSend[contextHandle].done == true;
# endif
}
- return 0;
+ return true; //there is nothing to wait for (signal wait finished)
}
/**
@@ -667,7 +666,7 @@ bool ConnectionFX3::WaitForSending(int contextHandle, unsigned int timeout_ms)
*/
int ConnectionFX3::FinishDataSending(const char *buffer, uint32_t length, int contextHandle)
{
- if( contextsToSend[contextHandle].used == true)
+ if(contextHandle >= 0 && contextsToSend[contextHandle].used == true)
{
#ifndef __unix__
long len = length;
|
Use C locale in Bash scripts.
Fixes openssl#17228. | # This is the most shell agnostic way to specify that POSIX rules.
POSIXLY_CORRECT=1
+# Force C locale because some commands (like date +%b) relies
+# on the current locale.
+export LC_ALL=C
+
usage () {
cat <<EOF
Usage: release.sh [ options ... ]
|
Initialize variable private | @@ -4660,7 +4660,7 @@ neat_write_to_lower_layer(struct neat_ctx *ctx, struct neat_flow *flow,
size_t len;
int atomic;
#ifdef NEAT_SCTP_DTLS
- struct security_data *private;
+ struct security_data *private = NULL;
#endif
int stream_id = 0;
|
Add ciphersuite_info check
return null if no valid ciphersuite info | @@ -188,6 +188,24 @@ static int ssl_tls13_offered_psks_check_binder_match( mbedtls_ssl_context *ssl,
return( SSL_TLS1_3_OFFERED_PSK_NOT_MATCH );
}
+static const mbedtls_ssl_ciphersuite_t *ssl_tls13_get_ciphersuite_info_by_id(
+ mbedtls_ssl_context *ssl,
+ uint16_t cipher_suite )
+{
+ const mbedtls_ssl_ciphersuite_t *ciphersuite_info;
+ if( ! mbedtls_ssl_tls13_cipher_suite_is_offered( ssl, cipher_suite ) )
+ return( NULL );
+
+ ciphersuite_info = mbedtls_ssl_ciphersuite_from_id( cipher_suite );
+ if( ( mbedtls_ssl_validate_ciphersuite( ssl, ciphersuite_info,
+ ssl->tls_version,
+ ssl->tls_version ) != 0 ) )
+ {
+ return( NULL );
+ }
+ return( ciphersuite_info );
+}
+
MBEDTLS_CHECK_RETURN_CRITICAL
static int ssl_tls13_psk_external_check_ciphersuites( mbedtls_ssl_context *ssl,
const unsigned char *buf,
@@ -1136,16 +1154,10 @@ static int ssl_tls13_parse_client_hello( mbedtls_ssl_context *ssl,
MBEDTLS_SSL_CHK_BUF_READ_PTR( p, cipher_suites_end, 2 );
cipher_suite = MBEDTLS_GET_UINT16_BE( p, 0 );
- if( ! mbedtls_ssl_tls13_cipher_suite_is_offered( ssl, cipher_suite ) )
- continue;
-
- ciphersuite_info = mbedtls_ssl_ciphersuite_from_id( cipher_suite );
- if( ( mbedtls_ssl_validate_ciphersuite(
- ssl, ciphersuite_info, ssl->tls_version,
- ssl->tls_version ) != 0 ) )
- {
+ ciphersuite_info = ssl_tls13_get_ciphersuite_info_by_id(
+ ssl,cipher_suite );
+ if( ciphersuite_info == NULL )
continue;
- }
ssl->session_negotiate->ciphersuite = cipher_suite;
ssl->handshake->ciphersuite_info = ciphersuite_info;
|
os/binfmt/libelf/libelf_cache.c: Add check for minimum blocks for caching
Minimum 2 blocks are needed for caching logic to work. | @@ -478,6 +478,11 @@ int elf_cache_init(int filfd, uint16_t offset, off_t filelen, uint8_t compressio
number_blocks_caching++;
}
+ /* Minimum 2 blocks needed for caching logic to work */
+ if (number_blocks_caching < 2) {
+ number_blocks_caching = 2;
+ }
+
/* Initialize max_accesed_count to 0 */
max_accessed_count = 0;
|
Adjusted alphabetical order | @@ -6009,10 +6009,10 @@ modules:
sceLsdbGetGameDataId: 0x2FFE0E3F
sceLsdbGetMetaContentsPath: 0x9117289F
sceLsdbGetName: 0xD02A8B85
+ sceLsdbGetOriginalPath: 0x92D14842
sceLsdbGetParentalLevel: 0x226B12F7
sceLsdbGetSelfPath: 0xD6B57313
sceLsdbGetSystemVersion: 0x9AE94B9F
sceLsdbGetStitle: 0x3B064DF5
sceLsdbGetTitle: 0x4141EBCD
- sceLsdbGetOriginalPath: 0x92D14842
sceLsdbGetType: 0xDEC358E4
|
[swig] Accept numpy integers for any integer argument | @@ -155,6 +155,48 @@ static inline void fillBasePyarray(PyObject* pyarray, SharedPointerKeeper* saved
$1 = (PyArrayObject*) $input;
}
+//////////////////////////////////////////////////////////////////////////////
+// allow integers to be numpy types
+%{
+static int
+Siconos_AsVal_int (PyObject *obj, int* val)
+{
+#if PY_VERSION_HEX < 0x03000000
+ if (PyInt_Check(obj)) {
+ if (val) *val = PyInt_AsLong(obj);
+ return SWIG_OK;
+ } else
+#endif
+ if (PyLong_Check(obj)) {
+ long v = PyLong_AsLong(obj);
+ if (!PyErr_Occurred()) {
+ if (val) *val = v;
+ return SWIG_OK;
+ } else {
+ PyErr_Clear();
+ return SWIG_OverflowError;
+ }
+ }
+ if (PyArray_CheckScalar(obj)) {
+ int x = PyArray_PyIntAsInt(obj);
+ if (x == -1 && PyErr_Occurred())
+ return SWIG_TypeError;
+ if (val) *val = x;
+ return SWIG_OK;
+ }
+ return SWIG_TypeError;
+}
+%}
+%typemap(typecheck) int {
+ int ecode = Siconos_AsVal_int($input, &$1);
+ $1 = SWIG_IsOK(ecode);
+}
+%typemap(in) int {
+ int ecode = Siconos_AsVal_int($input, &$1);
+ if (!SWIG_IsOK(ecode))
+ SWIG_exception_fail(ecode, "Expected int");
+}
+
//////////////////////////////////////////////////////////////////////////////
// check on input : a numpy array or a TYPE
|
Minor fix to iOS build script, when pushing SPM, push all tags to remote | @@ -273,7 +273,7 @@ def buildIOSPackage(args, buildCocoapod, buildSwiftPackage):
print('pod trunk push\n')
if buildSwiftPackage:
spmPackageName = "mobile-sdk-ios-metal-swift-package" if args.metalangle else "mobile-sdk-ios-swift-package"
- print('rm -rf %s\ngit clone [email protected]:nutiteq/%s\ncp Package.swift %s\ncd %s\ngit add Package.swift\ngit commit -m "Version %s" && git tag %s\ngit push origin\n' % (spmPackageName, spmPackageName, spmPackageName, spmPackageName, version, version))
+ print('rm -rf %s\ngit clone [email protected]:nutiteq/%s\ncp Package.swift %s\ncd %s\ngit add Package.swift\ngit commit -m "Version %s" && git tag %s\ngit push origin --tags\n' % (spmPackageName, spmPackageName, spmPackageName, spmPackageName, version, version))
return True
parser = argparse.ArgumentParser()
|
[tools] allow users to set specific link scripts. | @@ -291,6 +291,7 @@ def HandleToolOption(tools, env, project, reset):
listOptionValue = option.find('listOptionValue')
if listOptionValue != None:
+ if reset is True or IsRttEclipsePathFormat(listOptionValue.get('value')):
listOptionValue.set('value', linker_script)
else:
SubElement(option, 'listOptionValue', {'builtIn': 'false', 'value': linker_script})
|
readme: update ci badges url | | CI Workflow | Status |
|-------------------|--------------------|
-| Unit Tests (master) |  |
-| Integration Tests (master) | |
-| Latest release build | |
-| Docker images (master) | |
+| Unit Tests (master) | [](https://github.com/fluent/fluent-bit/actions/workflows/unit-tests.yaml) |
+| Integration Tests (master) | [](https://github.com/fluent/fluent-bit/actions/workflows/integration-run-master.yaml)|
+| Docker images (master) | [](https://github.com/fluent/fluent-bit/actions/workflows/integration-build-master.yaml)|
+| Latest release build | [](https://github.com/fluent/fluent-bit/actions/workflows/build-release.yaml)|
## Project Description
|
Make loop variable declaration C89-compliant | @@ -120,7 +120,9 @@ end_declarations;
int module_initialize(
YR_MODULE* module)
{
- for (int i = 0; i < MAX_THREADS; i++)
+ int i;
+
+ for (i = 0; i < MAX_THREADS; i++)
magic_cookie[i] = NULL;
return ERROR_SUCCESS;
@@ -130,7 +132,9 @@ int module_initialize(
int module_finalize(
YR_MODULE* module)
{
- for (int i = 0; i < MAX_THREADS; i++)
+ int i;
+
+ for (i = 0; i < MAX_THREADS; i++)
if (magic_cookie[i] != NULL)
magic_close(magic_cookie[i]);
|
Allow isolation2 to take additional pg_regress options. | @@ -56,7 +56,7 @@ clean distclean:
install: all gpdiff.pl gpstringsubs.pl
installcheck: install
- ./pg_isolation2_regress --init-file=$(top_builddir)/src/test/regress/init_file --init-file=./init_file_isolation2 --psqldir='$(PSQLDIR)' --inputdir=$(srcdir) --ao-dir=uao --schedule=$(srcdir)/isolation2_schedule
+ ./pg_isolation2_regress $(EXTRA_REGRESS_OPTS) --init-file=$(top_builddir)/src/test/regress/init_file --init-file=./init_file_isolation2 --psqldir='$(PSQLDIR)' --inputdir=$(srcdir) --ao-dir=uao --schedule=$(srcdir)/isolation2_schedule
installcheck-resgroup: install
- ./pg_isolation2_regress --init-file=$(top_builddir)/src/test/regress/init_file --init-file=./init_file_resgroup --psqldir='$(PSQLDIR)' --inputdir=$(srcdir) --dbname=isolation2resgrouptest --schedule=$(srcdir)/isolation2_resgroup_schedule
+ ./pg_isolation2_regress $(EXTRA_REGRESS_OPTS) --init-file=$(top_builddir)/src/test/regress/init_file --init-file=./init_file_resgroup --psqldir='$(PSQLDIR)' --inputdir=$(srcdir) --dbname=isolation2resgrouptest --schedule=$(srcdir)/isolation2_resgroup_schedule
|
iommu: retype with the correct object size | @@ -261,21 +261,29 @@ static void retype_request(struct iommu_binding *ib, struct capref src,
err = invoke_frame_identify(src, &id);
if (err_is_fail(err)) {
+ err = err_push(err, LIB_ERR_CAP_INVOKE);
goto send_reply;
}
/* we should be the only one that has it */
err = cap_revoke(src);
if (err_is_fail(err)) {
+ err = err_push(err, LIB_ERR_CAP_DELETE_FAIL);
goto send_reply;
}
+
+ /* allocate slot to store the new cap */
err = slot_alloc(&retcap);
if (err_is_fail(err)) {
+ err = err_push(err, LIB_ERR_SLOT_ALLOC);
+ retcap = src;
goto send_reply;
}
- err = cap_retype(retcap, src, 0, objtype, 11, 1);
+ /* retype it to a page table */
+ err = cap_retype(retcap, src, 0, objtype, id.bytes, 1);
if (err_is_fail(err)) {
+ err = err_push(err, LIB_ERR_CAP_RETYPE);
slot_free(retcap);
retcap = src;
goto send_reply;
|
temp: fix balance issue | @@ -37,13 +37,14 @@ export default class Balance extends Component {
CAD: 70000,
BTC: 1,
},
- denomination: "CAD",
+ denomination: "USD",
}
}
render() {
- const sats = this.props.state.wallet.balance || 0;
+ const sats = (this.props.state.wallet) ?
+ (this.props.state.wallet.balance || 0) : 0;
const value = currencyFormat(sats, this.state.conversion, this.state.denomination);
return (
|
imx6ull: fix indentation in memory test makefile
JIRA: | @@ -273,6 +273,7 @@ int test_ddrAll(void)
}
+#ifdef MEMTEST_SHORT
static void test_ddrShort(void)
{
int errors;
@@ -283,6 +284,7 @@ static void test_ddrShort(void)
test_ddrPrintUint(errors);
test_ddrPutch('\n');
}
+#endif
void test_ddr(void)
|
Remove duplicated qlog parameters_set | @@ -984,10 +984,6 @@ int ngtcp2_conn_client_new(ngtcp2_conn **pconn, const ngtcp2_cid *dcid,
return rv;
}
- ngtcp2_qlog_parameters_set_transport_params(
- &(*pconn)->qlog, &(*pconn)->local.settings.transport_params,
- (*pconn)->server, NGTCP2_QLOG_SIDE_LOCAL);
-
return 0;
}
|
set new version number | @@ -31,7 +31,7 @@ USE work.donut_types.all;
ENTITY mmio IS
GENERIC (
-- Version register content
- IMP_VERSION_DAT : std_ulogic_vector(63 DOWNTO 0) := x"0000_4650_1612_0600";
+ IMP_VERSION_DAT : std_ulogic_vector(63 DOWNTO 0) := x"0000_4650_1701_1000";
APP_VERSION_DAT : std_ulogic_vector(63 DOWNTO 0) := x"CAFE_0003_475A_4950";
-- Time slice register
TSR_RESET_VALUE : std_ulogic_vector(63 DOWNTO 0) := x"0000_0000_0002_0000";
|
ARIA documentation titled itself AES | @@ -32,7 +32,7 @@ EVP_aria_256_ccm,
EVP_aria_128_gcm,
EVP_aria_192_gcm,
EVP_aria_256_gcm,
-- EVP AES cipher
+- EVP ARIA cipher
=head1 SYNOPSIS
@@ -106,7 +106,7 @@ L<EVP_CIPHER_meth_new(3)>
=head1 COPYRIGHT
-Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy
|
vere: v0.10.9-rc1 | set -e
-URBIT_VERSION="0.10.8"
+URBIT_VERSION="0.10.9-rc1"
deps=" \
curl gmp sigsegv argon2 ed25519 ent h2o scrypt uv murmur3 secp256k1 \
|
added informations about hcxdudmptool and mac80211_hwsim | +08.01.2019
+==========
+hcxdudmptool and mac80211_hwsim
+mac80211_hwsim is a Linux kernel module that can be used to simulate
+arbitrary number of IEEE 802.11 radios for mac80211. It can be used to
+test hcxdumptool:
+load module:
+$ sudo modprobe mac80211_hwsim
+
+run hcxdumptool to retrieve informations about the interface:
+$ hcxdumptool -I
+wlan interfaces:
+020000000000 wlan0 (mac80211_hwsim)
+020000000100 wlan1 (mac80211_hwsim)
+
+bring monitor interface up:
+$ sudo sudo ip link set hwsim0 up
+
+run hcxdumptool:$ sudo hcxdumptool -i wlan0
+initialization...
+
+start capturing (stop with ctrl+c)
+INTERFACE:...............: wlan0
+ERRORMAX.................: 100 errors
+FILTERLIST...............: 0 entries
+MAC CLIENT...............: c8aacc9c01ec
+MAC ACCESS POINT.........: 580943000000 (incremented on every new client)
+EAPOL TIMEOUT............: 150000
+REPLAYCOUNT..............: 62263
+ANONCE...................: 513282ebb604e6e10c450d6c3eaa6428d118b54abeef4672be3ef700052305d5
+
+INFO: cha=11, rx=0, rx(dropped)=0, tx=120, powned=0, err=0
+
+run wireshark on wlan0 or hwsim0 to monitor hcxdumptool output.
+
+
04.01.2019
==========
hcxdumptool - changed flash time:
|
[io, vview] fix unhashable type error, dynamic_actors.keys() to list | @@ -1479,7 +1479,7 @@ class VView(object):
actor.VisibilityOff()
def set_dynamic_actors_visibility(self, time):
- self.set_visibility_v(self.dynamic_actors.keys(), time)
+ self.set_visibility_v(list(self.dynamic_actors.keys()), time)
# callback maker for scale manipulation
def make_scale_observer(self, glyphs):
|
plugins ext UPDATE print message on failed ext callback | @@ -664,10 +664,15 @@ lyplg_ext_parsed_get_storage(const struct lysc_ext_instance *ext, int stmt, uint
LIBYANG_API_DEF LY_ERR
lyplg_ext_get_data(const struct ly_ctx *ctx, const struct lysc_ext_instance *ext, void **ext_data, ly_bool *ext_data_free)
{
+ LY_ERR rc;
+
if (!ctx->ext_clb) {
lyplg_ext_compile_log(NULL, ext, LY_LLERR, LY_EINVAL, "Failed to get extension data, no callback set.");
return LY_EINVAL;
}
- return ctx->ext_clb(ext, ctx->ext_clb_data, ext_data, ext_data_free);
+ if ((rc = ctx->ext_clb(ext, ctx->ext_clb_data, ext_data, ext_data_free))) {
+ lyplg_ext_compile_log(NULL, ext, LY_LLERR, rc, "Callback for getting ext data failed.");
+ }
+ return rc;
}
|
Update test_dictionary to include check for ion_open_dictionary functionality | @@ -251,11 +251,14 @@ test_dictionary_master_table(
PLANCK_UNIT_ASSERT_INT_ARE_EQUAL(tc, err_ok, err);
/* Test open dictionary */
+
ion_dictionary_handler_t test_handler;
- err = ion_open_dictionary(&handler, &dictionary2, 2);
+ err = ion_open_dictionary(&test_handler, &dictionary2, 2);
PLANCK_UNIT_ASSERT_INT_ARE_EQUAL(tc, err_ok, err);
+ /* Test close master table */
+
err = ion_close_master_table();
PLANCK_UNIT_ASSERT_INT_ARE_EQUAL(tc, err_ok, err);
|
Stylecheck for plgo/cmd/ | @@ -521,7 +521,6 @@ migrations:
- a.yandex-team.ru/strm/gorshok/pkg/content/parsers_test
- a.yandex-team.ru/strm/gorshok/pkg/sandbox
- a.yandex-team.ru/strm/gorshok/pkg/server
- - a.yandex-team.ru/strm/plgo/cmd/strm-playlist
- a.yandex-team.ru/strm/plgo/pkg/algorithm
- a.yandex-team.ru/strm/plgo/pkg/algorithm_test
- a.yandex-team.ru/strm/plgo/pkg/balancer
|
fix error in yml script | @@ -102,12 +102,6 @@ docker-build:archlinux-oce:
IMAGE_NAME: archlinux-oce
extends: .docker-build
-docker-clean:
- stage: docker-clean
- script: "sh ci_gitlab/docker-clean-images.sh"
-
-
-
# ---- Siconos build jobs -----
# Siconos build and install, default config
|
Update RP2 build instructions to use upstream | @@ -275,21 +275,18 @@ make erase && make deploy
```
### RP2-based boards
-Building `micropython` with `ulab` currently requires Pimoroni's [micropython fork](https://github.com/pimoroni/micropython/tree/continuous-integration).
+RP2 firmware can be compiled either by downloading and running the single [build script](https://github.com/v923z/micropython-ulab/blob/master/build/rp2.sh), or executing the commands below.
-Once the pull request for this fork is resolved you should be able to use the official repository. The firmware can be compiled either by downloading and running the single [build script](https://github.com/v923z/micropython-ulab/blob/master/build/rp2.sh), or executing the commands below.
-
-First, clone the micropython fork and checkout the `continous-integration` branch:
+First, clone `micropython`:
```bash
-git clone [email protected]:pimoroni/micropython.git micropython
-cd micropython
-git checkout continuous-integration
+git clone https://github.com/micropython/micropython.git
```
Then, setup the required submodules:
```bash
+cd micropython
git submodule update --init lib/tinyusb
git submodule update --init lib/pico-sdk
cd lib/pico-sdk
@@ -303,7 +300,7 @@ cd ../../mpy-cross
make
```
-That's all you need to do for the `micropython` repository. Now, let us clone the fork of `ulab` (in a directory outside the micropython repository):
+That's all you need to do for the `micropython` repository. Now, let us clone `ulab` (in a directory outside the micropython repository):
```bash
cd ../../
|
One more change for papplSystemLoadState bug - strip trailing ">" from
"<something value(s)>". Easiest fix was to provide a local implementation of
cupsFileGetConf that doesn't support comments (Issue | static void parse_contact(char *value, pappl_contact_t *contact);
static void parse_media_col(char *value, pappl_media_col_t *media);
+static char *read_line(cups_file_t *fp, char *line, size_t linesize, char **value, int *linenum);
static void write_contact(cups_file_t *fp, pappl_contact_t *contact);
static void write_media_col(cups_file_t *fp, const char *name, pappl_media_col_t *media);
static void write_options(cups_file_t *fp, const char *name, int num_options, cups_option_t *options);
@@ -79,13 +80,8 @@ papplSystemLoadState(
papplLog(system, PAPPL_LOGLEVEL_INFO, "Loading system state from '%s'.", filename);
linenum = 0;
- while (cupsFileGets(fp, line, sizeof(line)))
+ while (read_line(fp, line, sizeof(line), &value, &linenum))
{
- linenum ++;
-
- if ((value = strchr(line, ' ')) != NULL)
- *value++ = '\0';
-
if (!strcasecmp(line, "DNSSDName"))
papplSystemSetDNSSDName(system, value);
else if (!strcasecmp(line, "Location"))
@@ -144,13 +140,8 @@ papplSystemLoadState(
papplLog(system, PAPPL_LOGLEVEL_ERROR, "Dropping printer '%s' and its job history because an error occurred: %s", printer_name, strerror(errno));
}
- while (cupsFileGets(fp, line, sizeof(line)))
+ while (read_line(fp, line, sizeof(line), &value, &linenum))
{
- linenum ++;
-
- if ((value = strchr(line, ' ')) != NULL)
- *value++ = '\0';
-
if (!strcasecmp(line, "</Printer>"))
break;
else if (!printer)
@@ -644,6 +635,48 @@ parse_media_col(
}
+//
+// 'read_line()' - Read a line from the state file.
+//
+// This function is like `cupsFileGetConf`, except that it doesn't support
+// comments since the state files are not meant to be edited or maintained by
+// humans.
+//
+
+static char * // O - Line or `NULL` on EOF
+read_line(cups_file_t *fp, // I - File
+ char *line, // I - Line buffer
+ size_t linesize, // I - Size of line buffer
+ char **value, // O - Value portion of line
+ int *linenum) // IO - Current line number
+{
+ char *ptr; // Pointer into line
+
+
+ // Try reading a line from the file...
+ *value = NULL;
+
+ if (!cupsFileGets(fp, line, linesize))
+ return (NULL);
+
+ // Got it, bump the line number...
+ (*linenum) ++;
+
+ // If we have "something value" then split at the whitespace...
+ if ((ptr = strchr(line, ' ')) != NULL)
+ {
+ *ptr++ = '\0';
+ *value = ptr;
+ }
+
+ // Strip the trailing ">" for "<something value(s)>"
+ if (line[0] == '<' && *value && (ptr = *value + strlen(*value) - 1) >= *value && *ptr == '>')
+ *ptr = '\0';
+
+ return (line);
+}
+
+
//
// 'write_contact()' - Write an "xxx-contact" value.
//
|
Set other define for SCTP | @@ -4564,7 +4564,7 @@ neat_connect(struct neat_he_candidate *candidate, uv_poll_cb callback_fx)
address_name = strtok_r(NULL, ",", &ptr);
}
free (tmp);
-#if defined(IPPROTO_SCTP) && !defined (USRSCTP_SUPPORT)
+#if defined(HAVE_NETINET_SCTP_H) && !defined (USRSCTP_SUPPORT)
if (sctp_bindx(candidate->pollable_socket->fd, (struct sockaddr *)candidate->pollable_socket->local_addr, candidate->pollable_socket->nr_local_addr, SCTP_BINDX_ADD_ADDR)) {
neat_log(ctx, NEAT_LOG_ERROR,
"Failed to bindx fd %d socket to IP. Error: %s",
|
Fix unused variable in QUIC send stream test | @@ -210,7 +210,7 @@ static int test_bulk(int idx)
QUIC_SSTREAM *sstream = NULL;
OSSL_QUIC_FRAME_STREAM hdr;
OSSL_QTX_IOVEC iov[2];
- size_t i, num_iov = 0, init_size = 8192, total_written = 0, l;
+ size_t i, num_iov = 0, init_size = 8192, l;
size_t consumed = 0, rd, expected = 0;
unsigned char *src_buf = NULL, *dst_buf = NULL;
unsigned char *ref_src_buf = NULL, *ref_dst_buf = NULL;
@@ -259,7 +259,6 @@ static int test_bulk(int idx)
memcpy(ref_src_cur, src_buf, consumed);
ref_src_cur += consumed;
- total_written += consumed;
} while (consumed > 0);
if (!TEST_size_t_eq(ossl_quic_sstream_get_buffer_used(sstream), init_size)
|
build CHANGE force out-of-source build
Avoid possibility to mix generated (config) files with source files
and force user to always build libyang out of its source codes. | cmake_minimum_required(VERSION 2.8.12)
+
+# force out-of-source build
+if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
+ message(FATAL_ERROR "In-source build is not allowed. Please make a standalone build directory and run CMake from there. You may need to remove CMakeCache.txt.")
+endif()
+
project(libyang C)
include(GNUInstallDirs)
|
ci: create csv-formatted bandit log artifact | @@ -32,6 +32,9 @@ jobs:
bandit -r $(find ${{ github.workspace }} -name "*.py") \
--format txt \
| tee ${{ github.workspace }}/bandit.log
+ bandit -r $(find ${{ github.workspace }} -name "*.py") \
+ --format csv \
+ | tee ${{ github.workspace }}/bandit.log.csv
- name: Archive results
uses: actions/upload-artifact@v2
with:
@@ -39,3 +42,4 @@ jobs:
path: |
${{ github.workspace }}/flake8.log
${{ github.workspace }}/bandit.log
+ ${{ github.workspace }}/bandit.log.csv
|
Remove unused /describe REST endpoint | @@ -1025,9 +1025,6 @@ parse_request(int sd, struct stats_cmd *st_cmd)
} else if (strcmp(reqline[1], "/ping") == 0) {
st_cmd->cmd = CMD_PING;
return;
- } else if (strcmp(reqline[1], "/describe") == 0) {
- st_cmd->cmd = CMD_DESCRIBE;
- return;
} else if (strncmp(reqline[1], "/setloglevel", dn_strlen("/setloglevel")) == 0) {
st_cmd->cmd = CMD_SET_LOG_LEVEL;
log_notice("Setting loglevel: %s", reqline[1]);
|
docs/esp8266: Add note about simultaneous use of STA_IF and AP_IF.
See also | @@ -125,6 +125,16 @@ will overflow every 7:45h. If a long-term working RTC time is required then
``time()`` or ``localtime()`` must be called at least once within 7 hours.
MicroPython will then handle the overflow.
+Simultaneous operation of STA_IF and AP_IF
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Simultaneous operation of STA_IF and AP_IF interfaces is supported.
+
+However, due to restrictions of the hardware, there may be performance
+issues in the AP_IF, if the STA_IF is not connected and searching.
+An application should manage these interfaces and for example
+deactivate the STA_IF in environments where only the AP_IF is used.
+
Sockets and WiFi buffers overflow
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Clean redis-benchmark Throughput output.
some leftovers from print are visible when the new line is printed. | @@ -1649,6 +1649,7 @@ int showThroughput(struct aeEventLoop *eventLoop, long long id, void *clientData
const float instantaneous_rps = (float)(requests_finished-previous_requests_finished)/instantaneous_dt;
config.previous_tick = current_tick;
atomicSet(config.previous_requests_finished,requests_finished);
+ printf("%*s\r", config.last_printed_bytes, " "); /* ensure there is a clean line */
int printed_bytes = printf("%s: rps=%.1f (overall: %.1f) avg_msec=%.3f (overall: %.3f)\r", config.title, instantaneous_rps, rps, hdr_mean(config.current_sec_latency_histogram)/1000.0f, hdr_mean(config.latency_histogram)/1000.0f);
if (printed_bytes > config.last_printed_bytes){
config.last_printed_bytes = printed_bytes;
|
Switched changelogs to packaging alias instead of personal emails. | unit-jsc14 unit-jsc15 unit-jsc16 unit-jsc17 unit-jsc18"
ver="1.28.0" rev="1"
date="" time=""
- packager="Konstantin Pavlov <[email protected]>">
+ packager="Nginx Packaging <[email protected]>">
<change>
<para>
@@ -29,7 +29,7 @@ NGINX Unit updated to 1.28.0.
<changes apply="unit" ver="1.28.0" rev="1"
date="" time=""
- packager="Konstantin Pavlov <[email protected]>">
+ packager="Nginx Packaging <[email protected]>">
<change type="feature">
<para>
|
CC1200: disable debug by default | @@ -60,7 +60,7 @@ static rtimer_clock_t sfd_timestamp = 0;
* - 2: Print errors + warnings (recoverable errors)
* - 3: Print errors + warnings + information (what's going on...)
*/
-#define DEBUG_LEVEL 2
+#define DEBUG_LEVEL 0
/*
* RF test mode. Blocks inside "configure()".
* - Set this parameter to 1 in order to produce an modulated carrier (PN9)
|
MicroPython: Update GU to MP_DEFINE_CONST_OBJ_TYPE. | @@ -94,6 +94,25 @@ STATIC MP_DEFINE_CONST_DICT(Channel_locals_dict, Channel_locals_dict_table);
STATIC MP_DEFINE_CONST_DICT(GalacticUnicorn_locals_dict, GalacticUnicorn_locals_dict_table);
/***** Class Definition *****/
+#ifdef MP_DEFINE_CONST_OBJ_TYPE
+MP_DEFINE_CONST_OBJ_TYPE(
+ Channel_type,
+ MP_QSTR_Channel,
+ MP_TYPE_FLAG_NONE,
+ make_new, Channel_make_new,
+ print, Channel_print,
+ locals_dict, (mp_obj_dict_t*)&Channel_locals_dict
+);
+
+MP_DEFINE_CONST_OBJ_TYPE(
+ GalacticUnicorn_type,
+ MP_QSTR_GalacticUnicorn,
+ MP_TYPE_FLAG_NONE,
+ make_new, GalacticUnicorn_make_new,
+ print, GalacticUnicorn_print,
+ locals_dict, (mp_obj_dict_t*)&GalacticUnicorn_locals_dict
+);
+#else
const mp_obj_type_t Channel_type = {
{ &mp_type_type },
.name = MP_QSTR_Channel,
@@ -109,6 +128,7 @@ const mp_obj_type_t GalacticUnicorn_type = {
.make_new = GalacticUnicorn_make_new,
.locals_dict = (mp_obj_dict_t*)&GalacticUnicorn_locals_dict,
};
+#endif
/***** Globals Table *****/
STATIC const mp_map_elem_t galactic_globals_table[] = {
|
If parameter pErrorlogs is NULL return error. | @@ -7603,7 +7603,7 @@ GetErrorLog(
NVDIMM_ENTRY();
- if (pThis == NULL || pCommandStatus == NULL || pErrorLogCount == NULL ||
+ if (pThis == NULL || pCommandStatus == NULL || pErrorLogCount == NULL || pErrorLogs == NULL ||
(pDimmIds == NULL && DimmsCount > 0)) {
ResetCmdStatus(pCommandStatus, NVM_ERR_INVALID_PARAMETER);
goto Finish;
|
kdb merge man: Fix return value syntax | @@ -42,11 +42,14 @@ Strategies have their own [man page](/doc/help/elektra-cmerge-strategy.md) which
## RETURN VALUE
-0 on success.
+- 0:
+ Successful.
-1 if an error happened.
+- 1:
+ An error happened.
-2 if a merge conflict occurred and merge strategy abort was set.
+- 2:
+ A merge conflict occurred and merge strategy abort was set.
The result of the merge is stored in `result`.
|
pg: bugfix for pg paylod hdr-size
it was specified to 0 after
causes unformat_pg_ip4_header to wrongly set ip header len.
do more check when assigning e->lsb_bit_offset to avoid
negative value | @@ -167,13 +167,13 @@ unformat_pg_payload (unformat_input_t * input, va_list * args)
for (i = 0; i < len; i++)
v[i] = i % ilen;
- e = pg_create_edit_group (s, sizeof (e[0]), 0, 0);
+ e = pg_create_edit_group (s, sizeof (e[0]), len, 0);
e->type = PG_EDIT_FIXED;
- e->n_bits = vec_len (v) * BITS (v[0]);
+ e->n_bits = len * BITS (v[0]);
/* Least significant bit is at end of bitstream, since everything is always bigendian. */
- e->lsb_bit_offset = e->n_bits - BITS (v[0]);
+ e->lsb_bit_offset = len > 0 ? e->n_bits - BITS (v[0]) : 0;
e->values[PG_EDIT_LO] = v;
|
esp32s2: remove bt references from esp32s2 ld script | @@ -190,14 +190,6 @@ SECTIONS
.dram0.data :
{
_data_start = ABSOLUTE(.);
- _bt_data_start = ABSOLUTE(.);
- *libbt.a:(.data .data.*)
- . = ALIGN (4);
- _bt_data_end = ABSOLUTE(.);
- _btdm_data_start = ABSOLUTE(.);
- *libbtdm_app.a:(.data .data.*)
- . = ALIGN (4);
- _btdm_data_end = ABSOLUTE(.);
*(.gnu.linkonce.d.*)
*(.data1)
*(.sdata)
@@ -244,14 +236,6 @@ SECTIONS
. = ALIGN (8);
_bss_start = ABSOLUTE(.);
*(.ext_ram.bss*)
- _bt_bss_start = ABSOLUTE(.);
- *libbt.a:(.bss .bss.* COMMON)
- . = ALIGN (4);
- _bt_bss_end = ABSOLUTE(.);
- _btdm_bss_start = ABSOLUTE(.);
- *libbtdm_app.a:(.bss .bss.* COMMON)
- . = ALIGN (4);
- _btdm_bss_end = ABSOLUTE(.);
mapping[dram0_bss]
|
tests: runtime: filter_lua: add test code for 'code' | @@ -511,6 +511,79 @@ void flb_test_array_contains_null(void)
flb_destroy(ctx);
}
+void flb_test_code(void)
+{
+ int ret;
+ flb_ctx_t *ctx;
+ int in_ffd;
+ int out_ffd;
+ int filter_ffd;
+ char *output = NULL;
+ char *input = "[0, {\"key\":\"val\"}]";
+ char *result;
+ struct flb_lib_out_cb cb_data;
+
+ char *script_body = ""
+ "function lua_main(tag, timestamp, record)\n"
+ " new_record = record\n"
+ " new_record[\"lua_array\"] = {};\n"
+ " new_record[\"lua_array2\"] = {1,2,3};\n"
+ " return 1, timestamp, new_record\n"
+ "end\n";
+
+ /* Create context, flush every second (some checks omitted here) */
+ ctx = flb_create();
+ flb_service_set(ctx, "flush", "1", "grace", "1", NULL);
+
+ /* Prepare output callback context*/
+ cb_data.cb = callback_test;
+ cb_data.data = NULL;
+
+ /* Filter */
+ filter_ffd = flb_filter(ctx, (char *) "lua", NULL);
+ TEST_CHECK(filter_ffd >= 0);
+ ret = flb_filter_set(ctx, filter_ffd,
+ "Match", "*",
+ "call", "lua_main",
+ "code", script_body,
+ "type_array_key", "lua_array lua_array2",
+ NULL);
+
+ /* Input */
+ in_ffd = flb_input(ctx, (char *) "lib", NULL);
+ flb_input_set(ctx, in_ffd, "tag", "test", NULL);
+ TEST_CHECK(in_ffd >= 0);
+
+ /* Lib output */
+ out_ffd = flb_output(ctx, (char *) "lib", (void *)&cb_data);
+ TEST_CHECK(out_ffd >= 0);
+ flb_output_set(ctx, out_ffd,
+ "match", "test",
+ "format", "json",
+ NULL);
+
+ ret = flb_start(ctx);
+ TEST_CHECK(ret==0);
+
+ flb_lib_push(ctx, in_ffd, input, strlen(input));
+ sleep(1);
+ output = get_output();
+ result = strstr(output, "\"lua_array\":[]");
+ if(!TEST_CHECK(result != NULL)) {
+ TEST_MSG("output:%s\n", output);
+ }
+ result = strstr(output, "\"lua_array2\":[1,2,3]");
+ if(!TEST_CHECK(result != NULL)) {
+ TEST_MSG("output:%s\n", output);
+ }
+
+ /* clean up */
+ flb_lib_free(output);
+
+ flb_stop(ctx);
+ flb_destroy(ctx);
+}
+
TEST_LIST = {
{"hello_world", flb_test_helloworld},
{"append_tag", flb_test_append_tag},
@@ -518,5 +591,7 @@ TEST_LIST = {
{"type_int_key_multi", flb_test_type_int_key_multi},
{"type_array_key", flb_test_type_array_key},
{"array_contains_null", flb_test_array_contains_null},
+ {"code", flb_test_code},
+
{NULL, NULL}
};
|
Add boostrap debugging in test for node loader. | @@ -6,6 +6,7 @@ const trampoline = require('./trampoline.node');
const Module = require('module');
const path = require('path');
+const util = require('util');
const cherow = require('./node_modules/cherow');
@@ -197,8 +198,12 @@ function node_loader_trampoline_discover(handle) {
return discover;
}
-function node_loader_trampoline_test() {
+function node_loader_trampoline_test(obj) {
console.log('NodeJS Loader Bootstrap Test');
+
+ if (obj !== undefined) {
+ console.log(util.inspect(obj, false, null, true));
+ }
}
function node_loader_trampoline_destroy() {
|
Fixed error in POP AF instruction reference
The "imaginary" equivalent instructions put the instructions in the wrong order (inc sp first). | @@ -1142,10 +1142,10 @@ This is roughly equivalent to the following
.Em imaginary
instructions:
.Bd -literal -offset indent
+ld f, [sp] ; See below for individual flags
inc sp
ld a, [sp]
inc sp
-ld f, [sp] ; See below for individual flags
.Ed
.Pp
Cycles: 3
|
Add copies-default, finishings[-col]-default, and number-up-default. | @@ -136,6 +136,36 @@ serverTransformJob(
if (format && asprintf(myenvp + myenvc, "OUTPUT_TYPE=%s", format) > 0)
myenvc ++;
+ if ((attr = ippFindAttribute(job->printer->dev_attrs, "copies-default", IPP_TAG_INTEGER)) == NULL)
+ attr = ippFindAttribute(job->printer->pinfo.attrs, "copies-default", IPP_TAG_INTEGER);
+ if (attr)
+ {
+ ippAttributeString(attr, val, sizeof(val));
+
+ if (asprintf(myenvp + myenvc, "PRINTER_COPIES_DEFAULT=%s", val))
+ myenvc ++;
+ }
+
+ if ((attr = ippFindAttribute(job->printer->dev_attrs, "finishings-default", IPP_TAG_ENUM)) == NULL)
+ attr = ippFindAttribute(job->printer->pinfo.attrs, "finishings-default", IPP_TAG_ENUM);
+ if (attr)
+ {
+ ippAttributeString(attr, val, sizeof(val));
+
+ if (asprintf(myenvp + myenvc, "PRINTER_FINISHINGS_DEFAULT=%s", val))
+ myenvc ++;
+ }
+
+ if ((attr = ippFindAttribute(job->printer->dev_attrs, "finishings-col-default", IPP_TAG_BEGIN_COLLECTION)) == NULL)
+ attr = ippFindAttribute(job->printer->pinfo.attrs, "finishings-col-default", IPP_TAG_BEGIN_COLLECTION);
+ if (attr)
+ {
+ ippAttributeString(attr, val, sizeof(val));
+
+ if (asprintf(myenvp + myenvc, "PRINTER_FINISHINGS_COL_DEFAULT=%s", val))
+ myenvc ++;
+ }
+
if ((attr = ippFindAttribute(job->printer->dev_attrs, "materials-col-default", IPP_TAG_BEGIN_COLLECTION)) == NULL)
attr = ippFindAttribute(job->printer->pinfo.attrs, "materials-col-default", IPP_TAG_BEGIN_COLLECTION);
if (attr)
@@ -161,6 +191,16 @@ serverTransformJob(
myenvc ++;
}
+ if ((attr = ippFindAttribute(job->printer->dev_attrs, "number-up-default", IPP_TAG_INTEGER)) == NULL)
+ attr = ippFindAttribute(job->printer->pinfo.attrs, "number-up-default", IPP_TAG_INTEGER);
+ if (attr)
+ {
+ ippAttributeString(attr, val, sizeof(val));
+
+ if (asprintf(myenvp + myenvc, "PRINTER_NUMBER_UP_DEFAULT=%s", val))
+ myenvc ++;
+ }
+
if ((attr = ippFindAttribute(job->printer->dev_attrs, "platform-temperature-default", IPP_TAG_INTEGER)) == NULL)
attr = ippFindAttribute(job->printer->pinfo.attrs, "platform-temperature-default", IPP_TAG_INTEGER);
if (attr && asprintf(myenvp + myenvc, "PRINTER_PLATFORM_TEMPERATURE_DEFAULT=%d", ippGetInteger(attr, 0)))
@@ -183,7 +223,7 @@ serverTransformJob(
if ((attr = ippFindAttribute(job->printer->dev_attrs, "print-supports-default", IPP_TAG_INTEGER)) == NULL)
attr = ippFindAttribute(job->printer->pinfo.attrs, "print-supports-default", IPP_TAG_INTEGER);
- if (attr && asprintf(myenvp + myenvc, "PRINTER_PPRINT_SUPPORTS_DEFAULT=%s", ippGetString(attr, 0, NULL)))
+ if (attr && asprintf(myenvp + myenvc, "PRINTER_PRINT_SUPPORTS_DEFAULT=%s", ippGetString(attr, 0, NULL)))
myenvc ++;
if ((attr = ippFindAttribute(job->printer->dev_attrs, "sides-default", IPP_TAG_KEYWORD)) == NULL)
|
Fix "--list" callback for mainloop. | static char *copy_stdin(const char *base_name, char *name, size_t namesize);
static void device_error_cb(const char *message, void *err_data);
-static bool device_list_cb(const char *device_uri, const char *device_id, void *data);
+static bool device_list_cb(const char *device_info, const char *device_uri, const char *device_id, void *data);
static char *get_value(ipp_attribute_t *attr, const char *name, int element, char *buffer, size_t bufsize);
static void print_option(ipp_t *response, const char *name);
@@ -1142,7 +1142,8 @@ device_error_cb(const char *message, // I - Error message
//
static bool // O - `true` to stop, `false` to continue
-device_list_cb(const char *device_uri, // I - Device URI
+device_list_cb(const char *device_info, // I - Device description
+ const char *device_uri, // I - Device URI
const char *device_id, // I - IEEE-1284 device ID
void *data) // I - Callback data (NULL for plain, "verbose" for verbose output)
{
|
esp32_qencoder: Fix small issues and typos reported by Tiago Medicci | @@ -188,7 +188,7 @@ static struct esp32_lowerhalf_s *esp32_pcnt2lower(int pcnt);
/* Interrupt handling */
-#if 0 /* FIXME: To be implement */
+#if 0 /* FIXME: To be implemented */
static int esp32_interrupt(int irq, void *context, void *arg);
#endif
@@ -525,7 +525,7 @@ static struct esp32_lowerhalf_s *esp32_pcnt2lower(int pcnt)
*
****************************************************************************/
-#if 0 /* FIXME: To be implement */
+#if 0 /* FIXME: To be implemented */
static int esp32_interrupt(int irq, void *context, void *arg)
{
struct esp32_lowerhalf_s *priv = (struct esp32_lowerhalf_s *)arg;
@@ -686,28 +686,7 @@ static int esp32_position(struct qe_lowerhalf_s *lower, int32_t *pos)
static int esp32_setposmax(struct qe_lowerhalf_s *lower, uint32_t pos)
{
-#ifdef CONFIG_ESP32_QENCODER_DISABLE_EXTEND16BTIMERS
- struct esp32_lowerhalf_s *priv = (struct esp32_lowerhalf_s *)lower;
-
-#if defined(HAVE_MIXEDWIDTH_TIMERS)
- if (priv->config->width == 32)
- {
- esp32_putreg32(priv, ESP32_GTIM_ARR_OFFSET, pos);
- }
- else
- {
- esp32_putreg16(priv, ESP32_GTIM_ARR_OFFSET, pos);
- }
-#elif defined(HAVE_32BIT_TIMERS)
- esp32_putreg32(priv, ESP32_GTIM_ARR_OFFSET, pos);
-#else
- esp32_putreg16(priv, ESP32_GTIM_ARR_OFFSET, pos);
-#endif
-
- return OK;
-#else
return -ENOTTY;
-#endif
}
/****************************************************************************
@@ -731,9 +710,7 @@ static int esp32_reset(struct qe_lowerhalf_s *lower)
flags = spin_lock_irqsave(&priv->lock);
- regval = getreg32(PCNT_CTRL_REG);
- regval |= PCNT_CNT_RST_U(priv->config->pcntid);
- putreg32(regval, PCNT_CTRL_REG);
+ modifyreg32(PCNT_CTRL_REG, 0, PCNT_CNT_RST_U(priv->config->pcntid));
priv->position = 0;
|
Examples: remove warning | @@ -84,7 +84,7 @@ int main(int argc, char* argv[])
sprintf(key_name, "/verticalSoundingSignificance=4/pressure");
CODES_CHECK(codes_get_size(h, key_name, &sigt_len), 0);
- printf("Number of T significant levels: %lu\n", sigt_len);
+ printf("Number of T significant levels: %lu\n", (unsigned long)sigt_len);
/* Allocate memory for the values to be read. Each
* parameter must have the same number of values. */
|
Update CHANGES.md and NEWS.md for new release
Release: yes | @@ -30,7 +30,13 @@ OpenSSL 3.1
OpenSSL 3.0
-----------
-### Major changes between OpenSSL 3.0.2 and OpenSSL 3.0.3
+### Major changes between OpenSSL 3.0.3 and OpenSSL 3.0.4 [21 Jun 2022]
+
+ * Fixed additional bugs in the c_rehash script which was not properly
+ sanitising shell metacharacters to prevent command injection
+ ([CVE-2022-2068])
+
+### Major changes between OpenSSL 3.0.2 and OpenSSL 3.0.3 [3 May 2022]
* Fixed a bug in the c_rehash script which was not properly sanitising shell
metacharacters to prevent command injection ([CVE-2022-1292])
|
fix(layout): "left: auto" is calculated as "left: 0" | @@ -848,18 +848,18 @@ void Widget_UpdatePosition(LCUI_Widget w)
switch (position) {
case SV_ABSOLUTE:
w->x = w->y = 0;
- if (Widget_CheckStyleValid(w, key_left)) {
+ if (!Widget_HasAutoStyle(w, key_left)) {
w->x = w->computed_style.left;
- } else if (Widget_CheckStyleValid(w, key_right)) {
+ } else if (!Widget_HasAutoStyle(w, key_right)) {
if (w->parent) {
w->x = w->parent->box.border.width;
w->x -= w->width;
}
w->x -= w->computed_style.right;
}
- if (Widget_CheckStyleValid(w, key_top)) {
+ if (!Widget_HasAutoStyle(w, key_top)) {
w->y = w->computed_style.top;
- } else if (Widget_CheckStyleValid(w, key_bottom)) {
+ } else if (!Widget_HasAutoStyle(w, key_bottom)) {
if (w->parent) {
w->y = w->parent->box.border.height;
w->y -= w->height;
@@ -868,14 +868,14 @@ void Widget_UpdatePosition(LCUI_Widget w)
}
break;
case SV_RELATIVE:
- if (Widget_CheckStyleValid(w, key_left)) {
+ if (!Widget_HasAutoStyle(w, key_left)) {
w->x += w->computed_style.left;
- } else if (Widget_CheckStyleValid(w, key_right)) {
+ } else if (!Widget_HasAutoStyle(w, key_right)) {
w->x -= w->computed_style.right;
}
- if (Widget_CheckStyleValid(w, key_top)) {
+ if (!Widget_HasAutoStyle(w, key_top)) {
w->y += w->computed_style.top;
- } else if (Widget_CheckStyleValid(w, key_bottom)) {
+ } else if (!Widget_HasAutoStyle(w, key_bottom)) {
w->y -= w->computed_style.bottom;
}
default:
|
build: only exclude debug symbols on m1 | @@ -14,6 +14,12 @@ let
version = builtins.readFile "${src}/version";
+ # See https://github.com/urbit/urbit/issues/5561
+ oFlags =
+ if stdenv.hostPlatform.system == "aarch64-darwin"
+ then (if enableDebug then [ "-O0" "-g" ] else [ "-O3" ])
+ else [ (if enableDebug then "-O0" else "-O3") "-g" ];
+
in stdenv.mkDerivation {
inherit src version;
@@ -59,8 +65,7 @@ in stdenv.mkDerivation {
then [ "--disable-shared" "--enable-static" ]
else [];
- CFLAGS = (if enableDebug then [ "-O0" "-g" ] else [ "-O3" ])
- ++ lib.optionals (!enableDebug) [ "-Werror" ];
+ CFLAGS = oFlags ++ lib.optionals (!enableDebug) [ "-Werror" ];
MEMORY_DEBUG = enableDebug;
CPU_DEBUG = enableDebug;
|
BugID:24843276:Updated halapp_dac demo to support two ADCs if possible | */
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <aos/kernel.h>
#include "aos/init.h"
#include "aos/hal/adc.h"
/**
* Convert Analog to Digital, and print out the result
*/
-void hal_adc_app_out(void)
+
+static void adc_app_out(uint8_t port)
{
- uint16_t val;
+ uint32_t val[2];
adc_dev_t adc_dev;
int ret;
int cnt;
- printf("hal_adc_out start\r\n");
+ printf("adc_app_out on port %d start\r\n", port);
- adc_dev.port = HALAPP_ADC;
+ adc_dev.port = port;
hal_adc_init(&adc_dev);
- val = 0;
cnt = 20;
while (cnt-- > 0) {
+ memset(val, 0, sizeof(val));
ret = hal_adc_value_get(&adc_dev, &val, 1000);
if (ret) {
printf("%s: get value error, ret %d\r\n", __func__, ret);
goto out;
} else {
- printf("adc port %d value 0x%x\r\n", adc_dev.port, val);
+ printf("adc port %d value 0x%03x, 0x%03x\r\n", adc_dev.port, val[0], val[1]);
}
aos_msleep(500);
@@ -42,7 +44,11 @@ void hal_adc_app_out(void)
out:
hal_adc_finalize(&adc_dev);
- printf("hal_adc_out end\r\n");
+ printf("adc_app_out on port %d end\r\n", port);
}
+void hal_adc_app_out(void)
+{
+ adc_app_out(HALAPP_ADC);
+}
#endif
|
Suppress over-eager compiler warnings in test code | #include <stdint.h>
+#if defined(__clang__)
#pragma clang diagnostic ignored "-Wunreachable-code"
+#endif
/* END_HEADER */
/* BEGIN_CASE */
@@ -109,7 +111,7 @@ void mbedtls_byteswap( unsigned int input_h, unsigned int input_l, int size,
uint64_t expected = ( ((uint64_t)expected_h) << 32 ) | ( (uint64_t)expected_l );
/* Check against expected */
- uint64_t r;
+ uint64_t r = 0;
switch ( size )
{
case 16:
@@ -121,6 +123,8 @@ void mbedtls_byteswap( unsigned int input_h, unsigned int input_l, int size,
case 64:
r = MBEDTLS_BSWAP64( input );
break;
+ default:
+ TEST_ASSERT( ! "size must be 16, 32 or 64" );
}
TEST_EQUAL( r, expected );
@@ -258,7 +262,7 @@ void unaligned_access_endian_aware(int size, int offset, int big_endian )
for ( size_t i = 0; i < sizeof(raw); i++ )
x[i] = (uint8_t) i;
- uint64_t read;
+ uint64_t read = 0;
if ( big_endian )
{
switch ( size )
|
Subsets and Splits