message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
doc BUGFIX fix typo | @@ -1582,7 +1582,7 @@ int sr_oper_get_items_subscribe(sr_session_ctx_t *session, const char *module_na
*/
/**
- * @brief Sysrepo plugin initialization callback name that must exists in every plugin.
+ * @brief Sysrepo plugin initialization callback name that must exist in every plugin.
*/
#define SRP_INIT_CB "sr_plugin_init_cb"
|
DLL_PROXY module and MAPSMOBI_SRCS macro | @@ -716,6 +716,7 @@ module BASE_UNIT {
module LINK_UNIT: BASE_UNIT {
.EXTS=.o .obj
.CMD=LINK_EXE
+ .ALLOWED=EXTRALIBS OBJADDE_GLOBAL
.NODE_TYPE=Program
.PEERDIR_POLICY=as_build_from
.FINAL_TARGET=yes
@@ -1307,7 +1308,6 @@ module DLL_UNIT: LINK_UNIT {
.CMD=LINK_DYN_LIB
.NODE_TYPE=Library
.SYMLINK_POLICY=SO
- .ALLOWED=EXTRALIBS OBJADDE_GLOBAL
.GLOBAL=USER_CFLAGS USER_CXXFLAGS LDFLAGS
ALLOCATOR(FAKE)
@@ -1455,6 +1455,31 @@ module DLL: DLL_UNIT {
###}
}
+DLL_PROXY_CMD_MF=$GENERATE_MF && $COPY_CMD $AUTO_INPUT $TARGET
+
+### @usage DEV_DLL_PROXY() # deprecated
+### Module declaration must be finished with the macro END()
+###
+### The use of this module is strictly prohibited!!!
+### This is a temporary and project-specific solution.
+module DEV_DLL_PROXY: BASE_UNIT {
+ .NODE_TYPE=Library
+ .EXTS=.so .dll .mf
+ .CMD=DLL_PROXY_CMD_MF
+
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_SUFFIX=.dll
+ }
+ elsewhen ($DARWIN == "yes" || $OS_IOS == "yes") {
+ MODULE_PREFIX=lib
+ MODULE_SUFFIX=.dylib$MODULE_VERSION
+ }
+ otherwise {
+ MODULE_PREFIX=lib
+ MODULE_SUFFIX=.so$MODULE_VERSION
+ }
+}
+
### In SRCS have indicated DLL_JAVA swig sources.
### Obtained from DLL_JAVA dynamic library is treated the same as in the case of PEERDIR to DLL.
### Obtained from DLL_JAVA jar goes on the classpath. Example.
@@ -3642,6 +3667,20 @@ macro MAPKIT_ADDINCL(Dirs...) {
SET_APPEND(MAPKIT_IDL_INCLUDES $Dirs)
}
+### @usage: MAPSMOBI_SRCS(filenames...)
+###
+### Make all source files listed as GLOBAL or not (depending on the value of
+### MAPSMOBI_USE_SRCS_GLOBAL). Be careful since the value of
+### MAPSMOBI_USE_SRCS_GLOBAL matters! If the value of this variable is equal to
+### GLOBAL then call to MAPSMOBI_SRCS() macro behaves like call to
+### GLOBAL_SRCS() macro otherwise the value of MAPSMOBI_USE_SRCS_GLOBAL is
+### treated as a file name and a call to MAPSMOBI_SRCS() macro behaves like a
+### call to SRCS() macro with additional iargument which is the value of
+### MAPSMOBI_USE_SRCS_GLOBAL variable
+macro MAPSMOBI_SRCS(FILES...) {
+ ALL_SRCS(${MAPSMOBI_USE_SRCS_GLOBAL} $FILES)
+}
+
### @usage: EXPORT_MAPKIT_PROTO()
### This macro is a temporary one and should be changed to EXPORT_YMAPS_PROTO
### when transition of mapsmobi to arcadia is finished
|
entrycmp_jump_fnv1a: sort keys as numbers if possible
Ensure that we treat numbers the way we document it.
Fixes issue | @@ -169,6 +169,9 @@ entrycmp_jump_fnv1a(const void *l, const void *r)
char *si_l = server_instance(ch_l->server);
char *si_r = server_instance(ch_r->server);
+ char *endp;
+ long val_l;
+ long val_r;
/* order such that servers with explicit instance come first
* (sorted), all servers without instance follow in order of their
@@ -179,6 +182,16 @@ entrycmp_jump_fnv1a(const void *l, const void *r)
return 1;
if (si_r == NULL)
return -1;
+
+ /* at this point we have two instances, try and see if both are
+ * numbers, if so, compare as such, else fall back to string
+ * comparison */
+ val_l = strtol(si_l, &endp, 10);
+ if (*endp == '\0') {
+ val_r = strtol(si_r, &endp, 10);
+ if (*endp == '\0')
+ return (int)(val_l - val_r);
+ }
return strcmp(si_l, si_r);
}
|
stm32/usbd_hid_interface: Address possible race condition vs. interrupt.
The USB IRQ may fire once USBD_HID_ClearNAK() is called and then change the
last_read_len value. | @@ -94,12 +94,13 @@ int usbd_hid_rx(usbd_hid_itf_t *hid, size_t len, uint8_t *buf, uint32_t timeout)
}
// Copy bytes from device to user buffer
- memcpy(buf, hid->buffer[hid->current_read_buffer], hid->last_read_len);
+ int read_len = hid->last_read_len;
+ memcpy(buf, hid->buffer[hid->current_read_buffer], read_len);
hid->current_read_buffer = !hid->current_read_buffer;
// Clear NAK to indicate we are ready to read more data
USBD_HID_ClearNAK(hid->usbd);
// Success, return number of bytes read
- return hid->last_read_len;
+ return read_len;
}
|
also consider path response in set_next_wake_time | @@ -236,11 +236,22 @@ protoop_arg_t set_nxt_wake_time(picoquic_cnx_t *cnx)
int nb_paths = (int) get_cnx(cnx, AK_CNX_NB_PATHS, 0);
PROTOOP_PRINTF(cnx, "Last packet size was %d\n", last_pkt_length);
+
+ /* If any receive path requires path response, do it now! */
+ for (int i = (nb_paths > 1); last_pkt_length > 0 && blocked != 0 && i < nb_paths; i++) {
+ picoquic_path_t *path_x = (picoquic_path_t *) get_cnx(cnx, AK_CNX_PATH, i);
+ pd = mp_get_path_data(bpfd, false, path_x);
+ if (pd == NULL) continue;
+ if (get_path(path_x, AK_PATH_CHALLENGE_RESPONSE_TO_SEND, 0) != 0) {
+ blocked = 0;
+ }
+ }
+
for (int i = (nb_paths > 1); last_pkt_length > 0 && blocked != 0 && i < nb_paths; i++) {
picoquic_path_t *path_x = (picoquic_path_t *) get_cnx(cnx, AK_CNX_PATH, i);
pd = mp_get_path_data(bpfd, true, path_x);
/* If the path is not active, don't expect anything! */
- if (pd != NULL && pd->state != path_active) {
+ if (pd == NULL || pd->state != path_active) {
continue;
}
uint64_t cwin_x = (uint64_t) get_path(path_x, AK_PATH_CWIN, 0);
|
Ensure we explicitly document the modulus for fixed-width arithmetic | @@ -167,6 +167,8 @@ int mbedtls_mpi_core_write_be( const mbedtls_mpi_uint *A,
* return carry;
* ```
*
+ * This function operates modulo `2^(biL*limbs)`.
+ *
* \param[in,out] X The pointer to the (little-endian) array
* representing the bignum to accumulate onto.
* \param[in] A The pointer to the (little-endian) array
@@ -217,6 +219,8 @@ mbedtls_mpi_uint mbedtls_mpi_core_sub( mbedtls_mpi_uint *X,
* \p X may be aliased to \p A (when \p X_limbs == \p A_limbs), but may not
* otherwise overlap.
*
+ * This function operates modulo `2^(biL*X_limbs)`.
+ *
* \param[in,out] X The pointer to the (little-endian) array
* representing the bignum to accumulate onto.
* \param X_limbs The number of limbs of \p X. This must be
|
example DOC update example plugin name | @@ -286,7 +286,7 @@ above is just basic and detailed descriptions of all these mechanisms can be fou
Before being concerned with this particular plugin, Sysrepo must be properly built and installed. Having done that,
you must install first the model, then the plugin. For installing the model, you can use [sysrepoctl](@ref sysrepoctl).
-Then, you must put the shared library `liboven.so` into [plugins path](@ref plugins_path).
+Then, you must put the shared library `oven.so` into [plugins path](@ref plugins_path).
After that you should be ready to start `sysrepo-plugind`, which should load the plugin. If you enable debug
messages, you should see that the `oven` plugin was successfully initialized.
|
Include mimalloc-redirect.dll with cmake install | @@ -303,6 +303,7 @@ if(MI_BUILD_SHARED)
add_custom_command(TARGET mimalloc POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" $<TARGET_FILE_DIR:mimalloc>
COMMENT "Copy mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll to output directory")
+ install(FILES "$<TARGET_FILE_DIR:mimalloc>/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" DESTINATION ${mi_install_libdir})
endif()
install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY)
|
VERSION bump to version 0.8.60 | @@ -28,7 +28,7 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0")
# set version
set(LIBNETCONF2_MAJOR_VERSION 0)
set(LIBNETCONF2_MINOR_VERSION 8)
-set(LIBNETCONF2_MICRO_VERSION 59)
+set(LIBNETCONF2_MICRO_VERSION 60)
set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
|
Added proper testing for the calc example | #include "test.h"
+#define P4CALC_ETYPE "1234"
+#define P4CALC_P "50" // 'P'
+#define P4CALC_4 "34" // '4'
+#define P4CALC_VER "01" // v0.1
+#define P4CALC_PLUS "2b" // '+'
+#define P4CALC_MINUS "2d" // '-'
+#define P4CALC_AND "26" // '&'
+#define P4CALC_OR "7c" // '|'
+#define P4CALC_XOR "5e" // '^'
+
fake_cmd_t t4p4s_testcase_common[][RTE_MAX_LCORE] = SINGLE_LCORE(
- FAST(1, 44, hETH4(ETH04, ETH1A))
+ FAST(1, DROP, hETH4(ETH04, ETH1A)),
+
+ FAST(1, DROP, hETH(ETH04, ETH1A, P4CALC_ETYPE), P4CALC_P, P4CALC_4, P4CALC_VER, "00", "00000002", "00000007", "00000000"),
+
+ FAST(10, 10, IN(hETH(ETH04, ETH1A, P4CALC_ETYPE))
+ , OUT(hETH(ETH1A, ETH04, P4CALC_ETYPE))
+ , P4CALC_P, P4CALC_4, P4CALC_VER, P4CALC_PLUS, "00000002", "00000007", INOUT("00000000", "00000009")),
+
+ FAST(10, 10, IN(hETH(ETH04, ETH1A, P4CALC_ETYPE))
+ , OUT(hETH(ETH1A, ETH04, P4CALC_ETYPE))
+ , P4CALC_P, P4CALC_4, P4CALC_VER, P4CALC_MINUS, "00000007", "00000002", INOUT("00000000", "00000005")),
+
+ FAST(10, 10, IN(hETH(ETH04, ETH1A, P4CALC_ETYPE))
+ , OUT(hETH(ETH1A, ETH04, P4CALC_ETYPE))
+ , P4CALC_P, P4CALC_4, P4CALC_VER, P4CALC_AND, "00000001", "00000001", INOUT("00000000", "00000001")),
+
+ FAST(10, 10, IN(hETH(ETH04, ETH1A, P4CALC_ETYPE))
+ , OUT(hETH(ETH1A, ETH04, P4CALC_ETYPE))
+ , P4CALC_P, P4CALC_4, P4CALC_VER, P4CALC_OR, "00000001", "00000010", INOUT("00000000", "00000011")),
+
+ FAST(10, 10, IN(hETH(ETH04, ETH1A, P4CALC_ETYPE))
+ , OUT(hETH(ETH1A, ETH04, P4CALC_ETYPE))
+ , P4CALC_P, P4CALC_4, P4CALC_VER, P4CALC_XOR, "00000011", "00000010", INOUT("00000000", "00000001"))
);
|
Increase the timeout of isolation2 GlobalShellExecutor
Probably because of the heavy CI load, we observed several timeouts,
increase the timeout value to work around it. | @@ -132,7 +132,7 @@ class GlobalShellExecutor(object):
output = ""
while self.sh_proc.poll() is None:
# If not returns in 10 seconds, consider it as an fatal error.
- r, w, e = select.select([self.master_fd], [], [self.master_fd], 10)
+ r, w, e = select.select([self.master_fd], [], [self.master_fd], 30)
if e:
# Terminate the shell when we get any output from stderr
o = os.read(self.master_fd, 10240)
|
Fix calculation of last used music bank | @@ -64,6 +64,7 @@ const compileMusic = async ({
// If current track fits into the current bank then store it
bankedData[bankedData.length - 1].size += musicData.size;
bankedData[bankedData.length - 1].tracks.push(musicData);
+ track.bank = bankedData[bankedData.length - 1].bank;
} else {
// Otherwise switch to new bank
bankedData.push({
@@ -71,6 +72,7 @@ const compileMusic = async ({
size: musicData.size,
tracks: [musicData],
});
+ track.bank = musicBanks[bankedData.length];
}
}
|
Simplify test/util.py:ppp. | @@ -19,15 +19,9 @@ from vpp_papi import mac_pton
def ppp(headline, packet):
""" Return string containing the output of scapy packet.show() call. """
- o = BytesIO()
- old_stdout = sys.stdout
- sys.stdout = o
- print(headline)
- hexdump(packet)
- print("")
- packet.show()
- sys.stdout = old_stdout
- return o.getvalue()
+ return '%s\n%s\n\n%s\n' % (headline,
+ hexdump(packet, dump=True),
+ packet.show(dump=True))
def ppc(headline, capture, limit=10):
|
http-client - bugfixes | @@ -69,11 +69,10 @@ on_error(struct neat_flow_operations *opCB)
{
fprintf(stderr, "%s\n", __func__);
struct stat_flow *stat = opCB->userData;
- uv_close((uv_handle_t*)&(stat->timer), NULL);
- int *result = (int*)opCB->userData;
- if (*result != EXIT_FAILURE)
- *result = EXIT_FAILURE;
+ if (stat) {
+ uv_close((uv_handle_t*)&(stat->timer), NULL);
+ }
neat_close(opCB->ctx, opCB->flow);
return NEAT_OK;
@@ -293,7 +292,6 @@ main(int argc, char *argv[])
ops[i].on_connected = on_connected;
ops[i].on_error = on_error;
ops[i].on_close = on_close;
- ops[i].userData = &result; // allow on_error to modify the result variable
neat_set_operations(ctx, flows[i], &(ops[i]));
// wait for on_connected or on_error to be invoked
|
Fix typos in process.h | @@ -11,18 +11,18 @@ enum {
// Processing failed. The output buffer must be discarded.
CLAP_PROCESS_ERROR = 0,
- // Processing succeed, keep processing.
+ // Processing succeeded, keep processing.
CLAP_PROCESS_CONTINUE = 1,
- // Processing succeed, keep processing if the output is not quiet.
+ // Processing succeeded, keep processing if the output is not quiet.
CLAP_PROCESS_CONTINUE_IF_NOT_QUIET = 2,
// Rely upon the plugin's tail to determine if the plugin should continue to process.
// see clap_plugin_tail
CLAP_PROCESS_TAIL = 3,
- // Processing succeed, but no more processing is required,
- // until next event or variation in audio input.
+ // Processing succeeded, but no more processing is required,
+ // until the next event or variation in audio input.
CLAP_PROCESS_SLEEP = 4,
};
typedef int32_t clap_process_status;
@@ -37,7 +37,7 @@ typedef struct clap_process {
// and must be increased by at least `frames_count` for the next call to process.
int64_t steady_time;
- // Number of frame to process
+ // Number of frames to process
uint32_t frames_count;
// time info at sample 0
|
drivers/pipes: fix write busy loop because POLLOUT always ready.
the size of pipes buffer +1 as compensate the full indicator | @@ -441,7 +441,7 @@ ssize_t pipecommon_read(FAR struct file *filep, FAR char *buffer, size_t len)
* FIFO when buffer can accept more than d_polloutthrd bytes.
*/
- if (pipecommon_bufferused(dev) < (dev->d_bufsize - dev->d_polloutthrd))
+ if (pipecommon_bufferused(dev) < (dev->d_bufsize - 1 - dev->d_polloutthrd))
{
poll_notify(dev->d_fds, CONFIG_DEV_PIPE_NPOLLWAITERS, POLLOUT);
}
@@ -699,7 +699,7 @@ int pipecommon_poll(FAR struct file *filep, FAR struct pollfd *fds,
eventset = 0;
if ((filep->f_oflags & O_WROK) &&
- nbytes < (dev->d_bufsize - dev->d_polloutthrd))
+ nbytes < (dev->d_bufsize - 1 - dev->d_polloutthrd))
{
eventset |= POLLOUT;
}
|
build: rename dockerize to withDOckerEnv
Other jenkinsfile instructions (withEnv, withCredentials, ...) are named
similarly. | @@ -248,7 +248,7 @@ def test_todo() {
**/*.c, **/*.h, **/*.hpp, **/*.cpp,\
**/CMakeLists.txt, **/Dockerfile*, Jenkinsfile*
'''
- return dockerize(test_name, DOCKER_IMAGES.stretch_doc) {
+ return withDockerEnv(test_name, DOCKER_IMAGES.stretch_doc) {
sh "sloccount --duplicates --wide --details ${WORKSPACE} > sloccount.sc"
step([$class: 'SloccountPublisher', ignoreBuildFailure: true])
openTasks pattern: open_task_patterns,
@@ -269,7 +269,7 @@ def test_doc() {
'BUILD_STATIC': 'OFF',
'BUILD_TESTING': 'OFF'
]
- return dockerize(test_name, DOCKER_IMAGES.stretch_doc) {
+ return withDockerEnv(test_name, DOCKER_IMAGES.stretch_doc) {
dir('build') {
deleteDir()
cmake(env.WORKSPACE, cmake_flags)
@@ -309,7 +309,7 @@ def test_asan(test_name, image, extra_cmake_flags = [:]) {
BUILD_FLAGS_ALL +
BUILD_FLAGS_ASAN +
extra_cmake_flags
- return dockerize(test_name, image) {
+ return withDockerEnv(test_name, image) {
dir('build') {
deleteDir()
cmake(env.WORKSPACE, cmake_flags)
@@ -335,7 +335,7 @@ def test(test_name, image, cmake_flags, tests = [], extra_artifacts = []) {
def test_nokdb = tests.contains(TEST_NOKDB)
def test_all = tests.contains(TEST_ALL)
def install = tests.contains(TEST_INSTALL)
- return dockerize(test_name, image) {
+ return withDockerEnv(test_name, image) {
try {
dir('build') {
deleteDir()
@@ -447,7 +447,7 @@ def trackCoverage(do_track, cl) {
}
}
-def dockerize(test_name, image, cl) {
+def withDockerEnv(test_name, image, cl) {
return [(test_name): {
stage(test_name) {
node(docker_node_label) {
|
Premultiply R,G and B when using transparency.
X11 uses premultiplied alpha for colors, i.e. white at 50% opacity is
represented as 0x7f7f7f7f, not 0x7fffffff. If we don't compensate for
this, the perceived opacity will increase and high intensity colors
can't be made transparent. | @@ -3485,9 +3485,17 @@ xloadcols(void)
/* set alpha value of bg color */
if (USE_ARGB) {
+ // X11 uses premultiplied alpha values (i.e. 50% opacity white is
+ // 0x7f7f7f7f, not 0x7fffffff), so multiply color by alpha
dc.col[defaultbg].color.alpha = (0xffff * alpha) / OPAQUE; //0xcccc;
- dc.col[defaultbg].pixel &= 0x00111111;
- dc.col[defaultbg].pixel |= alpha << 24; // 0xcc000000;
+ dc.col[defaultbg].color.red = (dc.col[defaultbg].color.red * alpha) / OPAQUE;
+ dc.col[defaultbg].color.green = (dc.col[defaultbg].color.green * alpha) / OPAQUE;
+ dc.col[defaultbg].color.blue = (dc.col[defaultbg].color.blue * alpha) / OPAQUE;
+
+ dc.col[defaultbg].pixel =
+ ((((dc.col[defaultbg].pixel & 0x00ff00ff) * alpha) / OPAQUE) & 0x00ff00ff) |
+ ((((dc.col[defaultbg].pixel & 0x0000ff00) * alpha) / OPAQUE) & 0x0000ff00) |
+ alpha << 24;
}
loaded = 1;
|
interface: inset by safe-area on iOS
Fixes urbit/landscape#242 | @@ -43,7 +43,11 @@ const Root = withState(styled.div`
font-family: ${p => p.theme.fonts.sans};
height: 100%;
width: 100%;
- padding: 0;
+ padding-left: env(safe-area-inset-left, 0px);
+ padding-right: env(safe-area-inset-right, 0px);
+ padding-top: env(safe-area-inset-top, 0px);
+ padding-bottom: env(safe-area-inset-bottom, 0px);
+
margin: 0;
${p => p.display.backgroundType === 'url' ? `
background-image: url('${p.display.background}');
|
Add a FAQ section for Wayland support
The video driver might need to be explicitly set to wayland.
Refs <https://github.com/Genymobile/scrcpy/issues/2554>
Refs <https://github.com/Genymobile/scrcpy/issues/2559> | @@ -153,6 +153,26 @@ You may also need to configure the [scaling behavior]:
[scaling behavior]: https://github.com/Genymobile/scrcpy/issues/40#issuecomment-424466723
+### Issue with Wayland
+
+By default, SDL uses x11 on Linux. The [video driver] can be changed via the
+`SDL_VIDEODRIVER` environment variable:
+
+[video driver]: https://wiki.libsdl.org/FAQUsingSDL#how_do_i_choose_a_specific_video_driver
+
+```bash
+export SDL_VIDEODRIVER=wayland
+scrcpy
+```
+
+On some distributions (at least Fedora), the package `libdecor` must be
+installed manually.
+
+See issues [#2554] and [#2559].
+
+[#2554]: https://github.com/Genymobile/scrcpy/issues/2554
+[#2559]: https://github.com/Genymobile/scrcpy/issues/2559
+
### KWin compositor crashes
|
Add check for NF_FEATURE_HAS_CONFIG_BLOCK on network build | @@ -560,6 +560,13 @@ if(USE_NETWORKING_OPTION)
message(STATUS "Support for networking enabled WITHOUT security")
endif()
+ # sanity check for missing configuration block option
+ # which is required for network
+
+ if(NOT NF_FEATURE_HAS_CONFIG_BLOCK)
+ message(FATAL_ERROR "\n\nERROR: network build requires NF_FEATURE_HAS_CONFIG_BLOCK build option to be 'ON'. Make sure you have that on your cmake-variants or in the build command line.")
+ endif()
+
else()
set(HAL_USE_MAC_OPTION FALSE CACHE INTERNAL "HAL MAC for USE_NETWORKING_OPTION")
message(STATUS "Support for networking IS NOT enabled")
|
Fix initial write directory set on windows; | @@ -127,7 +127,7 @@ const char* lovrFilesystemGetSaveDirectory() {
int lovrFilesystemGetSize(const char* path) {
PHYSFS_file* handle = PHYSFS_openRead(path);
if (!handle) {
- return 1;
+ return -1;
}
int length = PHYSFS_fileLength(handle);
@@ -210,12 +210,10 @@ int lovrFilesystemSetIdentity(const char* identity) {
}
}
- const char* sep = PHYSFS_getDirSeparator();
-
lovrFilesystemGetAppdataDirectory(state.savePathFull, LOVR_PATH_MAX);
PHYSFS_setWriteDir(state.savePathFull);
- snprintf(state.savePathRelative, LOVR_PATH_MAX, "LOVR%s%s", sep, identity);
- snprintf(state.savePathFull, LOVR_PATH_MAX, "%s%s%s", state.savePathFull, sep, state.savePathRelative);
+ snprintf(state.savePathRelative, LOVR_PATH_MAX, "LOVR/%s", identity);
+ snprintf(state.savePathFull, LOVR_PATH_MAX, "%s/%s", state.savePathFull, state.savePathRelative);
PHYSFS_mkdir(state.savePathRelative);
if (!PHYSFS_setWriteDir(state.savePathFull)) {
error("Could not set write directory");
|
test MAINTENANCE fix function casting warnings | @@ -400,16 +400,16 @@ test_output_clb(void **state)
assert_int_not_equal(-1, fd2 = open(filepath, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR));
/* manipulate with the handler */
- assert_int_equal(LY_SUCCESS, ly_out_new_clb((ssize_t (*)(void *, const void *, size_t))write, (void*)(intptr_t)fd1, &out));
+ assert_int_equal(LY_SUCCESS, ly_out_new_clb((void *)write, (void*)(intptr_t)fd1, &out));
assert_int_equal(LY_OUT_CALLBACK, ly_out_type(out));
assert_ptr_equal(fd1, ly_out_clb_arg(out, (void*)(intptr_t)fd2));
assert_ptr_equal(fd2, ly_out_clb_arg(out, NULL));
assert_ptr_equal(fd2, ly_out_clb_arg(out, (void*)(intptr_t)fd1));
- assert_ptr_equal(write, ly_out_clb(out, (ssize_t (*)(void *, const void *, size_t))write));
+ assert_ptr_equal(write, ly_out_clb(out, (void *)write));
ly_out_free(out, NULL, 0);
assert_int_equal(0, close(fd2));
- assert_int_equal(LY_SUCCESS, ly_out_new_clb((ssize_t (*)(void *, const void *, size_t))write, (void*)(intptr_t)fd1, &out));
- ly_out_free(out, (void (*)(void *))close, 0);
+ assert_int_equal(LY_SUCCESS, ly_out_new_clb((void *)write, (void*)(intptr_t)fd1, &out));
+ ly_out_free(out, (void *)close, 0);
/* writing data */
assert_int_not_equal(-1, fd1 = open(filepath, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR));
@@ -417,14 +417,14 @@ test_output_clb(void **state)
/* truncate file to start with no data */
assert_int_equal(0, ftruncate(fd1, 0));
- assert_int_equal(LY_SUCCESS, ly_out_new_clb((ssize_t (*)(void *, const void *, size_t))write, (void*)(intptr_t)fd1, &out));
+ assert_int_equal(LY_SUCCESS, ly_out_new_clb((void *)write, (void*)(intptr_t)fd1, &out));
assert_int_equal(LY_SUCCESS, ly_print(out, "test %s", "print"));
assert_int_equal(10, ly_out_printed(out));
assert_int_equal(10, read(fd2, buf, 30));
assert_string_equal("test print", buf);
close(fd2);
- ly_out_free(out, (void (*)(void *))close, 0);
+ ly_out_free(out, (void *)close, 0);
/* cleanup */
*state = NULL;
|
Messed up the addresses here | @@ -22,9 +22,6 @@ namespace FFXIVClientStructs.FFXIV.Client.UI
[FieldOffset(0x3F0)] public Utf8String String3F0;
[FieldOffset(0x458)] public Utf8String String458;
[FieldOffset(0x4C0)] public Utf8String String4C0;
- [FieldOffset(0x590)] public void* vtbl590;
- [FieldOffset(0x2F0)] public void* vtbl598;
- [FieldOffset(0x2F8)] public void* unk2F8;
[FieldOffset(0x5B8)] public AddonTalk* this5B8;
[FieldOffset(0x5C0)] public AtkStage* AtkStage;
}
|
mesh: Transport tx seg_o overflow
Increases the transport segmentented tx seg_o counter to 6 bits to avoid
overflow when sending 32 segments. The check in the send loop would
previously never be false, which causes segments to repeat
unnecessarily.
this is port of | @@ -78,11 +78,13 @@ static struct seg_tx {
ctl:1,
aszmic:1,
friend_cred:1;
- u8_t seg_o:5,
+ u8_t seg_o:6,/* Segment being sent. 6 bits to
+ * prevent overflow in loop.
+ */
started:1, /* Start cb called */
- sending:1, /* Sending is in progress */
+ sending:1; /* Sending is in progress */
+ u8_t nack_count:5, /* Number of unacked segs */
blocked:1; /* Blocked by ongoing tx */
- u8_t nack_count; /* Number of unacked segs */
u8_t ttl;
u8_t seg_pending:5, /* Number of segments pending */
attempts:3;
|
Solve bug in string for mock loader. | @@ -191,7 +191,7 @@ function_return function_mock_interface_invoke(function func, function_impl impl
{
static const char str[] = "Hello World";
- return value_create_string(str, sizeof(str) / sizeof(str[0]));
+ return value_create_string(str, sizeof(str) - 1);
}
else if (id == TYPE_PTR)
{
|
Simplify some testlib set_limit methods | @@ -290,8 +290,7 @@ int test_main(int argc, char** argv, proc* tests, proc* benches) {
// WUFFS_BASE_HEADER_H is where wuffs_base__io_buffer is defined.
#ifdef WUFFS_BASE_HEADER_H
-static inline wuffs_base__empty_struct wuffs_base__io_reader__set_limit(
- wuffs_base__io_reader* o,
+void wuffs_base__io_reader__set_limit(wuffs_base__io_reader* o,
uint64_t limit) {
if (o && o->private_impl.buf) {
uint8_t* p = o->private_impl.buf->ptr + o->private_impl.buf->ri;
@@ -304,11 +303,9 @@ static inline wuffs_base__empty_struct wuffs_base__io_reader__set_limit(
o->private_impl.bounds[1] = p + limit;
}
}
- return ((wuffs_base__empty_struct){});
}
-static inline wuffs_base__empty_struct wuffs_base__io_writer__set_limit(
- wuffs_base__io_writer* o,
+void wuffs_base__io_writer__set_limit(wuffs_base__io_writer* o,
uint64_t limit) {
if (o && o->private_impl.buf) {
uint8_t* p = o->private_impl.buf->ptr + o->private_impl.buf->wi;
@@ -321,7 +318,6 @@ static inline wuffs_base__empty_struct wuffs_base__io_writer__set_limit(
o->private_impl.bounds[1] = p + limit;
}
}
- return ((wuffs_base__empty_struct){});
}
bool read_file(wuffs_base__io_buffer* dst, const char* path) {
|
Compile: Remove unused option `GTEST_ROOT` | @@ -428,14 +428,6 @@ Similar to above, but with the plugins. Default is:
It can be also left empty to install plugins next
to other libraries.
-#### `GTEST_ROOT`
-
-Specifies the root of the GoogleTest sources, to be used
-for some of the tests. A `CMakeLists.txt` inside `GTEST_ROOT`
-will be searched as way to detect a valid GoogleTest source
-directory.
-If it is empty (`""`), an internal version of gtest will be used.
-
It is recommended that you browse through all of the options using ccmake.
Afterwards press 'c' again (maybe multiple times until all variables are
resolved) and then 'g' to generate. Finally press 'e' to exit.
|
Remove obsolete rac.ReaderContext comment | @@ -31,9 +31,6 @@ var (
// ReaderContext contains the decoded Codec-specific metadata (non-primary
// data) associated with a RAC chunk.
-//
-// Like the Reader type, users typically do not refer to this type directly.
-// Instead, they use higher level packages like the sibling "raczlib" package.
type ReaderContext struct {
Secondary []byte
Tertiary []byte
|
CBLK: Refuse giving out slots if device is in error | @@ -675,7 +675,7 @@ static int cache_unreserve(struct cache_way *e, off_t lba)
dfprintf(stderr, "[%s] err: LBA=%ld/%ld not consistent!\n",
__func__, lba, e->lba);
e->status = CACHE_BLOCK_UNUSED;
- __backtrace();
+ /* __backtrace(); */
pthread_mutex_unlock(&entry->way_lock);
return -1;
}
@@ -684,7 +684,7 @@ static int cache_unreserve(struct cache_way *e, off_t lba)
"cache from %s to UNUSED!\n",
__func__, e, lba, e->lba, block_status_str[e->status]);
e->status = CACHE_BLOCK_UNUSED;
- __backtrace();
+ /* __backtrace(); */
}
pthread_mutex_unlock(&entry->way_lock);
@@ -882,7 +882,7 @@ static struct cblk_req *get_read_req(struct cblk_dev *c,
unsigned int j;
struct cblk_req *req;
- while (1) {
+ while (c->status == CBLK_READY) {
sem_wait(&c->r_busy_sem);
pthread_mutex_lock(&c->dev_lock);
@@ -927,7 +927,7 @@ static struct cblk_req *get_write_req(struct cblk_dev *c,
int i, slot;
struct cblk_req *req;
- while (1) {
+ while (c->status == CBLK_READY) {
sem_wait(&c->w_busy_sem);
pthread_mutex_lock(&c->dev_lock);
|
Fix the mem_sec "small arena"
Fix the small arena test to just check for the symptom of the infinite
loop (i.e. initialized set on failure), rather than the actual infinite
loop. This avoids some valgrind errors. | @@ -68,12 +68,15 @@ static int test_sec_mem(void)
TEST_ptr_null(OPENSSL_secure_malloc((size_t)-1));
TEST_true(CRYPTO_secure_malloc_done());
- TEST_info("Possible infinite loop: small arena");
- if (!TEST_false(CRYPTO_secure_malloc_init(16, 16)))
- goto end;
- TEST_false(CRYPTO_secure_malloc_initialized());
- TEST_ptr_null(OPENSSL_secure_malloc((size_t)-1));
+ /*
+ * If init fails, then initialized should be false, if not, this
+ * could cause an infinite loop secure_malloc, but we don't test it
+ */
+ if (TEST_false(CRYPTO_secure_malloc_init(16, 16)) &&
+ !TEST_false(CRYPTO_secure_malloc_initialized())) {
TEST_true(CRYPTO_secure_malloc_done());
+ goto end;
+ }
/*-
* There was also a possible infinite loop when the number of
|
doc: OPAL_PCI_SHPC was never implemented | @@ -65,7 +65,8 @@ The OPAL API is the interface between an Operating System and OPAL.
+---------------------------------------------+--------------+------------------------+----------+-----------------+
| :ref:`OPAL_PCI_EEH_FREEZE_STATUS` | 23 | v1.0 (Initial Release) | POWER8 | |
+---------------------------------------------+--------------+------------------------+----------+-----------------+
-| :ref:`OPAL_PCI_SHPC` | 24 | v1.0 (Initial Release) | POWER8 | |
+| :ref:`OPAL_PCI_SHPC` | 24 | Never | POWER8 | Never |
+| | | | | Implemented |
+---------------------------------------------+--------------+------------------------+----------+-----------------+
| :ref:`OPAL_CONSOLE_WRITE_BUFFER_SPACE` | 25 | v1.0 (Initial Release) | POWER8 | |
+---------------------------------------------+--------------+------------------------+----------+-----------------+
@@ -383,6 +384,8 @@ removed and no longer supported.
+---------------------------------------------+-------+-----------------------+-----------------------+
| :ref:`OPAL_GET_COMPLETION_TOKEN_STATUS` | 21 | Never | |
+---------------------------------------------+-------+-----------------------+-----------------------+
+| :ref:`OPAL_PCI_SHPC` | 24 | Never | |
++---------------------------------------------+-------+-----------------------+-----------------------+
| :ref:`OPAL_WRITE_OPPANEL` | 43 | pre-v1.0 | pre-v1.0 |
+---------------------------------------------+-------+-----------------------+-----------------------+
| :ref:`OPAL_OLD_I2C_REQUEST` | 106 | v4.0 | v4.0 |
@@ -405,6 +408,14 @@ had a call called this.
This call has never been implemented, and never will be.
+.. _OPAL_PCI_SHPC:
+
+OPAL_PCI_SHPC
+^^^^^^^^^^^^^
+
+A remnant of a long forgotten incarnation of OPAL. Never implemented, never
+will be.
+
.. _OPAL_WRITE_OPPANEL:
OPAL_WRITE_OPPANEL
|
Make ESP32 Bluetooth stack architecture Doc only visible for ESP32 | @@ -18,6 +18,7 @@ ESP-IDF currently supports two host stacks. The Bluedroid based stack (default)
* For usecases involving classic Bluetooth as well as BLE, Bluedroid should be used.
* For BLE-only usecases, using NimBLE is recommended. It is less demanding in terms of code footprint and runtime memory, making it suitable for such scenarios.
+.. only:: esp32
For the overview of the ESP32 Bluetooth stack architecture, follow the links below:
|
armv7: Fixed hal_cpuReschedule not keeping return value | @@ -95,12 +95,17 @@ int hal_cpuCreateContext(cpu_context_t **nctx, void *start, void *kstack, size_t
int hal_cpuReschedule(spinlock_t *spinlock)
{
+ int err;
+
_hal_invokePendSV();
if (spinlock != NULL)
hal_spinlockClear(spinlock);
- return EOK;
+ /* We want to keep r0 from timeintr */
+ __asm__ volatile ("mov %0, r0" : "=r"(err));
+
+ return err;
}
|
`pthread_mutex_timedlock` never returns `EINTR`
According to posix spec, this function should never return `EINTR`.
This fixes the call to `pthread_mutex_take` so it keeps retrying the
lock and doesn't return `EINTR` | @@ -187,7 +187,7 @@ int pthread_mutex_timedlock(FAR pthread_mutex_t *mutex,
* or default mutex.
*/
- ret = pthread_mutex_take(mutex, abs_timeout, true);
+ ret = pthread_mutex_take(mutex, abs_timeout, false);
/* If we successfully obtained the semaphore, then indicate
* that we own it.
|
testcase/fs : fix fuction name of readdir_r & telldir
it didn't follow tc naming policy, add 'tc' as a prefix | @@ -969,7 +969,7 @@ static void tc_fs_vfs_seekdir(void)
* @precondition tc_fs_vfs_mkdir should be passed
* @postcondition NA
*/
-static void fs_libc_dirent_readdir_r(void)
+static void tc_fs_libc_dirent_readdir_r(void)
{
int ret, count;
DIR *dirp;
@@ -987,9 +987,9 @@ static void fs_libc_dirent_readdir_r(void)
}
count++;
}
+ TC_ASSERT_EQ("readdir_r", count, VFS_LOOP_COUNT);
ret = closedir(dirp);
TC_ASSERT_EQ("closedir", ret, OK);
- TC_ASSERT_EQ("readdir_r", count, VFS_LOOP_COUNT);
TC_SUCCESS_RESULT();
}
@@ -1001,7 +1001,7 @@ static void fs_libc_dirent_readdir_r(void)
* @precondition tc_fs_vfs_mkdir should be passed
* @postcondition NA
*/
-static void fs_libc_dirent_telldir(void)
+static void tc_fs_libc_dirent_telldir(void)
{
DIR *dirp;
off_t offset, res;
@@ -3533,8 +3533,8 @@ int tc_filesystem_main(int argc, char *argv[])
tc_fs_vfs_rewinddir();
tc_fs_vfs_seekdir();
tc_fs_vfs_closedir();
- fs_libc_dirent_readdir_r();
- fs_libc_dirent_telldir();
+ tc_fs_libc_dirent_readdir_r();
+ tc_fs_libc_dirent_telldir();
tc_fs_vfs_rmdir();
tc_fs_vfs_unlink();
tc_fs_vfs_stat();
|
Add bindings for SDL_GetQueuedAudioSize and SDL_ClearQueuedAudio | @@ -9,6 +9,13 @@ static int SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len)
{
return -1;
}
+static Uint32 SDL_GetQueuedAudioSize(SDL_AudioDeviceID)
+{
+ return 0;
+}
+static SDL_ClearQueuedAudio(SDL_AudioDeviceID dev)
+{
+}
#endif
#if !(SDL_VERSION_ATLEAST(2,0,5))
@@ -334,6 +341,15 @@ func DequeueAudio(dev AudioDeviceID, data []byte) error {
return nil
}
+// GetQueuedAudioSize (https://wiki.libsdl.org/SDL_GetQueuedAudioSize)
+func GetQueuedAudioSize(dev AudioDeviceID) uint32 {
+ return uint32(C.SDL_GetQueuedAudioSize(dev.c()))
+}
+
+// ClearQueuedAudio (https://wiki.libsdl.org/SDL_ClearQueuedAudio)
+func ClearQueuedAudio(dev AudioDeviceID) {
+ C.SDL_ClearQueuedAudio(dev.c())
+}
// MixAudio (https://wiki.libsdl.org/SDL_MixAudio)
func MixAudio(dst, src *uint8, len_ uint32, volume int) {
|
Fix memory leaks in derive tests. | #include <stdlib.h>
#include <tinyspline.h>
#include "CuTest.h"
+#include "utils.h"
#define EPSILON 0.0001
@@ -293,6 +294,7 @@ void derive_single_parabola_with_custom_knots(CuTest *tc)
&net, &result, &status))
CuAssertDblEquals(tc, ctrlp[0] + slope * (step * i),
result[0], EPSILON);
+ ts_deboornet_free(&net);
free(result);
result = NULL;
}
@@ -310,6 +312,7 @@ void derive_single_parabola_with_custom_knots(CuTest *tc)
TS_CALL(try, status.code, ts_deboornet_result(
&net, &result, &status))
CuAssertDblEquals(tc, slope, result[0], EPSILON);
+ ts_deboornet_free(&net);
free(result);
result = NULL;
}
@@ -639,9 +642,6 @@ void derive_compare_third_derivative_with_three_times(CuTest *tc)
tsBSpline spline = ts_bspline_init();
tsBSpline third = ts_bspline_init();
tsBSpline three = ts_bspline_init();
- tsDeBoorNet net = ts_deboornet_init();
- tsReal *result_third = NULL, *result_three = NULL;
- tsReal min, max, knot, dist;
tsStatus status;
tsReal ctrlp[8];
@@ -657,7 +657,6 @@ void derive_compare_third_derivative_with_three_times(CuTest *tc)
4, 2, 3, TS_OPENED, &spline, &status))
TS_CALL(try, status.code, ts_bspline_set_control_points(
&spline, ctrlp, &status))
- ts_bspline_domain(&spline, &min, &max);
/* ================================= When ================================== */
/* Create third (derive with n = 3). */
@@ -677,41 +676,13 @@ void derive_compare_third_derivative_with_three_times(CuTest *tc)
CuAssertTrue(tc, third.pImpl != three.pImpl);
/* Compare third and three. */
- for (knot = min; knot < max;
- knot += (max - min) / TS_MAX_NUM_KNOTS) {
-
- /* Eval third. */
- TS_CALL(try, status.code, ts_bspline_eval(
- &third, knot, &net, &status))
- TS_CALL(try, status.code, ts_deboornet_result(
- &net, &result_third, &status))
- ts_deboornet_free(&net);
-
- /* Eval three. */
- TS_CALL(try, status.code, ts_bspline_eval(
- &three, knot, &net, &status))
- TS_CALL(try, status.code, ts_deboornet_result(
- &net, &result_three, &status))
- ts_deboornet_free(&net);
-
- /* Compare results. */
- dist = ts_distance(result_third, result_three,
- ts_bspline_dimension(&spline));
- CuAssertDblEquals(tc, 0.f, dist, EPSILON);
- free(result_third);
- result_third = NULL;
- free(result_three);
- result_three = NULL;
- }
+ assert_equal_shape(tc, &third, &three);
TS_CATCH(status.code)
CuFail(tc, status.message);
TS_FINALLY
ts_bspline_free(&spline);
ts_bspline_free(&third);
ts_bspline_free(&three);
- ts_deboornet_free(&net);
- free(result_third);
- free(result_three);
TS_END_TRY
}
|
Add Some ... to Test.md | @@ -34,6 +34,7 @@ PS F:\msquic> .\scripts\test.ps1
...
[05/24/2021 08:17:55] 66 test(s) run.
[05/24/2021 08:17:56] F:\msquic\artifacts\bin\windows\x64_Debug_schannel\msquictest.exe (1681 test case(s))
+...
[05/24/2021 08:26:58] 1681 test(s) run.
[05/24/2021 08:26:58] Output can be found in F:\msquic\artifacts\logs\msquictest.exe\05.24.2021.08.17.55
Write-Error: 4 test(s) failed.
|
Fixing bug in check_cdd | @@ -29,29 +29,37 @@ using namespace std;
// Custom test to check the minimum number of correct decimal digits between
// the test and the ref vectors.
boost::test_tools::predicate_result check_cdd(std::vector<float>& test,
- std::vector<float>& ref, long cdd_tol)
-{
- float tmp, min_cdd = 100.0;
+ std::vector<float>& ref, long cdd_tol){
+ float tmp, min_cdd = 10.0;
- // TODO: What is the vectors aren't the same length?
+ // TODO: What if the vectors aren't the same length?
std::vector<float>::iterator test_it;
std::vector<float>::iterator ref_it;
- for (test_it = test.begin(); test_it < test.end(); ++test_it) {
- for (ref_it = ref.begin(); ref_it < ref.end(); ++ref_it) {
-
+ for (test_it = test.begin(), ref_it = ref.begin();
+ (test_it < test.end()) && (ref_it < ref.end());
+ ++test_it, ++ref_it)
+ {
if (*test_it != *ref_it) {
- tmp = - log10f(abs(*test_it - *ref_it));
- if (tmp < min_cdd) min_cdd = tmp;
- }
+ // Compute log absolute error
+ tmp = abs(*test_it - *ref_it);
+ if (tmp < 1.0e-7f)
+ tmp = 1.0e-7f;
+
+ else if (tmp > 2.0f)
+ tmp = 1.0f;
+
+ tmp = -log10(tmp);
+ if (tmp < 0.0f)
+ tmp = 0.0f;
+
+ if (tmp < min_cdd)
+ min_cdd = tmp;
}
}
- if (min_cdd == 100.0)
- return true;
- else
- return floor(min_cdd) <= cdd_tol;
+ return floor(min_cdd) >= cdd_tol;
}
boost::test_tools::predicate_result check_string(std::string test, std::string ref)
|
minor update for slider follow animation | @@ -43,7 +43,7 @@ def prepare_slider(diff, scale, skin):
cs = (54.4 - 4.48 * diff["CircleSize"]) * scale
radius_scale = cs * 2 / default_size
- interval = Settings.timeframe / Settings.fps
+ interval = 0.75 * Settings.timeframe / Settings.fps
follow_fadein = 150 # need 150ms to fadein
arrow_frames, sliderb_frames, sliderfollow_frames, slider_tick = load(radius_scale)
|
[core] reduce con allocation for small max_conns
reduce con allocation for small server.max_conns
(do not allocate structures that will never be used) | @@ -43,7 +43,7 @@ static connection *connections_get_new_connection(server *srv) {
size_t i;
if (conns->size == 0) {
- conns->size = 128;
+ conns->size = srv->max_conns >= 128 ? 128 : srv->max_conns > 16 ? 16 : srv->max_conns;
conns->ptr = NULL;
conns->ptr = malloc(sizeof(*conns->ptr) * conns->size);
force_assert(NULL != conns->ptr);
@@ -51,7 +51,7 @@ static connection *connections_get_new_connection(server *srv) {
conns->ptr[i] = connection_init(srv);
}
} else if (conns->size == conns->used) {
- conns->size += 128;
+ conns->size += srv->max_conns >= 128 ? 128 : 16;
conns->ptr = realloc(conns->ptr, sizeof(*conns->ptr) * conns->size);
force_assert(NULL != conns->ptr);
|
common/mag_cal.c: Format with clang-format
BRANCH=none
TEST=none | @@ -55,30 +55,21 @@ static int moc_eigen_test(struct mag_cal_t *moc)
int eigen_pass;
/* covariance matrix */
- S[0][0] = covariance_element(moc->kasa_fit.acc_xx,
- moc->kasa_fit.acc_x,
- moc->kasa_fit.acc_x,
- inv);
+ S[0][0] = covariance_element(moc->kasa_fit.acc_xx, moc->kasa_fit.acc_x,
+ moc->kasa_fit.acc_x, inv);
S[0][1] = S[1][0] = covariance_element(moc->kasa_fit.acc_xy,
moc->kasa_fit.acc_x,
- moc->kasa_fit.acc_y,
- inv);
+ moc->kasa_fit.acc_y, inv);
S[0][2] = S[2][0] = covariance_element(moc->kasa_fit.acc_xz,
moc->kasa_fit.acc_x,
- moc->kasa_fit.acc_z,
- inv);
- S[1][1] = covariance_element(moc->kasa_fit.acc_yy,
- moc->kasa_fit.acc_y,
- moc->kasa_fit.acc_y,
- inv);
+ moc->kasa_fit.acc_z, inv);
+ S[1][1] = covariance_element(moc->kasa_fit.acc_yy, moc->kasa_fit.acc_y,
+ moc->kasa_fit.acc_y, inv);
S[1][2] = S[2][1] = covariance_element(moc->kasa_fit.acc_yz,
moc->kasa_fit.acc_y,
- moc->kasa_fit.acc_z,
- inv);
- S[2][2] = covariance_element(moc->kasa_fit.acc_zz,
- moc->kasa_fit.acc_z,
- moc->kasa_fit.acc_z,
- inv);
+ moc->kasa_fit.acc_z, inv);
+ S[2][2] = covariance_element(moc->kasa_fit.acc_zz, moc->kasa_fit.acc_z,
+ moc->kasa_fit.acc_z, inv);
mat33_fp_get_eigenbasis(S, eigenvals, eigenvecs);
@@ -90,9 +81,8 @@ static int moc_eigen_test(struct mag_cal_t *moc)
evmag = fp_sqrtf(eigenvals[X] + eigenvals[Y] + eigenvals[Z]);
- eigen_pass = (fp_mul(evmin, MAX_EIGEN_RATIO) > evmax)
- && (evmag > MIN_EIGEN_MAG)
- && (evmag < MAX_EIGEN_MAG);
+ eigen_pass = (fp_mul(evmin, MAX_EIGEN_RATIO) > evmax) &&
+ (evmag > MIN_EIGEN_MAG) && (evmag < MAX_EIGEN_MAG);
#if 0
CPRINTF("mag eigenvalues: (%.02d %.02d %.02d), ",
|
Fix shifting issue in this file, waiting for validation. | @@ -64,43 +64,51 @@ void arm_softmax_q7(const q7_t * vec_in, const uint16_t dim_vec, q7_t * p_out)
{
q31_t sum;
int16_t i;
- q15_t min, max;
- max = -257;
- min = 257;
+ uint8_t shift;
+ q15_t base;
+ base = -257;
+
+ /* We first search for the maximum */
for (i = 0; i < dim_vec; i++)
{
- if (vec_in[i] > max)
- {
- max = vec_in[i];
- }
- if (vec_in[i] < min)
+ if (vec_in[i] > base)
{
- min = vec_in[i];
+ base = vec_in[i];
}
}
- /* we ignore really small values
- * anyway, they will be 0 after shrinking
- * to q7_t
+ /* So the base is set to max-8, meaning
+ * that we ignore really small values.
+ * anyway, they will be 0 after shrinking to q7_t.
*/
- if (max - min > 8)
- {
- min = max - 8;
- }
+ base = base - 8;
sum = 0;
for (i = 0; i < dim_vec; i++)
{
- sum += 0x1 << (vec_in[i] - min);
+ if (vec_in[i] > min) {
+ shift = (uint8_t)__USAT(vec_in[i] - min, 7);
+ sum += 0x1 << shift;
}
+ }
+
+ /* This is effectively (0x1 << 20) / sum */
+ int output_base = 0x100000 / sum;
+ /* Final confidence will be output_base >> ( 13 - (vec_in[i] - min) )
+ * so 128 (0x1<<7) -> 100% confidence when output_base = 0x1<<12 and vec_in[i]-min = 8
+ */
for (i = 0; i < dim_vec; i++)
{
- /* we leave 7-bit dynamic range, so that 128 -> 100% confidence */
- p_out[i] = (q7_t) __SSAT(((0x1 << (vec_in[i] - min + 20)) / sum) >> 13, 8);
+ if (vec_in[i] > min) {
+ /* Here minimum value of 13+min-vec_in[i] will be 5 */
+ shift = (uint8_t)__USAT(13+min-vec_in[i], 7);
+ p_out[i] = (q7_t) __SSAT((output_base >> shift), 8);
+ } else {
+ p_out[i] = 0;
+ }
}
-
}
/**
|
[account] minor, rename parameter | @@ -145,16 +145,16 @@ func hashBytes(b1 []byte, b2 []byte) []byte {
return h.Sum(nil)
}
-func encrypt(address, key, data []byte) ([]byte, error) {
+func encrypt(base, key, data []byte) ([]byte, error) {
block, err := aes.NewCipher(key)
if err != nil {
return nil, err
}
// Never use more than 2^32 random nonces with a given key because of the risk of a repeat.
- if len(address) < 16 {
+ if len(base) < 16 {
return nil, errors.New("too short address length")
}
- nonce := address[4:16]
+ nonce := base[4:16]
aesgcm, err := cipher.NewGCM(block)
if err != nil {
@@ -165,11 +165,11 @@ func encrypt(address, key, data []byte) ([]byte, error) {
return cipherbytes, nil
}
-func decrypt(address, key, data []byte) ([]byte, error) {
- if len(address) < 16 {
+func decrypt(base, key, data []byte) ([]byte, error) {
+ if len(base) < 16 {
return nil, errors.New("too short address length")
}
- nonce := address[4:16]
+ nonce := base[4:16]
block, err := aes.NewCipher(key)
if err != nil {
|
Fix style issues in mac_sign_verify_multi() | @@ -2721,21 +2721,21 @@ void mac_sign_verify_multi( int key_type_arg,
/* Split data into length(data_part_len) parts. */
mbedtls_test_set_step( 2000 + data_part_len );
- if( !mac_multipart_internal_func( key_type_arg, key_data,
+ if( mac_multipart_internal_func( key_type_arg, key_data,
alg_arg,
input, data_part_len,
expected_mac,
- is_verify, 0 ) )
+ is_verify, 0 ) == 0 )
break;
/* length(0) part, length(data_part_len) part, length(0) part... */
mbedtls_test_set_step( 3000 + data_part_len );
- if( !mac_multipart_internal_func( key_type_arg, key_data,
+ if( mac_multipart_internal_func( key_type_arg, key_data,
alg_arg,
input, data_part_len,
expected_mac,
- is_verify, 1 ) )
+ is_verify, 1 ) == 0 )
break;
}
|
SOVERSION bump to version 5.6.21 | @@ -54,7 +54,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 5)
set(SYSREPO_MINOR_SOVERSION 6)
-set(SYSREPO_MICRO_SOVERSION 20)
+set(SYSREPO_MICRO_SOVERSION 21)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
libbpf-tools: Allow filelife to run on kernels without CONIFG_SECURITY
security_inode_create does NOT exist if CONIFG_SECURITY is not set.
The tool filelife attaches to security_inode_create unconditionally
and result in attach error. Fix it by checking symbol existence. | @@ -138,6 +138,9 @@ int main(int argc, char **argv)
/* initialize global data (filtering options) */
obj->rodata->targ_tgid = env.pid;
+ if (!kprobe_exists("security_inode_create"))
+ bpf_program__set_autoload(obj->progs.security_inode_create, false);
+
err = filelife_bpf__load(obj);
if (err) {
fprintf(stderr, "failed to load BPF object: %d\n", err);
|
Changed HTTP duration to ms from us. | @@ -257,7 +257,7 @@ doHttpHeader(protocol_info *proto)
map->duration = 0;
} else {
map->duration = getDurationNow(post->start_duration, map->start_time);
- map->duration = map->duration / 1000;
+ map->duration = map->duration / 1000000;
}
size_t status = getHttpStatus((char *)map->resp, proto->len);
|
Fix fix code. | @@ -365,12 +365,12 @@ ldns_rr_new_frm_str_internal(ldns_rr **newrr, const char *str,
ldns_buffer_remaining(rd_buf) > 0){
/* skip spaces */
- while (sldns_buffer_remaining(strbuf) > 0 &&
+ while (ldns_buffer_remaining(rd_buf) > 0 &&
*(ldns_buffer_current(rd_buf)) == ' ') {
ldns_buffer_skip(rd_buf, 1);
}
- if (sldns_buffer_remaining(strbuf) > 0 &&
+ if (ldns_buffer_remaining(rd_buf) > 0 &&
*(ldns_buffer_current(rd_buf)) == '\"') {
delimiters = "\"\0";
ldns_buffer_skip(rd_buf, 1);
|
Added csched_sp3_test to non-deterministic suite | @@ -53,6 +53,9 @@ components = {
'cn_tree_test': {},
'csched_noop_test': {},
'csched_sp3_test': {
+ # mapi_malloc_tester isn't reliable in multithreaded environments. Add to
+ # non-deterministic suite
+ 'suites': ['non-deterministic'],
'cases': {
'default': [],
'debug': ['debug'],
|
win32: appveyor - another try with zipping rhosim | @@ -14,7 +14,7 @@ environment:
app_name: RhoSimulator
target_os: win32
target_artefact_path: C:\Ruby23\lib\ruby\gems\2.3.0\gems\rhodes-6.0.0\platform\win32\RhoSimulator\
- target_artefact_file_name: "*"
+ target_artefact_file_name:
- win32_auto_common_spec:
testable_application_repository: https://github.com/rhomobile/RMS-Testing.git
|
PHP SAPI: typo fixed. | @@ -503,7 +503,7 @@ nxt_php_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
"\r\n";
static const u_char default_headers[]
- - "Server: unit/" NXT_VERSION "\r\n"
+ = "Server: unit/" NXT_VERSION "\r\n"
"Connection: close\r\n";
static const u_char http_11[] = "HTTP/1.1 ";
|
LPC55xx: added DAPLink info to gcc vector table. | @@ -32,12 +32,12 @@ __isr_vector:
.long BusFault_Handler /* Bus Fault Handler*/
.long UsageFault_Handler /* Usage Fault Handler*/
.long SecureFault_Handler /* Secure Fault Handler*/
- .long 0 /* Reserved*/
- .long 0 /* Reserved*/
- .long 0 /* Reserved*/
+ .long DAPLINK_BUILD_KEY /* Build type - BL/IF*/
+ .long DAPLINK_HIC_ID /* Compatibility*/
+ .long DAPLINK_VERSION /* Version*/
.long SVC_Handler /* SVCall Handler*/
.long DebugMon_Handler /* Debug Monitor Handler*/
- .long 0 /* Reserved*/
+ .long g_board_info /* Ptr to Board info, family info other target details*/
.long PendSV_Handler /* PendSV Handler*/
.long SysTick_Handler /* SysTick Handler*/
|
is_pure_trans argument is implemented to slightly improve the performance. | @@ -92,7 +92,8 @@ static Symmetry * get_operations(const Cell *primitive,
static Symmetry * reduce_operation(const Cell * primitive,
const Symmetry * symmetry,
const double symprec,
- const double angle_symprec);
+ const double angle_symprec,
+ const int is_pure_trans);
static int search_translation_part(int atoms_found[],
const Cell * cell,
SPGCONST int rot[3][3],
@@ -200,7 +201,7 @@ Symmetry * sym_reduce_operation(const Cell * primitive,
const double symprec,
const double angle_tolerance)
{
- return reduce_operation(primitive, symmetry, symprec, angle_tolerance);
+ return reduce_operation(primitive, symmetry, symprec, angle_tolerance, 0);
}
/* Return NULL if failed */
@@ -226,7 +227,8 @@ VecDBL * sym_get_pure_translation(const Cell *cell,
debug_print(" sym_get_pure_translation: pure_trans->size = %d\n", multi);
} else {
;
- warning_print("spglib: Finding pure translation failed (line %d, %s).\n", __LINE__, __FILE__);
+ warning_print("spglib: Finding pure translation failed (line %d, %s).\n",
+ __LINE__, __FILE__);
warning_print(" cell->size %d, multi %d\n", cell->size, multi);
}
@@ -259,7 +261,7 @@ VecDBL * sym_reduce_pure_translation(const Cell * cell,
}
if ((symmetry_reduced =
- reduce_operation(cell, symmetry, symprec, angle_tolerance)) == NULL) {
+ reduce_operation(cell, symmetry, symprec, angle_tolerance, 1)) == NULL) {
sym_free_symmetry(symmetry);
symmetry = NULL;
return NULL;
@@ -324,7 +326,8 @@ static Symmetry * get_operations(const Cell *primitive,
static Symmetry * reduce_operation(const Cell * primitive,
const Symmetry * symmetry,
const double symprec,
- const double angle_symprec)
+ const double angle_symprec,
+ const int is_pure_trans)
{
int i, j, num_sym;
Symmetry * sym_reduced;
@@ -338,12 +341,17 @@ static Symmetry * reduce_operation(const Cell * primitive,
rot = NULL;
trans = NULL;
+ if (is_pure_trans) {
+ point_symmetry.size = 1;
+ mat_copy_matrix_i3(point_symmetry.rot[0], identity);
+ } else {
point_symmetry = get_lattice_symmetry(primitive->lattice,
symprec,
angle_symprec);
if (point_symmetry.size == 0) {
return NULL;
}
+ }
if ((rot = mat_alloc_MatINT(symmetry->size)) == NULL) {
return NULL;
|
doc: add params argument to key manager's gen_init call
Fixes | @@ -19,7 +19,8 @@ provider-keymgmt - The KEYMGMT library E<lt>-E<gt> provider functions
void OSSL_FUNC_keymgmt_free(void *keydata);
/* Generation, a more complex constructor */
- void *OSSL_FUNC_keymgmt_gen_init(void *provctx, int selection);
+ void *OSSL_FUNC_keymgmt_gen_init(void *provctx, int selection,
+ const OSSL_PARAM params[]);
int OSSL_FUNC_keymgmt_gen_set_template(void *genctx, void *template);
int OSSL_FUNC_keymgmt_gen_set_params(void *genctx, const OSSL_PARAM params[]);
const OSSL_PARAM *OSSL_FUNC_keymgmt_gen_settable_params(void *genctx,
@@ -221,7 +222,8 @@ more elaborate context based key object constructor.
OSSL_FUNC_keymgmt_gen_init() should create the key object generation context
and initialize it with I<selections>, which will determine what kind
-of contents the key object to be generated should get.
+of contents the key object to be generated should get. The I<params>, if
+not NULL, should be set on the generation context.
OSSL_FUNC_keymgmt_gen_set_template() should add I<template> to the context
I<genctx>. The I<template> is assumed to be a key object constructed
|
Add Z to end of timestamp. | @@ -59,7 +59,7 @@ class Framer(object):
-------
str : ISO 8601 format timestamp
"""
- return datetime.datetime.utcnow().isoformat()
+ return datetime.datetime.utcnow().isoformat() + 'Z'
def next(self):
msg = None
|
Modify travis config file
remove 'group' as the definition changed in travis
add 'qemu/tc_64k' build config for check build status | sudo: false
dist: trusty
-group: deprecated-2017Q2
-
language: c
services:
-
- docker
env:
-- BUILD_CONFIG=tash
-- BUILD_CONFIG=nettest
-- BUILD_CONFIG=minimal
-- BUILD_CONFIG=tc
+- BUILD_CONFIG=artik053/tash
+- BUILD_CONFIG=artik053/nettest
+- BUILD_CONFIG=artik053/minimal
+- BUILD_CONFIG=artik053/tc
+- BUILD_CONFIG=qemu/tc_64k
before_install:
@@ -25,6 +23,6 @@ script:
- docker run -d -it --name tizenrt_docker -v ${TRAVIS_BUILD_DIR}:/root/tizenrt -w /root/tizenrt/os an4967/tizenrt:1.1 /bin/bash
- docker exec tizenrt_docker make distclean
-- docker exec -it tizenrt_docker bash -c "cd tools; ./configure.sh artik053/${BUILD_CONFIG}"
+- docker exec -it tizenrt_docker bash -c "cd tools; ./configure.sh ${BUILD_CONFIG}"
- docker exec -it tizenrt_docker bash -c "export PATH=/root/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH;make;"
|
Make aomp+mappings pass for older runtimes as well as new | @@ -336,7 +336,8 @@ int main()
recordError(&errors, "DEVICE NUMBER", i, default_dev, NULL);
//check warp #
- if (warp_id[i] != (MAX_THREADS_PER_TEAM - WARP_SIZE) / WARP_SIZE +1)
+ if ((warp_id[i] != (MAX_THREADS_PER_TEAM - WARP_SIZE) / WARP_SIZE) &&
+ (warp_id[i] != (MAX_THREADS_PER_TEAM - WARP_SIZE) / WARP_SIZE +1))
recordError(&errors, "WARP NUMBER", i, warp_id, NULL);
//check lane #
@@ -344,7 +345,8 @@ int main()
recordError(&errors, "LANE NUMBER", i, lane_id, NULL);
//check master thread #
- if (master_thread_id[i] != MAX_THREADS_PER_TEAM)
+ if ((master_thread_id[i] != MAX_THREADS_PER_TEAM - WARP_SIZE) &&
+ (master_thread_id[i] != MAX_THREADS_PER_TEAM))
recordError(&errors, "MASTER THREAD NUMBER", i, master_thread_id, NULL);
//check SPMD mode #
|
stm32l1.c: compiler warning removed | @@ -760,8 +760,10 @@ int _stm32_systickInit(u32 interval)
void _stm32_systickSet(u8 state)
{
- *(stm32_common.stk + stk_ctrl) &= ~(!state);
- *(stm32_common.stk + stk_ctrl) |= !!state;
+ if (state > 0)
+ *(stm32_common.stk + stk_ctrl) |= 1;
+ else
+ *(stm32_common.stk + stk_ctrl) &= ~1;
}
|
Fix bug in HMAC implementation. | ++ hmac-sha512l (cury hmac sha-512l 128 64)
::
++ hmac
- :: boq: block size used by haj
+ :: boq: block size in bytes used by haj
:: out: bytes output by haj
|* [[haj=$-([@u @] @) boq=@u out=@u] [kl=@u key=@] [ml=@u msg=@]]
- :: ensure key and message fit signalled lengths
+ :: ensure key and message fit signaled lengths
+ ::TODO other crypto implementations should do this too, probably
=. key (end 3 kl key)
=. msg (end 3 ml msg)
:: keys longer than block size are shortened by hashing
=+ kip=(mix key (fil 3 boq 0x36))
=+ kop=(mix key (fil 3 boq 0x5c))
:: append inner padding to message, then hash
- =+ (haj (add ml boq) (add (lsh 3 boq msg) kip))
+ =+ (haj (add ml boq) (add (lsh 3 ml kip) msg))
:: prepend outer padding to result, hash again
(haj (add out boq) (add (lsh 3 out kop) -))
--
|
Rename offset and xsetid tags
There's really no point in having dedicated flags to test these features
(why shouldn't all commands/features get their own tag?) | @@ -752,7 +752,7 @@ start_server {tags {"stream needs:debug"} overrides {appendonly yes stream-node-
}
}
-start_server {tags {"stream xsetid"}} {
+start_server {tags {"stream"}} {
test {XADD can CREATE an empty stream} {
r XADD mystream MAXLEN 0 * a b
assert {[dict get [r xinfo stream mystream] length] == 0}
@@ -811,7 +811,7 @@ start_server {tags {"stream xsetid"}} {
} {ERR *smaller*}
}
-start_server {tags {"stream offset"}} {
+start_server {tags {"stream"}} {
test {XADD advances the entries-added counter and sets the recorded-first-entry-id} {
r DEL x
r XADD x 1-0 data a
|
ExtendedServices: Fix icon sizes | @@ -775,9 +775,11 @@ INT_PTR CALLBACK EspPnPServiceDlgProc(
PhAddListViewGroup(context->ListViewHandle, 1, L"Disconnected");
context->ImageList = PhImageListCreate(
- PhGetSystemMetrics(SM_CXSMICON, dpiValue),
- PhGetSystemMetrics(SM_CYSMICON, dpiValue),
- ILC_MASK | ILC_COLOR32, 1, 1);
+ PhGetDpi(24, dpiValue), // PhGetSystemMetrics(SM_CXSMICON, dpiValue)
+ PhGetDpi(24, dpiValue), // PhGetSystemMetrics(SM_CYSMICON, dpiValue)
+ ILC_MASK | ILC_COLOR32,
+ 1, 1
+ );
ListView_SetImageList(context->ListViewHandle, context->ImageList, LVSIL_SMALL);
if (context->ServiceItem->Type & SERVICE_DRIVER)
|
Documentation restructured, Interrupt usage clearified | @@ -751,9 +751,7 @@ WARN_LOGFILE =
# Note: If this tag is empty the current directory is searched.
INPUT = . \
- ../../RTOS2/Include/cmsis_os2.h \
- ../../RTOS2/Include/os_tick.h \
- ../../RTOS2/Source/os_systick.c \
+ ./src/mainpage.txt \
./src/cmsis_os2.txt \
./src/cmsis_os2_Kernel.txt \
./src/cmsis_os2_Thread.txt \
@@ -770,9 +768,11 @@ INPUT = . \
./src/cmsis_os2_MigrationGuide.txt \
./src/cmsis_os2_tick.txt \
./src/rtx_os.txt \
+ ./src/rtx_evr.txt \
+ ../../RTOS2/Include/cmsis_os2.h \
+ ../../RTOS2/Include/os_tick.h \
../../RTOS2/RTX/Include/rtx_os.h \
- ../../RTOS2/RTX/Include/rtx_evr.h \
- ./src/rtx_evr.txt
+ ../../RTOS2/RTX/Include/rtx_evr.h
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
Init timers with pulse of 0
Initialising the timers with a pulse value will cause an unwanted PWM signal between timer init and user code init. | @@ -62,7 +62,7 @@ void MX_TIM3_Init(void)
Error_Handler();
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
- sConfigOC.Pulse = 5000;
+ sConfigOC.Pulse = 0;
sConfigOC.OCPolarity = TIM_OCPOLARITY_LOW;
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_2) != HAL_OK)
@@ -113,7 +113,7 @@ void MX_TIM4_Init(void)
Error_Handler();
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
- sConfigOC.Pulse = 2000; // TODO: Exported from STM Cube as 0
+ sConfigOC.Pulse = 0; // TODO: Exported from STM Cube as 0
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
if (HAL_TIM_PWM_ConfigChannel(&htim4, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
@@ -180,7 +180,7 @@ void MX_TIM15_Init(void)
Error_Handler();
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
- sConfigOC.Pulse = 5000; // TODO: Exported from STM Cube as 0
+ sConfigOC.Pulse = 0; // TODO: Exported from STM Cube as 0
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
sConfigOC.OCNPolarity = TIM_OCNPOLARITY_HIGH;
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
@@ -315,9 +315,6 @@ void HAL_TIM_MspPostInit(TIM_HandleTypeDef* timHandle)
HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_3); // Red LED
HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_4); // Green LED
- __HAL_TIM_SetCompare(&htim3, TIM_CHANNEL_2, 10000);
- __HAL_TIM_SetCompare(&htim3, TIM_CHANNEL_3, 0);
- __HAL_TIM_SetCompare(&htim3, TIM_CHANNEL_4, 0);
/* USER CODE END TIM3_MspPostInit 1 */
}
else if(timHandle->Instance==TIM4)
@@ -360,7 +357,6 @@ void HAL_TIM_MspPostInit(TIM_HandleTypeDef* timHandle)
/* USER CODE BEGIN TIM15_MspPostInit 1 */
HAL_TIM_PWM_Start(&htim15, TIM_CHANNEL_1);
- __HAL_TIM_SetCompare(&htim15, TIM_CHANNEL_1, 2000);
/* USER CODE END TIM15_MspPostInit 1 */
}
|
format: improve pre-commit-check | @@ -69,8 +69,14 @@ if [ -n "$UNFORMATTED_FILES" ]; then
echo "A diff of the formatting changes is stored at:"
echo "$PATCH_FILE"
+ PATCH_SCRIPT="/tmp/elektra-$DATE-reformat.patch.sh"
+ echo 'OLD_DIR=$(pwd)' > "$PATCH_SCRIPT"
+ echo "cd $SRC_ROOT" >> "$PATCH_SCRIPT"
+ echo "git apply $PATCH_FILE" >> "$PATCH_SCRIPT"
+ echo 'cd $OLD_DIR' >> "$PATCH_SCRIPT"
+
echo "You can try to apply it with, but unstaged changes may cause conflicts:"
- echo "git apply $PATCH_FILE"
+ echo "sh $PATCH_SCRIPT"
exit 1
fi
|
dwalk options | @@ -306,8 +306,8 @@ static void print_usage(void)
printf(" -t, --text - use with -o; write processed list to file in ascii format\n");
printf(" -l, --lite - walk file system without stat\n");
printf(" -s, --sort <fields> - sort output by comma-delimited fields\n");
- printf(" -f, --file_histogram - print default size distribution of items\n");
printf(" -d, --distribution <field>:<separators> \n - print distribution by field\n");
+ printf(" -f, --file_histogram - print default size distribution of items\n");
printf(" -p, --print - print files to screen\n");
printf(" -v, --verbose - verbose output\n");
printf(" -q, --quiet - quiet output\n");
@@ -366,21 +366,22 @@ int main(int argc, char** argv)
static struct option long_options[] = {
{"input", 1, 0, 'i'},
{"output", 1, 0, 'o'},
+ {"text", 0, 0, 't'},
{"lite", 0, 0, 'l'},
{"sort", 1, 0, 's'},
{"distribution", 1, 0, 'd'},
{"file_histogram", 0, 0, 'f'},
{"print", 0, 0, 'p'},
{"verbose", 0, 0, 'v'},
+ {"quiet", 0, 0, 'q'}
{"help", 0, 0, 'h'},
- {"text", 0, 0, 't'},
{0, 0, 0, 0}
};
int usage = 0;
while (1) {
int c = getopt_long(
- argc, argv, "i:o:ls:d:pvhtf",
+ argc, argv, "i:o:tls:d:fpvqh",
long_options, &option_index
);
|
testcase/task_manager: Add sleep for waiting to restart the task
Current TC, task_manager tries to stop the task before restarting completely.
So stop callback didn't work.
Add sleep for waiting to restart completely. | @@ -733,6 +733,7 @@ static void utc_task_manager_stop_p(void)
{
int ret;
+ sleep(1);
cb_flag = false;
ret = task_manager_stop(tm_sample_handle, TM_RESPONSE_WAIT_INF);
TC_ASSERT_EQ("task_manager_stop", ret, OK);
@@ -1050,9 +1051,9 @@ int utc_task_manager_main(int argc, char *argv[])
handle_tm_utc = task_manager_register_builtin("tm_utc", TM_APP_PERMISSION_DEDICATE, TM_RESPONSE_WAIT_INF);
(void)task_manager_start(handle_tm_utc, TM_NO_RESPONSE);
- sleep(3); //wait for starting tm_utc
+ sleep(5); //wait for starting tm_utc
- waitpid(pid_tm_utc, &status, 0);
+ (void)waitpid(pid_tm_utc, &status, 0);
(void)task_manager_unregister(handle_tm_utc, TM_NO_RESPONSE);
|
Update: Memory: return on direct find | @@ -87,6 +87,7 @@ bool Memory_getClosestConcept(Event *event, int *returnIndex)
if(Memory_FindConceptBySDR(&event->sdr, event->sdr_hash, &foundSameConcept_i))
{
*returnIndex = foundSameConcept_i;
+ return true;
}
int best_i = -1;
double bestValSoFar = -1;
|
Update d2i_PrivateKey documentation | @@ -50,15 +50,19 @@ If the B<*a> is not NULL when calling d2i_PrivateKey() or d2i_AutoPrivateKey()
(i.e. an existing structure is being reused) and the key format is PKCS#8
then B<*a> will be freed and replaced on a successful call.
+To decode a key with type B<EVP_PKEY_EC>, d2i_PublicKey() requires B<*a> to be
+a non-NULL EVP_PKEY structure assigned an EC_KEY structure referencing the proper
+EC_GROUP.
+
=head1 RETURN VALUES
-d2i_PrivateKey() and d2i_AutoPrivateKey() return a valid B<EVP_KEY> structure
-or B<NULL> if an error occurs. The error code can be obtained by calling
-L<ERR_get_error(3)>.
+The d2i_PrivateKey(), d2i_AutoPrivateKey(), d2i_PrivateKey_bio(), d2i_PrivateKey_fp(),
+and d2i_PublicKey() functions return a valid B<EVP_KEY> structure or B<NULL> if an
+error occurs. The error code can be obtained by calling L<ERR_get_error(3)>.
-i2d_PrivateKey() returns the number of bytes successfully encoded or a
-negative value if an error occurs. The error code can be obtained by calling
-L<ERR_get_error(3)>.
+i2d_PrivateKey() and i2d_PublicKey() return the number of bytes successfully
+encoded or a negative value if an error occurs. The error code can be obtained
+by calling L<ERR_get_error(3)>.
=head1 SEE ALSO
@@ -67,7 +71,7 @@ L<d2i_PKCS8PrivateKey_bio(3)>
=head1 COPYRIGHT
-Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy
|
fixed bug in MP12E2 | @@ -1144,6 +1144,7 @@ while(c >= 0)
return;
}
/*===========================================================================*/
+/*
static void lookfor21(long int cakt, eapdb_t *zeigerakt, unsigned long long int replaycakt)
{
eapdb_t *zeiger;
@@ -1181,6 +1182,7 @@ while(c >= 0)
}
return;
}
+*/
/*===========================================================================*/
static void lookfor12(long int cakt, eapdb_t *zeigerakt, unsigned long long int replaycakt)
{
@@ -1272,10 +1274,12 @@ memcpy(neweapdbdata->eapol, eap, neweapdbdata->eapol_len);
m = geteapkey(neweapdbdata->eapol);
replaycount = getreplaycount(neweapdbdata->eapol);
+/*
if(m == 1)
{
lookfor21(eapdbrecords, neweapdbdata, replaycount);
}
+*/
if(m == 2)
{
|
fix CFLAGS option, -L -> -I | @@ -65,7 +65,7 @@ module load pmix
--with-pm=no --with-pmi=slurm \
%endif
%if 0%{with_pmix}
- CFLAGS="-L${PMIX_INC}" LIBS="-L${PMIX_LIB} -lpmix" --with-pm=none --with-pmi=slurm \
+ CFLAGS="-I${PMIX_INC}" LIBS="-L${PMIX_LIB} -lpmix" --with-pm=none --with-pmi=slurm \
%endif
|| { cat config.log && exit 1; }
|
Add ethernet type to support NSH over ethernet | @@ -102,7 +102,7 @@ ethernet_type (0x88B7, 802_OUI_EXTENDED)
ethernet_type (0x88c7, 802_11I_PRE_AUTHENTICATION)
ethernet_type (0x88cc, 802_1_LLDP)
ethernet_type (0x88e7, DOT1AH)
-ethernet_type (0x894f, VPATH_3)
+ethernet_type (0x894f, NSH)
ethernet_type (0x9000, LOOPBACK)
ethernet_type (0x9021, RTNET_MAC)
ethernet_type (0x9022, RTNET_CONFIG)
|
Fix queue locking. | @@ -424,30 +424,17 @@ VioScsiVQLock(
ENTER_FN();
adaptExt = (PADAPTER_EXTENSION)DeviceExtension;
- if (!adaptExt->msix_enabled) {
if (!isr) {
- StorPortAcquireSpinLock(DeviceExtension, InterruptLock, NULL, LockHandle);
- }
- }
- else {
- if (adaptExt->num_queues == 1) {
- if (!isr) {
- ULONG oldIrql = 0;
- StorPortAcquireMSISpinLock(DeviceExtension, (adaptExt->msix_one_vector ? 0 : MessageID), &oldIrql);
- LockHandle->Context.OldIrql = (KIRQL)oldIrql;
- }
- }
- else {
+ if (adaptExt->msix_enabled) {
+ if (!CHECKFLAG(adaptExt->perfFlags, STOR_PERF_ADV_CONFIG_LOCALITY)) {
+ // Queue numbers start at 0, message ids at 1.
NT_ASSERT(MessageID > VIRTIO_SCSI_REQUEST_QUEUE_0);
NT_ASSERT(MessageID <= VIRTIO_SCSI_REQUEST_QUEUE_0 + adaptExt->num_queues);
- if (CHECKFLAG(adaptExt->perfFlags, STOR_PERF_CONCURRENT_CHANNELS)) {
- if (CHECKFLAG(adaptExt->perfFlags, STOR_PERF_ADV_CONFIG_LOCALITY)) {
- StorPortAcquireSpinLock(DeviceExtension, StartIoLock, &adaptExt->dpc[MessageID - VIRTIO_SCSI_REQUEST_QUEUE_0 - 1], LockHandle);
- }
- else {
- RhelDbgPrint(TRACE_LEVEL_FATAL, ("%s STOR_PERF_CONCURRENT_CHANNELS yes, STOR_PERF_ADV_CONFIG_LOCALITY no\n", __FUNCTION__));
+ StorPortAcquireSpinLock(DeviceExtension, DpcLock, &adaptExt->dpc[MessageID - VIRTIO_SCSI_REQUEST_QUEUE_0 - 1], LockHandle);
}
}
+ else {
+ StorPortAcquireSpinLock(DeviceExtension, InterruptLock, NULL, LockHandle);
}
}
@@ -467,29 +454,10 @@ VioScsiVQUnlock(
ENTER_FN();
adaptExt = (PADAPTER_EXTENSION)DeviceExtension;
- if (!adaptExt->msix_enabled) {
- if (!isr) {
- StorPortReleaseSpinLock(DeviceExtension, LockHandle);
- }
- }
- else {
- if (adaptExt->num_queues == 1) {
if (!isr) {
- StorPortReleaseMSISpinLock(DeviceExtension, (adaptExt->msix_one_vector ? 0 : MessageID), LockHandle->Context.OldIrql);
- }
- }
- else {
- NT_ASSERT(MessageID > VIRTIO_SCSI_REQUEST_QUEUE_0);
- NT_ASSERT(MessageID <= VIRTIO_SCSI_REQUEST_QUEUE_0 + adaptExt->num_queues);
- if (CHECKFLAG(adaptExt->perfFlags, STOR_PERF_CONCURRENT_CHANNELS)) {
- if (CHECKFLAG(adaptExt->perfFlags, STOR_PERF_ADV_CONFIG_LOCALITY)) {
+ if (!adaptExt->msix_enabled || !CHECKFLAG(adaptExt->perfFlags, STOR_PERF_ADV_CONFIG_LOCALITY)) {
StorPortReleaseSpinLock(DeviceExtension, LockHandle);
}
- else {
- RhelDbgPrint(TRACE_LEVEL_FATAL, ("%s STOR_PERF_CONCURRENT_CHANNELS yes, STOR_PERF_ADV_CONFIG_LOCALITY no\n", __FUNCTION__));
- }
- }
- }
}
EXIT_FN();
|
[core] do not load indexfile, dirlisting if unused
do not load mod_indexfile or mod_dirlisting unless used and enabled
(avoid loading some default modules unless used and enabled) | @@ -320,6 +320,24 @@ static void config_check_module_duplicates (server *srv) {
}
__attribute_pure__
+__attribute_noinline__
+static int config_has_opt_enabled (const server * const srv, const char * const opt, const uint32_t olen) {
+ for (uint32_t i = 0; i < srv->config_context->used; ++i) {
+ const data_config * const config =
+ (const data_config *)srv->config_context->data[i];
+ const data_unset * const du =
+ array_get_data_unset(config->value, opt, olen);
+ if (NULL == du) continue;
+ if (du->type == TYPE_ARRAY
+ ? ((data_array *)du)->value.used != 0
+ : config_plugin_value_tobool(du, 0))
+ return 1;
+ }
+ return 0;
+}
+
+__attribute_pure__
+__attribute_noinline__
static const char * config_has_opt_and_value (const server * const srv, const char * const opt, const uint32_t olen, const char * const v, const uint32_t vlen) {
for (uint32_t i = 0; i < srv->config_context->used; ++i) {
const data_config * const config =
@@ -333,6 +351,21 @@ static const char * config_has_opt_and_value (const server * const srv, const ch
return NULL;
}
+__attribute_noinline__
+static void config_compat_module_remove (server *srv, const char *module, uint32_t len) {
+ array *modules = array_init(srv->srvconf.modules->used);
+
+ for (uint32_t i = 0; i < srv->srvconf.modules->used; ++i) {
+ const data_string *ds = (data_string *)srv->srvconf.modules->data[i];
+ if (!buffer_eq_slen(&ds->value, module, len))
+ array_insert_value(modules, BUF_PTR_LEN(&ds->value));
+ }
+
+ array_free(srv->srvconf.modules);
+ srv->srvconf.modules = modules;
+}
+
+__attribute_noinline__
static void config_compat_module_prepend (server *srv, const char *module, uint32_t len) {
array *modules = array_init(srv->srvconf.modules->used+4);
array_insert_value(modules, module, len);
@@ -433,6 +466,24 @@ static void config_compat_module_load (server *srv) {
}
}
+ /* check if some default modules are used and enabled
+ * (Each dynamically loaded modules takes at least 20k memory,
+ * so avoid loading some default modules unless used and enabled) */
+
+ if (!config_has_opt_enabled(srv, CONST_STR_LEN("index-file.names"))
+ && !config_has_opt_enabled(srv, CONST_STR_LEN("server.indexfiles"))) {
+ if (!prepend_mod_indexfile)
+ config_compat_module_remove(srv, CONST_STR_LEN("mod_indexfile"));
+ prepend_mod_indexfile = 0;
+ }
+
+ if (!config_has_opt_enabled(srv, CONST_STR_LEN("dir-listing.activate"))
+ && !config_has_opt_enabled(srv, CONST_STR_LEN("server.dir-listing"))) {
+ if (!append_mod_dirlisting)
+ config_compat_module_remove(srv, CONST_STR_LEN("mod_dirlisting"));
+ append_mod_dirlisting = 0;
+ }
+
/* prepend default modules */
if (prepend_mod_indexfile) {
|
bootloader: Fix a wrong offset in image_load after refactoring | @@ -144,7 +144,7 @@ static esp_err_t image_load(esp_image_load_mode_t mode, const esp_partition_pos_
// For secure boot V1 on ESP32, we don't calculate SHA or verify signature on bootloaders.
// (For non-secure boot, we don't verify any SHA-256 hash appended to the bootloader because
// esptool.py may have rewritten the header - rely on esptool.py having verified the bootloader at flashing time, instead.)
- bool verify_sha = (data->start_addr != ESP_BOOTLOADER_OFFSET) && do_verify;
+ bool verify_sha = (part->offset != ESP_BOOTLOADER_OFFSET) && do_verify;
#endif
if (data == NULL || part == NULL) {
|
rust: build all features and all targets | @@ -322,7 +322,7 @@ test-rust:
$(call announce-begin,"Running Rust tests")
cd $(SWIFTNAV_ROOT)/rust/sbp && cargo test --verbose
$(call announce-begin,"Building Rust examples")
- cd $(SWIFTNAV_ROOT)/rust/sbp && cargo build --examples --verbose
+ cd $(SWIFTNAV_ROOT)/rust/sbp && cargo build --examples --verbose --all-features --all-targets
$(call announce-end,"Finished running Rust tests")
test-protobuf:
|
workflows: update unit test runner OS | @@ -24,7 +24,7 @@ on:
jobs:
run-ubuntu-unit-tests:
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-20.04
timeout-minutes: 60
strategy:
fail-fast: false
@@ -50,7 +50,7 @@ jobs:
- name: Setup environment
run: |
sudo apt update
- sudo apt install -yyq gcc-7 g++-7 clang-6.0 libsystemd-dev gcovr libyaml-dev
+ sudo apt install -y gcc-7 g++-7 clang-6.0 libsystemd-dev gcovr libyaml-dev
sudo ln -s /usr/bin/llvm-symbolizer-6.0 /usr/bin/llvm-symbolizer || true
- uses: actions/checkout@v3
|
docs: update tools readme | @@ -15,10 +15,10 @@ The graphical user interface (GUI) is called `kdb qt-gui`.
## Web-UI
-For information about the Web-UI, please read [here](web).
+For information about the Web-UI, please read [here](../../doc/tutorials/install-webui.md).
Note that the Web-UI also provides a REST service
-[elektrad](web/elektrad) that allows you to get
+[elektrad](elektrad/README.md) that allows you to get
and set configuration settings.
## Programmatic
|
libcupsfilters: Let universal() pass FINAL_CONTENT_TYPE to pdftopdf()
pdftopdf() uses the FINAL_CONTENT_TYPE environment variable to
determine whether to log the printed pages and for other things, so
the universal() filter function should pass it through. | @@ -219,7 +219,7 @@ universal(int inputfd, /* I - File descriptor input stream */
if (strcmp(output_type, "pdf")) {
filter = malloc(sizeof(filter_filter_in_chain_t));
filter->function = pdftopdf;
- filter->parameters = NULL;
+ filter->parameters = strdup(output);
filter->name = "pdftopdf";
cupsArrayAdd(filter_chain, filter);
if (log) log(ld, FILTER_LOGLEVEL_DEBUG,
|
Allow interrupts in cambus read/write_bytes functions.
* Those are used exclusively by the FIR sensors and not by the main
image sensor, so it's safe (and much faster) to leave interrupts enabled. | @@ -177,48 +177,36 @@ int cambus_writew2(I2C_HandleTypeDef *i2c, uint8_t slv_addr, uint16_t reg_addr,
int cambus_read_bytes(I2C_HandleTypeDef *i2c, uint8_t slv_addr, uint8_t reg_addr, uint8_t *buf, int len)
{
- int ret=0;
- __disable_irq();
if (HAL_I2C_Mem_Read(i2c, slv_addr, reg_addr,
I2C_MEMADD_SIZE_8BIT, buf, len, I2C_TIMEOUT) != HAL_OK) {
- ret = -1;
+ return -1;
}
- __enable_irq();
- return ret;
+ return 0;
}
int cambus_write_bytes(I2C_HandleTypeDef *i2c, uint8_t slv_addr, uint8_t reg_addr, uint8_t *buf, int len)
{
- int ret=0;
- __disable_irq();
if (HAL_I2C_Mem_Write(i2c, slv_addr, reg_addr,
I2C_MEMADD_SIZE_8BIT, buf, len, I2C_TIMEOUT) != HAL_OK) {
- ret = -1;
+ return -1;
}
- __enable_irq();
- return ret;
+ return 0;
}
int cambus_readw_bytes(I2C_HandleTypeDef *i2c, uint8_t slv_addr, uint16_t reg_addr, uint8_t *buf, int len)
{
- int ret=0;
- __disable_irq();
if (HAL_I2C_Mem_Read(i2c, slv_addr, reg_addr,
I2C_MEMADD_SIZE_16BIT, buf, len, I2C_TIMEOUT) != HAL_OK) {
- ret = -1;
+ return -1;
}
- __enable_irq();
- return ret;
+ return 0;
}
int cambus_writew_bytes(I2C_HandleTypeDef *i2c, uint8_t slv_addr, uint16_t reg_addr, uint8_t *buf, int len)
{
- int ret=0;
- __disable_irq();
if (HAL_I2C_Mem_Write(i2c, slv_addr, reg_addr,
I2C_MEMADD_SIZE_16BIT, buf, len, I2C_TIMEOUT) != HAL_OK) {
- ret = -1;
+ return -1;
}
- __enable_irq();
- return ret;
+ return 0;
}
|
Fix envc transfer from host to guest with uhyve | @@ -386,7 +386,7 @@ static int initd(void* arg)
for(i=0; i<uhyve_cmdsize.envc-1; i++)
uhyve_cmdval_phys.envp[i] = (char*) virt_to_phys((size_t) uhyve_cmdval.envp[i]);
// the last element is always NULL
- uhyve_cmdval_phys.envp[uhyve_cmdsize.envc-1] = NULL;
+ uhyve_cmdval.envp[uhyve_cmdsize.envc-1] = NULL;
uhyve_cmdval_phys.envp = (char**) virt_to_phys((size_t) uhyve_cmdval_phys.envp);
uhyve_send(UHYVE_PORT_CMDVAL,
|
Fix description of the translation function | @@ -1281,14 +1281,27 @@ static inline mbedtls_svc_key_id_t mbedtls_ssl_get_opaque_psk(
return( MBEDTLS_SVC_KEY_ID_INIT );
}
-/* Corresponding PSA algorithm for MBEDTLS_CIPHER_NULL */
+/* Corresponding PSA algorithm for MBEDTLS_CIPHER_NULL.
+ * Same value is used fo PSA_ALG_CATEGORY_CIPHER, hence it is
+ * guaranteed to not be a valid PSA algorithm identifier.
+ */
#define MBEDTLS_SSL_NULL_CIPHER 0x04000000
/**
- * Translate mbedtls cipher type/mode pair to psa: algorithm, key type and
- * key size.
+ * \brief Translate mbedtls cipher type/taglen pair to psa:
+ * algorithm, key type and key size.
+ *
+ * \param mbedtls_cipher_type [in] given mbedtls cipher type
+ * \param taglen [in] given tag length
+ * 0 - default tag length
+ * \param alg [out] corresponding PSA alg
+ * There is no corresponding PSA
+ * alg for MBEDTLS_SSL_NULL_CIPHER, so
+ * MBEDTLS_SSL_NULL_CIPHER is returned
+ * \param key_type [out] corresponding PSA key type
+ * \param key_size [out] corresponding PSA key size
*
- * Return PSA_SUCCESS on success or PSA_ERROR_NOT_SUPPORTED if
+ * \return PSA_SUCCESS on success or PSA_ERROR_NOT_SUPPORTED if
* conversion is not supported.
*/
psa_status_t mbedtls_cipher_to_psa( mbedtls_cipher_type_t mbedtls_cipher_type,
|
update CHAIN_ID for kusd mainnet | @@ -88,7 +88,7 @@ DEFINES += CHAINID_UPCASE=\"WAN\" CHAINID_COINNAME=\"WAN\" CHAIN_KIND=CHAIN_KIND
APPNAME = "Wanchain"
else ifeq ($(CHAIN),kusd)
APP_LOAD_PARAMS += --path "44'/91927009'"
-DEFINES += CHAINID_UPCASE=\"KUSD\" CHAINID_COINNAME=\"KUSD\" CHAIN_KIND=CHAIN_KIND_KUSD CHAIN_ID=2
+DEFINES += CHAINID_UPCASE=\"KUSD\" CHAINID_COINNAME=\"KUSD\" CHAIN_KIND=CHAIN_KIND_KUSD CHAIN_ID=1
APPNAME = "KUSD"
else ifeq ($(CHAIN),musicoin)
APP_LOAD_PARAMS += --path "44'/184'"
|
Coalesce EOED + client Finished in one UDP packet | @@ -1520,9 +1520,12 @@ static ssize_t conn_write_client_handshake(ngtcp2_conn *conn, uint8_t *dest,
ngtcp2_tstamp ts) {
ngtcp2_ringbuf *rb = &conn->tx_crypto_data;
ngtcp2_crypto_data *cdata;
+ ssize_t nwrite;
+ ssize_t res = 0;
+ for (;;) {
if (ngtcp2_ringbuf_len(rb) == 0) {
- return 0;
+ return res;
}
cdata = ngtcp2_ringbuf_get(rb, 0);
@@ -1538,8 +1541,25 @@ static ssize_t conn_write_client_handshake(ngtcp2_conn *conn, uint8_t *dest,
assert(0);
}
- return conn_write_handshake_pkt(conn, dest, destlen, cdata->pkt_type,
+ nwrite = conn_write_handshake_pkt(conn, dest, destlen, cdata->pkt_type,
require_padding, ts);
+ if (nwrite < 0) {
+ if (nwrite != NGTCP2_ERR_NOBUF) {
+ return nwrite;
+ }
+ if (res) {
+ return res;
+ }
+ return NGTCP2_ERR_NOBUF;
+ }
+ if (nwrite == 0) {
+ return res;
+ }
+
+ res += nwrite;
+ dest += nwrite;
+ destlen -= (size_t)nwrite;
+ }
}
static ssize_t conn_write_protected_ack_pkt(ngtcp2_conn *conn, uint8_t *dest,
|
Fix test_cmp_cli for extended tests
The test_cmp_cli was failing in the extended tests on cross-compiled
mingw builds. This was due to the test not using wine when it should do.
The simplest solution is to just skip the test in this case.
[extended tests] | @@ -34,6 +34,8 @@ plan skip_all => "These tests are not supported in a no-ec build"
plan skip_all => "Tests involving CMP server not available on Windows or VMS"
if $^O =~ /^(VMS|MSWin32)$/;
+plan skip_all => "Tests involving CMP server not available in cross-compile builds"
+ if defined $ENV{EXE_SHELL};
plan skip_all => "Tests involving CMP server require 'kill' command"
unless `which kill`;
plan skip_all => "Tests involving CMP server require 'lsof' command"
|
p9dsu: Describe platform BMC register configuration
Provide the p9dsu-specific BMC configuration values required for the
host kernel to drive the VGA display correctly. | @@ -688,9 +688,17 @@ static const struct bmc_sw_config bmc_sw_smc = {
.ipmi_oem_hiomap_cmd = IPMI_CODE(0x3a, 0x5a),
};
+/* Provided by Eric Chen (SMC) */
+const struct bmc_hw_config p9dsu_bmc_hw = {
+ .scu_revision_id = 0x04030303,
+ .mcr_configuration = 0x11000756,
+ .mcr_scu_mpll = 0x000071c1,
+ .mcr_scu_strap = 0x00000000,
+};
+
static const struct bmc_platform bmc_plat_ast2500_smc = {
.name = "SMC",
- .hw = &bmc_hw_ast2500,
+ .hw = &p9dsu_bmc_hw,
.sw = &bmc_sw_smc,
};
|
store: include internal header | * https://www.openssl.org/source/license.html
*/
-#include <openssl/store.h>
#include <openssl/crypto.h>
+#include "crypto/store.h"
#include "internal/core.h"
#include "internal/namemap.h"
#include "internal/property.h"
|
dnstap debug tool, document string change more clearly. | @@ -474,8 +474,11 @@ static char* q_of_msg(ProtobufCBinaryData message)
if(sldns_wire2str_rrquestion_buf(message.data+12, message.len-12,
buf, sizeof(buf)) != 0) {
/* remove trailing newline, tabs to spaces */
+ /* remove the newline: */
if(buf[0] != 0) buf[strlen(buf)-1]=0;
+ /* remove first tab (before type) */
if(strrchr(buf, '\t')) *strrchr(buf, '\t')=' ';
+ /* remove second tab (before class) */
if(strrchr(buf, '\t')) *strrchr(buf, '\t')=' ';
return strdup(buf);
}
|
Don't ignore command-line CFALGS | @@ -33,7 +33,7 @@ else
puts 'using an unknown (old?) compiler... who knows if this will work out... we hope.'
end
-$CFLAGS = '-std=c11 -O3 -Wall -DSERVER_DELAY_IO=1 -DNO_CHILD_REAPER=1'
+$CFLAGS = "-std=c11 -O3 -Wall -DSERVER_DELAY_IO=1 -DNO_CHILD_REAPER=1 #{ENV['CFLAGS']}"
RbConfig::MAKEFILE_CONFIG['CC'] = $CC = ENV['CC'] if ENV['CC']
RbConfig::MAKEFILE_CONFIG['CPP'] = $CPP = ENV['CPP'] if ENV['CPP']
|
BugID:22029688:Close lower after checking Download flag | @@ -90,9 +90,6 @@ void ota_parse_host_url(char *url, char **host_name, char **host_uri)
int ota_service_start(ota_service_t *ctx)
{
int ret = 0;
-#ifdef AOS_COMP_PWRMGMT
- aos_pwrmgmt_lowpower_suspend(PWRMGMT_OTA);
-#endif
ota_ctx = ctx;
#if defined OTA_CONFIG_SECURE_DL_MODE
ota_wdg.config.timeout = 180000;
@@ -103,6 +100,9 @@ int ota_service_start(ota_service_t *ctx)
}
ota_read_parameter(&ota_param);
#endif
+#ifdef AOS_COMP_PWRMGMT
+ aos_pwrmgmt_lowpower_suspend(PWRMGMT_OTA);
+#endif
#if defined BOARD_ESP8266 && !defined OTA_CONFIG_SECURE_DL_MODE
aos_task_delete("linkkit");
ota_msleep(200);
|
Fix possibly uninitialized value
Due to gotos, "ret" may be returned uninitialized. | @@ -308,6 +308,8 @@ scrcpy(const struct scrcpy_options *options) {
return false;
}
+ bool ret = false;
+
bool server_started = false;
bool fps_counter_initialized = false;
bool video_buffer_initialized = false;
@@ -449,7 +451,7 @@ scrcpy(const struct scrcpy_options *options) {
input_manager_init(&input_manager, options);
- bool ret = event_loop(options);
+ ret = event_loop(options);
LOGD("quit...");
screen_destroy(&screen);
|
Log CreateProcessW() error code on Windows
Refs <https://github.com/Genymobile/scrcpy/issues/2838> | @@ -154,7 +154,9 @@ sc_process_execute_p(const char *const argv[], HANDLE *handle, unsigned flags,
dwCreationFlags, NULL, NULL, &si.StartupInfo, &pi);
free(wide);
if (!ok) {
- if (GetLastError() == ERROR_FILE_NOT_FOUND) {
+ int err = GetLastError();
+ LOGE("CreateProcessW() error %d", err);
+ if (err == ERROR_FILE_NOT_FOUND) {
ret = SC_PROCESS_ERROR_MISSING_BINARY;
}
goto error_free_attribute_list;
|
apps: remove internal/cryptlib.h include that isn't used
[extended tests] | * https://www.openssl.org/source/license.html
*/
-#include <internal/cryptlib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -110,8 +109,10 @@ static size_t internal_trace_cb(const char *buf, size_t cnt,
switch (cmd) {
case OSSL_TRACE_CTRL_BEGIN:
- if (!ossl_assert(!trace_data->ingroup))
+ if (trace_data->ingroup) {
+ BIO_printf(bio_err, "ERROR: tracing already started\n");
return 0;
+ }
trace_data->ingroup = 1;
tid = CRYPTO_THREAD_get_current_id();
@@ -123,14 +124,18 @@ static size_t internal_trace_cb(const char *buf, size_t cnt,
BIO_set_prefix(trace_data->bio, buffer);
break;
case OSSL_TRACE_CTRL_WRITE:
- if (!ossl_assert(trace_data->ingroup))
+ if (!trace_data->ingroup) {
+ BIO_printf(bio_err, "ERROR: writing when tracing not started\n");
return 0;
+ }
ret = BIO_write(trace_data->bio, buf, cnt);
break;
case OSSL_TRACE_CTRL_END:
- if (!ossl_assert(trace_data->ingroup))
+ if (!trace_data->ingroup) {
+ BIO_printf(bio_err, "ERROR: finishing when tracing not started\n");
return 0;
+ }
trace_data->ingroup = 0;
BIO_set_prefix(trace_data->bio, NULL);
|
Add instrument select keyboard shortcuts to music editor using number keys | -import React, { useCallback, useContext } from "react";
+import React, { useCallback, useContext, useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";
import styled, { ThemeContext } from "styled-components";
import { RootState } from "store/configureStore";
@@ -125,6 +125,44 @@ const SongEditorToolsPanel = ({ selectedSong }: SongEditorToolsPanelProps) => {
[dispatch]
);
+ const onKeyDown = useCallback(
+ (e: KeyboardEvent) => {
+ if (e.target && (e.target as Node).nodeName === "INPUT") {
+ return;
+ }
+ if (e.ctrlKey || e.shiftKey || e.metaKey) {
+ return;
+ }
+ if (e.code === "Digit1") {
+ setDefaultInstruments(0);
+ } else if (e.code === "Digit2") {
+ setDefaultInstruments(1);
+ } else if (e.code === "Digit3") {
+ setDefaultInstruments(2);
+ } else if (e.code === "Digit4") {
+ setDefaultInstruments(3);
+ } else if (e.code === "Digit5") {
+ setDefaultInstruments(4);
+ } else if (e.code === "Digit6") {
+ setDefaultInstruments(5);
+ } else if (e.code === "Digit7") {
+ setDefaultInstruments(6);
+ } else if (e.code === "Digit8") {
+ setDefaultInstruments(7);
+ } else if (e.code === "Digit9") {
+ setDefaultInstruments(8);
+ }
+ },
+ [setDefaultInstruments]
+ );
+
+ useEffect(() => {
+ window.addEventListener("keydown", onKeyDown);
+ return () => {
+ window.removeEventListener("keydown", onKeyDown);
+ };
+ });
+
const themeContext = useContext(ThemeContext);
const themePianoIcon =
|
FIX: do sm_init() after arcus_check_server_mapping(). | @@ -416,7 +416,7 @@ arcus_zk_watcher(zhandle_t *wzh, int type, int state, const char *path, void *cx
}
#ifdef ENABLE_ZK_RECONFIG
- if (!arcus_conf.zk_reconfig) {
+ if (arcus_conf.init && !arcus_conf.zk_reconfig) {
/* enable zookeeper dynamic reconfiguration */
if (arcus_check_zk_reconfig_enabled(zinfo->zh) < 0) {
/* zoo_getconfig API failed.. (rarely)
@@ -1376,13 +1376,6 @@ void arcus_zk_init(char *ensemble_list, int zk_to,
zoo_set_debug_level(ZOO_LOG_LEVEL_WARN);
}
- /* Initialize the state machine. */
- if (sm_init() != 0) {
- arcus_conf.logger->log(EXTENSION_LOG_WARNING, NULL,
- "Failed to initialize the state machine. Terminating.\n");
- arcus_exit(main_zk->zh, EX_CONFIG);
- }
-
if (arcus_conf.verbose > 2)
arcus_conf.logger->log(EXTENSION_LOG_DEBUG, NULL, "zookeeper_init()\n");
@@ -1410,6 +1403,20 @@ void arcus_zk_init(char *ensemble_list, int zk_to,
arcus_conf.cluster_path = strdup(zpath);
assert(arcus_conf.cluster_path);
+ /* Initialize the state machine. */
+ if (sm_init() != 0) {
+ arcus_conf.logger->log(EXTENSION_LOG_WARNING, NULL,
+ "Failed to initialize the state machine. Terminating.\n");
+ arcus_exit(main_zk->zh, EX_CONFIG);
+ }
+
+#ifdef ENABLE_ZK_RECONFIG
+ /* enable zookeeper dynamic reconfiguration */
+ if (arcus_check_zk_reconfig_enabled(main_zk->zh) != 0) {
+ arcus_exit(main_zk->zh, EX_PROTOCOL);
+ }
+#endif
+
arcus_conf.init = true;
/* register cache instance in ZK */
@@ -1454,6 +1461,11 @@ void arcus_zk_init(char *ensemble_list, int zk_to,
* Tell it to refresh the hash ring (cluster_config).
*/
sm_lock();
+#ifdef ENABLE_ZK_RECONFIG
+ if (arcus_conf.zk_reconfig) {
+ sm_info.request.update_zkconfig = true;
+ }
+#endif
/* Don't care if we just read the list above. Do it again. */
sm_info.request.update_cache_list = true;
sm_wakeup(true);
|
Set default pattern for new junctions
Also fix an `ENgetqualtype` function call to include the project pointer | @@ -1512,7 +1512,7 @@ int DLLEXPORT EN_getqualtype(EN_Project *p, int *qualcode, int *tracenode) {
}
int DLLEXPORT EN_getqualinfo(EN_Project *p, int *qualcode, char *chemname, char *chemunits, int *tracenode) {
- ENgetqualtype(qualcode, tracenode);
+ EN_getqualtype(p, qualcode, tracenode);
if (p->quality.Qualflag == TRACE) {
strncpy(chemname, "", MAXID);
strncpy(chemunits, "dimensionless", MAXID);
@@ -4165,7 +4165,7 @@ int DLLEXPORT EN_addnode(EN_Project *p, char *id, EN_NodeType nodeType) {
demand = (struct Sdemand *)malloc(sizeof(struct Sdemand));
demand->Base = 0.0;
- demand->Pat = 0;
+ demand->Pat = hyd->DefPat; // Use default pattern
demand->next = NULL;
node->D = demand;
|
publish: removed commented out code | ^- (quip card _state)
?- -.del
%add-book
- ::=. tile-num (add tile-num (get-unread data.del))
?: =(our.bol host.del)
=^ cards state
(emit-updates-and-state host.del book.del data.del del sty)
?~ book
[~ sty]
=. read.data.del =(our.bol author.data.del)
- ::=? tile-num.sty !read.data.del
- :: +(tile-num.sty)
=. notes.u.book (~(put by notes.u.book) note.del data.del)
(emit-updates-and-state host.del book.del u.book del sty)
::
=/ not=(unit note) (~(get by notes.u.book) note.del)
?~ not
[~ sty]
- ::=? tile-num &(!read.u.not (gth tile-num 0))
- :: (dec tile-num)
=. notes.u.book (~(del by notes.u.book) note.del)
(emit-updates-and-state host.del book.del u.book del sty)
::
|
Correct the argument indices for Source:setCone | @@ -172,9 +172,9 @@ static int l_lovrSourceSeek(lua_State* L) {
static int l_lovrSourceSetCone(lua_State* L) {
Source* source = luax_checktype(L, 1, Source);
- float innerAngle = luax_checkfloat(L, 1);
- float outerAngle = luax_checkfloat(L, 2);
- float outerGain = luax_checkfloat(L, 3);
+ float innerAngle = luax_checkfloat(L, 2);
+ float outerAngle = luax_checkfloat(L, 3);
+ float outerGain = luax_checkfloat(L, 4);
lovrSourceSetCone(source, innerAngle, outerAngle, outerGain);
return 0;
}
|
Add thermal throttle loss percent field in show dimm hii
This change displays the thermal throttle loss percent field
in show dimm hii page. This field is introduced in the
firmware interface specification v 2.1 and is already displayed
during output of show -a -dimm command. | @@ -421,6 +421,10 @@ UnlatchedLastShutdownStatus::
- PM Idle: Power management idle received
- DDRT Surprise Reset: Surprise reset received
+ThermalThrottleLossPercent::
+ The average performance loss percentage due to thermal throttling
+ in current boot of the DCPMM.
+
LastShutdownTime::
The time the system was last shutdown.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.