message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
fix deleting rcv name if "empty" | @@ -83,7 +83,7 @@ static t_pd *commentsink = 0;
static void comment_receive(t_comment *x, t_symbol *s){
t_symbol *rcv = canvas_realizedollar(x->x_glist, x->x_rcv_unexpanded = s);
if(rcv == gensym("empty"))
- rcv == &s_;
+ rcv = &s_;
if(rcv != &s_){
if(x->x_receive_sym != &s_)
pd_unbind(&x->x_obj.ob_pd, x->x_receive_sym);
|
Examples: confusing comment in bufr_expanded.f90 | @@ -32,7 +32,6 @@ real(kind=8), dimension(:), allocatable :: values
do while (iret/=CODES_END_OF_FILE)
- ! Get and print some keys form the BUFR header
write(*,*) 'message: ',count
! We need to instruct ecCodes to expand all the descriptors
|
*Fix previous commit | @@ -289,7 +289,7 @@ INT WINAPI wWinMain(
result = PhMainMessageLoop();
if (PhGetIntegerSetting(L"KphUnloadOnShutdown"))
- PhUnloadDriver(NULL, L"KProcessHacker3");
+ PhUnloadDriver(NULL, KPH_DEVICE_SHORT_NAME);
RtlExitUserProcess(result);
}
|
Geometry: enable SQUARE wave for beep audio | @@ -270,7 +270,7 @@ void init() {
channels[0].release_ms = 10;
channels[0].volume = 4000;
- channels[1].waveforms = Waveform::SINE;
+ channels[1].waveforms = Waveform::SQUARE | Waveform::SINE;
channels[1].frequency = 0;
channels[1].attack_ms = 10;
channels[1].decay_ms = 500;
|
Fix miner/worker split bug in hashrate stats | @@ -244,11 +244,11 @@ namespace Miningcore.Mining
foreach(var item in orphanedHashrateForMinerWorker)
{
- var parts = item.Split(":");
+ var parts = item.Split(".");
var miner = parts[0];
var worker = parts.Length > 1 ? parts[1] : null;
- stats.Miner = parts[0];
+ stats.Miner = miner;
stats.Worker = worker;
// persist
|
Support for Linear Gradients with one Gradient stop | @@ -3170,11 +3170,11 @@ static std::vector<D2D1_GRADIENT_STOP> __CGGradientToD2D1GradientStop(CGContextR
// effect based on the extend mode). We support that by inserting a point (with transparent color) close to the start/end points, such
// that d2d will automatically extend the transparent color, thus we obtain the desired effect for CGGradientDrawingOptions.
- if (!(options & kCGGradientDrawsBeforeStartLocation)) {
+ if (!(options & kCGGradientDrawsBeforeStartLocation) && gradientCount > 1) {
__CGGradientInsertTransparentColor(gradientStops, 0, s_kCGGradientOffsetPoint);
}
- if (!(options & kCGGradientDrawsAfterEndLocation)) {
+ if (!(options & kCGGradientDrawsAfterEndLocation) && gradientCount > 1) {
__CGGradientInsertTransparentColor(gradientStops, 1, 1.0f - s_kCGGradientOffsetPoint);
}
|
modcustomdevices: Add I2CDevice structure
This adds a class with a dummy method, but it doesn't do anything yet. | @@ -114,10 +114,55 @@ STATIC const mp_obj_type_t customdevices_AnalogSensor_type = {
.locals_dict = (mp_obj_dict_t*)&customdevices_AnalogSensor_locals_dict,
};
+// pybricks.customdevices.I2CDevice class object
+typedef struct _customdevices_I2CDevice_obj_t {
+ mp_obj_base_t base;
+ pbio_ev3iodev_t *iodev;
+} customdevices_I2CDevice_obj_t;
+
+// pybricks.customdevices.I2CDevice.__init__
+STATIC mp_obj_t customdevices_I2CDevice_make_new(const mp_obj_type_t *otype, size_t n_args, size_t n_kw, const mp_obj_t *args ) {
+ PB_PARSE_ARGS_CLASS(n_args, n_kw, args,
+ PB_ARG_REQUIRED(port),
+ PB_ARG_REQUIRED(address)
+ );
+ customdevices_I2CDevice_obj_t *self = m_new_obj(customdevices_I2CDevice_obj_t);
+ self->base.type = (mp_obj_type_t*) otype;
+
+ mp_int_t port_num = enum_get_value_maybe(port, &pb_enum_type_Port);
+ mp_int_t i2c_address = mp_obj_get_int(address);
+
+ printf("I2C Sensor with address %d on port %c\n", i2c_address, port_num);
+
+ return MP_OBJ_FROM_PTR(self);
+}
+
+// pybricks.customdevices.I2CDevice.read
+STATIC mp_obj_t customdevices_I2CDevice_read(mp_obj_t self_in) {
+ customdevices_I2CDevice_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ return mp_obj_new_int(self->iodev->port);
+}
+STATIC MP_DEFINE_CONST_FUN_OBJ_1(customdevices_I2CDevice_read_obj, customdevices_I2CDevice_read);
+
+// dir(pybricks.customdevices.I2CDevice)
+STATIC const mp_rom_map_elem_t customdevices_I2CDevice_locals_dict_table[] = {
+ { MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&customdevices_I2CDevice_read_obj) },
+};
+STATIC MP_DEFINE_CONST_DICT(customdevices_I2CDevice_locals_dict, customdevices_I2CDevice_locals_dict_table);
+
+// type(pybricks.customdevices.I2CDevice)
+STATIC const mp_obj_type_t customdevices_I2CDevice_type = {
+ { &mp_type_type },
+ .name = MP_QSTR_I2CDevice,
+ .make_new = customdevices_I2CDevice_make_new,
+ .locals_dict = (mp_obj_dict_t*)&customdevices_I2CDevice_locals_dict,
+};
+
// dir(pybricks.customdevices)
STATIC const mp_rom_map_elem_t customdevices_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_customdevices) },
{ MP_ROM_QSTR(MP_QSTR_AnalogSensor), MP_ROM_PTR(&customdevices_AnalogSensor_type) },
+ { MP_ROM_QSTR(MP_QSTR_I2CDevice), MP_ROM_PTR(&customdevices_I2CDevice_type ) },
};
STATIC MP_DEFINE_CONST_DICT(pb_module_customdevices_globals, customdevices_globals_table);
|
test without pwd | @@ -25,11 +25,11 @@ jobs:
with:
fetch-depth: 0
- - name: Login to DockerHub
- uses: docker/login-action@v1
- with:
- username: ${{ secrets.DOCKER_HUB_USERNAME }}
- password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
+ # - name: Login to DockerHub
+ # uses: docker/login-action@v1
+ # with:
+ # username: ${{ secrets.DOCKER_HUB_USERNAME }}
+ # password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
# Run Docker Command - Pull
- run: echo ${IMAGE_NAME}
|
BugID:17865306: Allow to use wildcards in $(NAME)_SOURCES
Allow to specify sources with $(NAME)_SOURCES := *.c */*.c simply. | @@ -218,7 +218,7 @@ AOS_SDK_FINAL_OUTPUT_FILE += $(BIN_OUTPUT_FILE)
AOS_SDK_2BOOT_SUPPORT +=$(AOS_2BOOT_SUPPORT)
AOS_CPLUSPLUS_FLAGS += $(CPLUSPLUS_FLAGS)
$(eval PROCESSED_COMPONENTS += $(NAME))
-$(eval $(NAME)_SOURCES := $(sort $($(NAME)_SOURCES) $($(NAME)_SOURCES-y)) )
+$(eval $(NAME)_SOURCES := $(sort $(subst $($(NAME)_LOCATION),,$(wildcard $(addprefix $($(NAME)_LOCATION),$($(NAME)_SOURCES) $($(NAME)_SOURCES-y)) ))))
endef
|
Update pipeline README to note centos 7 is now default
Authored-by: Tyler Ramer | @@ -113,13 +113,13 @@ template) to the source repository.
As an example of generating a pipeline with a targeted test subset,
the following can be used to generate a pipeline with supporting
-builds (default: centos6 platform) and `CLI` only jobs.
+builds (default: centos7 platform) and `CLI` only jobs.
The generated pipeline and helper `fly` command are intended encourage
engineers to set the pipeline with a team-name-string (-t) and engineer
(-u) identifiable names.
-NOTE: The majority of jobs are only available for the `centos6`
+NOTE: The majority of jobs are only available for the `centos7`
platform.
```
@@ -129,7 +129,7 @@ $ ./gen_pipeline.py -t dpm -u curry -a CLI
Generate Pipeline type: .. : dpm
Pipeline file ............ : gpdb-dpm-curry.yml
Template file ............ : gpdb-tpl.yml
- OS Types ................. : ['centos6']
+ OS Types ................. : ['centos7']
Test sections ............ : ['CLI']
test_trigger ............. : True
======================================================================
@@ -148,16 +148,16 @@ fly -t gpdb-dev \
```
Use the following to generate a pipeline with `ICW` and `CS` test jobs
-for `centos6` and `ubuntu18.04` platforms.
+for `centos7` and `ubuntu18.04` platforms.
```
-$ ./gen_pipeline.py -t cs -u durant -O {centos6,ubuntu18.04} -a {ICW,CS}
+$ ./gen_pipeline.py -t cs -u durant -O {centos7,ubuntu18.04} -a {ICW,CS}
======================================================================
Generate Pipeline type: .. : cs
Pipeline file ............ : gpdb-cs-durant.yml
Template file ............ : gpdb-tpl.yml
- OS Types ................. : ['centos6', 'ubuntu18.04']
+ OS Types ................. : ['centos7', 'ubuntu18.04']
Test sections ............ : ['ICW', 'CS']
test_trigger ............. : True
======================================================================
|
README.md fixes. | -# NGINX Unit
-
<!-- menu -->
-- [About](#about)
+- [NGINX Unit](#about)
- [Installation](#installation)
- [System Requirements](#system-requirements)
- [Precompiled Packages](#precompiled-packages)
- [Ubuntu Prerequisites](#ubuntu-prerequisits)
- [CentOS Prerequisites](#centos-prerequisits)
- [Configuring Sources](#configuring-sources)
- - [Configuring Go package](#configuring-go-package)
+ - [Configuring Go Package](#configuring-go-package)
- [Building the Go Applications](#building-the-go-applications)
- [Configuring PHP Modules](#configuring-php-modules)
- [Configuring Python Modules](#configuring-python-modules)
- [Full Example](#full-example)
- [Integration with NGINX](#integration-with-nginx)
- [Installing Unit Behind NGINX](#installing-unit-behind-nginx)
+ - [Example 1](#installing-unit-example1)
+ - [Example 2](#installing-unit-example2)
- [Securing and Proxying Unit API](#securing-and-proxying-unit-api)
- [Contribution](#contribution)
- [Troubleshooting](#troubleshooting)
<!-- section:1 -->
-## About
+## NGINX Unit
NGINX Unit is a dynamic web application server, designed to run applications
in multiple languages. Unit is lightweight, polyglot, and dynamically
@@ -145,7 +145,7 @@ Ubuntu 16.04 LTS.
# apt-get install unit
```
-### Source code
+### Source Code
This section explains how to compile and install Unit from the source code.
@@ -163,7 +163,7 @@ current working directory.
For example, on Ubuntu systems, run this command:
```
- # apt-get mercurial
+ # apt-get install mercurial
```
2. Download the Unit sources:
@@ -527,7 +527,7 @@ file:
--unix-socket ./control.unit.sock http://localhost/
```
-#### Example: Create an Application Configuration
+#### Example: Create an Application Object
Create a new application object called **wiki** from the file **wiki.json**.
@@ -799,7 +799,7 @@ Example:
<!-- /section:3 -->
-<!-- /section:4 -->
+<!-- section:4 -->
## Integration with NGINX
|
doc: METADATA require/required unclear status | @@ -336,15 +336,15 @@ example = 4-20
[require]
type = boolean
-status = proposed
-description = Alternative to "default": ensures that an application
- will be able to successfully retrieve a configuration setting.
+status = unclear
+description = See spec plugin
[required]
type = range
usedby/plugin = required
status = unclear
-description = for _ as basename as array. Otherwise the presence determines
+description = See spec plugin
+ for _ as basename as array. Otherwise the presence determines
if a key is required.
In process of being replaced in favour of require.
|
[kernel] fix typos | @@ -327,13 +327,13 @@ public:
* \param nb the identifier of the DynamicalSystem to get
* \return a pointer on DynamicalSystem
*/
- inline SP::DynamicalSystem dynamicalSystems(int nb) const
+ inline SP::DynamicalSystem dynamicalSystem(int nb) const
{
- return _topology->getDynamicalSystems(nb);
+ return _topology->getDynamicalSystem(nb);
}
- inline void displayDynamicalSystem() const
+ inline void displayDynamicalSystems() const
{
- _topology->displayDynamicalSystem();
+ _topology->displayDynamicalSystems();
}
/** remove a dynamical system
|
[kernel] add calls to updateInteractions() before updateOutput() in TimeSteppingDirectProjection | @@ -102,12 +102,10 @@ void TimeSteppingDirectProjection::advanceToEvent()
DEBUG_PRINT("TimeStepping::newtonSolve begin :\n");
- // Update interactions if a manager was provided
- updateInteractions();
-
if (!_doOnlyProj)
TimeStepping::newtonSolve(_newtonTolerance, _newtonMaxIteration);
-
+ else
+ updateInteractions();
DEBUG_EXPR_WE(std::cout << "TimeStepping::newtonSolve end : Number of iterations=" << getNewtonNbIterations() << "\n";
std::cout << " : newtonResiduDSMax=" << newtonResiduDSMax() << "\n";
@@ -286,6 +284,7 @@ void TimeSteppingDirectProjection::advanceToEvent()
}
updateWorldFromDS();
+ updateInteractions();
computeCriteria(&runningProjection);
@@ -618,6 +617,7 @@ void TimeSteppingDirectProjection::newtonSolve(double criterion, unsigned int ma
isNewtonConverge = newtonCheckConvergence(criterion);
if (!isNewtonConverge && !info)
{
+ updateInteractions();
updateOutput();
if (!_allNSProblems->empty() && indexSet->size()>0)
saveYandLambdaInOldVariables();
|
apps/examples/usrsocktest: Add MSG_PEEK flag support
Do not decrement the recv_avail_bytes if MSG_PEEK flag is specified. | @@ -879,7 +879,12 @@ prepare:
{
char tmp = 'a' + i;
+ /* Check if MSG_PEEK flag is specified. */
+
+ if ((req->flags & MSG_PEEK) != MSG_PEEK)
+ {
tsock->recv_avail_bytes--;
+ }
wlen = write(fd, &tmp, 1);
if (wlen < 0)
|
bugfix/remove MEMMAP_SMP config
This commit removes the MEMMAP_SMP config option.
Dependencies on this config will now depend on !FREERTOS_UNICORE | @@ -20,13 +20,6 @@ config ESP32_DEFAULT_CPU_FREQ_MHZ
default 160 if ESP32_DEFAULT_CPU_FREQ_160
default 240 if ESP32_DEFAULT_CPU_FREQ_240
-config MEMMAP_SMP
- bool "Reserve memory for two cores"
- default "y"
- help
- The ESP32 contains two cores. If you plan to only use one, you can disable this item
- to save some memory. (ToDo: Make this automatically depend on unicore support)
-
config SPIRAM_SUPPORT
bool "Support for external, SPI-connected RAM"
default "n"
@@ -197,7 +190,7 @@ config ESP32_TRAX
config ESP32_TRAX_TWOBANKS
bool "Reserve memory for tracing both pro as well as app cpu execution"
default "n"
- depends on ESP32_TRAX && MEMMAP_SMP
+ depends on ESP32_TRAX && !FREERTOS_UNICORE
select MEMMAP_TRACEMEM_TWOBANKS
help
The ESP32 contains a feature which allows you to trace the execution path the processor
|
group-view: fix errored rollback | %start start
%added added
%metadata metadata
+ ?(%no-perms %strange %abort) error
==
+ ++ error jn-core
++ start jn-core
++ added (emit del-us:pass)
++ metadata (emit:added remove-pull-groups:pass)
|
Dev: v0.12 development begins! | @@ -20,7 +20,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/library")
# Fluent Bit Version
set(FLB_VERSION_MAJOR 0)
-set(FLB_VERSION_MINOR 11)
+set(FLB_VERSION_MINOR 12)
set(FLB_VERSION_PATCH 0)
set(FLB_VERSION_STR "${FLB_VERSION_MAJOR}.${FLB_VERSION_MINOR}.${FLB_VERSION_PATCH}")
|
apps/examples/ustream: Fix a typo that generates a warning when CONFIG_BUILD_LOADABLE is selected. | #
############################################################################
--include $(TOPDIR)/.config
-include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
@@ -69,7 +68,7 @@ CLIENT_MAINOBJ = $(CLIENT_MAINSRC:.c=$(OBJEXT))
CLIENT_SRCS = $(CLIENT_ASRCS) $(CLIENT_CSRCS) $(CLIENT_MAINSRC)
CLIENT_OBJS = $(CLIENT_AOBJS) $(CLIENT_COBJS)
-CLIENT_PROGNAME = server$(EXEEXT)
+CLIENT_PROGNAME = client$(EXEEXT)
CLIENT_APPNAME = client
CLIENT_PRIORITY = SCHED_PRIORITY_DEFAULT
@@ -121,7 +120,6 @@ $(COBJS): %$(OBJEXT): %.c
$(Q) touch .built
ifeq ($(CONFIG_BUILD_LOADABLE),y)
-
$(BIN_DIR)$(DELIM)$(CLIENT_PROGNAME): $(CLIENT_OBJS)
@echo "LD: $(CLIENT_PROGNAME)"
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(CLIENT_PROGNAME) $(ARCHCRT0OBJ) $(CLIENT_MAINOBJ) $(LDLIBS)
|
examples/mediaplayer: Add missing break
Add missing break at the end of case TEST_PCM. | @@ -130,6 +130,7 @@ bool MyMediaPlayer::init(int test)
source->setPcmFormat(AUDIO_FORMAT_TYPE_S16_LE);
return std::move(source);
};
+ break;
case TEST_BUFFER:
makeSource = []() {
auto source = std::move(unique_ptr<BufferInputDataSource>(new BufferInputDataSource()));
|
[CLI] Add base64 filling for convinience
tying to append trailing equal character(=) to input in getblock
command | @@ -47,6 +47,15 @@ func execGetBlock(cmd *cobra.Command, args []string) {
binary.LittleEndian.PutUint64(b, uint64(number))
blockQuery = b
} else {
+
+ if len(hash)%4 > 0 {
+ toAdd := 4 - len(hash)%4
+ for toAdd > 0 {
+ hash = hash + "="
+ toAdd--
+ }
+ fmt.Printf("Trying to append change input to %s by appending filling char =\n", hash)
+ }
decoded, err := util.DecodeB64(hash)
if err != nil {
fmt.Printf("decode error: %s", err.Error())
|
Add wheel as possible group name in storage/posix test.
Some platforms use wheel as the group for symlinks instead of root. | @@ -268,7 +268,7 @@ testRun(void)
TEST_RESULT_INT(info.mode, 0777, " check mode");
TEST_RESULT_STR(info.linkDestination, NULL, " check link destination");
TEST_RESULT_STR_Z(info.user, "root", " check user");
- TEST_RESULT_STR_Z(info.group, "root", " check group");
+ TEST_RESULT_STR_Z(info.group, strEqZ(info.group, "wheel") ? "wheel" : "root", " check group");
storageRemoveP(storageTest, linkName, .errorOnMissing = true);
|
Use ARG instead of ENV
No need to persist this into runtime environment. Also, this way you can
customize the build/runtime dependencies on the docker command line. | @@ -4,10 +4,11 @@ FROM alpine:edge
COPY . /goaccess
WORKDIR /goaccess
-ENV build_deps="build-base ncurses-dev autoconf automake git gettext-dev"
+ARG build_deps="build-base ncurses-dev autoconf automake git gettext-dev"
+ARG runtime_deps="tini ncurses libintl gettext "
RUN apk update && \
- apk add -u tini ncurses libintl gettext $build_deps && \
+ apk add -u $runtime_deps $build_deps && \
autoreconf -fiv && \
./configure --enable-utf8 && \
make && \
|
Missing pointer from | @@ -2837,7 +2837,7 @@ int prevcolourmap (s_model *model, int map_index);
int prevcolourmapn (s_model *model, int map_index, int player_index);
// Transition animation vs. default.
-int transition_to_animation (entity ent, e_animations transition, e_animations default);
+int transition_to_animation (entity *ent, e_animations transition, e_animations default);
int buffer_pakfile (char *filename, char **pbuffer, size_t *psize);
size_t ParseArgs (ArgList *list, char *input, char *output);
|
vmbus: fix strncpy related warnings
The code that was manipulating interface names with ifreq was
causing warnings about possible truncation and non terminated
strings.
These are warnings only since kernel would allow a interface
name > 15 characters anyway.
Reported-by: Burt Silverman | @@ -157,7 +157,7 @@ vlib_vmbus_raise_lower (int fd, const char *upper_name)
u8 *dev_net_dir;
DIR *dir;
- memset (&ifr, 0, sizeof (ifr));
+ clib_memset (&ifr, 0, sizeof (ifr));
dev_net_dir = format (0, "%s/%s%c", sysfs_class_net_path, upper_name, 0);
@@ -175,7 +175,7 @@ vlib_vmbus_raise_lower (int fd, const char *upper_name)
if (strncmp (e->d_name, "lower_", 6))
continue;
- strncpy (ifr.ifr_name, e->d_name + 6, IFNAMSIZ);
+ strncpy (ifr.ifr_name, e->d_name + 6, IFNAMSIZ - 1);
break;
}
closedir (dir);
@@ -249,8 +249,8 @@ vlib_vmbus_bind_to_uio (vlib_vmbus_addr_t * addr)
}
- memset (&ifr, 0, sizeof (ifr));
- strncpy (ifr.ifr_name, ifname, IFNAMSIZ);
+ clib_memset (&ifr, 0, sizeof (ifr));
+ strncpy (ifr.ifr_name, ifname, IFNAMSIZ - 1);
/* read up/down flags */
fd = socket (PF_INET, SOCK_DGRAM, 0);
|
Change build to full log | @@ -23,7 +23,7 @@ autoreconf -fvi
if [ $OS == "Darwin" ] ; then
./configure --enable-debug=yes LDFLAGS="-L${SSL_LIBDIR}" CPPFLAGS="-I${SSL_INCLUDEDIR}"
else
- ./configure --enable-debug=log
+ ./configure --enable-debug=full
fi
make
|
Add docs to parser | @@ -389,6 +389,8 @@ espi_parse_at_sdk_version(const char* str, esp_sw_version_t* version_out) {
/**
* \brief Parse +LINK_CONN received string for new connection active
+ * \param[in] str: Pointer to input string starting with +LINK_CONN
+ * \return `1` on success, `0` otherwise
*/
uint8_t
espi_parse_link_conn(const char* str) {
|
IPSEC: Tunnel SA not deleted
p is overwritten by hash_unset so an incorrect value is passed to
ipsec_sa_del | @@ -382,11 +382,14 @@ ipsec_add_del_tunnel_if_internal (vnet_main_t * vnm,
}
else
{
+ u32 ti;
+
/* check if exists */
if (!p)
return VNET_API_ERROR_INVALID_VALUE;
- t = pool_elt_at_index (im->tunnel_interfaces, p[0]);
+ ti = p[0];
+ t = pool_elt_at_index (im->tunnel_interfaces, ti);
hi = vnet_get_hw_interface (vnm, t->hw_if_index);
vnet_sw_interface_set_flags (vnm, hi->sw_if_index, 0); /* admin down */
@@ -401,8 +404,8 @@ ipsec_add_del_tunnel_if_internal (vnet_main_t * vnm,
pool_put (im->tunnel_interfaces, t);
/* delete input and output SA */
- ipsec_sa_del (ipsec_tun_mk_input_sa_id (p[0]));
- ipsec_sa_del (ipsec_tun_mk_output_sa_id (p[0]));
+ ipsec_sa_del (ipsec_tun_mk_input_sa_id (ti));
+ ipsec_sa_del (ipsec_tun_mk_output_sa_id (ti));
}
if (sw_if_index)
|
remove unnecessary path qualifiers on output files | add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/fox.o
- COMMAND arm-none-eabi-ld -r -b binary -o ${CMAKE_CURRENT_BINARY_DIR}/fox.o ${CMAKE_CURRENT_SOURCE_DIR}/fox.tga
+ OUTPUT fox.o
+ COMMAND arm-none-eabi-ld -r -b binary -o fox.o ${CMAKE_CURRENT_SOURCE_DIR}/fox.tga
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/fox.tga
)
|
ocvalidate: Require LoadEarly=FALSE on OpenRuntime when OpenVariableRuntimeDxe is not present; remove duplicate driver check | @@ -416,14 +416,6 @@ CheckUefiDrivers (
HasAudioDxeEfiDriver = TRUE;
IndexAudioDxeEfiDriver = Index;
}
-
- if (AsciiStrCmp (Driver, "OpenVariableRuntimeDxe.efi") == 0) {
- HasOpenVariableRuntimeDxeEfiDriver = TRUE;
-
- if (!DriverEntry->LoadEarly) {
- DEBUG ((DEBUG_WARN, "OpenVariableRuntimeDxe at UEFI->Drivers[%u] must have LoadEarly set to TRUE!\n", Index));
- }
- }
}
//
@@ -436,7 +428,8 @@ CheckUefiDrivers (
UefiDriverHasDuplication
);
- if (HasOpenVariableRuntimeDxeEfiDriver && HasOpenRuntimeEfiDriver) {
+ if (HasOpenRuntimeEfiDriver) {
+ if (HasOpenVariableRuntimeDxeEfiDriver) {
if (!IsOpenRuntimeLoadEarly) {
DEBUG ((
DEBUG_WARN,
@@ -456,6 +449,16 @@ CheckUefiDrivers (
));
++ErrorCount;
}
+ } else {
+ if (IsOpenRuntimeLoadEarly) {
+ DEBUG ((
+ DEBUG_WARN,
+ "OpenRuntime.efi at UEFI->Drivers[%u] should have its LoadEarly set to FALSE unless OpenVariableRuntimeDxe.efi is in use!\n",
+ IndexOpenRuntimeEfiDriver
+ ));
+ ++ErrorCount;
+ }
+ }
}
IsRequestBootVarRoutingEnabled = Config->Uefi.Quirks.RequestBootVarRouting;
|
chip: stm32: clock-stm32f4: Implement rtc_set() for RTC
Implement rtc_set() function for STM32F4 chip variant
BRANCH=none
TEST=Using eval-board, use rtc set 0, observe increments | #define RTC_PREDIV_S (RTC_FREQ - 1)
#define US_PER_RTC_TICK (1000000 / RTC_FREQ)
-int32_t rtc_ssr_to_us(uint32_t rtcss)
+int32_t rtcss_to_us(uint32_t rtcss)
{
return ((RTC_PREDIV_S - rtcss) * US_PER_RTC_TICK);
}
-uint32_t us_to_rtc_ssr(int32_t us)
+uint32_t us_to_rtcss(int32_t us)
{
return (RTC_PREDIV_S - (us / US_PER_RTC_TICK));
}
@@ -267,3 +267,31 @@ void rtc_init(void)
rtc_lock_regs();
}
+
+#if defined(CONFIG_CMD_RTC) || defined(CONFIG_HOSTCMD_RTC)
+void rtc_set(uint32_t sec)
+{
+ struct rtc_time_reg rtc;
+
+ sec_to_rtc(sec, &rtc);
+ rtc_unlock_regs();
+
+ /* Disable alarm */
+ STM32_RTC_CR &= ~STM32_RTC_CR_ALRAE;
+
+ /* Enter RTC initialize mode */
+ STM32_RTC_ISR |= STM32_RTC_ISR_INIT;
+ while (!(STM32_RTC_ISR & STM32_RTC_ISR_INITF))
+ ;
+
+ /* Set clock prescalars */
+ STM32_RTC_PRER = (RTC_PREDIV_A << 16) | RTC_PREDIV_S;
+
+ STM32_RTC_TR = rtc.rtc_tr;
+ STM32_RTC_DR = rtc.rtc_dr;
+ /* Start RTC timer */
+ STM32_RTC_ISR &= ~STM32_RTC_ISR_INIT;
+
+ rtc_lock_regs();
+}
+#endif
|
docs: Remove outdated HID note
Removed outdated HID note from key-press.md | @@ -33,11 +33,6 @@ provided by ZMK near the top:
Doing so makes a set of defines such as `A`, `N1`, etc. available for use with these behaviors
-:::note
-There is an [open issue](https://github.com/zmkfirmware/zmk/issues/21) to provide a more comprehensive, and
-complete set of defines for the full keypad and consumer usage pages in the future for ZMK.
-:::
-
### Improperly defined keymap - `dtlib.DTError: <board>.dts.pre.tmp:<line number>`
When compiling firmware from a keymap, it may be common to encounter an error in the form of a`dtlib.DTError: <board>.dts.pre.tmp:<line number>`.
|
testing/ostest: Remove the code which reference CONFIG_SEM_NNESTPRIO
since CONFIG_SEM_NNESTPRIO is removed by: | # define NLOWPRI_THREADS 1
#endif
-#ifndef CONFIG_SEM_NNESTPRIO
-# define CONFIG_SEM_NNESTPRIO 0
-#endif
-
-/* Where resources configured for lots of waiters? If so then run 3 high
- * priority threads. Otherwise, just one.
- */
-
-#if CONFIG_SEM_NNESTPRIO > 3
-# define NHIGHPRI_THREADS 3
-#else
#define NHIGHPRI_THREADS 1
-#endif
#define NUMBER_OF_COMPETING_THREADS 3
#define COMPETING_THREAD_START_PRIORITY 200
|
LISP: Add APIs for enable/disable xTR/P-ITR/P-ETR modes | @@ -962,6 +962,66 @@ define show_one_map_register_fallback_threshold_reply
u32 value;
};
+autoreply define one_enable_disable_xtr_mode
+{
+ u32 client_index;
+ u32 context;
+ u8 is_en;
+};
+
+define one_show_xtr_mode
+{
+ u32 client_index;
+ u32 context;
+};
+
+define one_show_xtr_mode_reply
+{
+ u32 context;
+ i32 retval;
+ u8 is_en;
+};
+
+autoreply define one_enable_disable_petr_mode
+{
+ u32 client_index;
+ u32 context;
+ u8 is_en;
+};
+
+define one_show_petr_mode
+{
+ u32 client_index;
+ u32 context;
+};
+
+define one_show_petr_mode_reply
+{
+ u32 context;
+ i32 retval;
+ u8 is_en;
+};
+
+autoreply define one_enable_disable_pitr_mode
+{
+ u32 client_index;
+ u32 context;
+ u8 is_en;
+};
+
+define one_show_pitr_mode
+{
+ u32 client_index;
+ u32 context;
+};
+
+define one_show_pitr_mode_reply
+{
+ u32 context;
+ i32 retval;
+ u8 is_en;
+};
+
/*
* Local Variables:
* eval: (c-set-style "gnu")
|
admin/lmod: remove override of libbir and datadir for lua | @@ -93,7 +93,7 @@ unset MODULEPATH
export LUA_CPATH="%{LUA_CPATH}"
export LUA_PATH="%{LUA_PATH}"
%endif
-./configure --prefix=%{OHPC_ADMIN} --libdir=%{lualibdir} --datadir=%{luapkgdir} --with-redirect=yes --with-autoSwap=no
+./configure --prefix=%{OHPC_ADMIN} --with-redirect=yes --with-autoSwap=no
%install
%if 0%{?rhel} <= 7
|
Restore formatted JSON API responses | @@ -718,7 +718,11 @@ namespace Miningcore
services.AddMvc()
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1)
- .AddControllersAsServices();
+ .AddControllersAsServices()
+ .AddJsonOptions(options =>
+ {
+ options.SerializerSettings.Formatting = Formatting.Indented;
+ });
// Cors
services.AddCors();
|
update docs to install llvm5 | @@ -17,6 +17,6 @@ but we do not provide the full complement of downstream library builds.
% begin_ohpc_run
% ohpc_comment_header Install llvm Compilers
\begin{lstlisting}[language=bash]
-[sms](*\#*) (*\install*) llvm4-compilers-ohpc
+[sms](*\#*) (*\install*) llvm5-compilers-ohpc
\end{lstlisting}
% end_ohpc_run
|
Mention that toplevel is part of pg_stat_statements key.
While at it, also document that toplevel is always true if
pg_stat_statements.track is set to top.
Author: Julien Rouhaud
Reported-By: Fujii Masao
Discussion: | <para>
The statistics gathered by the module are made available via a
view named <structname>pg_stat_statements</structname>. This view
- contains one row for each distinct database ID, user ID and query
- ID (up to the maximum number of distinct statements that the module
+ contains one row for each distinct database ID, user ID, query ID and
+ toplevel (up to the maximum number of distinct statements that the module
can track). The columns of the view are shown in
<xref linkend="pgstatstatements-columns"/>.
</para>
</para>
<para>
True if the query was executed as a top level statement
+ (if <varname>pg_stat_statements.track</varname> is set to
+ <literal>all</literal>, otherwise always false)
</para></entry>
</row>
|
Controller experiments; | #include "headset/headset.h"
#include "graphics/graphics.h"
+#include "lib/vec/vec.h"
#include <math/mat4.h>
#include <math/quat.h>
#include <emscripten.h>
typedef struct {
headsetRenderCallback renderCallback;
+ vec_controller_t controllers;
} HeadsetState;
static HeadsetState state;
@@ -48,11 +50,19 @@ static void onRequestAnimationFrame(void* userdata) {
}
void lovrHeadsetInit() {
+ vec_init(&state.controllers);
emscripten_vr_init();
+ atexit(lovrHeadsetDestroy);
}
void lovrHeadsetDestroy() {
- //
+ Controller* controller;
+ int i;
+ vec_foreach(&state.controllers, controller, i) {
+ lovrRelease(&controller->ref);
+ }
+
+ vec_deinit(&state.controllers);
}
void lovrHeadsetPoll() {
@@ -157,7 +167,19 @@ void lovrHeadsetGetAngularVelocity(float* x, float* y, float* z) {
}
vec_controller_t* lovrHeadsetGetControllers() {
- return NULL;
+ int controllerCount = emscripten_vr_get_controller_count();
+
+ while (state.controllers.length > controllerCount) {
+ lovrRelease(&state.controllers.data[i]->ref);
+ vec_pop(&state.controllers);
+ }
+
+ while (state.controllers.length < controllerCount) {
+ Controller* controller = lovrAlloc(sizeof(Controller), lovrControllerDestroy);
+ vec_push(&state.controllers, controller);
+ }
+
+ return &state.controllers;
}
int lovrHeadsetControllerIsPresent(Controller* controller) {
@@ -165,11 +187,21 @@ int lovrHeadsetControllerIsPresent(Controller* controller) {
}
void lovrHeadsetControllerGetPosition(Controller* controller, float* x, float* y, float* z) {
- *x = *y = *z = 0;
+ float v[3];
+ emscripten_vr_get_controller_position(controller->id, &v[0], &v[1], &v[2]);
+ mat4_transform(emscripten_vr_get_sitting_to_standing_matrix(), v);
+ *x = v[0];
+ *y = v[1];
+ *z = v[2];
}
void lovrHeadsetControllerGetOrientation(Controller* controller, float* angle, float* x, float* y, float* z) {
- *angle = *x = *y = *z = 0;
+ float quat[4];
+ float m[16];
+ emscripten_vr_get_controller_orientation(controller->id, &quat[0], &quat[1], &quat[2], &quat[3]);
+ mat4_multiply(mat4_identity(m), emscripten_vr_get_sitting_to_standing_matrix());
+ mat4_rotateQuat(m, quat);
+ quat_getAngleAxis(quat_fromMat4(quat, m), angle, x, y, z);
}
float lovrHeadsetControllerGetAxis(Controller* controller, ControllerAxis axis) {
|
xenbus_get_state(): fix handling of failure in retrieving state
When xenstore_read_u64() returns an error status, the existing code
was overwriting the value pointed to by `state` with a potentially
uninitialized variable. | @@ -702,6 +702,7 @@ status xenbus_get_state(buffer path, XenbusState *state)
status s = xenstore_read_u64(0, path, "state", &val);
if (!is_ok(s))
*state = XenbusStateUnknown;
+ else
*state = val;
return s;
}
|
EVP_PKEY_get_*_param should work with legacy
Also do not shortcut the pkey == NULL case
to allow EVP_PKEY_get_params() to raise an error. | @@ -1980,9 +1980,7 @@ int EVP_PKEY_get_bn_param(const EVP_PKEY *pkey, const char *key_name,
size_t buf_sz = 0;
if (key_name == NULL
- || bn == NULL
- || pkey == NULL
- || !evp_pkey_is_provided(pkey))
+ || bn == NULL)
return 0;
memset(buffer, 0, sizeof(buffer));
@@ -2021,9 +2019,7 @@ int EVP_PKEY_get_octet_string_param(const EVP_PKEY *pkey, const char *key_name,
OSSL_PARAM params[2];
int ret1 = 0, ret2 = 0;
- if (key_name == NULL
- || pkey == NULL
- || !evp_pkey_is_provided(pkey))
+ if (key_name == NULL)
return 0;
params[0] = OSSL_PARAM_construct_octet_string(key_name, buf, max_buf_sz);
|
Update set_compiler_env.bat to support MSVC 2022 | @@ -11,6 +11,10 @@ set arch=x86
if "%platform%" EQU "x64" ( set arch=x86_amd64 )
+if "%COMPILER%"=="2022" (
+ set SET_VS_ENV="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat"
+)
+
if "%COMPILER%"=="2019" (
set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat"
)
|
avx: use simde_mm_dp_ps to implement simde_mm256_dp_ps | @@ -3531,36 +3531,13 @@ simde__m256i simde_mm256_insertf128_si256(simde__m256i a, simde__m128i b, int im
# define _mm256_insertf128_si256(a, b, imm8) simde_mm256_insertf128_si256(a, b, imm8)
#endif
-SIMDE__FUNCTION_ATTRIBUTES
-simde__m256
-simde_mm256_dp_ps (simde__m256 a, simde__m256 b, const int imm8) {
- simde__m256_private
- r_,
- a_ = simde__m256_to_private(a),
- b_ = simde__m256_to_private(b);
-
- simde_float32 sum1 = SIMDE_FLOAT32_C(0.0);
- simde_float32 sum2 = SIMDE_FLOAT32_C(0.0);
-
- SIMDE__VECTORIZE_REDUCTION(+:sum1)
- for (size_t i = 0 ; i < 4 ; i++) {
- sum1 += (imm8 & (16 << i)) ? (a_.f32[i + 4] * b_.f32[i + 4]) : SIMDE_FLOAT32_C(0.0);
- }
- SIMDE__VECTORIZE_REDUCTION(+:sum2)
- for (size_t i = 0 ; i < 4 ; i++) {
- sum2 += (imm8 & (16 << i)) ? (a_.f32[ i ] * b_.f32[ i ]) : SIMDE_FLOAT32_C(0.0);
- }
-
- SIMDE__VECTORIZE
- for (size_t i = 0 ; i < 4 ; i++) {
- r_.f32[i + 4] = (imm8 & (8 >> i)) ? sum1 : SIMDE_FLOAT32_C(0.0);
- r_.f32[ i ] = (imm8 & (8 >> i)) ? sum2 : SIMDE_FLOAT32_C(0.0);
- }
-
- return simde__m256_from_private(r_);
-}
#if defined(SIMDE_AVX_NATIVE)
# define simde_mm256_dp_ps(a, b, imm8) _mm256_dp_ps(a, b, imm8)
+#else
+# define simde_mm256_dp_ps(a, b, imm8) \
+ simde_mm256_set_m128( \
+ simde_mm_dp_ps(simde_mm256_extractf128_ps(a, 1), simde_mm256_extractf128_ps(b, 1), imm8), \
+ simde_mm_dp_ps(simde_mm256_extractf128_ps(a, 0), simde_mm256_extractf128_ps(b, 0), imm8))
#endif
#if defined(SIMDE_AVX_ENABLE_NATIVE_ALIASES)
# define _mm256_dp_ps(a, b, imm8) simde_mm256_dp_ps(a, b, imm8)
|
iOS: add required always GPS using description | </array>
<key>NSLocationWhenInUseUsageDescription</key>
<string>application tracks your position</string>
+ <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
+ <string>application tracks your position always</string>
<key>NSCameraUsageDescription</key>
<string>application wants to use camera</string>
<key>NSBluetoothPeripheralUsageDescription</key>
|
in_health: use new input chunk registration calls | @@ -58,10 +58,12 @@ struct flb_in_health_config {
static int in_health_collect(struct flb_input_instance *i_ins,
struct flb_config *config, void *in_context)
{
+ int map_num = 1;
uint8_t alive;
struct flb_in_health_config *ctx = in_context;
struct flb_upstream_conn *u_conn;
- int map_num = 1;
+ msgpack_packer mp_pck;
+ msgpack_sbuffer mp_sbuf;
u_conn = flb_upstream_conn_get(ctx->u);
if (!u_conn) {
@@ -76,13 +78,11 @@ static int in_health_collect(struct flb_input_instance *i_ins,
FLB_INPUT_RETURN();
}
- /*
- * Store the new data into the MessagePack buffer,
- */
-
- /* Mark the start of a 'buffer write' operation */
- flb_input_buf_write_start(i_ins);
+ /* Initialize local msgpack buffer */
+ msgpack_sbuffer_init(&mp_sbuf);
+ msgpack_packer_init(&mp_pck, &mp_sbuf, msgpack_sbuffer_write);
+ /* Pack data */
msgpack_pack_array(&i_ins->mp_pck, 2);
flb_pack_time_now(&i_ins->mp_pck);
@@ -121,7 +121,8 @@ static int in_health_collect(struct flb_input_instance *i_ins,
msgpack_pack_int32(&i_ins->mp_pck, ctx->port);
}
- flb_input_buf_write_end(i_ins);
+ flb_input_chunk_append_raw(i_ins, NULL, 0, mp_sbuf.data, mp_sbuf.size);
+ msgpack_sbuffer_destroy(&mp_sbuf);
FLB_INPUT_RETURN();
return 0;
|
treat all <= 1000 as channel and all > 1000 as frequency in Herz | @@ -7370,8 +7370,13 @@ for(c = 0; c < 256; c++)
if(res >= 0)
{
frequency = pwrq.u.freq.m;
+ /*
+ frequency or channel :
+ 0 - 1000 = channel
+ > 1000 = frequency in Hz!
+ */
if(frequency > 100000) frequency /= 100000;
- if(frequency < 1000) testchannel = frequency;
+ if(frequency <= 1000) testchannel = frequency;
else if((frequency >= 2407) && (frequency <= 2474)) testchannel = (frequency -2407)/5;
else if((frequency >= 2481) && (frequency <= 2487)) testchannel = (frequency -2412)/5;
else if((frequency >= 5150) && (frequency <= 5875)) testchannel = (frequency -5000)/5;
|
Update mixly_arduino/mpBuild/ESP32_MixGo/lib/mixgo.py | @@ -40,8 +40,8 @@ class Button:
def is_pressed(self):
return 1 - Pin(self.pin).value()
- def irq(self, h, t):
- Pin(self.pin).irq(handler = h, trigger = t)
+ def irq(self, handler, trigger):
+ Pin(self.pin).irq(handler = handler, trigger = trigger)
# Pin
|
added info about xhci bug - many devices do not work at the moment | @@ -62,6 +62,8 @@ Requirements
Adapters
--------------
+* Due to abug in xhci subsystem many devices do not work at the moment: https://bugzilla.kernel.org/show_bug.cgi?id=202541
+
* Due to continuous further development of hardware components (chipsets) by VENDORs and several kernel issues (kernel >= 4.20), I decided to remove all device names (read changelog 14.04.2019).
* I recommend to study wikidevi if you consider to buy a device, to make sure driver supports monitor mode and packet injection: https://wikidevi.com
|
configs/rtl8721csm/loadable_apps: set IPERF thread priority to 106
This is missing from commit | @@ -96,7 +96,7 @@ CONFIG_ARMV8M_MPU_NREGIONS=8
# CONFIG_ARCH_HAVE_DABORTSTACK is not set
CONFIG_REG_STACK_OVERFLOW_PROTECTION=y
# CONFIG_MPU_STACK_OVERFLOW_PROTECTION is not set
-# CONFIG_MPU_STACK_OVERFLOW_PROTECTION_DISABLE is not set
+# CONFIG_STACK_OVERFLOW_PROTECTION_DISABLE is not set
#
# ARMV8M Configuration Options
@@ -1347,7 +1347,7 @@ CONFIG_TASH_CMDTASK_PRIORITY=100
CONFIG_SYSTEM_PREAPP_INIT=y
CONFIG_SYSTEM_PREAPP_STACKSIZE=2048
CONFIG_SYSTEM_IPERF=y
-CONFIG_IPERF_PRIORITY=100
+CONFIG_IPERF_PRIORITY=106
CONFIG_IPERF_STACKSIZE=4096
CONFIG_SYSTEM_NETDB=y
CONFIG_SYSTEM_NETDB_STACKSIZE=2048
|
manifest: Block foreign classes from declaring properties. | @@ -5353,6 +5353,12 @@ static void manifest_foreign(lily_parse_state *parser)
expect_word(parser, "class");
manifest_class(parser);
parser->current_class->item_kind = ITEM_CLASS_FOREIGN;
+
+ lily_named_sym *sym = parser->current_class->members;
+
+ if (sym->item_kind == ITEM_PROPERTY)
+ lily_raise_syn(parser->raiser,
+ "Only native classes can have class properties.");
}
static void manifest_enum(lily_parse_state *parser)
@@ -5383,7 +5389,7 @@ static void manifest_var(lily_parse_state *parser)
"Var declaration not allowed inside of an enum.");
else if (cls->item_kind == ITEM_CLASS_FOREIGN)
lily_raise_syn(parser->raiser,
- "Foreign classes cannot have vars.");
+ "Only native classes can have class properties.");
else if (modifiers == 0)
lily_raise_syn(parser->raiser,
"Class var declaration must start with a scope.");
|
gimble: remove obsolete C1 reset configuration
This problem was fixed by PS8815 FW version 0x3. And we are now using
0x25.
TEST=Check with Parade
Tested-by: Peter Chi | @@ -151,25 +151,6 @@ void config_usb_db_type(void)
CPRINTS("Configured USB DB type number is %d", db_type);
}
-static void ps8815_reset(void)
-{
- int val;
-
- CPRINTS("%s: patching ps8815 registers", __func__);
-
- if (i2c_read8(I2C_PORT_USB_C1_TCPC,
- PS8XXX_I2C_ADDR1_P2_FLAGS, 0x0f, &val) == EC_SUCCESS)
- CPRINTS("ps8815: reg 0x0f was %02x", val);
-
- if (i2c_write8(I2C_PORT_USB_C1_TCPC,
- PS8XXX_I2C_ADDR1_P2_FLAGS, 0x0f, 0x31) == EC_SUCCESS)
- CPRINTS("ps8815: reg 0x0f set to 0x31");
-
- if (i2c_read8(I2C_PORT_USB_C1_TCPC,
- PS8XXX_I2C_ADDR1_P2_FLAGS, 0x0f, &val) == EC_SUCCESS)
- CPRINTS("ps8815: reg 0x0f now %02x", val);
-}
-
void board_reset_pd_mcu(void)
{
/* Port0 */
@@ -183,13 +164,9 @@ void board_reset_pd_mcu(void)
gpio_set_level(GPIO_USB_C0_TCPC_RST_ODL, 1);
gpio_set_level(GPIO_USB_C1_RT_RST_R_ODL, 1);
+
/* wait for chips to come up */
msleep(PS8815_FW_INIT_DELAY_MS);
-
- /* Port1 */
- ps8815_reset();
- usb_mux_hpd_update(USBC_PORT_C1, USB_PD_MUX_HPD_LVL_DEASSERTED |
- USB_PD_MUX_HPD_IRQ_DEASSERTED);
}
static void board_tcpc_init(void)
|
unlinks console from :dns-bind on startup | +$ out-poke-data
$% [%dns-bind =ship =target]
[%dns-complete =ship =binding:dns]
+ [%drum-unlink =dock]
==
:: XX %requests from collector
+$ in-peer-data ~
:: the app itself
::
=* default-tapp default-tapp:tapp
-%- create-tapp-poke:tapp
-^- tapp-core-poke:tapp
+%- create-tapp-all:tapp
+^- tapp-core-all:tapp
|_ [=bowl:gall state=app-state]
::
+++ handle-peek handle-peek:default-tapp
+++ handle-peer handle-peer:default-tapp
+++ handle-diff handle-diff:default-tapp
+++ handle-take handle-take:default-tapp
+::
+++ handle-init
+ =/ m tapp-async
+ ^- form:m
+ ;< ~ bind:m (poke-app:stdio [[our %hood] [%drum-unlink our dap]]:bowl)
+ (pure:m state)
+::
++ handle-poke
|= =in-poke-data
=/ m tapp-async
|
Add MOV GS:od, AL
test11 contains the instruction. | @@ -416,6 +416,15 @@ uintptr_t dynarecGS(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
}
break;
+ case 0xA2:
+ INST_NAME("MOV GS:Od, AL");
+ grab_tlsdata(dyn, addr, ninst, x1);
+ u32 = F32;
+ MOV32(x2, u32);
+ ADD_REG_LSL_IMM5(x2, x1, x2, 0);
+ STRB_IMM9(xEAX, x2, 0);
+ break;
+
case 0xA3:
INST_NAME("MOV GS:Od, EAX");
grab_tlsdata(dyn, addr, ninst, x1);
|
clEnqueueNDRangeKernel: check reqd_work_group_size compatibility
If the kernel has a required work-group size, return
CL_INVALID_WORK_GROUP_SIZE if the user didn't specify one or specified
one that doesn't match the requirements. | @@ -117,7 +117,23 @@ POname(clEnqueueNDRangeKernel)(cl_command_queue command_queue,
local_z = work_dim > 2 ? local_work_size[2] : 1;
}
- if (local_work_size == NULL ||
+ /* If the kernel has the reqd_work_group_size attribute, then the local
+ * work size _must_ be specified, and it _must_ match the attribute specification
+ */
+ if (kernel->reqd_wg_size != NULL &&
+ kernel->reqd_wg_size[0] > 0 &&
+ kernel->reqd_wg_size[1] > 0 &&
+ kernel->reqd_wg_size[2] > 0)
+ {
+ POCL_RETURN_ERROR_COND((local_work_size == NULL ||
+ local_x != kernel->reqd_wg_size[0] ||
+ local_y != kernel->reqd_wg_size[1] ||
+ local_z != kernel->reqd_wg_size[2]), CL_INVALID_WORK_GROUP_SIZE);
+ }
+ /* otherwise, if the local work size was not specified or it's bigger
+ * than the global work size, find the optimal one
+ */
+ else if (local_work_size == NULL ||
(local_x > global_x || local_y > global_y || local_z > global_z))
{
/* Embarrassingly parallel kernel with a free work-group
|
fix validate ascii | @@ -497,18 +497,19 @@ int validate_ipv4_port(const char *str)
int validate_ascii(const char *str)
{
- if(!str || strlen(str) == 0) {
- return 1;
+ if(str == NULL) {
+ return 0;
}
- uint8_t c = 0;
- for(int i = 0; i < strlen(str); i++) {
- c = str[i];
- if(c > 126 && c < 32) {
+ for(;;++str) {
+ if(*str < 32 || *str > 126) {
+ if(*str == '\0') {
+ return 1;
+ }
return 0;
}
}
- return 1;
+ return 0;
}
|
Docs: Drop Generic key as it is unused from Legacy | <key>SystemUUID</key>
<string>00000000-0000-0000-0000-000000000000</string>
</dict>
- <key>Generic</key>
- <dict>
- <key>AdviseWindows</key>
- <false/>
- <key>MLB</key>
- <string>M0000000000000001</string>
- <key>ROM</key>
- <data>ESIzRFVm</data>
- <key>SpoofVendor</key>
- <true/>
- <key>SystemProductName</key>
- <string>iMac19,1</string>
- <key>SystemSerialNumber</key>
- <string>W00000000001</string>
- <key>SystemUUID</key>
- <string>00000000-0000-0000-0000-000000000000</string>
- </dict>
<key>PlatformNVRAM</key>
<dict>
<key>BID</key>
|
doc: add summary of config changes and upgrading guides
v2:
* Add the complete instructions to upgrade Python
* Add libxml2-utils as another additional tool required for building v2.4
* Random typo fixes | @@ -152,6 +152,8 @@ toolset.
Configuration Workflow
+.. _acrn_makefile_targets:
+
Makefile Targets for Configuration
==================================
|
man: update Pango font description URL
The old URL gives a 404. | @@ -40,7 +40,7 @@ runtime.
*font* <font>
Specifies the font to be used in the bar. _font_ should be specified as a
pango font description. For more information on pango font descriptions,
- see https://developer.gnome.org/pango/stable/pango-Fonts.html#pango-font-description-from-string
+ see https://docs.gtk.org/Pango/type_func.FontDescription.from_string.html#description
*gaps* <all> | <horizontal> <vertical> | <top> <right> <bottom> <left>
Sets the gaps from the edge of the screen for the bar. Gaps can either be
|
Use tls1_group_id_lookup in tls1_curve_allowed | @@ -254,13 +254,11 @@ void tls1_get_grouplist(SSL *s, int sess, const uint16_t **pcurves,
/* See if curve is allowed by security callback */
int tls_curve_allowed(SSL *s, uint16_t curve, int op)
{
- const TLS_GROUP_INFO *cinfo;
+ const TLS_GROUP_INFO *cinfo = tls1_group_id_lookup(curve);
unsigned char ctmp[2];
- if (curve > 0xff)
- return 1;
- if (curve < 1 || curve > OSSL_NELEM(nid_list))
+
+ if (cinfo == NULL)
return 0;
- cinfo = &nid_list[curve - 1];
# ifdef OPENSSL_NO_EC2M
if (cinfo->flags & TLS_CURVE_CHAR2)
return 0;
|
set IP address to 192.168.1.100 in adc-test-client.c | @@ -7,7 +7,7 @@ gcc adc-test-client.c -o adc-test-client -lws2_32
#include <ws2tcpip.h>
#include <windows.h>
-#define TCP_ADDR "192.168.137.111"
+#define TCP_ADDR "192.168.1.100"
#define TCP_PORT 1001
int main(int argc, char**argv)
|
Update WhitePaper.md
remove useless lines | @@ -22,8 +22,6 @@ Each block contains exactly one transaction. At the same time, the block is an a
Every block in DAG has up to 15 links to another blocks (inputs and outputs). Block B is referenced by another block A if we can reach B from A by following the links. Chain is a sequence of blocks each of which is referenced by the previous block. Chain is called distinct if every its block belongs to separate 64-seconds interval. Difficulty_of_block is 1/hash where hash is sha256(sha256(block)) regarded as little-endian number. Difficulty_of_chain is sum of difficulties of blocks. Main_chain is the distinct chain with maximum difficulty. Blocks in main chain are called main_blocks.
-Daggers are mined in every main block. For first 4 years 1024 XDAG are mined in each main block. For second 4 years - 512 XDAG, and so on. So, maximum XDAG supply is approximately power(2,32). Each dagger is equal to power(2,32) cheatoshino. Transaction is valid if it is referenced by a main block. Valid transactions are strictly ordered depending on main chain and links order. Double spending is prohibited because only first concurrent transaction (by this order) is applied.
-
Daggers are mined in every mainblock. There are three periods of mining:
| Stage 1 | Stage 2 | Stage 3 |
|
OcCryptoLib: Fixed rbx overriding in TryEnableAvx
cpuid call writes into eax,ebx,ecx,edx registers, so it overwrites rbx which causes undefined behavior in subsequent execution | @@ -357,6 +357,8 @@ global ASM_PFX(TryEnableAvx)
ASM_PFX(TryEnableAvx):
; Detect CPUID.1:ECX.XSAVE[bit 26] = 1 (CR4.OSXSAVE can be set to 1).
; Detect CPUID.1:ECX.AVX[bit 28] = 1 (AVX instructions supported).
+
+ push rbx
mov eax, 1 ; Feature Information
cpuid ; result in EAX, EBX, ECX, EDX
and ecx, 014000000H
@@ -379,6 +381,7 @@ noAVX:
xor rax, rax
mov byte [rel ASM_PFX(mIsAvxEnabled)], 0
done:
+ pop rbx
ret
; #######################################################################
|
kaluga: investigate all arguments to check the module is auto | static struct module_info modules[MAX_DRIVER_MODULES];
inline bool is_auto_driver(struct module_info* mi) {
- return mi->argc > 1 && strcmp(mi->argv[1], "auto") == 0;
+ int i;
+ bool auto_driver = false;
+
+ for (i = 1; i < mi->argc; i++) {
+ if (strcmp(mi->argv[i], "auto") == 0) {
+ auto_driver = true;
+ break;
+ }
+ }
+
+ return auto_driver;
}
inline bool is_started(struct module_info* mi)
|
Fix Accumulate to make it work as std::accumulate. | @@ -452,23 +452,27 @@ static inline void Rotate(T f, T m, T l) {
}
template <typename It, typename Val>
-static inline Val Accumulate(It begin, It end, Val val) {
- return std::accumulate(begin, end, val);
+Val Accumulate(It begin, It end, Val val) {
+ // std::move since C++20
+ return std::accumulate(begin, end, std::move(val));
}
template <typename It, typename Val, typename BinOp>
-static inline Val Accumulate(It begin, It end, Val val, BinOp binOp) {
- return std::accumulate(begin, end, val, binOp);
+Val Accumulate(It begin, It end, Val val, BinOp binOp) {
+ // std::move since C++20
+ return std::accumulate(begin, end, std::move(val), binOp);
}
-template <typename TVectorType>
-static inline typename TVectorType::value_type Accumulate(const TVectorType& v, typename TVectorType::value_type val = typename TVectorType::value_type()) {
- return Accumulate(v.begin(), v.end(), val);
+template <typename C, typename Val>
+Val Accumulate(const C& c, Val val) {
+ // std::move since C++20
+ return Accumulate(std::begin(c), std::end(c), std::move(val));
}
-template <typename TVectorType, typename Val, typename BinOp>
-static inline Val Accumulate(const TVectorType& v, Val val, BinOp binOp) {
- return Accumulate(v.begin(), v.end(), val, binOp);
+template <typename C, typename Val, typename BinOp>
+Val Accumulate(const C& c, Val val, BinOp binOp) {
+ // std::move since C++20
+ return Accumulate(std::begin(c), std::end(c), std::move(val), binOp);
}
template <typename It1, typename It2, typename Val>
|
Check item.hits in map_data to protect against divide by zero | @@ -420,6 +420,8 @@ map_data (GModule module, GRawDataItem item, datatype type, char **data, uint32_
case U32:
if (!(*data = ht_get_datamap (module, item.nkey)))
return 1;
+ if (!item.hits)
+ return 1;
*hits = item.hits;
break;
case STR:
|
VERSION bump to version 1.3.14 | @@ -27,7 +27,7 @@ endif()
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(SYSREPO_MAJOR_VERSION 1)
set(SYSREPO_MINOR_VERSION 3)
-set(SYSREPO_MICRO_VERSION 13)
+set(SYSREPO_MICRO_VERSION 14)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
one last build location fix | @@ -15,7 +15,7 @@ fi fi fi
TMPDIR=$(mktemp -d)
mkdir -p ${TMPDIR}/scope
-cp ${DIR}/cli/build/{scope,ldscope,libscope.so,scope.yml,scope_protocol.yml} ${TMPDIR}/scope/
+cp ${DIR}/bin/linux/{scope,ldscope,libscope.so,scope.yml,scope_protocol.yml} ${TMPDIR}/scope/
cd ${TMPDIR} && tar cfz scope.tgz scope
cd scope && md5sum scope > scope.md5 && cd -
md5sum scope.tgz > scope.tgz.md5
|
kdbtypes.h: add definitions for C99 | @@ -48,8 +48,31 @@ using octet_t = uint8_t; // default: 0
// for C (and C++)
-typedef unsigned char kdb_boolean_t;
typedef unsigned char kdb_char_t;
+
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+// for C99+
+#include <stdbool.h>
+#include <stdint.h>
+
+typedef uint8_t kdb_octet_t;
+typedef bool kdb_boolean_t;
+typedef int16_t kdb_short_t;
+typedef int32_t kdb_long_t;
+typedef int64_t kdb_long_long_t;
+typedef uint16_t kdb_unsigned_short_t;
+typedef uint32_t kdb_unsigned_long_t;
+typedef uint64_t kdb_unsigned_long_long_t;
+
+#define ELEKTRA_LONG_F "%d"
+#define ELEKTRA_UNSIGNED_LONG_F "%u"
+#define ELEKTRA_LONG_LONG_F "%ld"
+#define ELEKTRA_LONG_LONG_S strtoll
+#define ELEKTRA_UNSIGNED_LONG_LONG_F "%lu"
+#define ELEKTRA_UNSIGNED_LONG_LONG_S strtoull
+
+#else // for C89
+typedef unsigned char kdb_boolean_t;
typedef unsigned char kdb_octet_t;
typedef signed short kdb_short_t;
typedef unsigned short kdb_unsigned_short_t;
@@ -86,6 +109,8 @@ typedef long long kdb_long_long_t;
typedef unsigned long long kdb_unsigned_long_long_t;
#endif
+#endif // for C89
+
typedef float kdb_float_t;
typedef double kdb_double_t;
|
Only merge tilesets for images if they significantly overlap | @@ -117,11 +117,18 @@ const compileImages = async (
]);
const mergedLength = Object.keys(mergedLookup).length;
- const diffLength =
- Object.keys(mergedLookup).length -
- Object.keys(tilesetLookups[j]).length;
+ const aLength = Object.keys(tilesetLookups[i]).length;
+ const bLength = Object.keys(tilesetLookups[j]).length;
- if (mergedLength <= MAX_TILESET_TILES && diffLength < minDiffLength) {
+ const diffLength = mergedLength - Math.max(aLength, bLength);
+
+ const maxAllowedDiff = Math.min(aLength, bLength) / 2;
+
+ if (
+ mergedLength <= MAX_TILESET_TILES &&
+ diffLength < minDiffLength &&
+ diffLength < maxAllowedDiff
+ ) {
minLookup = mergedLookup;
minIndex = j;
minDiffLength = diffLength;
|
OcSerializeLib: Improve printing even further | @@ -180,10 +180,11 @@ ParseSerializedValue (
if (Result == FALSE) {
DEBUG ((
- DEBUG_WARN, "OCS: Failed to parse %a field as type %a with <%.16a> contents\n",
+ DEBUG_WARN,
+ "OCS: Failed to parse %a field as value with type %a and <%a> contents\n",
XmlNodeName (Node),
GetSchemaTypeName (Info->Value.Type),
- XmlNodeContent (Node)
+ XmlNodeContent (Node) != NULL ? XmlNodeContent (Node) : "empty"
));
}
}
@@ -218,9 +219,9 @@ ParseSerializedBlob (
if (Result == FALSE) {
DEBUG ((
DEBUG_WARN,
- "OCS: Failed to calculate size of %a field containing <%.16a> as type %u\n",
+ "OCS: Failed to calculate size of %a field containing <%a> as type %a\n",
XmlNodeName (Node),
- XmlNodeContent (Node),
+ XmlNodeContent (Node) != NULL ? XmlNodeContent (Node) : "empty",
GetSchemaTypeName (Info->Blob.Type)
));
return;
@@ -232,10 +233,10 @@ ParseSerializedBlob (
if (BlobMemory == NULL) {
DEBUG ((
DEBUG_INFO,
- "OCS: Failed to allocate %u bytes %a field of type %u\n",
+ "OCS: Failed to allocate %u bytes %a field of type %a\n",
Size,
XmlNodeName (Node),
- Info->Blob.Type
+ GetSchemaTypeName (Info->Value.Type)
));
return;
}
@@ -257,10 +258,10 @@ ParseSerializedBlob (
if (Result == FALSE) {
DEBUG ((
DEBUG_WARN,
- "OCS: Failed to parse %a field as type %a with <%.16a> contents\n",
+ "OCS: Failed to parse %a field as blob with type %a and <%a> contents\n",
XmlNodeName (Node),
GetSchemaTypeName (Info->Value.Type),
- XmlNodeContent (Node)
+ XmlNodeContent (Node) != NULL ? XmlNodeContent (Node) : "empty"
));
}
}
|
Update: Change Grease Quic Bit draft to RFC | @@ -19,11 +19,11 @@ protocol. It is cross-platform, written in C and designed to be a general purpos
[](https://tools.ietf.org/html/rfc9001)
[](https://tools.ietf.org/html/rfc9002)
[](https://tools.ietf.org/html/rfc9221)
+[](https://tools.ietf.org/html/rfc9287)
[](https://tools.ietf.org/html/draft-ietf-quic-v2)
[](https://tools.ietf.org/html/draft-ietf-quic-version-negotiation)
[](https://tools.ietf.org/html/draft-ietf-quic-load-balancers)
[](https://tools.ietf.org/html/draft-ietf-quic-ack-frequency)
-[](https://tools.ietf.org/html/draft-ietf-quic-bit-grease-04)
[](https://tools.ietf.org/html/draft-banks-quic-disable-encryption)
[](https://tools.ietf.org/html/draft-banks-quic-performance)
[](https://tools.ietf.org/html/draft-banks-quic-cibir)
|
Bump R21 firmware version to 0x26490700
Fix issues when joining Zigbee 3.0 steering devices like IKEA Tradfri on/off switch. | @@ -75,7 +75,7 @@ DEFINES += GIT_COMMMIT=\\\"$$GIT_COMMIT\\\" \
DEFINES += GW_AUTO_UPDATE_AVR_FW_VERSION=0x260b0500
DEFINES += GW_AUTO_UPDATE_R21_FW_VERSION=0x26420700
DEFINES += GW_MIN_AVR_FW_VERSION=0x26330500
-DEFINES += GW_MIN_R21_FW_VERSION=0x26480700
+DEFINES += GW_MIN_R21_FW_VERSION=0x26490700
# Minimum version of the deRFusb23E0X firmware
# which shall be used in order to support all features for this software release
|
fixed btcp links
* Fixed BTCP explorer url/methods and added address
Fixed BTCP explorer url/methods and added address link for btcp
* changed BTCP links to https | @@ -40,7 +40,7 @@ namespace MiningCore.Blockchain
{ CoinType.BTC, new Dictionary<string, string> { { string.Empty, $"https://blockchain.info/block/{BlockHeightPH}" }}},
{ CoinType.DOGE, new Dictionary<string, string> { { string.Empty, $"https://dogechain.info/block/{BlockHeightPH}" }}},
{ CoinType.ZEC, new Dictionary<string, string> { { string.Empty, $"https://explorer.zcha.in/blocks/{BlockHashPH}" } }},
- { CoinType.BTCP, new Dictionary<string, string> { { string.Empty, $"http://explorer.btcprivate.org/block/{BlockHashPH}" } }},
+ { CoinType.BTCP, new Dictionary<string, string> { { string.Empty, $"https://explorer.btcprivate.org/block-index/{BlockHashPH}" } }},
{ CoinType.ZCL, new Dictionary<string, string> { { string.Empty, $"http://explorer.zclmine.pro/block/{BlockHeightPH}" }}},
{ CoinType.ZEN, new Dictionary<string, string> { { string.Empty, $"http://explorer.zensystem.io/block/{BlockHashPH}" } }},
{ CoinType.DGB, new Dictionary<string, string> { { string.Empty, $"https://digiexplorer.info/block/{BlockHeightPH}" }}},
@@ -74,7 +74,7 @@ namespace MiningCore.Blockchain
{ CoinType.ZEC, "https://explorer.zcha.in/transactions/{0}" },
{ CoinType.ZCL, "http://explorer.zclmine.pro/transactions/{0}" },
{ CoinType.ZEN, "http://explorer.zensystem.io/transactions/{0}" },
- { CoinType.BTCP, "https://explorer.btcprivate.org/transactions/{0}" },
+ { CoinType.BTCP, "https://explorer.btcprivate.org/tx/{0}" },
{ CoinType.DGB, "https://digiexplorer.info/tx/{0}" },
{ CoinType.NMC, "https://explorer.namecoin.info/tx/{0}" },
{ CoinType.GRS, "https://groestlsight.groestlcoin.org/tx/{0}" },
@@ -105,6 +105,7 @@ namespace MiningCore.Blockchain
{ CoinType.DOGE, "https://dogechain.info/address/{0}" },
{ CoinType.ZEC, "https://explorer.zcha.in/accounts/{0}" },
{ CoinType.ZCL, "http://explorer.zclmine.pro/accounts/{0}" },
+ { CoinType.BTCP, "https://explorer.btcprivate.org/address/{0}" },
{ CoinType.ZEN, "http://explorer.zensystem.io/accounts/{0}" },
{ CoinType.DGB, "https://digiexplorer.info/address/{0}" },
{ CoinType.NMC, "https://explorer.namecoin.info/a/{0}" },
|
pbio/trajectory: enforce max speed
This argument wasn't used. | @@ -124,6 +124,7 @@ pbio_error_t pbio_trajectory_make_time_based(pbio_trajectory_t *ref, bool foreve
int32_t max_init = timest(a, t3mt0);
int32_t abs_max = min(wmax, max_init);
w0 = max(-abs_max, min(w0, abs_max));
+ wt = max(-abs_max, min(wt, abs_max));
// Initial speed is less than the target speed
if (w0 < wt) {
@@ -216,6 +217,10 @@ pbio_error_t pbio_trajectory_make_angle_based(pbio_trajectory_t *ref, int32_t t0
}
// In a forward maneuver, the target speed is always positive.
wt = abs(wt);
+ wt = min(wt, wmax);
+
+ // Limit initial speed
+ w0 = max(-wmax, min(w0, wmax));
// Limit initial speed, but evaluate square root only if necessary (usually not)
if (w0 > 0 && (w0*w0)/(2*a) > th3 - th0) {
|
Update packfile.c
Reverted changes to packfile.c made the changes to allow the android build to compile have to find another way to fix it.
this will fix issue | @@ -436,7 +436,7 @@ int openPackfile(const char *filename, const char *packfilename)
packfilepointer[h] = 0;
// Separate file present?
- if((handle = open(filename, O_CREAT | O_RDONLY | O_BINARY, 777)) != -1)
+ if((handle = open(filename, O_RDONLY | O_BINARY, 777)) != -1)
{
if((packfilesize[h] = lseek(handle, 0, SEEK_END)) == -1)
{
@@ -463,7 +463,7 @@ int openPackfile(const char *filename, const char *packfilename)
fspath = casesearch(".", filename);
if (fspath != NULL)
{
- if((handle = open(fspath, O_CREAT | O_RDONLY | O_BINARY, 777)) != -1)
+ if((handle = open(fspath, O_RDONLY | O_BINARY, 777)) != -1)
{
if((packfilesize[h] = lseek(handle, 0, SEEK_END)) == -1)
{
@@ -493,7 +493,7 @@ int openPackfile(const char *filename, const char *packfilename)
#endif
// Try to open packfile
- if((handle = open(packfilename, O_CREAT | O_RDONLY | O_BINARY, 777)) == -1)
+ if((handle = open(packfilename, O_RDONLY | O_BINARY, 777)) == -1)
{
#ifdef VERBOSE
printf ("perm err\n");
@@ -1246,7 +1246,7 @@ int pak_init()
{
#endif
- pakfd = open(packfile, O_CREAT | O_RDONLY | O_BINARY, 777);
+ pakfd = open(packfile, O_RDONLY | O_BINARY, 777);
if(pakfd < 0)
{
@@ -1262,7 +1262,7 @@ int pak_init()
// Is it a valid Packfile
close(pakfd);
- pakfd = open(packfile, O_CREAT | O_RDONLY | O_BINARY, 777);
+ pakfd = open(packfile, O_RDONLY | O_BINARY, 777);
// Read magic dword ("PACK")
if(read(pakfd, &magic, 4) != 4 || magic != SwapLSB32(PACKMAGIC))
|
Fix Cmake picotls helper | @@ -22,7 +22,7 @@ find_package_handle_standard_args(PTLS REQUIRED_VARS
PTLS_INCLUDE_DIR)
if(PTLS_FOUND)
- set(PTLS_LIBRARIES ${PTLS_CORE_LIBRARY} ${PTLS_OPENSSL_LIBRARY})
+ set(PTLS_LIBRARIES ${PTLS_CORE_LIBRARY} ${PTLS_OPENSSL_LIBRARY} ${PTLS_FUSION_LIBRARY})
set(PTLS_INCLUDE_DIRS ${PTLS_INCLUDE_DIR})
endif()
|
encode_key2text.c: Fix build error on OPENSSL_NO_{DH,DSA,EC} | @@ -126,6 +126,7 @@ err:
/* Number of octets per line */
#define LABELED_BUF_PRINT_WIDTH 15
+#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_EC)
static int print_labeled_buf(BIO *out, const char *label,
const unsigned char *buf, size_t buflen)
{
@@ -151,6 +152,7 @@ static int print_labeled_buf(BIO *out, const char *label,
return 1;
}
+#endif
#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_DSA)
static int ffc_params_to_text(BIO *out, const FFC_PARAMS *ffc)
|
VERSION bump to version 2.1.89 | @@ -64,7 +64,7 @@ endif()
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(SYSREPO_MAJOR_VERSION 2)
set(SYSREPO_MINOR_VERSION 1)
-set(SYSREPO_MICRO_VERSION 88)
+set(SYSREPO_MICRO_VERSION 89)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
Fix byteenable in the basic memory model | @@ -249,15 +249,23 @@ function automatic Response create_response (
return rsp;
endfunction
+// Expand data enable to a data mask
+function automatic logic [DATA_W-1:0] get_mask (logic [NUM_SYMBOLS-1:0] byteenable);
+ logic [DATA_W-1:0] mask;
+ for(int i=0; i<NUM_SYMBOLS; i++) begin
+ mask[i*SYMBOL_W +: SYMBOL_W] = byteenable[i]? {SYMBOL_W{1'b1}}:
+ {SYMBOL_W{1'b0}};
+ end
+ return mask;
+endfunction
+
function automatic Response memory_response (Command cmd, int SLAVE_ID);
Response rsp;
- logic [NUM_SYMBOLS-1:0] byteenable;
- byteenable = cmd.byteenable[0];
rsp.burstcount = (cmd.trans == READ) ? cmd.burstcount : 1;
for(int idx = 0; idx < cmd.burstcount; idx++) begin
if(cmd.trans == READ) begin
- rsp.data[idx] = (memory[SLAVE_ID][cmd.addr+idx] & {8{byteenable}});
+ rsp.data[idx] = memory[SLAVE_ID][cmd.addr+idx] & get_mask(cmd.byteenable[0]);
rsp.latency[idx] = $urandom_range(0,MAX_LATENCY); // set a random memory response latency
end
end
@@ -269,6 +277,7 @@ endfunction
\
Command actual_cmd, exp_cmd; \
Response rsp; \
+ logic [DATA_W-1:0] mask; \
\
automatic int backpressure_cycles; \
\
@@ -290,7 +299,9 @@ endfunction
if (actual_cmd.trans == WRITE) begin \
for(int idx = 0; idx < actual_cmd.burstcount; idx++) begin\
if(memory[SLAVE_ID].exists(actual_cmd.addr+idx)) begin\
- memory[SLAVE_ID][actual_cmd.addr+idx] = ((memory[SLAVE_ID][actual_cmd.addr+idx] & ~{8{actual_cmd.byteenable[idx]}}) | actual_cmd.data[idx] & {8{actual_cmd.byteenable[idx]}});\
+ mask = get_mask(actual_cmd.byteenable[idx]); \
+ memory[SLAVE_ID][actual_cmd.addr+idx] = ((memory[SLAVE_ID][actual_cmd.addr+idx] & ~mask) | \
+ (actual_cmd.data[idx] & mask));\
end\
else begin\
memory[SLAVE_ID][actual_cmd.addr+idx] = actual_cmd.data[idx];\
|
Allow longer file size | #define ROW_HEIGHT 10
#define ROW(x) Point(0,x * ROW_HEIGHT)
#define MAX_FILENAME 256+1
-#define MAX_FILELEN 5+1
+#define MAX_FILELEN 16+1
#define PAGE_SIZE 256
class FlashLoader : public CDCCommandHandler
|
Change stem to filename in symbol address related to the extension loader. | @@ -181,7 +181,7 @@ int ext_loader_impl_load_from_file_handle(loader_impl_ext ext_impl, loader_impl_
}
dynlink_symbol_addr symbol_address = NULL;
- std::string symbol_name = std::filesystem::path(path).stem().string();
+ std::string symbol_name = std::filesystem::path(path).filename().string();
if (dynlink_symbol(lib, symbol_name.c_str(), &symbol_address) != 0)
{
|
Shell: added command tsch-set-coordinator | @@ -418,6 +418,34 @@ PT_THREAD(cmd_ip_neighbors(struct pt *pt, shell_output_func output, char *args))
#if MAC_CONF_WITH_TSCH
/*---------------------------------------------------------------------------*/
static
+PT_THREAD(cmd_tsch_set_coordinator(struct pt *pt, shell_output_func output, char *args))
+{
+ static int is_on;
+ char *next_args;
+
+ PT_BEGIN(pt);
+
+ SHELL_ARGS_INIT(args, next_args);
+
+ /* Get first arg (0/1) */
+ SHELL_ARGS_NEXT(args, next_args);
+
+ if(!strcmp(args, "1")) {
+ is_on = 1;
+ } else if(!strcmp(args, "0")) {
+ is_on = 0;
+ } else {
+ SHELL_OUTPUT(output, "Invalid argument: %s\n", args);
+ PT_EXIT(pt);
+ }
+
+ SHELL_OUTPUT(output, "Setting as TSCH coordinator\n");
+ tsch_set_coordinator(is_on);
+
+ PT_END(pt);
+}
+/*---------------------------------------------------------------------------*/
+static
PT_THREAD(cmd_tsch_status(struct pt *pt, shell_output_func output, char *args))
{
PT_BEGIN(pt);
@@ -666,12 +694,13 @@ struct shell_command_t shell_commands[] = {
{ "ip-nbr", cmd_ip_neighbors, "'> ip-nbr': Shows all IPv6 neighbors" },
{ "log", cmd_log, "'> log module level': Sets log level (0--4) for a given module (or \"all\"). For module \"mac\", level 4 also enables per-slot logging." },
{ "ping", cmd_ping, "'> ping addr': Pings the IPv6 address 'addr'" },
- { "rpl-set-root", cmd_rpl_set_root, "'> rpl-set-root 0/1 [prefix]': Sets node as root (on) or not (off). A /64 prefix can be optionally specified." },
+ { "rpl-set-root", cmd_rpl_set_root, "'> rpl-set-root 0/1 [prefix]': Sets node as root (1) or not (0). A /64 prefix can be optionally specified." },
{ "rpl-status", cmd_rpl_status, "'> rpl-status': Shows a summary of the current RPL state" },
{ "rpl-local-repair", cmd_rpl_local_repair, "'> rpl-local-repair': Triggers a RPL local repair" },
{ "rpl-global-repair", cmd_rpl_global_repair, "'> rpl-global-repair': Triggers a RPL global repair" },
{ "routes", cmd_routes, "'> routes': Shows the route entries" },
#if MAC_CONF_WITH_TSCH
+ { "tsch-set-coordinator", cmd_tsch_set_coordinator, "'> tsch-set-coordinator 0/1': Sets node as coordinator (1) or not (0)" },
{ "tsch-schedule", cmd_tsch_schedule, "'> tsch-schedule': Shows the current TSCH schedule" },
{ "tsch-status", cmd_tsch_status, "'> tsch-status': Shows a summary of the current TSCH state" },
#endif /* MAC_CONF_WITH_TSCH */
|
s_time: avoid unlikely division by zero
Fixing coverity 966560 Division or modulo by zero (DIVIDE_BY_ZERO) | @@ -394,10 +394,13 @@ int s_time_main(int argc, char **argv)
printf
("\n\n%d connections in %.2fs; %.2f connections/user sec, bytes read %ld\n",
nConn, totalTime, ((double)nConn / totalTime), bytes_read);
+ if (nConn > 0)
printf
("%d connections in %ld real seconds, %ld bytes read per connection\n",
nConn, (long)time(NULL) - finishtime + maxtime, bytes_read / nConn);
-
+ else
+ printf("0 connections in %ld real seconds\n",
+ (long)time(NULL) - finishtime + maxtime);
ret = 0;
end:
|
I updated the mfem and fastbit libraries on the rzzeus system. | @@ -134,7 +134,8 @@ VISIT_OPTION_DEFAULT(VISIT_CGNS_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP
##
## FastBit
##
-VISIT_OPTION_DEFAULT(VISIT_FASTBIT_DIR ${VISITHOME}/fastbit/1.2.0/${VISITARCH})
+SETUP_APP_VERSION(FASTBIT 2.0.3)
+VISIT_OPTION_DEFAULT(VISIT_FASTBIT_DIR ${VISITHOME}/fastbit/${FASTBIT_VERSION}/${VISITARCH})
##
## GDAL
@@ -161,7 +162,7 @@ VISIT_OPTION_DEFAULT(VISIT_ICET_DIR ${VISITHOME}/icet/1.0.0/${VISITARCH})
##
## MFEM
##
-VISIT_OPTION_DEFAULT(VISIT_MFEM_DIR ${VISITHOME}/mfem/3.1/${VISITARCH})
+VISIT_OPTION_DEFAULT(VISIT_MFEM_DIR ${VISITHOME}/mfem/3.3/${VISITARCH})
##
## Mili
|
debug/fs : fix build error when nxfusing run
can't find dbg_noarg when nxfusing, because config is different | @@ -382,7 +382,6 @@ int get_errno(void);
#else
#define fdbg(...)
#define flldbg(...)
-#define fsdbg(format, ...)
#endif
#ifdef CONFIG_DEBUG_FS_WARN
@@ -395,9 +394,11 @@ int get_errno(void);
#ifdef CONFIG_DEBUG_FS_INFO
#define fvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+#define fsdbg(format, ...) dbg_noarg(format, ##__VA_ARGS__)
#define fllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
#else
#define fvdbg(...)
+#define fsdbg(format, ...)
#define fllvdbg(...)
#endif
@@ -1154,11 +1155,10 @@ int get_errno(void);
#ifdef CONFIG_DEBUG_FS_ERROR
#define fdbg dbg
#define flldbg lldbg
-#define fsdbg dbg_noarg
+#define fsdbg dbg
#else
#define fdbg (void)
#define flldbg (void)
-#define fsdbg (void)
#endif
#ifdef CONFIG_DEBUG_FS_WARN
@@ -1171,9 +1171,11 @@ int get_errno(void);
#ifdef CONFIG_DEBUG_FS_INFO
#define fvdbg vdbg
+#define fsdbg dbg
#define fllvdbg llvdbg
#else
#define fvdbg (void)
+#define fsdbg (void)
#define fllvdbg (void)
#endif
|
vioinput: Remove all uses of bEnableInterruptSuppression
The field has no effect and will be removed. | @@ -408,11 +408,9 @@ VIOInputInitAllQueues(
VIRTIO_WDF_QUEUE_PARAM params[2];
// event
- params[0].bEnableInterruptSuppression = false;
params[0].Interrupt = pContext->QueuesInterrupt;
// status
- params[1].bEnableInterruptSuppression = false;
params[1].Interrupt = pContext->QueuesInterrupt;
TraceEvents(TRACE_LEVEL_INFORMATION, DBG_INIT, "--> %s\n", __FUNCTION__);
|
chgstv2: Move battery revival code to sub-routine
This patch moves battery revival code to revive_battery. It also
uses IS_ENABLED to increase readability. There is no functional
change.
BRANCH=None
TEST=buildall | @@ -1852,6 +1852,41 @@ static void wakeup_battery(int *need_static)
}
}
+static void revive_battery(int *need_static)
+{
+ if (IS_ENABLED(CONFIG_BATTERY_REQUESTS_NIL_WHEN_DEAD)
+ && curr.requested_voltage == 0
+ && curr.requested_current == 0
+ && curr.batt.state_of_charge == 0) {
+ /*
+ * Battery is dead, give precharge current
+ * TODO (crosbug.com/p/29467): remove this workaround
+ * for dead battery that requests no voltage/current
+ */
+ curr.requested_voltage = batt_info->voltage_max;
+ curr.requested_current = batt_info->precharge_current;
+ } else if (IS_ENABLED(CONFIG_BATTERY_REVIVE_DISCONNECT)
+ && curr.requested_voltage == 0
+ && curr.requested_current == 0
+ && battery_seems_disconnected) {
+ /*
+ * Battery is in disconnect state. Apply a
+ * current to kick it out of this state.
+ */
+ CPRINTS("found battery in disconnect state");
+ curr.requested_voltage = batt_info->voltage_max;
+ curr.requested_current = batt_info->precharge_current;
+ } else if (curr.state == ST_PRECHARGE
+ || battery_seems_dead || battery_was_removed) {
+ CPRINTS("battery woke up");
+ /* Update the battery-specific values */
+ batt_info = battery_get_info();
+ *need_static = 1;
+ }
+
+ battery_seems_dead = battery_was_removed = 0;
+}
+
/* Main loop */
void charger_task(void *u)
{
@@ -2078,47 +2113,8 @@ void charger_task(void *u)
battery_seems_disconnected =
battery_get_disconnect_state() == BATTERY_DISCONNECTED;
-#ifdef CONFIG_BATTERY_REQUESTS_NIL_WHEN_DEAD
- /*
- * TODO (crosbug.com/p/29467): remove this workaround
- * for dead battery that requests no voltage/current
- */
- if (curr.requested_voltage == 0 &&
- curr.requested_current == 0 &&
- curr.batt.state_of_charge == 0) {
- /* Battery is dead, give precharge current */
- curr.requested_voltage =
- batt_info->voltage_max;
- curr.requested_current =
- batt_info->precharge_current;
- } else
-#endif
-#ifdef CONFIG_BATTERY_REVIVE_DISCONNECT
- if (curr.requested_voltage == 0 &&
- curr.requested_current == 0 &&
- battery_seems_disconnected) {
- /*
- * Battery is in disconnect state. Apply a
- * current to kick it out of this state.
- */
- CPRINTS("found battery in disconnect state");
- curr.requested_voltage =
- batt_info->voltage_max;
- curr.requested_current =
- batt_info->precharge_current;
- } else
-#endif
- if (curr.state == ST_PRECHARGE ||
- battery_seems_dead ||
- battery_was_removed) {
- CPRINTS("battery woke up");
+ revive_battery(&need_static);
- /* Update the battery-specific values */
- batt_info = battery_get_info();
- need_static = 1;
- }
-
- battery_seems_dead = battery_was_removed = 0;
set_charge_state(ST_CHARGE);
wait_for_it:
|
Enable process test for Windows | return require('lib/tap')(function (test)
+ local isWindows = _G.isWindows
+
test("test disable_stdio_inheritance", function (print, p, expect, uv)
uv.disable_stdio_inheritance()
end)
@@ -9,7 +11,7 @@ return require('lib/tap')(function (test)
local handle, pid
handle, pid = uv.spawn(uv.exepath(), {
- args = {"-e", "print 'Hello World'"},
+ args = {"-e", "io.write 'Hello World'"},
stdio = {nil, stdout},
}, expect(function (code, signal)
p("exit", {code=code, signal=signal})
@@ -24,21 +26,30 @@ return require('lib/tap')(function (test)
uv.read_start(stdout, expect(function (err, chunk)
p("stdout", {err=err,chunk=chunk})
assert(not err, err)
+ assert(chunk == "Hello World")
uv.close(stdout)
end))
end)
- if _G.isWindows then return end
+ local cmd, options, expect_status = 'sleep', { args = {1} }, 0
+ if isWindows then
+ cmd = "cmd.exe"
+ options.args = {"/c","pause"}
+ expect_status = 1
+ end
test("spawn and kill by pid", function (print, p, expect, uv)
local handle, pid
- handle, pid = uv.spawn("sleep", {
- args = {1},
- }, expect(function (status, signal)
+ handle, pid = uv.spawn(cmd, options, expect(function (status, signal)
p("exit", handle, {status=status,signal=signal})
- assert(status == 0)
+ assert(status == expect_status)
+ if isWindows then
+ -- just call TerminateProcess, ref uv__kill in libuv/src/win/process.c
+ assert(signal == 0)
+ else
assert(signal == 2)
+ end
uv.close(handle)
end))
p{handle=handle,pid=pid}
@@ -47,11 +58,9 @@ return require('lib/tap')(function (test)
test("spawn and kill by handle", function (print, p, expect, uv)
local handle, pid
- handle, pid = uv.spawn("sleep", {
- args = {1},
- }, expect(function (status, signal)
+ handle, pid = uv.spawn(cmd, options, expect(function (status, signal)
p("exit", handle, {status=status,signal=signal})
- assert(status == 0)
+ assert(status == expect_status)
assert(signal == 15)
uv.close(handle)
end))
@@ -73,7 +82,8 @@ return require('lib/tap')(function (test)
local stdout = uv.new_pipe(false)
local handle, pid
- handle, pid = uv.spawn("cat", {
+ handle, pid = uv.spawn(uv.exepath(), {
+ args = {"-"},
stdio = {stdin, stdout},
}, expect(function (code, signal)
p("exit", {code=code, signal=signal})
@@ -88,10 +98,11 @@ return require('lib/tap')(function (test)
uv.read_start(stdout, expect(function (err, chunk)
p("stdout", {err=err,chunk=chunk})
assert(not err, err)
+ assert(chunk == "Hello World")
uv.close(stdout)
end))
- uv.write(stdin, "Hello World")
+ uv.write(stdin, "io.write('Hello World')")
uv.shutdown(stdin, expect(function ()
uv.close(stdin)
end))
|
freertos_hooks: Fix unbalance lock in deregistration for cpu functions
Current code exits the deregistration for cpu functions with spinlock held when
cpuid >= portNUM_PROCESSORS. Fix it.
Fixes: ("New Task Watchdog API (Revert of Revert)") | @@ -109,10 +109,10 @@ esp_err_t esp_register_freertos_tick_hook(esp_freertos_tick_cb_t new_tick_cb)
void esp_deregister_freertos_idle_hook_for_cpu(esp_freertos_idle_cb_t old_idle_cb, UBaseType_t cpuid)
{
- portENTER_CRITICAL(&hooks_spinlock);
if(cpuid >= portNUM_PROCESSORS){
return;
}
+ portENTER_CRITICAL(&hooks_spinlock);
for(int n = 0; n < MAX_HOOKS; n++){
if(idle_cb[cpuid][n] == old_idle_cb) idle_cb[cpuid][n] = NULL;
}
@@ -130,10 +130,10 @@ void esp_deregister_freertos_idle_hook(esp_freertos_idle_cb_t old_idle_cb)
void esp_deregister_freertos_tick_hook_for_cpu(esp_freertos_tick_cb_t old_tick_cb, UBaseType_t cpuid)
{
- portENTER_CRITICAL(&hooks_spinlock);
if(cpuid >= portNUM_PROCESSORS){
return;
}
+ portENTER_CRITICAL(&hooks_spinlock);
for(int n = 0; n < MAX_HOOKS; n++){
if(tick_cb[cpuid][n] == old_tick_cb) tick_cb[cpuid][n] = NULL;
}
|
fix usage string missing arg | @@ -1439,7 +1439,7 @@ main (int argc, char **argv)
;
else
{
- fformat (stderr, "%s: usage [master|slave]\n");
+ fformat (stderr, "%s: usage [master|slave]\n", argv[0]);
exit (1);
}
}
|
doxm: ignore invalid owned queries on only mcast
Tested-by: IoTivity Jenkins | @@ -108,11 +108,15 @@ get_doxm(oc_request_t *request, oc_interface_mask_t interface, void *data)
if (ql > 0 &&
((doxm[device].owned == 1 && strncasecmp(q, "false", 5) == 0) ||
(doxm[device].owned == 0 && strncasecmp(q, "true", 4) == 0))) {
+ if (request->origin && (request->origin->flags & MULTICAST) == 0) {
+ request->response->response_buffer->code =
+ oc_status_code(OC_STATUS_BAD_REQUEST);
+ } else {
oc_ignore_request(request);
+ }
} else {
oc_sec_encode_doxm(device);
oc_send_response(request, OC_STATUS_OK);
- return;
}
} break;
default:
|
added merged PR's to v2.4.2 release notes. | @@ -458,6 +458,12 @@ This is a patch release that includes fixes for the following security vulnerabi
* Invalid chunkCount attributes could cause heap buffer overflow in getChunkOffsetTableSize()
* Invalid tiled input file can cause invalid memory access TiledInputFile::TiledInputFile()
+### Merged Pull Requests
+
+* [738](https://github.com/AcademySoftwareFoundation/openexr/pull/738) always ignore chunkCount attribute unless it cannot be computed
+* [730](https://github.com/AcademySoftwareFoundation/openexr/pull/730) fix #728 - missing 'throw' in deepscanline error handling
+* [727](https://github.com/AcademySoftwareFoundation/openexr/pull/727) check null pointer in broken tiled file handling
+
## Version 2.4.1 (February 11, 2020)
Patch release with minor bug fixes.
|
Fix environment setup for clang CI job | @@ -69,10 +69,11 @@ jobs:
image: ubuntu-2004:202010-01
steps:
- checkout
- - run: *linux-setup
- - run: >
- export CC=/usr/bin/clang
- export CXX=/usr/bin/clang++
+ - run:
+ command: *linux-setup
+ environment:
+ CC: /usr/bin/clang
+ CXX: /usr/bin/clang++
- run: *build-test
build-and-test-arm:
|
idf.py: Make the lambda function Python 2 & 3 compatible | @@ -357,7 +357,7 @@ def print_closing_message(args):
else: # flashing the whole project
cmd = " ".join(flasher_args["write_flash_args"]) + " "
flash_items = sorted(((o,f) for (o,f) in flasher_args["flash_files"].items() if len(o) > 0),
- key = lambda (o,_): int(o, 0))
+ key = lambda x: int(x[0], 0))
for o,f in flash_items:
cmd += o + " " + flasher_path(f) + " "
|
dnstap test program prints messages and timestamps in long format. | @@ -246,6 +246,23 @@ static char* possible_str(ProtobufCBinaryData str)
return NULL;
}
+/** convert timeval to string, malloced or NULL */
+static char* tv_to_str(protobuf_c_boolean has_time_sec, uint64_t time_sec,
+ protobuf_c_boolean has_time_nsec, uint32_t time_nsec)
+{
+ char buf[64], buf2[256];
+ struct timeval tv;
+ memset(&tv, 0, sizeof(tv));
+ if(has_time_sec) tv.tv_sec = time_sec;
+ if(has_time_nsec) tv.tv_usec = time_nsec;
+
+ buf[0]=0;
+ (void)ctime_r(&tv.tv_sec, buf);
+ snprintf(buf2, sizeof(buf2), "%u.%9.9u %s",
+ (unsigned)time_sec, (unsigned)time_nsec, buf);
+ return strdup(buf2);
+}
+
/** log data frame contents */
static void log_data_frame(uint8_t* pkt, size_t len)
{
@@ -299,6 +316,47 @@ static void log_data_frame(uint8_t* pkt, size_t len)
(id&&vs?" ":""), (vs?vs:""));
free(id);
free(vs);
+
+ if(d->message && d->message->has_query_message &&
+ d->message->query_message.data) {
+ char* qmsg = sldns_wire2str_pkt(
+ d->message->query_message.data,
+ d->message->query_message.len);
+ if(qmsg) {
+ printf("query_message:\n%s", qmsg);
+ free(qmsg);
+ }
+ }
+ if(d->message && d->message->has_query_time_sec) {
+ char* qtv = tv_to_str(d->message->has_query_time_sec,
+ d->message->query_time_sec,
+ d->message->has_query_time_nsec,
+ d->message->query_time_nsec);
+ if(qtv) {
+ printf("query_time: %s\n", qtv);
+ free(qtv);
+ }
+ }
+ if(d->message && d->message->has_response_message &&
+ d->message->response_message.data) {
+ char* rmsg = sldns_wire2str_pkt(
+ d->message->response_message.data,
+ d->message->response_message.len);
+ if(rmsg) {
+ printf("response_message:\n%s", rmsg);
+ free(rmsg);
+ }
+ }
+ if(d->message && d->message->has_response_time_sec) {
+ char* rtv = tv_to_str(d->message->has_response_time_sec,
+ d->message->response_time_sec,
+ d->message->has_response_time_nsec,
+ d->message->response_time_nsec);
+ if(rtv) {
+ printf("response_time: %s\n", rtv);
+ free(rtv);
+ }
+ }
}
dnstap__dnstap__free_unpacked(d, NULL);
}
|
RPL-MRHOF: when squaring etx, do so only in path/rank calculation, not in link_metric | #define RPL_MRHOF_SQUARED_ETX 1
#endif /* RPL_MRHOF_CONF_SQUARED_ETX */
-#if !RPL_MRHOF_SQUARED_ETX
/* Configuration parameters of RFC6719. Reject parents that have a higher
* link metric than the following. The default value is 512. */
#define MAX_LINK_METRIC 512 /* Eq ETX of 4 */
+
+/* Reject parents that have a higher path cost than the following. */
+#define MAX_PATH_COST 32768 /* Eq path ETX of 256 */
+
+#if !RPL_MRHOF_SQUARED_ETX
/* Hysteresis of MRHOF: the rank must differ more than PARENT_SWITCH_THRESHOLD_DIV
* in order to switch preferred parent. Default in RFC6719: 192, eq ETX of 1.5.
* We use a more aggressive setting: 96, eq ETX of 0.75.
*/
#define PARENT_SWITCH_THRESHOLD 192 /* Eq ETX of 1.5 */
#else /* !RPL_MRHOF_SQUARED_ETX */
-#define MAX_LINK_METRIC 2048 /* Eq ETX of 4 */
-#define PARENT_SWITCH_THRESHOLD 512 /* Eq ETX of 2 */
+#define PARENT_SWITCH_THRESHOLD 512 /* Eq ETX of 2. More than in the
+non-squared case because squatinf cases extra jitter. */
#endif /* !RPL_MRHOF_SQUARED_ETX */
-/* Reject parents that have a higher path cost than the following. */
-#define MAX_PATH_COST 32768 /* Eq path ETX of 256 */
-
/*---------------------------------------------------------------------------*/
static void
reset(void)
@@ -100,16 +101,19 @@ static uint16_t
nbr_link_metric(rpl_nbr_t *nbr)
{
const struct link_stats *stats = rpl_neighbor_get_link_stats(nbr);
- if(stats != NULL) {
+ return stats != NULL ? stats->etx : 0xffff;
+}
+/*---------------------------------------------------------------------------*/
+static uint16_t
+link_metric_to_rank(uint16_t etx)
+{
#if RPL_MRHOF_SQUARED_ETX
- uint32_t squared_etx = ((uint32_t)stats->etx * stats->etx) / LINK_STATS_ETX_DIVISOR;
+ uint32_t squared_etx = ((uint32_t)etx * etx) / LINK_STATS_ETX_DIVISOR;
return (uint16_t)MIN(squared_etx, 0xffff);
#else /* RPL_MRHOF_SQUARED_ETX */
- return stats->etx;
+ return etx;
#endif /* RPL_MRHOF_SQUARED_ETX */
}
- return 0xffff;
-}
/*---------------------------------------------------------------------------*/
static uint16_t
nbr_path_cost(rpl_nbr_t *nbr)
@@ -138,7 +142,7 @@ nbr_path_cost(rpl_nbr_t *nbr)
#endif /* RPL_WITH_MC */
/* path cost upper bound: 0xffff */
- return MIN((uint32_t)base + nbr_link_metric(nbr), 0xffff);
+ return MIN((uint32_t)base + link_metric_to_rank(nbr_link_metric(nbr)), 0xffff);
}
/*---------------------------------------------------------------------------*/
static rpl_rank_t
|
rpl-lite: fix variable name | @@ -220,12 +220,12 @@ rpl_dag_update_state(void)
static rpl_nbr_t *
update_nbr_from_dio(uip_ipaddr_t *from, rpl_dio_t *dio)
{
- rpl_nbr_t *p = NULL;
+ rpl_nbr_t *nbr = NULL;
const uip_lladdr_t *lladdr;
- p = rpl_neighbor_get_from_ipaddr(from);
+ nbr = rpl_neighbor_get_from_ipaddr(from);
/* Neighbor not in RPL neighbor table, add it */
- if(p == NULL) {
+ if(nbr == NULL) {
/* Is the neighbor known by ds6? Drop this request if not.
* Typically, the neighbor is added upon receiving a DIO. */
lladdr = uip_ds6_nbr_lladdr_from_ipaddr(from);
@@ -234,22 +234,22 @@ update_nbr_from_dio(uip_ipaddr_t *from, rpl_dio_t *dio)
}
/* Add neighbor to RPL table */
- p = nbr_table_add_lladdr(rpl_neighbors, (linkaddr_t *)lladdr,
+ nbr = nbr_table_add_lladdr(rpl_neighbors, (linkaddr_t *)lladdr,
NBR_TABLE_REASON_RPL_DIO, dio);
- if(p == NULL) {
+ if(nbr == NULL) {
PRINTF("RPL: failed to add neighbor\n");
return NULL;
}
}
/* Update neighbor info from DIO */
- p->rank = dio->rank;
- p->dtsn = dio->dtsn;
+ nbr->rank = dio->rank;
+ nbr->dtsn = dio->dtsn;
#if RPL_WITH_MC
- memcpy(&p->mc, &dio->mc, sizeof(p->mc));
+ memcpy(&nbr->mc, &dio->mc, sizeof(nbr->mc));
#endif /* RPL_WITH_MC */
- return p;
+ return nbr;
}
/*---------------------------------------------------------------------------*/
static void
|
options/posix: fix OOB read in read_dns_name | @@ -36,7 +36,7 @@ static frg::string<MemoryAllocator> read_dns_name(char *buf, char *&it) {
for (int i = 0; i < code; i++)
res += (*it++);
- if (*(it + 1))
+ if (*it)
res += '.';
} else {
break;
|
drv/virtual/simulation: Allow None for actuation.
This allows continuing the simulation when no new input is given. This is needed for open loop simulations where new values are set only occasionally. | @@ -36,10 +36,13 @@ class SimulationModel(ABC):
# Empty buffers to hold results, starting with the initial time/state.
self.times = array([t0])
self.states = zeros((self.n, 1)) if x0 is None else x0.reshape(self.n, 1)
- self.inputs = zeros((self.m, 1))
self.outputs = self.output(t0, x0).reshape(self.p, 1)
- def simulate(self, te, u):
+ # Empty buffers to hold externally set input data.
+ self.input_values = zeros((self.m, 1))
+ self.input_times = array([t0])
+
+ def simulate(self, te, u=None):
"""Simulates the system until time te, subject to constant input u.
The system starts from the initial state. When this is called again, it
@@ -47,7 +50,7 @@ class SimulationModel(ABC):
Arguments:
te (float): End time.
- u (array): Control signal vector.
+ u (array): Control signal vector, or None to use the previous value.
Returns:
tuple: Time (array: 1 x samples) and
@@ -59,9 +62,17 @@ class SimulationModel(ABC):
nsamples = int((te - t0) / self.DT) + 1
times = array([t0 + i * self.DT for i in range(nsamples)])
+ # Update input data.
+ if u is None:
+ # Keep using last input if no new input given.
+ u = self.inputs[:, -1]
+ else:
+ # If input given, update logs.
+ self.input_times = concatenate((self.input_times, array([t0])))
+ self.input_values = concatenate((self.input_values, u.reshape(self.m, 1)), axis=1)
+
# Create empty state vector samples
states = zeros((self.n, nsamples))
- inputs = zeros((self.m, nsamples))
outputs = zeros((self.p, nsamples))
# Start at current state
@@ -72,7 +83,6 @@ class SimulationModel(ABC):
# Save the state and output
states[:, i] = state
- inputs[:, i] = u
outputs[:, i] = self.output(t, state)
# Single RK4 step to evaluate the next state.
@@ -85,7 +95,6 @@ class SimulationModel(ABC):
# Concatenate results
self.times = concatenate((self.times, times))
self.states = concatenate((self.states, states), axis=1)
- self.inputs = concatenate((self.inputs, inputs), axis=1)
self.outputs = concatenate((self.outputs, outputs), axis=1)
@abstractmethod
|
Fix Change commandline control actions to always log. | +7 July 2022L Tom
+ - Fix #212: Change commandline control actions to always log.
+
1 July 2022: Wouter
- Fix static analyzer reports, fix wrong log print when skipping xfr,
fix to print error on pipe read fail, and assert an xfr is in
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.