message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Dump contents in Lua only if handle is not nil | @@ -366,7 +366,7 @@ void Scripting::Initialize()
m_lua["Dump"] = [this](Type* apType)
{
- return apType->Dump();
+ return apType != nullptr ? apType->Dump() : Type::Descriptor{};
};
m_lua["DumpType"] = [this](const std::string& acName)
|
Return None from build_alignment_sequence if no MD tag | @@ -689,6 +689,10 @@ cdef inline bytes build_alignment_sequence(bam1_t * src):
if src == NULL:
return None
+ cdef uint8_t * md_tag_ptr = bam_aux_get(src, "MD")
+ if md_tag_ptr == NULL:
+ return None
+
cdef uint32_t start = getQueryStart(src)
cdef uint32_t end = getQueryEnd(src)
# get read sequence, taking into account soft-clipping
@@ -742,12 +746,6 @@ cdef inline bytes build_alignment_sequence(bam1_t * src):
"Padding (BAM_CPAD, 6) is currently not supported. "
"Please implement. Sorry about that.")
- cdef uint8_t * md_tag_ptr = bam_aux_get(src, "MD")
- if md_tag_ptr == NULL:
- seq = PyBytes_FromStringAndSize(s, s_idx)
- free(s)
- return seq
-
cdef char * md_tag = <char*>bam_aux2Z(md_tag_ptr)
cdef int md_idx = 0
s_idx = 0
|
Fixes a memory leak in the pubsub_utils | @@ -68,6 +68,7 @@ celix_status_t pubsub_getPubSubInfoFromFilter(const char* filterstr, const char
}
}
}
+ filter_destroy(filter);
if (topic != NULL && objectClass != NULL && strncmp(objectClass, PUBSUB_PUBLISHER_SERVICE_NAME, 128) == 0) {
*topicOut = topic;
|
Delete Travis Cache during Travis cron jobs | #!/bin/bash
+# Clear the Travis Cache Weekly to ensure that any upstream breakages in test dependencies are caught
+if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]]; then
+ sudo rm -rf ./test-deps
+fi
+
# Install missing test dependencies. If the install directory already exists, cached artifacts will be used
# for that dependency.
|
Update: allow full argument compound to be utilized by NAR.py to support multiple args | @@ -36,7 +36,7 @@ def parseReason(sraw):
def parseExecution(e):
if "args " not in e:
return {"operator" : e.split(" ")[0], "arguments" : []}
- return {"operator" : e.split(" ")[0], "arguments" : e.split("args ")[1][1:-1].split(" * ")[1]}
+ return {"operator" : e.split(" ")[0], "arguments" : e.split("args ")[1].split("{SELF} * ")[1][:-1]}
def GetRawOutput():
NAR.sendline("0")
|
hv: vmcall: fix "goto detected" violations
Remove the goto by split the function into two,
dispatch_hypercall and vmcall_vmexit_handler.
Acked-by: Eddie Dong | @@ -11,14 +11,9 @@ static spinlock_t vmm_hypercall_lock = {
.head = 0U,
.tail = 0U,
};
-/*
- * Pass return value to SOS by register rax.
- * This function should always return 0 since we shouldn't
- * deal with hypercall error in hypervisor.
- */
-int32_t vmcall_vmexit_handler(struct acrn_vcpu *vcpu)
+
+static int32_t dispatch_hypercall(struct acrn_vcpu *vcpu)
{
- int32_t ret = -EACCES;
struct acrn_vm *vm = vcpu->vm;
/* hypercall ID from guest*/
uint64_t hypcall_id = vcpu_get_gpreg(vcpu, CPU_REG_R8);
@@ -26,20 +21,8 @@ int32_t vmcall_vmexit_handler(struct acrn_vcpu *vcpu)
uint64_t param1 = vcpu_get_gpreg(vcpu, CPU_REG_RDI);
/* hypercall param2 from guest*/
uint64_t param2 = vcpu_get_gpreg(vcpu, CPU_REG_RSI);
+ int32_t ret;
- if (!is_hypercall_from_ring0()) {
- pr_err("hypercall is only allowed from RING-0!\n");
- goto out;
- }
-
- if (!is_vm0(vm) && (hypcall_id != HC_WORLD_SWITCH) &&
- (hypcall_id != HC_INITIALIZE_TRUSTY) &&
- (hypcall_id != HC_SAVE_RESTORE_SWORLD_CTX)) {
- pr_err("hypercall %d is only allowed from VM0!\n", hypcall_id);
- goto out;
- }
-
- /* Dispatch the hypercall handler */
switch (hypcall_id) {
case HC_SOS_OFFLINE_CPU:
spinlock_obtain(&vmm_hypercall_lock);
@@ -194,7 +177,34 @@ int32_t vmcall_vmexit_handler(struct acrn_vcpu *vcpu)
break;
}
-out:
+ return ret;
+}
+
+/*
+ * Pass return value to SOS by register rax.
+ * This function should always return 0 since we shouldn't
+ * deal with hypercall error in hypervisor.
+ */
+int32_t vmcall_vmexit_handler(struct acrn_vcpu *vcpu)
+{
+ int32_t ret;
+ struct acrn_vm *vm = vcpu->vm;
+ /* hypercall ID from guest*/
+ uint64_t hypcall_id = vcpu_get_gpreg(vcpu, CPU_REG_R8);
+
+ if (!is_hypercall_from_ring0()) {
+ pr_err("hypercall is only allowed from RING-0!\n");
+ ret = -EACCES;
+ } else if (!is_vm0(vm) && (hypcall_id != HC_WORLD_SWITCH) &&
+ (hypcall_id != HC_INITIALIZE_TRUSTY) &&
+ (hypcall_id != HC_SAVE_RESTORE_SWORLD_CTX)) {
+ pr_err("hypercall %d is only allowed from VM0!\n", hypcall_id);
+ ret = -EACCES;
+ } else {
+ /* Dispatch the hypercall handler */
+ ret = dispatch_hypercall(vcpu);
+ }
+
vcpu_set_gpreg(vcpu, CPU_REG_RAX, (uint64_t)ret);
TRACE_2L(TRACE_VMEXIT_VMCALL, vm->vm_id, hypcall_id);
|
JANITORIAL: (shaderconv.c) Correct spelling mistakes in comments
occurence -> occurrence | @@ -929,7 +929,7 @@ char* ConvertShader(const char* pEntry, int isVertex, shaderconv_need_t *need)
while((p=strstr(p, "gl_LightSource["))) {
char *p2 = strchr(p, ']');
if (p2 && !strncmp(p2, "].halfVector", strlen("].halfVector"))) {
- // found an occurence, lets change
+ // found an occurrence, lets change
char p3[500];
strncpy(p3,p, (p2-p)+1); p3[(p2-p)+1]='\0';
char p4[500], p5[500];
|
Fixed description of examples/EarthInterior. | -EarthInterior
+Thermal and Magnetic Evolution of Earth's Interior
==========
Overview
--------
-Evolution of Earth's interior.
-
=================== ============
**Date** 10/03/18
**Author** Peter Driscoll
|
drivers/testcase : Fix typo for tg_pgid
There is a typo, change tg_gpid to tg_pgid | @@ -657,7 +657,7 @@ static int kernel_test_drv_ioctl(FAR struct file *filep, int cmd, unsigned long
}
#ifdef HAVE_GROUP_MEMBERS
- after_parent_id = child_tcb->group->tg_gpid;
+ after_parent_id = child_tcb->group->tg_pgid;
#else
after_parent_id = child_tcb->group->tg_ppid;
#endif
|
tests/run-tests: Capture any output from a crashed uPy execution.
Instead of putting just 'CRASH' in the .py.out file, this patch makes it so
any output from uPy that led to the crash is stored in the .py.out file, as
well as the 'CRASH' message at the end. | @@ -54,6 +54,7 @@ def run_micropython(pyb, args, test_file, is_special=False):
'micropython/meminfo.py', 'basics/bytes_compare3.py',
'basics/builtin_help.py', 'thread/thread_exc2.py',
)
+ had_crash = False
if pyb is None:
# run on PC
if test_file.startswith(('cmdline/', 'feature_check/')) or test_file in special_tests:
@@ -128,8 +129,9 @@ def run_micropython(pyb, args, test_file, is_special=False):
# run the actual test
try:
output_mupy = subprocess.check_output(cmdlist, stderr=subprocess.STDOUT)
- except subprocess.CalledProcessError:
- output_mupy = b'CRASH'
+ except subprocess.CalledProcessError as er:
+ had_crash = True
+ output_mupy = er.output + b'CRASH'
# clean up if we had an intermediate .mpy file
if args.via_mpy:
@@ -142,13 +144,14 @@ def run_micropython(pyb, args, test_file, is_special=False):
try:
output_mupy = pyb.execfile(test_file)
except pyboard.PyboardError:
+ had_crash = True
output_mupy = b'CRASH'
# canonical form for all ports/platforms is to use \n for end-of-line
output_mupy = output_mupy.replace(b'\r\n', b'\n')
# don't try to convert the output if we should skip this test
- if output_mupy in (b'SKIP\n', b'CRASH'):
+ if had_crash or output_mupy in (b'SKIP\n', b'CRASH'):
return output_mupy
if is_special or test_file in special_tests:
|
Doc: News: Preparation Next Release: update | @@ -71,7 +71,7 @@ We added even more functionality, which could not make it to the highlights:
has been added.
It can be used to integrate the notification feature with applications based
on glib.
-
+- The Order Preserving Minimal Perfect Hash Map (OPMPHM), used to speed up the lookups, got optimized.
## Documentation
|
Add dbus info to readme | @@ -66,6 +66,7 @@ Install dependencies:
* cairo
* gdk-pixbuf2 *
* pam **
+* dbus >= 1.10 ***
* imagemagick (required for image capture with swaygrab)
* ffmpeg (required for video capture with swaygrab)
@@ -73,6 +74,8 @@ _\*Only required for swaybar, swaybg, and swaylock_
_\*\*Only required for swaylock_
+_\*\*\*Only required for tray support_
+
Run these commands:
mkdir build
|
Add examples and build test info to Readme | # Open CAS Framework
-Open CAS Framwework (OCF) is high performance block storage caching meta-library
+Open CAS Framework (OCF) is high performance block storage caching meta-library
written in C. It's entirely platform and system independent, accessing system API
through user provided environment wrappers layer. OCF tightly integrates with the
rest of software stack, providing flawless, high performance, low latency caching
@@ -11,7 +11,9 @@ utility.
* [Documentation](#documentation)
* [Source Code](#source)
* [Deployment](#deployment)
-* [Unit Tests](#tests)
+* [Examples](#examples)
+* [Unit Tests](#unit_tests)
+* [Build Test](#build_test)
* [Contributing](#contributing)
<a id="documentation"></a>
@@ -54,7 +56,18 @@ make -C $OCFDIF src O=$SRCDIR CMD=cp
make -C $OCFDIF inc O=$INCDIR CMD=cp
~~~
-<a id="tests"></a>
+<a id="examples"></a>
+## Examples
+
+OCF is shipped with examples, which are complete, compillable and working
+programs, containing lot of comments that explain basics of caching. They
+are great starting point for everyone who wants to start working with OCF.
+
+Examples can be found in directory `example/`.
+
+Each example contains Makefile which can be used to compile it.
+
+<a id="unit_tests"></a>
## Unit Tests
OCF is shipped with dedicated unit test framework based on Cmocka.
@@ -66,7 +79,18 @@ To run unit test you need to install following packages:
To run unit tests use following command:
~~~{.sh}
-./tests/ut-framework/run_unit_tests.py
+./tests/unit/framework/run_unit_tests.py
+~~~
+
+<a id="build_test"></a>
+## Build Test
+
+OCF repository contains basic build test. It uses default POSIX environment.
+To run this test, use following commands:
+
+~~~{.sh}
+cd tests/build/
+make
~~~
<a id="contributing"></a>
|
Add an option to strip leading zeros from histograms | @@ -54,7 +54,7 @@ def _stars(val, val_max, width):
return text
-def _print_log2_hist(vals, val_type):
+def _print_log2_hist(vals, val_type, strip_leading_zero):
global stars_max
log2_dist_max = 64
idx_max = -1
@@ -74,13 +74,21 @@ def _print_log2_hist(vals, val_type):
stars = int(stars_max / 2)
if idx_max > 0:
- print(header % val_type);
+ print(header % val_type)
+
for i in range(1, idx_max + 1):
low = (1 << i) >> 1
high = (1 << i) - 1
if (low == high):
low -= 1
val = vals[i]
+
+ if strip_leading_zero:
+ if val:
+ print(body % (low, high, val, stars,
+ _stars(val, val_max, stars)))
+ strip_leading_zero = False
+ else:
print(body % (low, high, val, stars,
_stars(val, val_max, stars)))
@@ -281,7 +289,7 @@ class TableBase(MutableMapping):
return next_key
def print_log2_hist(self, val_type="value", section_header="Bucket ptr",
- section_print_fn=None, bucket_fn=None):
+ section_print_fn=None, bucket_fn=None, strip_leading_zero=None):
"""print_log2_hist(val_type="value", section_header="Bucket ptr",
section_print_fn=None, bucket_fn=None)
@@ -292,8 +300,10 @@ class TableBase(MutableMapping):
If section_print_fn is not None, it will be passed the bucket value
to format into a string as it sees fit. If bucket_fn is not None,
it will be used to produce a bucket value for the histogram keys.
- The maximum index allowed is log2_index_max (65), which will
- accomodate any 64-bit integer in the histogram.
+ If the value of strip_leading_zero is not False, prints a histogram
+ that is omitted leading zeros from the beginning. The maximum index
+ allowed is log2_index_max (65), which will accomodate any 64-bit
+ integer in the histogram.
"""
if isinstance(self.Key(), ct.Structure):
tmp = {}
@@ -312,12 +322,12 @@ class TableBase(MutableMapping):
section_print_fn(bucket)))
else:
print("\n%s = %r" % (section_header, bucket))
- _print_log2_hist(vals, val_type)
+ _print_log2_hist(vals, val_type, strip_leading_zero)
else:
vals = [0] * log2_index_max
for k, v in self.items():
vals[k.value] = v.value
- _print_log2_hist(vals, val_type)
+ _print_log2_hist(vals, val_type, strip_leading_zero)
def print_linear_hist(self, val_type="value", section_header="Bucket ptr",
section_print_fn=None, bucket_fn=None):
@@ -709,4 +719,3 @@ class StackTrace(TableBase):
def clear(self):
pass
-
|
Fix relcache reference leak introduced by
Author: Sawada Masahiko
Discussion: | @@ -353,6 +353,7 @@ GetSubscriptionRelState(Oid subid, Oid relid, XLogRecPtr *sublsn)
if (!HeapTupleIsValid(tup))
{
+ table_close(rel, AccessShareLock);
*sublsn = InvalidXLogRecPtr;
return SUBREL_STATE_UNKNOWN;
}
|
Add additional gpus to GFXLIST.
gfx90c, gfx940, gfx1032, gfx1033
gfx1034, gfx1035, gfx1036. | @@ -200,7 +200,7 @@ fi
# Set list of default amdgcn subarchitectures to build
# Developers may override GFXLIST to shorten build time.
-GFXLIST=${GFXLIST:-"gfx700 gfx701 gfx801 gfx803 gfx900 gfx902 gfx906 gfx908 gfx90a gfx1030 gfx1031"}
+GFXLIST=${GFXLIST:-"gfx700 gfx701 gfx801 gfx803 gfx900 gfx902 gfx906 gfx908 gfx90a gfx90c gfx940 gfx1030 gfx1031 gfx1032 gfx1033 gfx1034 gfx1035 gfx1036"}
export GFXLIST
# Calculate the number of threads to use for make
|
BUGFIX memory leak caused by missing free in nc_rpc_free | @@ -560,6 +560,7 @@ nc_rpc_free(struct nc_rpc *rpc)
rpc_copy = (struct nc_rpc_copy *)rpc;
if (rpc_copy->free) {
free(rpc_copy->url_config_src);
+ free(rpc_copy->url_trg);
}
break;
case NC_RPC_DELETE:
|
Set default for keep alive timeout for mod_wsgi-express to 2 seconds. | @@ -2314,11 +2314,12 @@ option_list = (
help='The IP address or subnet corresponding to any trusted '
'proxy.'),
- optparse.make_option('--keep-alive-timeout', type='int', default=0,
+ optparse.make_option('--keep-alive-timeout', type='int', default=2,
metavar='SECONDS', help='The number of seconds which a client '
'connection will be kept alive to allow subsequent requests '
- 'to be made over the same connection. Defaults to 0, indicating '
- 'that keep alive connections are disabled.'),
+ 'to be made over the same connection when a keep alive '
+ 'connection is requested. Defaults to 2, indicating that keep '
+ 'alive connections are set for 2 seconds.'),
optparse.make_option('--compress-responses', action='store_true',
default=False, help='Flag indicating whether responses for '
|
feat(devcontainer): supersede zephyr-west-action-arm with zmk-dev-arm
PR: | -FROM zmkfirmware/zephyr-west-action-arm
-
-ENV LC_ALL=C
-
-RUN apt-get -y update && \
- apt-get -y upgrade && \
- apt-get install --no-install-recommends -y \
- ssh \
- nano \
- locales \
- gpg && \
- rm -rf /var/lib/apt/lists/*
+FROM zmkfirmware/zmk-dev-arm:2.3
COPY .bashrc tmp
RUN mv /tmp/.bashrc ~/.bashrc
|
lv_btnm.h add missing semi colon | @@ -112,7 +112,7 @@ void lv_btnm_set_tgl(lv_obj_t * btnm, bool en, uint16_t id);
* @param ina pointer to a style for inactive state
*/
void lv_btnm_set_styles_btn(lv_obj_t * btnm, lv_style_t * rel, lv_style_t * pr,
- lv_style_t * trel, lv_style_t * tpr, lv_style_t * ina)
+ lv_style_t * trel, lv_style_t * tpr, lv_style_t * ina);
/**
* Get the current map of a button matrix
|
Packages: fixed dependency tracking for Go and Java modules on RHEL7. | # distribution specific definitions
%define bdir %{_builddir}/%{name}-%{version}
-%%MODULE_DEFINITIONS%%
-
%if (0%{?rhel} == 7 && 0%{?amzn} == 0)
%define dist .el7
%endif
+%%MODULE_DEFINITIONS%%
+
%if 0%{?rhel}%{?fedora}
BuildRequires: gcc
%if 0%{?amzn2}
|
Fix when depth test is disabled but depth write is enabled
GL_DEPTH_TEST controls both whether depth testing and depth writes are
enabled. So if depth testing is disabled and depth writes are enabled,
GL_DEPTH_TEST has to be enabled and the compare mode should be GL_ALWAYS. | @@ -974,26 +974,29 @@ static void lovrGpuBindPipeline(Pipeline* pipeline) {
}
}
- // Depth test
- if (state.depthTest != pipeline->depthTest) {
- state.depthTest = pipeline->depthTest;
- if (state.depthTest != COMPARE_NONE) {
- if (!state.depthEnabled) {
- state.depthEnabled = true;
+ // Depth test and depth write
+ bool updateDepthTest = pipeline->depthTest != state.depthTest;
+ bool updateDepthWrite = state.depthWrite != (pipeline->depthWrite && !state.stencilWriting);
+ if (updateDepthTest || updateDepthWrite) {
+ bool enable = state.depthTest != COMPARE_NONE || state.depthWrite;
+
+ if (enable && !state.depthEnabled) {
glEnable(GL_DEPTH_TEST);
- }
- glDepthFunc(convertCompareMode(state.depthTest));
- } else if (state.depthEnabled) {
- state.depthEnabled = false;
+ } else if (!enable && state.depthEnabled) {
glDisable(GL_DEPTH_TEST);
}
+ state.depthEnabled = enable;
+
+ if (enable && updateDepthTest) {
+ state.depthTest = pipeline->depthTest;
+ glDepthFunc(convertCompareMode(state.depthTest));
}
- // Depth write
- if (state.depthWrite != (pipeline->depthWrite && !state.stencilWriting)) {
+ if (enable && updateDepthWrite) {
state.depthWrite = pipeline->depthWrite && !state.stencilWriting;
glDepthMask(state.depthWrite);
}
+ }
// Line width
if (state.lineWidth != pipeline->lineWidth) {
|
docs/library/builtins: Describe namespaced OSError's.
As recently introduced for usocket.getaddrinfo(), and expected to be
applied in other cases too. | @@ -233,9 +233,33 @@ Exceptions
.. exception:: OSError
- |see_cpython| `python:OSError`. Pycopy doesn't implement ``errno``
- attribute, instead use the standard way to access exception arguments:
- ``exc.args[0]``.
+ Represents system-level error, related to the operating system or hardware.
+ |see_cpython| `python:OSError` for general information.
+
+ Pycopy doesn't implement ``errno`` attribute, instead use the standard way
+ to access exception arguments: ``exc.args[0]`` (this is compatible with
+ CPython).
+
+ Pycopy doesn't implement subclasses of this exception for specific error
+ codes. E.g., instead of `python:TimeoutError`, ``OSError(ETIMEDOUT)``
+ is used directly (this is compatible with CPython).
+
+ Pycopy also uses this exception in some cases where instead of standard
+ system `errno` code, a different error code is provided (e.g. a more
+ detailed/domain specific code). In this case, OSErrno arguments are a tuple
+ of size 2, where first argument is an error code, and 2nd is first string,
+ representing namespace of the error code. Whenever possible, error codes
+ for such namespaced errors should be negative. This allows to easily
+ distinguish errors in the default `errno` namespace from namespaced
+ errors - checking ``exc.args[0]`` is then enough to distinguish system
+ error from namespaced error, and then ``exc.args[1]`` can be consulted
+ to get the namespace. Example of namespaced OSError from
+ `usocket.getaddrinfo()` function::
+
+ >>> usocket.getaddrinfo("-doesnt-exist-", 80)
+ Traceback (most recent call last):
+ File "<stdin>", line 1, in <module>
+ OSError: (-3, 'gai')
.. exception:: RuntimeError
|
Updater: Re-enable express setup for updates | @@ -66,7 +66,7 @@ HRESULT CALLBACK FinalTaskDialogCallbackProc(
break;
info.lpFile = PhGetStringOrEmpty(context->SetupFilePath);
- //info.lpParameters = L"-update";
+ info.lpParameters = L"-update";
info.lpVerb = PhGetOwnTokenAttributes().Elevated ? NULL : L"runas";
info.nShow = SW_SHOW;
info.hwnd = hwndDlg;
|
[numerics] default solver for one contact nonsmooth Newton is now ONECONTACT_NSN_GP_HYBRID | @@ -1072,7 +1072,7 @@ int fc3d_onecontact_nonsmooth_Newton_gp_setDefaultSolverOptions(SolverOptions* o
printf("Set the Default SolverOptions for the ONECONTACT_NSN Solver\n");
}
- options->solverId = SICONOS_FRICTION_3D_ONECONTACT_NSN_GP;
+ options->solverId = SICONOS_FRICTION_3D_ONECONTACT_NSN_GP_HYBRID;
options->numberOfInternalSolvers = 0;
options->isSet = 1;
options->filterOn = 1;
|
examples/mediaplayer: Add opus file test feature
Add TEST_OPUS for opus file playing with mediaplayer.
The opus file must be generated by mediarecorder. | @@ -99,6 +99,7 @@ void MediaPlayerTest::start(void)
*/
#define TEST_MP3
#undef TEST_AAC
+#undef TEST_OPUS
#if defined(TEST_MP3)
auto source = std::move(unique_ptr<FileInputDataSource>(new FileInputDataSource("/rom/over_16000.mp3")));
@@ -107,6 +108,8 @@ void MediaPlayerTest::start(void)
source->setPcmFormat(AUDIO_FORMAT_TYPE_S16_LE);
#elif defined(TEST_AAC)
auto source = std::move(unique_ptr<FileInputDataSource>(new FileInputDataSource("/rom/play.mp4")));
+#elif defined(TEST_OPUS)
+ auto source = std::move(unique_ptr<FileInputDataSource>(new FileInputDataSource("/rom/res_16k.mp3.pcm.opus")));
#else
auto source = std::move(unique_ptr<FileInputDataSource>(new FileInputDataSource("/rom/44100.pcm")));
source->setSampleRate(44100);
|
Correct style_tick_line in Mono theme to only be created if the Spinner is Enabled | @@ -37,7 +37,6 @@ static lv_style_t style_btn;
static lv_style_t style_round;
static lv_style_t style_no_radius;
static lv_style_t style_fg_color;
-static lv_style_t style_tick_line;
static lv_style_t style_border_none;
static lv_style_t style_big_line_space; /*In roller or dropdownlist*/
static lv_style_t style_pad_none;
@@ -73,6 +72,10 @@ static lv_style_t style_gauge_needle, style_gauge_major;
static lv_style_t style_sb;
#endif
+#if LV_USE_SPINNER
+static lv_style_t style_tick_line;
+#endif
+
#if LV_USE_TEXTAREA
static lv_style_t style_ta_cursor;
#endif
|
Add valgrind to Dockerfile missed in | @@ -10,7 +10,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
libdbd-pg-perl libxml-checker-perl libyaml-perl \
devscripts build-essential lintian git cloc txt2man debhelper libssl-dev zlib1g-dev libperl-dev libxml2-dev liblz4-dev \
liblz4-tool libpq-dev lcov autoconf-archive zstd libzstd-dev bzip2 libbz2-dev pkg-config libyaml-dev libc6-dbg wget meson \
- ccache
+ ccache valgrind
# Install Docker
RUN groupadd -g5000 docker
|
x86_64 clock: now_kvm(): add system time from PV clock structure
If we don't use the system_time field of the KVM PV clock
structure, we are not returning a monotonic time but just the time
offset from the last update of the KVM PV clock structure. | @@ -47,7 +47,8 @@ timestamp now_kvm()
}
// ok - a 64 bit number (?) multiplied by a 32 bit number yields
// a 96 bit result, chuck the bottom 32 bits
- u64 nsec = ((u128)delta * vclock->tsc_to_system_mul) >> 32;
+ u64 nsec = vclock->system_time +
+ (((u128)delta * vclock->tsc_to_system_mul) >> 32);
u64 sec = nsec / BILLION;
nsec -= sec * BILLION;
timestamp out = seconds(sec) + nanoseconds(nsec);
|
Fix some undefined behaviour in ossltest engine | @@ -593,16 +593,20 @@ int ossltest_aes128_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
int ret;
tmpbuf = OPENSSL_malloc(inl);
- if (tmpbuf == NULL)
+
+ /* OPENSSL_malloc will return NULL if inl == 0 */
+ if (tmpbuf == NULL && inl > 0)
return -1;
/* Remember what we were asked to encrypt */
+ if (tmpbuf != NULL)
memcpy(tmpbuf, in, inl);
/* Go through the motions of encrypting it */
ret = EVP_CIPHER_meth_get_do_cipher(EVP_aes_128_cbc())(ctx, out, in, inl);
/* Throw it all away and just use the plaintext as the output */
+ if (tmpbuf != NULL)
memcpy(out, tmpbuf, inl);
OPENSSL_free(tmpbuf);
@@ -626,12 +630,14 @@ int ossltest_aes128_gcm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
return -1;
/* Remember what we were asked to encrypt */
+ if (tmpbuf != NULL)
memcpy(tmpbuf, in, inl);
/* Go through the motions of encrypting it */
EVP_CIPHER_meth_get_do_cipher(EVP_aes_128_gcm())(ctx, out, in, inl);
/* Throw it all away and just use the plaintext as the output */
+ if (tmpbuf != NULL)
memcpy(out, tmpbuf, inl);
OPENSSL_free(tmpbuf);
|
Refactor code duplication in Chat root | @@ -87,14 +87,7 @@ export class Root extends Component {
inviteConfig = configs[`~${window.ship}/i`];
}
- return (
- <BrowserRouter>
- <div>
- <Route exact path="/~chat"
- render={ (props) => {
- return (
- <Skeleton
- sidebar={
+ const renderChannelsSidebar = (props) => (
<Sidebar
circles={circles}
messagePreviews={messagePreviews}
@@ -104,7 +97,16 @@ export class Root extends Component {
inviteConfig={inviteConfig}
{...props}
/>
- }>
+ );
+
+ return (
+ <BrowserRouter>
+ <div>
+ <Route exact path="/~chat"
+ render={ (props) => {
+ return (
+ <Skeleton
+ sidebar={renderChannelsSidebar(props)}>
<div className="w-100 h-100 fr" style={{ flexGrow: 1 }}>
<div className="dt w-100 h-100">
<div className="dtc center v-mid w-100 h-100 bg-white">
@@ -119,17 +121,7 @@ export class Root extends Component {
return (
<Skeleton
spinner={this.state.spinner}
- sidebar={
- <Sidebar
- circles={circles}
- messagePreviews={messagePreviews}
- invites={invites}
- unreads={unreads}
- api={api}
- inviteConfig={inviteConfig}
- {...props}
- />
- }>
+ sidebar={renderChannelsSidebar(props)}>
<NewScreen
setSpinner={this.setSpinner}
api={api}
@@ -143,17 +135,7 @@ export class Root extends Component {
render={ (props) => {
return (
<Skeleton
- sidebar={
- <Sidebar
- circles={circles}
- messagePreviews={messagePreviews}
- invites={invites}
- unreads={unreads}
- api={api}
- inviteConfig={inviteConfig}
- {...props}
- />
- }>
+ sidebar={renderDefaultSidebar(props)}>
<LandingScreen
api={api}
configs={configs}
@@ -171,17 +153,7 @@ export class Root extends Component {
let messages = state.messages[station] || [];
return (
<Skeleton
- sidebar={
- <Sidebar
- circles={circles}
- messagePreviews={messagePreviews}
- invites={invites}
- unreads={unreads}
- api={api}
- inviteConfig={inviteConfig}
- {...props}
- />
- }>
+ sidebar={renderChannelsSidebar(props) }>
<ChatScreen
api={api}
configs={configs}
@@ -197,17 +169,7 @@ export class Root extends Component {
render={ (props) => {
return (
<Skeleton
- sidebar={
- <Sidebar
- circles={circles}
- messagePreviews={messagePreviews}
- invites={invites}
- unreads={unreads}
- api={api}
- inviteConfig={inviteConfig}
- {...props}
- />
- }>
+ sidebar={renderChannelsSidebar(props) }>
<MemberScreen
{...props}
api={api}
@@ -221,17 +183,7 @@ export class Root extends Component {
return (
<Skeleton
spinner={this.state.spinner}
- sidebar={
- <Sidebar
- circles={circles}
- messagePreviews={messagePreviews}
- invites={invites}
- unreads={unreads}
- api={api}
- inviteConfig={inviteConfig}
- {...props}
- />
- }>
+ sidebar={renderChannelsSidebar(props) }>
<SettingsScreen
{...props}
setSpinner={this.setSpinner}
|
stm32/rng: Use Yasmarang for rng_get() if MCU doesn't have HW RNG. | @@ -60,4 +60,30 @@ STATIC mp_obj_t pyb_rng_get(void) {
}
MP_DEFINE_CONST_FUN_OBJ_0(pyb_rng_get_obj, pyb_rng_get);
+#else // MICROPY_HW_ENABLE_RNG
+
+// For MCUs that don't have an RNG we still need to provide a rng_get() function,
+// eg for lwIP. A pseudo-RNG is not really ideal but we go with it for now. We
+// don't want to use urandom's pRNG because then the user won't see a reproducible
+// random stream.
+
+// Yasmarang random number generator by Ilya Levin
+// http://www.literatecode.com/yasmarang
+STATIC uint32_t pyb_rng_yasmarang(void) {
+ static uint32_t pad = 0xeda4baba, n = 69, d = 233;
+ static uint8_t dat = 0;
+
+ pad += dat + d * n;
+ pad = (pad << 3) + (pad >> 29);
+ n = pad | 2;
+ d ^= (pad << 31) + (pad >> 1);
+ dat ^= (char)pad ^ (d >> 8) ^ 1;
+
+ return pad ^ (d << 5) ^ (pad >> 18) ^ (dat << 1);
+}
+
+uint32_t rng_get(void) {
+ return pyb_rng_yasmarang();
+}
+
#endif // MICROPY_HW_ENABLE_RNG
|
unwrap comments | @@ -82,7 +82,7 @@ export function NotePreview(props: NotePreviewProps) {
<Box color={isRead ? "gray" : "green"} mr={3}>
{date}
</Box>
- <Box mr={3}><Text>{commentDesc}</Text></Box>
+ <Box mr={3}>{commentDesc}</Box>
<Box>{rev.valueOf() === 1 ? `1 Revision` : `${rev} Revisions`}</Box>
</Box>
</Col>
|
fpgadiag: Make option flag consistent across tests
The shorthand for "multi-cl" flag should be '-u', instead of '-U',
for mode 0 test, to be consistent with other tests. | @@ -65,7 +65,7 @@ nlb0::nlb0()
options_.add_option<std::string>("target", 't', option::with_argument, "one of { fpga, ase }", target_);
options_.add_option<uint32_t>("begin", 'b', option::with_argument, "where 1 <= <value> <= 65535", begin_);
options_.add_option<uint32_t>("end", 'e', option::with_argument, "where 1 <= <value> <= 65535", end_);
- options_.add_option<uint32_t>("multi-cl", 'U', option::with_argument, "one of {1, 2, 4}", 1);
+ options_.add_option<uint32_t>("multi-cl", 'u', option::with_argument, "one of {1, 2, 4}", 1);
options_.add_option<bool>("cont", 'L', option::no_argument, "Continuous mode", cont_);
options_.add_option<std::string>("cache-policy", 'p', option::with_argument, "one of { wrline-I, wrline-M wrpush-I", "wrline-M");
options_.add_option<std::string>("cache-hint", 'i', option::with_argument, "one of { rdline-I, rdline-S}", "rdline-I");
|
external/iotivity: fix compilation warning
The iotivity_simpleserver example is built by Makefile, not sconsscript
so that calling sconscript from iotivity is not needed.
This commit resolves shown below:
scons: warning: Ignoring missing SConscript '/home/sunghan/Work/TinyAra/TizenRT_forked/apps/examples/iotivity_simpleserver/SConscript'
File "/home/sunghan/Work/TinyAra/TizenRT_forked/external/iotivity/iotivity_1.2-rel/SConstruct", line 73, in <module> | @@ -69,9 +69,6 @@ SConscript(build_dir + 'cloud/SConscript')
if target_os not in ['tizenrt']:
SConscript(build_dir + 'plugins/SConscript')
-if target_os == 'tizenrt':
- SConscript('../../../apps/examples/iotivity_simpleserver' + '/SConscript')
-
# Append targets information to the help information, to see help info, execute command line:
# $ scon [options] -h
env.PrintTargets()
|
update top level Makefile | @@ -110,11 +110,10 @@ export BOAT_CFLAGS
export BOAT_LFLAGS
export LINK_LIBS
-#.PHONY: all boatlibs createdir boatwalletlib hwdeplib contractlib tests clean cleanboatwallet cleanhwdep cleancontract cleantests
-.PHONY: all boatlibs createdir boatwalletlib hwdeplib contractlib demo clean cleanboatwallet cleanhwdep cleancontract cleandemo
+.PHONY: all boatlibs createdir boatwalletlib hwdeplib contractlib demo tests clean \
+ cleanboatwallet cleanhwdep cleancontract cleandemo cleantests
-#all: boatlibs tests
-all: boatlibs demo
+all: boatlibs demo tests
boatlibs: createdir boatwalletlib hwdeplib
@@ -131,16 +130,13 @@ hwdeplib:
contractlib:
make -C $(BOAT_BASE_DIR)/contract all
-#tests: boatlibs contractlib
-# make -C $(BOAT_BASE_DIR)/tests all
+tests: boatlibs contractlib
+ make -C $(BOAT_BASE_DIR)/tests all
demo: boatlibs contractlib
make -C $(BOAT_BASE_DIR)/demo all
-#clean: cleanboatwallet cleanhwdep cleancontract cleantests
-# -$(BOAT_RM) $(BOAT_BUILD_DIR)
-
-clean: cleanboatwallet cleanhwdep cleancontract cleandemo
+clean: cleanboatwallet cleanhwdep cleancontract cleandemo cleantests
-$(BOAT_RM) $(BOAT_BUILD_DIR)
cleanboatwallet:
@@ -155,5 +151,8 @@ cleancontract:
cleandemo:
make -C $(BOAT_BASE_DIR)/demo clean
+cleantests:
+ make -C $(BOAT_BASE_DIR)/tests clean
+
|
rtnlinv: coding style and less debug spam | @@ -189,8 +189,7 @@ int main_rtnlinv(int argc, char* argv[argc])
turns = pat_dims[TIME_DIM];
- } else
- if (NULL != trajectory) {
+ } else if (NULL != trajectory) {
conf.noncart = true;
@@ -200,7 +199,7 @@ int main_rtnlinv(int argc, char* argv[argc])
md_select_dims(DIMS, ~TIME_FLAG, trj1_dims, trj_dims);
- debug_print_dims(DP_INFO, 3, my_img_dims);
+ //debug_print_dims(DP_INFO, 3, my_img_dims);
if (!alt_scaling)
md_zsmul(DIMS, trj_dims, traj, traj, 2.);
|
Supporting backwards compatibility with FREERTOS_CONFIG_FILE_DIRECTORY | @@ -13,6 +13,8 @@ cmake_minimum_required(VERSION 3.15)
# `freertos_config` target defines the path to FreeRTOSConfig.h and optionally other freertos based config files
if(NOT TARGET freertos_config )
+ if (NOT DEFINED FREERTOS_CONFIG_FILE_DIRECTORY )
+
message(FATAL_ERROR " freertos_config target not specified. Please specify a cmake target that defines the include directory for FreeRTOSConfig.h:\n"
" add_library(freertos_config INTERFACE)\n"
" target_include_directories(freertos_config SYSTEM\n"
@@ -21,6 +23,26 @@ if(NOT TARGET freertos_config )
" target_compile_definitions(freertos_config\n"
" PUBLIC\n"
" projCOVERAGE_TEST=0)\n")
+ else()
+ message(WARNING " Using deprecated 'FREERTOS_CONFIG_FILE_DIRECTORY' - please update your project CMakeLists.txt file:\n"
+ " add_library(freertos_config INTERFACE)\n"
+ " target_include_directories(freertos_config SYSTEM\n"
+ " INTERFACE\n"
+ " include) # The config file directory\n"
+ " target_compile_definitions(freertos_config\n"
+ " PUBLIC\n"
+ " projCOVERAGE_TEST=0)\n")
+ # Currently will add this in here.
+ add_library(freertos_config INTERFACE)
+ target_include_directories(freertos_config SYSTEM
+ INTERFACE
+ ${FREERTOS_CONFIG_FILE_DIRECTORY}
+ )
+ target_compile_definitions(freertos_config
+ PUBLIC
+ projCOVERAGE_TEST=0
+ )
+ endif()
endif()
# Heap number or absolute path to custom heap implementation provided by user
|
gphdfs limit fix with altering process close/cleanup behavior | @@ -62,9 +62,11 @@ typedef struct URL_EXECUTE_FILE
static int popen_with_stderr(int *rwepipe, const char *exe, bool forwrite);
static int pclose_with_stderr(int pid, int *rwepipe, StringInfo sinfo);
+static void pclose_without_stderr(int *rwepipe);
static char *interpretError(int exitCode, char *buf, size_t buflen, char *err, size_t errlen);
static const char *getSignalNameFromCode(int signo);
static void read_err_msg(int fid, StringInfo sinfo);
+static void cleanup_execute_handle(execute_handle_t *h);
/*
@@ -95,8 +97,30 @@ create_execute_handle(void)
return h;
}
+/*
+ * Close any open handles on abort.
+ */
static void
destroy_execute_handle(execute_handle_t *h)
+{
+ int hpid = h->pid;
+
+ cleanup_execute_handle(h);
+ if (h->pid != -1)
+ {
+#ifndef WIN32
+ int status;
+ waitpid(hpid, &status, 0);
+#endif
+ }
+
+}
+
+/*
+ * Cleanup open handles.
+ */
+static void
+cleanup_execute_handle(execute_handle_t *h)
{
/* unlink from linked list first */
if (h->prev)
@@ -113,15 +137,6 @@ destroy_execute_handle(execute_handle_t *h)
if (h->pipes[EXEC_ERR_P] != -1)
close(h->pipes[EXEC_ERR_P]);
- if (h->pid != -1)
- {
-#ifndef WIN32
- int status;
-
- waitpid(h->pid, &status, 0);
-#endif
- }
-
pfree(h);
}
@@ -284,14 +299,17 @@ url_execute_fclose(URL_FILE *file, bool failOnError, const char *relname)
URL_EXECUTE_FILE *efile = (URL_EXECUTE_FILE *) file;
StringInfoData sinfo;
char *url;
- int ret;
+ int ret=0;
initStringInfo(&sinfo);
/* close the child process and related pipes */
+ if(failOnError)
ret = pclose_with_stderr(efile->handle->pid, efile->handle->pipes, &sinfo);
+ else
+ pclose_without_stderr(efile->handle->pipes);
- destroy_execute_handle(efile->handle);
+ cleanup_execute_handle(efile->handle);
efile->handle = NULL;
url = pstrdup(file->url);
@@ -754,3 +772,19 @@ pclose_with_stderr(int pid, int *pipes, StringInfo sinfo)
return status;
}
+
+/*
+ * pclose_without_stderr
+ *
+ * close our data and error pipes
+ * we don't probe for any error message or suspend the current process.
+ * this function is meant for scenarios when the current slice doesn't
+ * need to wait for the error message available at the completion of
+ * the child process.
+ */
+static void
+pclose_without_stderr(int *pipes)
+{
+ close(pipes[EXEC_DATA_P]);
+ close(pipes[EXEC_ERR_P]);
+}
|
[bsp][imxrt1052-evk] change sdio default speed to 25M | @@ -56,7 +56,7 @@ static int enable_log = 1;
#define USDHC_ADMA_TABLE_WORDS (8U) /* define the ADMA descriptor table length */
#define USDHC_ADMA2_ADDR_ALIGN (4U) /* define the ADMA2 descriptor table addr align size */
-#define IMXRT_MAX_FREQ (50UL * 1000UL * 1000UL)
+#define IMXRT_MAX_FREQ (25UL * 1000UL * 1000UL)
#define USDHC_ADMA_TABLE_WORDS (8U) /* define the ADMA descriptor table length */
#define USDHC_ADMA2_ADDR_ALIGN (4U) /* define the ADMA2 descriptor table addr align size */
|
st-flash: add sanity check to option flash.
current opt parse code can make bad cmdline parameter attempt to flash bad
flash option.
ie: calling st-flash write --area=option a_file.bin
will make parser attempt to translate "a_file.bon" to an uint32 and will return 0.., | @@ -170,7 +170,11 @@ int main(int ac, char** av)
}
}
else if (o.area == FLASH_OPTION_BYTES){
- // XXX some sanity check should be done here to check o.val parsing.
+ if (o.val == 0) {
+ printf("attempting to set option byte to 0, abort.\n");
+ goto on_error;
+ }
+
err = stlink_write_option_bytes32(sl, o.val);
if (err == -1)
{
|
Use libfuzzer7 with Clang 7. | @@ -1477,7 +1477,9 @@ class GnuCompiler(Compiler):
# fuzzing configuration
if self.tc.is_clang and self.tc.version_at_least(5, 0):
emit('FSANITIZE_FUZZER_SUPPORTED', 'yes')
- if self.tc.version_at_least(6, 0):
+ if self.tc.version_at_least(7):
+ emit('LIBFUZZER_PATH', 'contrib/libs/libfuzzer7')
+ elif self.tc.version_at_least(6):
emit('LIBFUZZER_PATH', 'contrib/libs/libfuzzer6')
else:
emit('LIBFUZZER_PATH', 'contrib/libs/libfuzzer-5.0')
|
add log entry for HE caching | @@ -1900,6 +1900,7 @@ send_result_connection_attempt_to_pm(neat_ctx *ctx, neat_flow *flow, struct cib_
goto end;
}
+ neat_log(ctx, NEAT_LOG_INFO, "Sending HE result to PM for caching");
neat_json_send_once(ctx, flow, socket_path, result_array, NULL, on_pm_he_error);
end:
|
sysdeps/managarm: Convert sys_inotify_add_watch to bragi | @@ -1707,41 +1707,32 @@ int sys_inotify_create(int flags, int *fd) {
int sys_inotify_add_watch(int ifd, const char *path, uint32_t mask, int *wd) {
SignalGuard sguard;
- HelAction actions[3];
- globalQueue.trim();
- managarm::posix::CntRequest<MemoryAllocator> req(getSysdepsAllocator());
- req.set_request_type(managarm::posix::CntReqType::INOTIFY_ADD);
+ managarm::posix::InotifyAddRequest<MemoryAllocator> req(getSysdepsAllocator());
req.set_fd(ifd);
req.set_path(frg::string<MemoryAllocator>(getSysdepsAllocator(), path));
req.set_flags(mask);
- frg::string<MemoryAllocator> ser(getSysdepsAllocator());
- req.SerializeToString(&ser);
- actions[0].type = kHelActionOffer;
- actions[0].flags = kHelItemAncillary;
- actions[1].type = kHelActionSendFromBuffer;
- actions[1].flags = kHelItemChain;
- actions[1].buffer = ser.data();
- actions[1].length = ser.size();
- actions[2].type = kHelActionRecvInline;
- actions[2].flags = 0;
- HEL_CHECK(helSubmitAsync(getPosixLane(), actions, 3,
- globalQueue.getQueue(), 0, 0));
-
- auto element = globalQueue.dequeueSingle();
- auto offer = parseSimple(element);
- auto send_req = parseSimple(element);
- auto recv_resp = parseInline(element);
+ auto [offer, send_head, send_tail, recv_resp] =
+ exchangeMsgsSync(
+ getPosixLane(),
+ helix_ng::offer(
+ helix_ng::sendBragiHeadTail(req, getSysdepsAllocator()),
+ helix_ng::recvInline()
+ )
+ );
- HEL_CHECK(offer->error);
- HEL_CHECK(send_req->error);
- HEL_CHECK(recv_resp->error);
+ HEL_CHECK(offer.error());
+ HEL_CHECK(send_head.error());
+ HEL_CHECK(send_tail.error());
+ HEL_CHECK(recv_resp.error());
managarm::posix::SvrResponse<MemoryAllocator> resp(getSysdepsAllocator());
- resp.ParseFromArray(recv_resp->data, recv_resp->length);
+ resp.ParseFromArray(recv_resp.data(), recv_resp.length());
if(resp.error() == managarm::posix::Errors::FILE_NOT_FOUND) {
return ENOENT;
+ }else if(resp.error() == managarm::posix::Errors::BAD_FD) {
+ return EBADF;
}else{
__ensure(resp.error() == managarm::posix::Errors::SUCCESS);
*wd = resp.wd();
|
ip: fix coverity warning
Type: fix
Ticket: | @@ -173,21 +173,17 @@ ip_address_set (ip_address_t * dst, const void *src, u8 version)
fib_protocol_t
ip_address_to_46 (const ip_address_t * addr, ip46_address_t * a)
{
- fib_protocol_t proto;
+ fib_protocol_t proto = FIB_PROTOCOL_IP4;
- proto = (AF_IP4 == ip_addr_version (addr) ?
- FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6);
- switch (proto)
+ switch (ip_addr_version (addr))
{
- case FIB_PROTOCOL_IP4:
+ case AF_IP4:
ip46_address_set_ip4 (a, &addr->ip.v4);
break;
- case FIB_PROTOCOL_IP6:
+ case AF_IP6:
+ proto = FIB_PROTOCOL_IP6;
a->ip6 = addr->ip.v6;
break;
- default:
- ASSERT (0);
- break;
}
return (proto);
|
reusable function for decoding acode | #include <stdint.h>
#include <string.h>
+
+int32_t decode_acode(uint32_t length, int32_t main_divisor) {
+ //+50 adds a small offset and seems to help always get it right.
+ //Check the +50 in the future to see how well this works on a variety of hardware.
+
+ int32_t acode = (length+main_divisor+50)/(main_divisor*2);
+ if( acode & 1 ) return -1;
+
+ return (acode>>1) - 6;
+}
+
+}
+
//This is the disambiguator function, for taking light timing and figuring out place-in-sweep for a given photodiode.
void handle_lightcap( SurviveObject * so, LightcapElement * le )
{
@@ -112,17 +125,13 @@ void handle_lightcap( SurviveObject * so, LightcapElement * le )
int32_t acode_array[2] =
{
- (so->last_sync_length[0]+main_divisor+50)/(main_divisor*2), //+50 adds a small offset and seems to help always get it right.
- (so->last_sync_length[1]+main_divisor+50)/(main_divisor*2), //Check the +50 in the future to see how well this works on a variety of hardware.
+ decode_acode(so->last_sync_length[0],main_divisor),
+ decode_acode(so->last_sync_length[1],main_divisor)
};
//XXX: TODO: Capture error count here.
- if( acode_array[0] & 1 ) return;
- if( acode_array[1] & 1 ) return;
-
- acode_array[0] = (acode_array[0]>>1) - 6;
- acode_array[1] = (acode_array[1]>>1) - 6;
-
+ if( acode_array[0] < 0 ) return;
+ if( acode_array[1] < 0 ) return;
int acode = acode_array[0];
|
clean-up: removing blank spaces at ends of lines in global header | /*
- * Copyright (c) 2007 - 2019 Joseph Gaeddert
+ * Copyright (c) 2007 - 2020 Joseph Gaeddert
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
|
Fix control event String parsing
At least 2 bytes must be available to read the length of the String. | @@ -93,7 +93,7 @@ public class ControlEventReader {
}
private ControlEvent parseTextControlEvent() {
- if (buffer.remaining() < 1) {
+ if (buffer.remaining() < 2) {
return null;
}
int len = toUnsigned(buffer.getShort());
|
esp32/network_ppp: Add ppp_set_usepeerdns(pcb, 1) when init'ing iface.
Without this you often don't get any DNS server from your network provider.
Additionally, setting your own DNS _does not work_ without this option set
(which could be a bug in the PPP stack). | @@ -130,6 +130,7 @@ STATIC mp_obj_t ppp_active(size_t n_args, const mp_obj_t *args) {
mp_raise_msg(&mp_type_RuntimeError, "init failed");
}
pppapi_set_default(self->pcb);
+ ppp_set_usepeerdns(self->pcb, 1);
pppapi_connect(self->pcb, 0);
xTaskCreate(pppos_client_task, "ppp", 2048, self, 1, (TaskHandle_t*)&self->client_task_handle);
|
VERSION bump to version 0.12.24 | @@ -32,7 +32,7 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0")
# set version
set(LIBNETCONF2_MAJOR_VERSION 0)
set(LIBNETCONF2_MINOR_VERSION 12)
-set(LIBNETCONF2_MICRO_VERSION 23)
+set(LIBNETCONF2_MICRO_VERSION 24)
set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
|
BugID:17646749:[mqttapp]fix mm leak when no net init for multithread case | @@ -330,8 +330,7 @@ int mqtt_client(void *params)
/* Device AUTH */
if (0 != IOT_SetupConnInfo(PRODUCT_KEY, DEVICE_NAME, DEVICE_SECRET, (void **)&pconn_info)) {
EXAMPLE_TRACE("AUTH request failed!");
- rc = -1;
- goto do_exit;
+ return -1;
}
/* Initialize MQTT parameter */
@@ -358,8 +357,7 @@ int mqtt_client(void *params)
pclient = IOT_MQTT_Construct(&mqtt_params);
if (NULL == pclient) {
EXAMPLE_TRACE("MQTT construct failed");
- rc = -1;
- goto do_exit;
+ return -1;
}
EXAMPLE_TRACE("TEST CASE");
@@ -370,7 +368,6 @@ int mqtt_client(void *params)
task_parms.name = "thread_yield";
rc = HAL_ThreadCreate(&g_thread_yield, thread_yield, (void *)pclient, &task_parms, &stack_used);
if (rc != 0) {
- IOT_MQTT_Destroy(&pclient);
goto do_exit;
}
@@ -393,7 +390,7 @@ int mqtt_client(void *params)
g_thread_pub_2_running = 0;
g_thread_yield_running = 0;
HAL_SleepMs(5000);
- IOT_MQTT_Destroy(&pclient);
+
do_exit:
HAL_ThreadDelete(g_thread_sub_unsub_1);
@@ -401,7 +398,7 @@ do_exit:
HAL_ThreadDelete(g_thread_pub_1);
HAL_ThreadDelete(g_thread_pub_2);
HAL_ThreadDelete(g_thread_yield);
-
+ IOT_MQTT_Destroy(&pclient);
return rc;
}
|
rsu: fix location of available_images/image_load
Search in all possible locations to identify the correct paths. | @@ -503,6 +503,40 @@ class fpga_base(sysfs_device):
"""
return self.pci_node.pci_id in self.BOOT_PAGES
+ @property
+ def rsu_controls(self):
+ available_images = None
+ image_load = None
+
+ patterns = ['',
+ '*-sec*.*.auto',
+ '*-sec*.*.auto/*fpga_sec_mgr/*fpga_sec*',
+ '*-sec*.*.auto/fpga_image_load/fpga_image*']
+
+ spi = self.fme.spi_bus
+ if spi:
+ for pat in patterns:
+ for d in ['control', 'update']:
+ available_images = spi.find_one(
+ os.path.join(pat, d, 'available_images'))
+ image_load = spi.find_one(
+ os.path.join(pat, d, 'image_load'))
+ if available_images:
+ return available_images, image_load
+
+ pmci = self.fme.pmci_bus
+ if pmci:
+ for pat in patterns:
+ for d in ['control', 'update']:
+ available_images = pmci.find_one(
+ os.path.join(pat, d, 'available_images'))
+ image_load = pmci.find_one(
+ os.path.join(pat, d, 'image_load'))
+ if available_images:
+ return available_images, image_load
+
+ return None, None
+
def rsu_boot(self, available_image, **kwargs):
# look for non-max10 solution
fme = self.fme
@@ -521,18 +555,7 @@ class fpga_base(sysfs_device):
self.log.exception('unrecognized kwargs: %s', kwargs)
raise ValueError('unrecognized kwargs: {}'.format(kwargs))
- available_images = None
- image_load = None
-
- upload_dev = self.upload_dev
- if upload_dev:
- available_images = upload_dev.find_one('update/available_images')
- image_load = upload_dev.find_one('update/image_load')
-
- fpga_sec = self.secure_update
- if fpga_sec and not available_images:
- available_images = fpga_sec.find_one('control/available_images')
- image_load = fpga_sec.find_one('control/image_load')
+ available_images, image_load = self.rsu_controls
if not available_images or not image_load:
msg = 'rsu not supported by this (0x{:04x},0x{:04x})'.format(
|
py/profile: Resolve name collision with STATIC unset.
When building with STATIC undefined (e.g., -DSTATIC=), there are two
instances of mp_type_code that collide at link time: in profile.c and in
builtinevex.c. This patch resolves the collision by renaming one of them. | @@ -172,7 +172,7 @@ STATIC void code_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
}
}
-const mp_obj_type_t mp_type_code = {
+const mp_obj_type_t mp_type_settrace_codeobj = {
{ &mp_type_type },
.name = MP_QSTR_code,
.print = code_print,
@@ -185,7 +185,7 @@ mp_obj_t mp_obj_new_code(const mp_raw_code_t *rc) {
if (o == NULL) {
return MP_OBJ_NULL;
}
- o->base.type = &mp_type_code;
+ o->base.type = &mp_type_settrace_codeobj;
o->rc = rc;
o->dict_locals = mp_locals_get(); // this is a wrong! how to do this properly?
o->lnotab = MP_OBJ_NULL;
|
README: update CI badge URL | <p align="center">
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT">
- <a href="https://github.com/zyantific/zydis/actions"><img src="https://github.com/zyantific/zydis/workflows/GitHub%20Actions%20CI/badge.svg" alt="GitHub Actions"></a>
+ <a href="https://github.com/zyantific/zydis/actions"><img src="https://github.com/zyantific/zydis/workflows/CI/badge.svg" alt="GitHub Actions"></a>
<a href="https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:zydis"><img src="https://oss-fuzz-build-logs.storage.googleapis.com/badges/zydis.svg" alt="Fuzzing Status"></a>
<a href="https://gitter.im/zyantific/zydis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge"><img src="https://badges.gitter.im/zyantific/zyan-disassembler-engine.svg" alt="Gitter"></a>
<a href="https://discord.zyantific.com/"><img src="https://img.shields.io/discord/390136917779415060.svg?logo=discord&label=Discord" alt="Discord"></a>
|
Add missing initialisation to setup test. | @@ -4181,6 +4181,8 @@ void aead_multipart_setup( int key_type_arg, data_t *key_data,
PSA_ASSERT( psa_import_key( &attributes, key_data->x, key_data->len,
&key ) );
+ operation = psa_aead_operation_init( );
+
mbedtls_test_set_step( 0 );
status = psa_aead_encrypt_setup( &operation, key, alg );
|
Clean up redundant argument decls in macros | @@ -125,6 +125,15 @@ Usz UCLAMP(Usz val, Usz min, Usz max) {
#define ORCA_DECLARE_OPERATORS(_solo_defs, _dual_defs) \
ORCA_DEFINE_OPER_CHARS(_solo_defs, _dual_defs)
+#define OPER_PHASE_COMMON_ARGS \
+ Gbuffer const gbuffer, Mbuffer const mbuffer, Usz const height, \
+ Usz const width, Usz const y, Usz const x
+#define OPER_PHASE_0_COMMON_ARGS \
+ OPER_PHASE_COMMON_ARGS, Oper_bank_write_params *const bank_params, \
+ U8 const cell_flags
+#define OPER_PHASE_1_COMMON_ARGS \
+ OPER_PHASE_COMMON_ARGS, Oper_bank_read_params* const bank_params
+
#define OPER_IGNORE_COMMON_ARGS() \
(void)gbuffer; \
(void)mbuffer; \
@@ -135,25 +144,16 @@ Usz UCLAMP(Usz val, Usz min, Usz max) {
(void)bank_params;
#define BEGIN_SOLO_PHASE_0(_oper_name) \
- static inline void oper_phase0_##_oper_name( \
- Gbuffer const gbuffer, Mbuffer const mbuffer, Usz const height, \
- Usz const width, Usz const y, Usz const x, \
- Oper_bank_write_params* bank_params, U8 const cell_flags) { \
+ static inline void oper_phase0_##_oper_name(OPER_PHASE_0_COMMON_ARGS) { \
OPER_IGNORE_COMMON_ARGS() \
(void)cell_flags; \
enum { This_oper_char = Orca_oper_char_##_oper_name };
#define BEGIN_SOLO_PHASE_1(_oper_name) \
- static inline void oper_phase1_##_oper_name( \
- Gbuffer const gbuffer, Mbuffer const mbuffer, Usz const height, \
- Usz const width, Usz const y, Usz const x, \
- Oper_bank_read_params* bank_params) { \
+ static inline void oper_phase1_##_oper_name(OPER_PHASE_1_COMMON_ARGS) { \
OPER_IGNORE_COMMON_ARGS() \
enum { This_oper_char = Orca_oper_char_##_oper_name };
#define BEGIN_DUAL_PHASE_0(_oper_name) \
- static inline void oper_phase0_##_oper_name( \
- Gbuffer const gbuffer, Mbuffer const mbuffer, Usz const height, \
- Usz const width, Usz const y, Usz const x, \
- Oper_bank_write_params* bank_params, U8 const cell_flags, \
+ static inline void oper_phase0_##_oper_name(OPER_PHASE_0_COMMON_ARGS, \
Glyph const This_oper_char) { \
OPER_IGNORE_COMMON_ARGS() \
(void)cell_flags; \
@@ -161,10 +161,8 @@ Usz UCLAMP(Usz val, Usz min, Usz max) {
Orca_oper_upper_char_##_oper_name == This_oper_char; \
(void)Dual_is_uppercase;
#define BEGIN_DUAL_PHASE_1(_oper_name) \
- static inline void oper_phase1_##_oper_name( \
- Gbuffer const gbuffer, Mbuffer const mbuffer, Usz const height, \
- Usz const width, Usz const y, Usz const x, \
- Oper_bank_read_params* bank_params, Glyph const This_oper_char) { \
+ static inline void oper_phase1_##_oper_name(OPER_PHASE_1_COMMON_ARGS, \
+ Glyph const This_oper_char) { \
OPER_IGNORE_COMMON_ARGS() \
bool const Dual_is_uppercase = \
Orca_oper_upper_char_##_oper_name == This_oper_char; \
|
Fixed building without openat2(). | @@ -39,7 +39,7 @@ nxt_http_static_handler(nxt_task_t *task, nxt_http_request_t *r,
nxt_str_t index, extension, *mtype, *chroot;
nxt_uint_t level;
nxt_bool_t need_body;
- nxt_file_t *f, af, file;
+ nxt_file_t *f, file;
nxt_file_info_t fi;
nxt_http_field_t *field;
nxt_http_status_t status;
@@ -124,6 +124,8 @@ nxt_http_static_handler(nxt_task_t *task, nxt_http_request_t *r,
}
if (nxt_fast_path(ret == NXT_OK)) {
+ nxt_file_t af;
+
af = file;
nxt_memzero(&file, sizeof(nxt_file_t));
file.name = fname;
|
Change circle size argument from diameter to radius; | @@ -948,8 +948,8 @@ void lovrGraphicsArc(DrawStyle style, ArcMode mode, Material* material, mat4 tra
float angleShift = (r2 - r1) / (float) segments;
for (int i = 0; i <= segments; i++) {
- float x = cosf(theta) * .5f;
- float y = sinf(theta) * .5f;
+ float x = cosf(theta);
+ float y = sinf(theta);
memcpy(vertices, ((float[]) { x, y, 0.f, 0.f, 0.f, 1.f, x + .5f, 1.f - (y + .5f) }), 8 * sizeof(float));
vertices += 8;
theta += angleShift;
|
Display bits per sec, not bytes per sec. | @@ -810,7 +810,7 @@ int quic_client(const char* ip_address_text, int server_port, const char * sni,
double duration_usec = (double)(current_time - picoquic_get_cnx_start_time(cnx_client));
if (duration_usec > 0) {
- double receive_rate_mbps = ((double)picoquic_get_data_received(cnx_client)) / duration_usec;
+ double receive_rate_mbps = 8.0*((double)picoquic_get_data_received(cnx_client)) / duration_usec;
fprintf(stdout, "Received %llu bytes in %f seconds, %f Mbps.\n",
(unsigned long long)picoquic_get_data_received(cnx_client),
duration_usec/1000000.0, receive_rate_mbps);
|
esp_netif: fixed initialization order of items in a struct
Closes
Closes | @@ -29,8 +29,8 @@ extern "C" {
#define ESP_NETIF_DEFAULT_ETH() \
{ \
.base = ESP_NETIF_BASE_DEFAULT_ETH, \
- .stack = ESP_NETIF_NETSTACK_DEFAULT_ETH, \
.driver = NULL, \
+ .stack = ESP_NETIF_NETSTACK_DEFAULT_ETH, \
}
/**
@@ -39,8 +39,8 @@ extern "C" {
#define ESP_NETIF_DEFAULT_WIFI_AP() \
{ \
.base = ESP_NETIF_BASE_DEFAULT_WIFI_AP, \
- .stack = ESP_NETIF_NETSTACK_DEFAULT_WIFI_AP, \
.driver = NULL, \
+ .stack = ESP_NETIF_NETSTACK_DEFAULT_WIFI_AP, \
}
/**
@@ -49,8 +49,8 @@ extern "C" {
#define ESP_NETIF_DEFAULT_WIFI_STA() \
{ \
.base = ESP_NETIF_BASE_DEFAULT_WIFI_STA, \
- .stack = ESP_NETIF_NETSTACK_DEFAULT_WIFI_STA, \
.driver = NULL, \
+ .stack = ESP_NETIF_NETSTACK_DEFAULT_WIFI_STA, \
}
/**
@@ -59,8 +59,8 @@ extern "C" {
#define ESP_NETIF_DEFAULT_PPP() \
{ \
.base = ESP_NETIF_BASE_DEFAULT_PPP, \
- .stack = ESP_NETIF_NETSTACK_DEFAULT_PPP, \
.driver = NULL, \
+ .stack = ESP_NETIF_NETSTACK_DEFAULT_PPP, \
}
/**
* @brief Default base config (esp-netif inherent) of WIFI STA
|
Renamed certain macros to match XNU style more. | @@ -160,25 +160,39 @@ enum {
#define CPU_MODEL_FIELDS 0x1E ///< Lynnfield, Clarksfield, Jasper Forest
#define CPU_MODEL_DALES 0x1F ///< Havendale, Auburndale
#define CPU_MODEL_DALES_32NM 0x25 ///< Clarkdale, Arrandale
-#define CPU_MODEL_SANDYBRIDGE 0x2A ///< Sandy Bridge
+#define CPU_MODEL_SANDY_BRIDGE 0x2A ///< Sandy Bridge
#define CPU_MODEL_WESTMERE 0x2C ///< Gulftown, Westmere-EP, Westmere-WS
#define CPU_MODEL_JAKETOWN 0x2D ///< Sandy Bridge Xeon
#define CPU_MODEL_NEHALEM_EX 0x2E ///< Beckton
#define CPU_MODEL_WESTMERE_EX 0x2F
#define CPU_MODEL_IVYBRIDGE 0x3A ///< Ivy Bridge
+#define CPU_MODEL_CRYSTALWELL 0x46
+#define CPU_MODEL_BRYSTALWELL 0x47
#define CPU_MODEL_HASWELL 0x3C
#define CPU_MODEL_BROADWELL 0x3D ///< Broadwell
-#define CPU_MODEL_IVYBRIDGE_E5 0x3E
-#define CPU_MODEL_HASWELL_MB 0x3F ///< Haswell MB
+#define CPU_MODEL_BROADWELL_ULT 0x3D
+#define CPU_MODEL_BROADWELL_ULX 0x3D
+#define CPU_MODEL_IVYBRIDGE_EP 0x3E
+#define CPU_MODEL_HASWELL_EP 0x3F ///< Haswell MB
#define CPU_MODEL_HASWELL_ULT 0x45 ///< Haswell ULT
#define CPU_MODEL_HASWELL_ULX 0x46 ///< Haswell ULX
-#define CPU_MODEL_SKYLAKE 0x5E ///< Skylake-S
+#define CPU_MODEL_SKYLAKE 0x4E ///< Skylake-S
+#define CPU_MODEL_SKYLAKE_ULT 0x4E
+#define CPU_MODEL_SKYLAKE_ULX 0x4E
+#define CPU_MODEL_SKYLAKE_DT 0x5E
+#define CPU_MODEL_SKYLAKE_W 0x55
#define CPU_MODEL_DENVERTON 0x5F ///< Goldmont Microserver
#define CPU_MODEL_CANNONLAKE 0x66
#define CPU_MODEL_XEON_MILL 0x85 ///< Knights Mill
-#define CPU_MODEL_KABYLAKE_U 0x8E ///< Kabylake Mobile
-#define CPU_MODEL_KABYLAKE 0x9E ///< Kabylake Dektop
+#define CPU_MODEL_KABYLAKE 0x8E ///< Kabylake Dektop
+#define CPU_MODEL_KABYLAKE_ULT 0x8E
+#define CPU_MODEL_KABYLAKE_ULX 0x8E
+#define CPU_MODEL_KABYLAKE_DT 0x9E
+#define CPU_MODEL_COFFEELAKE 0x9E
+#define CPU_MODEL_COFFEELAKE_ULT 0x9E
+#define CPU_MODEL_COFFEELAKE_ULX 0x9E
+#define CPU_MODEL_COFFEELAKE_DT 0x9E
#define CPU_SOCKET_UNKNOWN 0x02
#define CPU_SOCKET_PGA478 0x0F
|
serial-libs/gsl: bump to v2.6 | Summary: GNU Scientific Library (GSL)
Name: %{pname}-%{compiler_family}%{PROJ_DELIM}
-Version: 2.5
+Version: 2.6
Release: 1%{?dist}
License: GPL
Group: %{PROJ_NAME}/serial-libs
|
fix(bluetooth): Fix max pair settings for non-split. | @@ -107,9 +107,6 @@ config ZMK_SPLIT_BLE_ROLE_CENTRAL
if ZMK_SPLIT_BLE_ROLE_CENTRAL
-config BT_MAX_PAIRED
- default 2
-
config BT_MAX_CONN
default 2
@@ -153,6 +150,9 @@ if ZMK_BLE && !ZMK_SPLIT_BLE
config BT_ID_MAX
default 5
+config BT_MAX_PAIRED
+ default 5
+
# Used to update the name to include the identity used
config BT_DEVICE_NAME_DYNAMIC
default y
|
libnet: adding timeout function | #include <lwip/opt.h>
#include <lwip/netif.h>
+#include <lwip/timeouts.h>
#include "include/net/netif.h"
#include <netif/etharp.h>
@@ -54,7 +55,6 @@ static err_t net_if_linkoutput(struct netif *netif, struct pbuf *p)
}
-
static void net_if_status_cb(struct netif *netif)
{
debug_printf("netif status changed %s\n", ip4addr_ntoa(netif_ip4_addr(netif)));
@@ -326,6 +326,7 @@ errval_t net_if_poll(struct netif *netif)
}
}
+ sys_check_timeouts();
return SYS_ERR_OK;
|
and New mars types | 71 fx Flux forcing
72 fu Fill-up
73 sfo Simulations with forcing
+74 tpa Time processed analysis
+75 if Interim forecast
80 fcmean Forecast mean
81 fcmax Forecast maximum
82 fcmin Forecast minimum
|
Add device only after successful initialization | @@ -293,14 +293,14 @@ static int add_device(struct tcmulib_context *ctx,
dev->ctx = ctx;
- darray_append(ctx->devices, dev);
-
ret = dev->handler->added(dev);
if (ret < 0) {
tcmu_err("handler open failed for %s\n", dev->dev_name);
goto err_munmap;
}
+ darray_append(ctx->devices, dev);
+
return 0;
err_munmap:
|
improve test build rule | @@ -443,8 +443,8 @@ gitbook: $(BINDIR)/$(AGENT) $(BINDIR)/$(GEN) $(BINDIR)/$(ADD) $(BINDIR)/$(CLIENT
.PHONY: release
release: deb gitbook
-$(TESTBINDIR)/test: $(TESTSRCDIR)/main.c $(TEST_SOURCES)
- $(CC) $(TEST_CFLAGS) $< $(TEST_SOURCES) $(GENERAL_SOURCES:$(SRCDIR)/%.c=$(OBJDIR)/%.o) $(LIB_SOURCES:$(LIBDIR)/%.c=$(OBJDIR)/%.o) -o $@ $(TEST_LFLAGS)
+$(TESTBINDIR)/test: $(TESTSRCDIR)/main.c $(TEST_SOURCES) $(GENERAL_SOURCES:$(SRCDIR)/%.c=$(OBJDIR)/%.o) $(LIB_SOURCES:$(LIBDIR)/%.c=$(OBJDIR)/%.o)
+ @$(CC) $(TEST_CFLAGS) $< $(TEST_SOURCES) $(GENERAL_SOURCES:$(SRCDIR)/%.c=$(OBJDIR)/%.o) $(LIB_SOURCES:$(LIBDIR)/%.c=$(OBJDIR)/%.o) -o $@ $(TEST_LFLAGS)
.PHONY: test
test: $(TESTBINDIR)/test
|
added packetcount and last pcap error message | @@ -25,28 +25,33 @@ int getpcapinfo(char *pcapinname)
{
//struct stat statinfo;
pcap_t *pcapin = NULL;
+struct pcap_pkthdr *pkh;
+
FILE *fhc;
int magicsize = 0;
int datalink = 0;
int majorversion = 0;
int minorversion = 0;
+int pcapstatus;
+long int packetcount = 0;
uint32_t magic = 0;
+const uint8_t *packet = NULL;
char *datalinkstring = "";
char *pcapformatstring = "";
-char pcaperrorstring[PCAP_ERRBUF_SIZE];
-
char *dlt105 = "(DLT_IEEE802_11)";
char *dlt119 = "(DLT_PRISM_HEADER)";
char *dlt127 = "(DLT_IEEE802_11_RADIO)";
char *dlt163 = "(DLT_IEEE802_11_RADIO_AVS)";
char *pcap = "(cap/pcap)";
+char *pcapng = "(pcapng)";
char *pcapsw = "(swapped cap/pcap)";
char *pcapns = "(cap/pcap - ns)";
char *pcapnssw = "(swapped cap/pcap - ns)";
-char *pcapng = "(pcapng)";
+char *noerror = "flawless";
+char pcaperrorstring[PCAP_ERRBUF_SIZE];
if (!(pcapin = pcap_open_offline(pcapinname, pcaperrorstring)))
{
@@ -58,6 +63,19 @@ majorversion = pcap_major_version(pcapin);
minorversion = pcap_minor_version(pcapin);
datalink = pcap_datalink(pcapin);
+memset(&pcaperrorstring, 0, PCAP_ERRBUF_SIZE);
+strcpy(pcaperrorstring, noerror);
+while((pcapstatus = pcap_next_ex(pcapin, &pkh, &packet)) != -2)
+ {
+ if(pcapstatus == -1)
+ {
+ strcpy(pcaperrorstring, pcap_geterr(pcapin));
+ continue;
+ }
+ packetcount++;
+
+
+ }
pcap_close(pcapin);
@@ -113,8 +131,10 @@ printf( "input file.......: %s\n"
"major version....: %d\n"
"minor version....: %d\n"
"data link type...: %d %s\n"
+ "packets inside...: %ld\n"
+ "last pcap error..: %s\n"
- , pcapinname, magic, pcapformatstring, majorversion, minorversion, datalink, datalinkstring);
+ , pcapinname, magic, pcapformatstring, majorversion, minorversion, datalink, datalinkstring, packetcount, pcaperrorstring);
return TRUE;
}
|
disable creat trace in manifest | )
# filesystem path to elf for kernel to run
program:/creat
- trace:t
- debugsyscalls:t
- futex_trace:t
+# trace:t
+# debugsyscalls:t
+# futex_trace:t
fault:t
arguments:[webg poppy]
environment:(USER:bobby PWD:/)
|
Free FB memory if compress or compressed fail. | @@ -229,19 +229,23 @@ static mp_obj_t py_image_compress(uint n_args, const mp_obj_t *args, mp_map_t *k
{
image_t *arg_img = py_image_cobj(args[0]);
PY_ASSERT_FALSE_MSG(IM_IS_JPEG(arg_img), "Operation not supported on JPEG");
+
int arg_q = py_helper_lookup_int(kw_args, MP_OBJ_NEW_QSTR(MP_QSTR_quality), 50);
PY_ASSERT_TRUE_MSG((1 <= arg_q) && (arg_q <= 100), " 1 <= quality <= 100");
- // TODO: Need to set fb_alloc trap here to recover from any exception...
-
uint32_t size;
uint8_t *buffer = fb_alloc_all(&size);
image_t out = { .w=arg_img->w, .h=arg_img->h, .bpp=size, .data=buffer };
- PY_ASSERT_FALSE_MSG(jpeg_compress(arg_img, &out, arg_q, false), "Out of Memory!");
+
+ if (jpeg_compress(arg_img, &out, arg_q, false)) { // JPEG overflow
+ fb_free();
+ nlr_raise(mp_obj_new_exception_msg(&mp_type_MemoryError, "Out of Memory!!!"));
+ }
switch(arg_img->bpp) {
case IMAGE_BPP_BINARY: {
- PY_ASSERT_TRUE_MSG(out.bpp <= (((arg_img->w * arg_img->h) + UINT32_T_MASK) >> UINT32_T_SHIFT), "Can't compress in place!");
+ PY_ASSERT_TRUE_MSG(out.bpp <= (((arg_img->w * arg_img->h)
+ + UINT32_T_MASK) >> UINT32_T_SHIFT), "Can't compress in place!");
break;
}
case IMAGE_BPP_GRAYSCALE: {
@@ -272,16 +276,25 @@ static mp_obj_t py_image_compressed(uint n_args, const mp_obj_t *args, mp_map_t
{
image_t *arg_img = py_image_cobj(args[0]);
PY_ASSERT_FALSE_MSG(IM_IS_JPEG(arg_img), "Operation not supported on JPEG");
+
int arg_q = py_helper_lookup_int(kw_args, MP_OBJ_NEW_QSTR(MP_QSTR_quality), 50);
PY_ASSERT_TRUE_MSG((1 <= arg_q) && (arg_q <= 100), " 1 <= quality <= 100");
- // TODO: Need to set fb_alloc trap here to recover from any exception...
-
uint32_t size;
uint8_t *buffer = fb_alloc_all(&size);
image_t out = { .w=arg_img->w, .h=arg_img->h, .bpp=size, .data=buffer };
- PY_ASSERT_FALSE_MSG(jpeg_compress(arg_img, &out, arg_q, false), "Out of Memory!");
- uint8_t *temp = xalloc(out.bpp);
+
+ if (jpeg_compress(arg_img, &out, arg_q, false)) { // JPEG overflow
+ fb_free();
+ nlr_raise(mp_obj_new_exception_msg(&mp_type_MemoryError, "Out of Memory!!!"));
+ }
+
+ uint8_t *temp = xalloc_try_alloc(out.bpp);
+ if (temp == NULL) {
+ fb_free();
+ nlr_raise(mp_obj_new_exception_msg(&mp_type_MemoryError, "Out of Memory!!!"));
+ }
+
memcpy(temp, out.data, out.bpp);
out.data = temp;
fb_free();
|
chat: fix sizing on mobile
fixes | @@ -2,8 +2,9 @@ import React, { Component } from 'react';
import { UnControlled as CodeEditor } from 'react-codemirror2';
import { MOBILE_BROWSER_REGEX } from "~/logic/lib/util";
import CodeMirror from 'codemirror';
+import styled from "styled-components";
-import { Row, BaseTextArea } from '@tlon/indigo-react';
+import { Row, BaseTextArea, Box } from '@tlon/indigo-react';
import 'codemirror/mode/markdown/markdown';
import 'codemirror/addon/display/placeholder';
@@ -52,9 +53,40 @@ const inputProxy = (input) => new Proxy(input, {
if (property === 'setValue') {
return (val) => target.value = val;
}
+ if (property === 'element') {
+ return input;
+ }
}
});
+const MobileBox = styled(Box)`
+ display: inline-grid;
+ vertical-align: center;
+ align-items: stretch;
+ position: relative;
+ justify-content: flex-start;
+ width: 100%;
+
+ &:after,
+ textarea {
+ grid-area: 2 / 1;
+ width: auto;
+ min-width: 1em;
+ font: inherit;
+ padding: 0.25em;
+ margin: 0;
+ resize: none;
+ background: none;
+ appearance: none;
+ border: none;
+ }
+ &::after {
+ content: attr(data-value) ' ';
+ visibility: hidden;
+ white-space: pre-wrap;
+ }
+`;
+
export default class ChatEditor extends Component {
constructor(props) {
super(props);
@@ -167,12 +199,26 @@ export default class ChatEditor extends Component {
color="black"
>
{MOBILE_BROWSER_REGEX.test(navigator.userAgent)
- ? <BaseTextArea
+ ? <MobileBox
+ data-value={this.state.message}
+ fontSize="14px"
+ lineHeight="tall"
+ onClick={event => {
+ if (this.editor) {
+ this.editor.element.focus();
+ }
+ }}
+ >
+ <BaseTextArea
fontFamily={inCodeMode ? 'Source Code Pro' : 'Inter'}
fontSize="14px"
lineHeight="tall"
+ rows="1"
style={{ width: '100%', background: 'transparent', color: 'currentColor' }}
placeholder={inCodeMode ? "Code..." : "Message..."}
+ onChange={event => {
+ this.messageChange(null, null, event.target.value);
+ }}
onKeyDown={event => {
if (event.key === 'Enter') {
event.preventDefault();
@@ -187,6 +233,7 @@ export default class ChatEditor extends Component {
}}
{...props}
/>
+ </MobileBox>
: <CodeEditor
className="lh-copy"
value={message}
|
lv_canvas: update function prototypes | @@ -164,6 +164,8 @@ void lv_canvas_draw_circle(lv_obj_t * canvas, lv_coord_t x0, lv_coord_t y0, lv_c
* @param point1 start point of the line
* @param point2 end point of the line
* @param color color of the line
+ *
+ * NOTE: The lv_canvas_draw_line function originates from https://github.com/jb55/bresenham-line.c.
*/
void lv_canvas_draw_line(lv_obj_t * canvas, lv_point_t point1, lv_point_t point2, lv_color_t color);
@@ -197,20 +199,20 @@ void lv_canvas_draw_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size,
* @param canvas pointer to a canvas object
* @param points edge points of the polygon
* @param size edge count of the polygon
- * @param color line color of the polygon
- * @param bg_color background color of the polygon
+ * @param boundary_color line color of the polygon
+ * @param fill_color fill color of the polygon
*/
-void lv_canvas_fill_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, lv_color_t color, lv_color_t bg_color);
+void lv_canvas_fill_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, lv_color_t boundary_color, lv_color_t fill_color);
/**
* Boundary fill function of the canvas
* @param canvas pointer to a canvas object
* @param x x coordinate of the start position (seed)
* @param y y coordinate of the start position (seed)
- * @param fill_color fill color of the area
* @param boundary_color edge/boundary color of the area
+ * @param fill_color fill color of the area
*/
-void lv_canvas_boundary_fill4(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t fill_color, lv_color_t boundary_color);
+void lv_canvas_boundary_fill4(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t boundary_color, lv_color_t fill_color);
/**
* Flood fill function of the canvas
|
Update index_board_Arduino_HandBit.html
add blocks | </shadow>
</value>
</block>
+ <block type="Vs2DetectedColorDetect"></block>
+ <block type="Vs2GetMessage"></block>
+ <block type="Vs2GetCardType"></block>
+ <block type="Vs2GetColorLabel"></block>
</category>
<category id="catFactory" name="Factory" colour="65">
<block type="factory_notes"></block>
|
user: comment out global vars (temp change) | @@ -127,8 +127,9 @@ int mk_user_set_uidgid(struct mk_server *server)
out:
/* Variables set for run checks on file permission */
- EUID = geteuid();
- EGID = getegid();
+ //FIXME
+ //EUID = geteuid();
+ //EGID = getegid();
return 0;
}
|
esp_https_ota: fix bug where `http_client_init_cb` is called after `esp_http_client_perform()` instead of before.
Closes | @@ -254,6 +254,14 @@ esp_err_t esp_https_ota_begin(const esp_https_ota_config_t *ota_config, esp_http
goto failure;
}
+ if (ota_config->http_client_init_cb) {
+ err = ota_config->http_client_init_cb(https_ota_handle->http_client);
+ if (err != ESP_OK) {
+ ESP_LOGE(TAG, "http_client_init_cb returned 0x%x", err);
+ goto http_cleanup;
+ }
+ }
+
if (https_ota_handle->partial_http_download) {
esp_http_client_set_method(https_ota_handle->http_client, HTTP_METHOD_HEAD);
err = esp_http_client_perform(https_ota_handle->http_client);
@@ -286,14 +294,6 @@ esp_err_t esp_https_ota_begin(const esp_https_ota_config_t *ota_config, esp_http
esp_http_client_set_method(https_ota_handle->http_client, HTTP_METHOD_GET);
}
- if (ota_config->http_client_init_cb) {
- err = ota_config->http_client_init_cb(https_ota_handle->http_client);
- if (err != ESP_OK) {
- ESP_LOGE(TAG, "http_client_init_cb returned 0x%x", err);
- goto http_cleanup;
- }
- }
-
err = _http_connect(https_ota_handle->http_client);
if (err != ESP_OK) {
ESP_LOGE(TAG, "Failed to establish HTTP connection");
|
add changes since v2.12 | +Version 2.13
+============
+
+Released xxxx-xx-xx
+
+* New Features:
+
+ - Add `jansson_version_str()` and `jansson_version_cmp()` for runtime
+ version checking (#465).
+
+ - Add `json_object_update_new()`, `json_object_update_existing_new()`
+ and `json_object_update_missing_new()` functions (#499).
+
+ - Add `json_object_update_recursive()` (#505).
+
+* Build:
+
+ - Add -Wno-format-truncation to suppress format truncation warnings (#489).
+
+* Bug fixes:
+
+ - Remove `strtod` macro definition for MinGW (#498).
+
+ - Add infinite loop check in `json_deep_copy()` (#490).
+
+ - Add `pipe` macro definition for MinGW (#500).
+
+ - Enhance `JANSSON_ATTRS` macro to support earlier C standard(C89) (#501).
+
+ - Update version detection for sphinx-build (#502).
+
+* Tests:
+
+ - Add negative test case for `test_equal_complex()` (#506).
+
+* Documentation:
+
+ - Fix typos (#483, #494).
+
+ - Document that call the custom free function to free the return value
+ of `json_dumps()` if you have a custom malloc/free (#490).
+
+ - Add vcpkg installation instructions (#496).
+
+ - Document that non-blocking file descriptor is not supported on
+ `json_loadfd()` (#503).
+
+ - Format code with clang-format (#508).
+
+* Other:
+
+ - Add fuzz target for jansson to integrate jansson with OSS-Fuzz (#480,
+ #484, #485, #486, #487).
+
Version 2.12
+============
Released 2018-11-26
|
docs/index.md: Fix typos | @@ -42,13 +42,13 @@ You should give HsLua a try if you
HsLua exposes most of Lua's C API via Haskell functions. It offers
improved type-safety when compared to the raw C functions, while
also translating Lua errors to Haskell exceptions. Furthermore,
-HsLua provides an convenience functions which make interacting
-with Lua straight-forward and safe.
+HsLua provides convenience functions and helpers that make
+interacting with Lua straight-forward and safe.
### Showcases
-Possibly the best-known real world use case of HsLua is used in
-[pandoc], the universal document converter, where it serves as a
+Possibly the best-known real world use case of HsLua is [pandoc],
+the universal document converter, where it serves as a central
building block for [Lua filters] and [custom writers].
[Santa's little Lua scripts], originally written for [Advent of
|
vfs/fs_truncate.c:Add socket judgment to return correct errno. | @@ -51,6 +51,7 @@ static int sock_file_ioctl(FAR struct file *filep, int cmd,
unsigned long arg);
static int sock_file_poll(FAR struct file *filep, struct pollfd *fds,
bool setup);
+static int sock_file_truncate(FAR struct file *filep, off_t length);
/****************************************************************************
* Private Data
@@ -65,7 +66,7 @@ static const struct file_operations g_sock_fileops =
NULL, /* seek */
sock_file_ioctl, /* ioctl */
NULL, /* mmap */
- NULL, /* truncate */
+ sock_file_truncate, /* truncate */
sock_file_poll /* poll */
};
@@ -140,6 +141,11 @@ static int sock_file_poll(FAR struct file *filep, FAR struct pollfd *fds,
return psock_poll(filep->f_priv, fds, setup);
}
+static int sock_file_truncate(FAR struct file *filep, off_t length)
+{
+ return -EINVAL;
+}
+
/****************************************************************************
* Public Functions
****************************************************************************/
|
Better message for unsupported loss in ostr | @@ -90,7 +90,7 @@ static TEvaluateDerivativesFunc GetEvaluateDerivativesFunc(ELossFunction lossFun
case ELossFunction::Poisson:
return EvaluateDerivativesForError<TPoissonError>;
default:
- CB_ENSURE(false, "provided error function is not supported yet");
+ CB_ENSURE(false, "Error function " + ToString(lossFunction) + " is not supported yet in ostr mode");
}
}
|
define max width for instance cards | @@ -22,6 +22,7 @@ const containerStyle = {
const cellStyle = {
flex: 1,
+ maxWidth: '700px',
}
const Home = ({ instances, status }) =>
|
Change CI scripts directory | @@ -60,21 +60,20 @@ install:
- export GOPATH=$HOME/gopath
- go version
-- git clone https://github.com/michal-narajowski/mynewt-travis-ci ci
-- chmod +x ci/*.sh
-- ci/${TRAVIS_OS_NAME}_travis_install.sh
+- git clone https://github.com/michal-narajowski/mynewt-travis-ci $HOME/ci
+- chmod +x $HOME/ci/*.sh
+- $HOME/ci/${TRAVIS_OS_NAME}_travis_install.sh
- newt version
- gcc --version
- arm-none-eabi-gcc --version
script:
-- cp -R ${TRAVIS_BUILD_DIR}/ci/mynewt-core-project.yml project.yml
+- cp -R $HOME/ci/mynewt-core-project.yml project.yml
- newt install
+- cp -R $HOME/ci/targets .
-- cp -R ${TRAVIS_BUILD_DIR}/ci/targets .
-
-- ${TRAVIS_BUILD_DIR}/ci/run_test.sh
+- $HOME/ci/run_test.sh
cache:
directories:
|
integration/TestEbpftop: Check for any captured event | @@ -595,10 +595,11 @@ func TestEbpftop(t *testing.T) {
Cmd: "$KUBECTL_GADGET top ebpf -o json",
StartAndStop: true,
ExpectedOutputFn: func(output string) error {
- expectedEntry := &ebpftopTypes.Stats{
- Name: "ig_top_ebpf_it",
- Type: "Tracing",
- }
+ // Top gadgets truncate their output to 20 rows by default
+ // Even if we increase the amount or rows, the output might get
+ // truncated since we run the tests in parallel and we won't be
+ // able to find our own eBPF program "ig_top_ebpf_it"
+ expectedEntry := &ebpftopTypes.Stats{}
normalize := func(e *ebpftopTypes.Stats) {
e.Node = ""
@@ -607,6 +608,8 @@ func TestEbpftop(t *testing.T) {
e.Container = ""
e.Namespace = ""
e.ProgramID = 0
+ e.Name = ""
+ e.Type = ""
e.Pids = nil
e.CurrentRuntime = 0
e.CurrentRunCount = 0
|
ble_mesh:change the location of print ready | @@ -67,7 +67,6 @@ void app_main(void)
#else
repl_config.prompt = "esp32>";
#endif
- printf("!!!ready!!!\n");
// init console REPL environment
ESP_ERROR_CHECK(esp_console_new_repl_uart(&uart_config, &repl_config, &repl));
@@ -84,7 +83,7 @@ void app_main(void)
#if (CONFIG_BLE_MESH_CFG_CLI)
ble_mesh_register_configuration_client_model();
#endif
-
+ printf("!!!ready!!!\n");
// start console REPL
ESP_ERROR_CHECK(esp_console_start_repl(repl));
}
|
Fix 404 in our Readme.md
There were some broken links in the Basics of Luos, Nodes, Packages, Services and Messages sections. | @@ -25,8 +25,8 @@ Luos proposes organized and effective development practices, guaranteeing develo
This section details the features of Luos technology as an embedded development platform, following these subjects:
* Let's test through the [Luos get started](https://docs.luos.io/get-started/get-started/), to build, flash, run, and control your very first Luos code.
-* The [Basics of Luos](https://docs.luos.io/docs/luos-technology/basics/basics), explaining the general concepts and the project organization.
-* Definition of [Nodes](https://docs.luos.io/docs/luos-technology/node/node), and the relation between Luos and the physical world.
-* Definition of [Packages](https://docs.luos.io/docs/luos-technology/package/package), and how to make a portable and reusable development.
-* Definition of [Services](https://docs.luos.io/docs/luos-technology/services/services), how to create and declare features in your product.
-* Definition of [Messages](https://docs.luos.io/docs/luos-technology/message/message), when, why, and how to handle them, explaining the more advanced features of Luos.
+* The [Basics of Luos](https://docs.luos.io/docs/luos-technology/basics/), explaining the general concepts and the project organization.
+* Definition of [Nodes](https://docs.luos.io/docs/luos-technology/node/), and the relation between Luos and the physical world.
+* Definition of [Packages](https://docs.luos.io/docs/luos-technology/package/), and how to make a portable and reusable development.
+* Definition of [Services](https://docs.luos.io/docs/luos-technology/services/), how to create and declare features in your product.
+* Definition of [Messages](https://docs.luos.io/docs/luos-technology/message/), when, why, and how to handle them, explaining the more advanced features of Luos.
|
SOVERSION bump to version 6.1.14 | @@ -68,7 +68,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_
# with backward compatible change and micro version is connected with any internal change of the library.
set(SYSREPO_MAJOR_SOVERSION 6)
set(SYSREPO_MINOR_SOVERSION 1)
-set(SYSREPO_MICRO_SOVERSION 13)
+set(SYSREPO_MICRO_SOVERSION 14)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
Modify sizeof(instsize_t) to 1 byte
instsize_t uses 1 byte acturlly, while alloced 4 bytes before. | typedef struct dynablocklist_s dynablocklist_t;
typedef struct instsize_s {
- unsigned int x86:4;
- unsigned int nat:4;
+ unsigned char x86:4;
+ unsigned char nat:4;
} instsize_t;
typedef struct dynablock_s {
|
Enable pending push test
Actually just forgot about rawlen. | @@ -138,12 +138,11 @@ tests = testGroup "Push"
<* Lua.pop 1
assert $ retrievedList == list
- -- PENDING: enable once Lua.len becomes available
- -- , testProperty "table size equals list length" $ \list -> monadicIO $ do
- -- tableSize <- run $ Lua.run $ do
- -- pushList pushString list
- -- Lua.len Lua.stackTop
- -- assert $ fromIntegral tableSize == length list
+ , testProperty "table size equals list length" $ \list -> monadicIO $ do
+ tableSize <- run $ Lua.run $ do
+ pushList pushString list
+ Lua.rawlen Lua.stackTop
+ assert $ fromIntegral tableSize == length list
, testSingleElementProperty (pushList pushText)
]
|
using cached locations to speed up kicks | @@ -1728,8 +1728,19 @@ _n_hock(u3_noun cor, _n_site* sit_u)
static u3_weak
_n_kick(u3_noun cor, _n_site* sit_u)
{
- u3_weak loc, pro = u3_none;
+ u3_weak loc = u3_none,
+ pro = u3_none;
+ if ( u3_none != sit_u->loc ) {
+ if ( c3y == _n_fine(cor, sit_u->fin_u) ) {
+ loc = sit_u->loc;
+ if ( c3y == sit_u->jet_o ) {
+ pro = _n_hock(cor, sit_u);
+ }
+ }
+ }
+
+ if ( u3_none == loc ) {
loc = _n_spot(cor);
if ( u3_none != loc ) {
_n_fink* fon_u = NULL;
@@ -1765,10 +1776,12 @@ _n_kick(u3_noun cor, _n_site* sit_u)
}
}
}
+ }
if ( u3_none == pro ) {
pro = _n_lock(cor, sit_u);
}
+
return pro;
}
|
Fix cut/paste glitch | @@ -572,7 +572,7 @@ int blas_thread_init(void){
thread_status[i].status = THREAD_STATUS_WAKEUP;
pthread_mutex_init(&thread_status[i].lock, NULL);
- pthread_cond_init (&thread_status[i].wakeup, NULL)
+ pthread_cond_init (&thread_status[i].wakeup, NULL);
#ifdef NEED_STACKATTR
ret=pthread_create(&blas_threads[i], &attr,
|
improved help: inform user that some useful frames are filtered out, when running filtermode=2 | @@ -5735,7 +5735,7 @@ printf("%s %s (C) %s ZeroBeat\n"
" do not interact with ACCESS POINTs and CLIENTs from this list\n"
" 2: use filter list as target list\n"
" only interact with ACCESS POINTs and CLIENTs from this list\n"
- " not recommended, because important pre-authentication frames will be lost due to MAC randomization of the CLIENTs\n"
+ " not recommended, because some useful frames will be filtered out\n"
"--weakcandidate=<password> : use this pre shared key (8...63 characters) for weak candidate alert\n"
" will be saved to pcapng to inform hcxpcaptool\n"
" default: %s\n"
|
Add missing zeroing to identity algorithm in 16bit case | @@ -37,6 +37,7 @@ void hash__u16__u16__bufs__u32(uint16_t* result, enum_HashAlgorithm_t hash, uint
case enum_HashAlgorithm_identity:
{
+ *result = 0;
memcpy(result, data.buffer, data.buffer_size > 2 ? 2 : data.buffer_size);
}
break;
|
rand: fix coverity data race condition | @@ -158,7 +158,8 @@ int RAND_poll(void)
}
# ifndef OPENSSL_NO_DEPRECATED_3_0
-int RAND_set_rand_method(const RAND_METHOD *meth)
+static int rand_set_rand_method_internal(const RAND_METHOD *meth,
+ ossl_unused ENGINE *e)
{
if (!RUN_ONCE(&rand_init, do_rand_init))
return 0;
@@ -167,13 +168,18 @@ int RAND_set_rand_method(const RAND_METHOD *meth)
return 0;
# ifndef OPENSSL_NO_ENGINE
ENGINE_finish(funct_ref);
- funct_ref = NULL;
+ funct_ref = e;
# endif
default_RAND_meth = meth;
CRYPTO_THREAD_unlock(rand_meth_lock);
return 1;
}
+int RAND_set_rand_method(const RAND_METHOD *meth)
+{
+ return rand_set_rand_method_internal(meth, NULL);
+}
+
const RAND_METHOD *RAND_get_rand_method(void)
{
const RAND_METHOD *tmp_meth = NULL;
@@ -228,8 +234,7 @@ int RAND_set_rand_engine(ENGINE *engine)
}
/* This function releases any prior ENGINE so call it first */
- RAND_set_rand_method(tmp_meth);
- funct_ref = engine;
+ rand_set_rand_method_internal(tmp_meth, engine);
CRYPTO_THREAD_unlock(rand_engine_lock);
return 1;
}
|
sysdeps/managarm: Stub sys_umask | @@ -2832,6 +2832,13 @@ int sys_fchownat(int dirfd, const char *pathname, uid_t owner, gid_t group, int
return 0;
}
+int sys_umask(mode_t mode, mode_t *old) {
+ (void)mode;
+ mlibc::infoLogger() << "mlibc: sys_umask is a stub, hardcoding 022!" << frg::endlog;
+ *old = 022;
+ return 0;
+}
+
int sys_utimensat(int dirfd, const char *pathname, const struct timespec times[2], int flags) {
SignalGuard sguard;
|
add SRCFLAGS support 4 yasm command | @@ -2560,7 +2560,7 @@ class Yasm(object):
output = '${{output;noext;suf={}:SRC}}'.format('${OBJ_SUF}.o' if self.fmt != 'win' else '${OBJ_SUF}.obj')
print '''\
macro _SRC_yasm_impl(SRC, PREINCLUDES[], SRCFLAGS...) {{
- .CMD={} -f {}$HARDWARE_ARCH {} -D ${{pre=_;suf=_:HARDWARE_TYPE}} -D_YASM_ $ASM_PREFIX_VALUE {} ${{YASM_FLAGS}} ${{pre=-I :INCLUDE}} -o {} ${{pre=-P :PREINCLUDES}} ${{input;hide:PREINCLUDES}} ${{input:SRC}} ${{kv;hide:"p AS"}} ${{kv;hide:"pc light-green"}}
+ .CMD={} -f {}$HARDWARE_ARCH {} -D ${{pre=_;suf=_:HARDWARE_TYPE}} -D_YASM_ $ASM_PREFIX_VALUE {} ${{YASM_FLAGS}} ${{pre=-I :INCLUDE}} ${{SRCFLAGS}} -o {} ${{pre=-P :PREINCLUDES}} ${{input;hide:PREINCLUDES}} ${{input:SRC}} ${{kv;hide:"p AS"}} ${{kv;hide:"pc light-green"}}
}}
'''.format(self.yasm_tool, self.fmt, d_platform, ' '.join(self.flags), output)
|
hdata: MS AREA endian fix
[oliver: fix up drift] | @@ -512,14 +512,14 @@ static void add_memory_buffer_mmio(const struct HDIF_common_hdr *msarea)
const struct HDIF_array_hdr *array;
unsigned int i, count, ranges = 0;
struct dt_node *membuf;
- uint64_t *reg, *flags;
+ beint64_t *reg, *flags;
if (PVR_TYPE(mfspr(SPR_PVR)) != PVR_TYPE_P9P)
return;
- if (be32_to_cpu(msarea->version) < 0x50) {
+ if (be16_to_cpu(msarea->version) < 0x50) {
prlog(PR_WARNING, "MS AREA: Inconsistent MSAREA version %x for P9P system",
- be32_to_cpu(msarea->version));
+ be16_to_cpu(msarea->version));
return;
}
|
new version message fix | @@ -3348,10 +3348,11 @@ static void onHttpVesrsionGet(const net_get_data* data)
(version.major == TIC_VERSION_MAJOR && version.minor == TIC_VERSION_MINOR && version.patch > TIC_VERSION_REVISION))
{
char msg[TICNAME_MAX];
- sprintf(msg, " new version %i.%i.%i available\n", version.major, version.minor, version.patch);
+ sprintf(msg, " new version %i.%i.%i available", version.major, version.minor, version.patch);
enum{Offset = (2 * STUDIO_TEXT_BUFFER_WIDTH)};
+ memset(console->text + Offset, ' ', STUDIO_TEXT_BUFFER_WIDTH);
strcpy(console->text + Offset, msg);
memset(console->color + Offset, tic_color_red, strlen(msg));
}
|
desktop: fix wasPressed/wasReleased | @@ -24,6 +24,8 @@ static struct {
double prevCursorX;
double prevCursorY;
+ bool mouseDown;
+ bool prevMouseDown;
float offset;
float clipNear;
@@ -149,9 +151,8 @@ static bool desktop_isDown(Device device, DeviceButton button, bool* down, bool*
if (device != DEVICE_HAND_LEFT || button != BUTTON_TRIGGER) {
return false;
}
-
- *down = lovrPlatformIsMouseDown(MOUSE_RIGHT);
- *changed = false; // TODO
+ *down = state.mouseDown;
+ *changed = state.mouseDown != state.prevMouseDown;
return true;
}
@@ -225,6 +226,9 @@ static void desktop_update(float dt) {
state.prevCursorX = state.prevCursorY = -1;
}
+ state.prevMouseDown = state.mouseDown;
+ state.mouseDown = lovrPlatformIsMouseDown(MOUSE_RIGHT);
+
// Update velocity
state.localVelocity[0] = left ? -movespeed : (right ? movespeed : state.localVelocity[0]);
state.localVelocity[1] = up ? movespeed : (down ? -movespeed : state.localVelocity[1]);
|
doc: also mention to install git
+ say package name of ccmake | ## Dependencies
-For the base system you only need cmake and build-essential (make, gcc,
-some Unix tools):
+For the base system you only need cmake, git, and build-essential
+(make, gcc, and some standard Unix tools; alternatively ninja and
+clang are also supported but not described here):
- sudo apt-get install cmake build-essential
+ sudo apt-get install cmake git build-essential
Or on RPM based systems (CentOS):
- sudo yum install -y cmake3 gcc-c++
+ sudo yum install -y cmake3 git gcc-c++
Or on macOS Sierra, most of the build tools can be obtained by installing Xcode (from the App Store). Other required tools may be installed using [brew](http://brew.sh/). First install brew as described on their website. Then issue the following command to get cmake to complete the basic requirements:
- brew install cmake
+ brew install cmake git
## Quick Guide
@@ -28,7 +29,7 @@ cd libelektra
mkdir build
cd build
cmake .. # watch output to see if everything needed is included
-ccmake .. # optional: provides a console based GUI to give an overview of the available compilation options and settings
+ccmake .. # optional: overview of the available build settings (needs cmake-curses-gui)
make -j 5
make run_nokdbtests # optional: run tests
```
|
doc: write more about ENABLE_DEBUG
see | @@ -442,14 +442,20 @@ It is not recommended to use these options.
Build documentation with doxygen (API) and ronn (man pages).
+
#### Developer Options
-As developer you should enable `ENABLE_DEBUG` and `ENABLE_LOGGER`.
-By default no logging will take place, see [CODING](/doc/CODING.md)
-for information about logging.
+As developer you should enable `ENABLE_DEBUG` and `ENABLE_LOGGER`:
+- `ENABLE_DEBUG`:
+ - enables assertions
+ - adds RTLD_NODELETE so that debugger finds symbols even after dlclose
+- `ENABLE_LOGGER`:
+ enables logging
+ By default no logging will take place,
+ see [CODING](/doc/CODING.md) for how to get log messages.
+
+Continue reading [testing](/doc/TESTING.md) for more information about testing.
-Then continue reading [testing](/doc/TESTING.md) for options about
-testing.
#### `CMAKE_INSTALL_PREFIX`
|
py/parsenum: Adjust braces so they are balanced. | @@ -319,11 +319,13 @@ mp_obj_t mp_parse_num_decimal(const char *str, size_t len, bool allow_imag, bool
return mp_obj_new_complex(0, dec_val);
} else if (force_complex) {
return mp_obj_new_complex(dec_val, 0);
+ }
#else
if (imag || force_complex) {
raise_exc(mp_obj_new_exception_msg(&mp_type_ValueError, "complex values not supported"), lex);
+ }
#endif
- } else {
+ else {
return mp_obj_new_float(dec_val);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.