message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Emulator restore touch controls if screen is touched after keyboard has been used (iPad) | @@ -160,6 +160,15 @@ function bindDpad(el) {
});
}
+function bindTouchRestore() {
+ window.addEventListener("touchstart", function(e) {
+ if(!isTouchEnabled) {
+ controller.style.display = "block";
+ isTouchEnabled = true;
+ }
+ })
+}
+
function bindKeyboard() {
window.onkeydown = function(e) {
initSound();
@@ -209,6 +218,7 @@ if (isTouchEnabled) {
bindButton(btnStart, "start");
bindButton(btnSelect, "select");
bindDpad(dpad);
+ bindTouchRestore();
} else {
controller.style.display = "none";
}
|
release: replace configure-debian with direct cmake invocation | @@ -63,7 +63,18 @@ run_checks() {
# Rebuild cleanly, run all tests and also check for memleaks:
cd "$BUILD_DIR"
- $SRC_DIR/scripts/dev/configure-debian $SRC_DIR
+ cmake -DPLUGINS="ALL" \
+ -DTOOLS="ALL" \
+ -DENABLE_DEBUG="OFF" \
+ -DENABLE_LOGGER="OFF" \
+ -DBUILD_SHARED=ON \
+ -DBUILD_FULL=ON \
+ -DBUILD_STATIC=ON \
+ -DKDB_DB_SYSTEM="${WORKSPACE}/config/kdb/system" \
+ -DKDB_DB_SPEC="${WORKSPACE}/config/kdb/spec" \
+ -DKDB_DB_HOME="${WORKSPACE}/config/kdb/home" \
+ -DCMAKE_INSTALL_PREFIX="${WORKSPACE}/system" \
+ ..
make
make run_all
make run_memcheck
@@ -100,7 +111,18 @@ prepare_package() {
tar xvzf elektra-$VERSION.tar.gz
mkdir $BUILD_DIR/builder
cd $BUILD_DIR/builder
- $SRC_DIR/scripts/dev/configure-debian ../elektra-$VERSION
+ cmake -DPLUGINS="ALL" \
+ -DTOOLS="ALL" \
+ -DENABLE_DEBUG="OFF" \
+ -DENABLE_LOGGER="OFF" \
+ -DBUILD_SHARED=ON \
+ -DBUILD_FULL=ON \
+ -DBUILD_STATIC=ON \
+ -DKDB_DB_SYSTEM="${WORKSPACE}/config/kdb/system" \
+ -DKDB_DB_SPEC="${WORKSPACE}/config/kdb/spec" \
+ -DKDB_DB_HOME="${WORKSPACE}/config/kdb/home" \
+ -DCMAKE_INSTALL_PREFIX="${WORKSPACE}/system" \
+ ../elektra-$VERSION
make
make run_all
make run_memcheck
|
Fixed devtools install | @@ -16,13 +16,6 @@ let helpWindow = null;
const isDevMode = process.execPath.match(/[\\/]electron/);
-// Enable DevTools.
-if (isDevMode) {
- enableLiveReload({ strategy: "react-hmr" });
- await installExtension(REACT_DEVELOPER_TOOLS);
- await installExtension(REDUX_DEVTOOLS);
-}
-
// Allow images and json outside of application package to be loaded in production build
addBypassChecker(filePath => {
return (
@@ -175,7 +168,14 @@ const createPlay = async url => {
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
-app.on("ready", () => {
+app.on("ready", async () => {
+ // Enable DevTools.
+ if (isDevMode) {
+ enableLiveReload({ strategy: "react-hmr" });
+ await installExtension(REACT_DEVELOPER_TOOLS);
+ await installExtension(REDUX_DEVTOOLS);
+ }
+
createSplash();
});
|
zephyr/emul/emul_bmi260.c: Format with clang-format
BRANCH=none
TEST=none | @@ -354,8 +354,7 @@ static int bmi260_emul_access_reg(struct i2c_emul *emul, int reg, int byte,
*/
if (reg <= BMI260_FIFO_DATA && reg + byte >= BMI260_FIFO_DATA) {
return BMI260_FIFO_DATA;
- } else if (reg <= BMI260_INIT_DATA &&
- reg + byte >= BMI260_INIT_DATA) {
+ } else if (reg <= BMI260_INIT_DATA && reg + byte >= BMI260_INIT_DATA) {
return BMI260_INIT_DATA;
}
@@ -395,7 +394,6 @@ static int bmi260_emul_handle_write(uint8_t *regs, struct i2c_emul *emul,
return BMI_EMUL_ACCESS_E;
}
-
/* Stop on going command if required */
if (regs[BMI260_CMD_REG] != 0 && bmi_emul_is_cmd_end(emul)) {
bmi260_emul_end_cmd(regs, emul);
@@ -513,8 +511,8 @@ static int bmi260_emul_handle_read(uint8_t *regs, struct i2c_emul *emul,
bmi_emul_state_to_reg(emul, acc_shift, gyr_shift,
BMI260_ACC_X_L_G,
BMI260_GYR_X_L_G,
- BMI260_SENSORTIME_0,
- acc_off_en, gyr_off_en);
+ BMI260_SENSORTIME_0, acc_off_en,
+ gyr_off_en);
}
break;
case BMI260_FIFO_LENGTH_0:
@@ -538,16 +536,12 @@ static int bmi260_emul_handle_read(uint8_t *regs, struct i2c_emul *emul,
}
/** Registers backed in NVM by BMI260 */
-const int bmi260_nvm_reg[] = {BMI260_AUX_IF_TRIM,
- BMI260_NV_CONF,
- BMI260_DRV,
- BMI260_OFFSET_ACC70,
- BMI260_OFFSET_ACC70 + 1,
- BMI260_OFFSET_ACC70 + 2,
- BMI260_OFFSET_GYR70,
- BMI260_OFFSET_GYR70 + 1,
- BMI260_OFFSET_GYR70 + 2,
- BMI260_OFFSET_EN_GYR98};
+const int bmi260_nvm_reg[] = {
+ BMI260_AUX_IF_TRIM, BMI260_NV_CONF, BMI260_DRV,
+ BMI260_OFFSET_ACC70, BMI260_OFFSET_ACC70 + 1, BMI260_OFFSET_ACC70 + 2,
+ BMI260_OFFSET_GYR70, BMI260_OFFSET_GYR70 + 1, BMI260_OFFSET_GYR70 + 2,
+ BMI260_OFFSET_EN_GYR98
+};
/** Confguration of BMI260 */
struct bmi_emul_type_data bmi260_emul = {
|
system/vi: fix nxstyle warning
system/vi/vi.c:540:57: error: Multiple data definitions
system/vi/vi.c:541:54: error: Multiple data definitions | @@ -537,8 +537,8 @@ static const char g_fmtmodified[] =
"No write since last change (add ! to override)";
static const char g_fmtnotvalid[] = "Command not valid";
static const char g_fmtnotcmd[] = "Not an editor command: %s";
-static const char g_fmtsrcbot[] = "search hit BOTTOM, continuing at TOP";
-static const char g_fmtsrctop[] = "search hit TOP, continuing at BOTTOM";
+static const char g_fmtsrcbot[] = "search hit BOTTOM(continuing at TOP)";
+static const char g_fmtsrctop[] = "search hit TOP(continuing at BOTTOM)";
static const char g_fmtinsert[] = "--INSERT--";
/****************************************************************************
|
muxread,anmf: fail on multiple image chunks
treat an ANMF chunk containing multiple VP8/VP8L file as malformed.
fixes a WebPMuxImage::img_ leak.
Though the invalid free in was avoided in (ubsan):
muxread,ChunkVerifyAndAssign: validate chunk_size
that file would still cause a leak similar to | @@ -138,6 +138,7 @@ static int MuxImageParse(const WebPChunk* const chunk, int copy_data,
wpi->is_partial_ = 1; // Waiting for a VP8 chunk.
break;
case WEBP_CHUNK_IMAGE:
+ if (wpi->img_ != NULL) goto Fail; // Only 1 image chunk allowed.
if (ChunkSetNth(&subchunk, &wpi->img_, 1) != WEBP_MUX_OK) goto Fail;
if (!MuxImageFinalize(wpi)) goto Fail;
wpi->is_partial_ = 0; // wpi is completely filled.
|
Set actions install prefix to avoid needing sudo | @@ -11,6 +11,7 @@ env:
BUILD_TYPE: Release
CMAKE_BUILD_PARALLEL_LEVEL: 2
SOAPY_SDR_BRANCH: master
+ INSTALL_PREFIX: ${{github.workspace}}/deps
jobs:
build:
@@ -53,11 +54,11 @@ jobs:
- name: Configure CMake (windows)
if: matrix.os == 'windows-latest'
- run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_EVB7COM=ON -DwxWidgets_ROOT_DIR=${{github.workspace}}/deps/wxWidgets -DFX3_SDK_PATH=${{github.workspace}}/deps/FX3SDK
+ run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_EVB7COM=ON -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} -DwxWidgets_ROOT_DIR=${{github.workspace}}/deps/wxWidgets -DFX3_SDK_PATH=${{github.workspace}}/deps/FX3SDK
- name: Configure CMake (linux)
if: matrix.os != 'windows-latest'
- run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_EVB7COM=ON
+ run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_EVB7COM=ON -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
sbgemm: cooperlake: prefetch A & B | @@ -64,6 +64,11 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define DECLARE_B_PAIR() \
__m512i B_lo; __m512i B_hi;
+#define PREFETCH_B_STEP 32
+#define PREFETCH_B(Bx, By) \
+ if (By == 0) asm("prefetcht0 %c1(%0)": : "r"(ptr_b##Bx), "n"(PREFETCH_B_STEP * 2)); \
+ else asm("prefetcht0 %c3(%0, %1, %c2)": : "r"(ptr_b##Bx), "r"(n_blksize), "n"(By*2), "n"(PREFETCH_B_STEP * 2))
+
#define BROADCAST_B_PAIR(Bx, By) \
BROADCAST64(ptr_b##Bx, n_blksize, By, 0, B_lo); \
BROADCAST64(ptr_b##Bx, n_blksize, By, 4, B_hi);
@@ -204,17 +209,19 @@ int CNAME (BLASLONG m, BLASLONG n, BLASLONG k, FLOAT alpha, IFLOAT * A, IFLOAT *
k_count = k;
for (; k_count > 3; k_count -=4) {
LOAD_A_PAIR(0);
+ _mm_prefetch(ptr_a0 + 128, _MM_HINT_T0);
ptr_a0 += 16 * 2;
- BROADCAST_B_PAIR(0, 0); MATMUL_4X(0, 0, 0);
- BROADCAST_B_PAIR(0, 1); MATMUL_4X(0, 0, 1);
- BROADCAST_B_PAIR(0, 2); MATMUL_4X(0, 0, 2);
+ BROADCAST_B_PAIR(0, 0); PREFETCH_B(0, 0); MATMUL_4X(0, 0, 0);
+ BROADCAST_B_PAIR(0, 1); PREFETCH_B(0, 1); MATMUL_4X(0, 0, 1);
+ BROADCAST_B_PAIR(0, 2); PREFETCH_B(0, 2); MATMUL_4X(0, 0, 2);
ptr_b0 += 4 * 2;
- BROADCAST_B_PAIR(1, 0); MATMUL_4X(0, 1, 0);
- BROADCAST_B_PAIR(1, 1); MATMUL_4X(0, 1, 1);
- BROADCAST_B_PAIR(1, 2); MATMUL_4X(0, 1, 2);
+ BROADCAST_B_PAIR(1, 0); PREFETCH_B(1, 0); MATMUL_4X(0, 1, 0);
+ BROADCAST_B_PAIR(1, 1); PREFETCH_B(1, 1); MATMUL_4X(0, 1, 1);
+ BROADCAST_B_PAIR(1, 2); PREFETCH_B(1, 2); MATMUL_4X(0, 1, 2);
ptr_b1 += 4 * 2;
LOAD_A_PAIR(0);
+ _mm_prefetch(ptr_a0 + 128, _MM_HINT_T0);
ptr_a0 += 16 * 2;
BROADCAST_B_PAIR(0, 0); MATMUL_4X(0, 0, 0);
BROADCAST_B_PAIR(0, 1); MATMUL_4X(0, 0, 1);
|
terminate hcxdumptool immediately if it failed to set channel | @@ -3570,7 +3570,7 @@ while(1)
else
{
printf("\nfailed to set channel\n");
- errorcount++;
+ globalclose();
}
}
oldincommingcount = incommingcount;
@@ -3944,7 +3944,7 @@ while(1)
else
{
printf("\nfailed to set channel\n");
- errorcount++;
+ globalclose();
}
}
tvfd.tv_sec = 1;
|
Assert statement calls a function which has side effects | @@ -336,7 +336,8 @@ static void __redisAsyncDisconnect(redisAsyncContext *ac) {
if (ac->err == 0) {
/* For clean disconnects, there should be no pending callbacks. */
- assert(__redisShiftCallback(&ac->replies,NULL) == REDIS_ERR);
+ int ret = __redisShiftCallback(&ac->replies,NULL);
+ assert(ret == REDIS_ERR);
} else {
/* Disconnection is caused by an error, make sure that pending
* callbacks cannot call new commands. */
|
Cirrus: Build additional code on Fedora Linux | @@ -220,6 +220,10 @@ linux_task:
dockerfile: scripts/docker/cirrus/fedora/Dockerfile
script:
+ - >
+ set --
+ -DBUILD_FULL=ON
+ -DENABLE_LOGGER=ON
- *generate
- *build
- *install
|
p2p ethernet: update p2p_ethernet.api with explicit types.
Type: refactor | option version = "1.0.0";
+import "vnet/interface_types.api";
+import "vnet/ethernet/ethernet_types.api";
+
define p2p_ethernet_add
{
u32 client_index;
u32 context;
- u32 parent_if_index;
+ vl_api_interface_index_t parent_if_index;
u32 subif_id;
- u8 remote_mac[6];
+ vl_api_mac_address_t remote_mac;
};
define p2p_ethernet_add_reply
{
u32 context;
i32 retval;
- u32 sw_if_index;
+ vl_api_interface_index_t sw_if_index;
};
define p2p_ethernet_del
{
u32 client_index;
u32 context;
- u32 parent_if_index;
- u8 remote_mac[6];
+ vl_api_interface_index_t parent_if_index;
+ vl_api_mac_address_t remote_mac;
};
define p2p_ethernet_del_reply
|
ble_mesh: Use mutex to protect client list operations | static bt_mesh_client_node_t *bt_mesh_client_pick_node(sys_slist_t *list, u16_t tx_dst)
{
+ bt_mesh_client_node_t *node = NULL;
+ sys_snode_t *cur = NULL;
+
+ bt_mesh_irq_lock();
if (sys_slist_is_empty(list)) {
+ bt_mesh_irq_unlock();
return NULL;
}
- sys_snode_t *cur = NULL; bt_mesh_client_node_t *node = NULL;
for (cur = sys_slist_peek_head(list);
cur != NULL; cur = sys_slist_peek_next(cur)) {
node = (bt_mesh_client_node_t *)cur;
if (node->ctx.addr == tx_dst) {
+ bt_mesh_irq_unlock();
return node;
}
}
+ bt_mesh_irq_unlock();
return NULL;
}
@@ -116,19 +122,25 @@ bt_mesh_client_node_t *bt_mesh_is_client_recv_publish_msg(
static bool bt_mesh_client_check_node_in_list(sys_slist_t *list, u16_t tx_dst)
{
+ bt_mesh_client_node_t *node = NULL;
+ sys_snode_t *cur = NULL;
+
+ bt_mesh_irq_lock();
if (sys_slist_is_empty(list)) {
+ bt_mesh_irq_unlock();
return false;
}
- sys_snode_t *cur = NULL; bt_mesh_client_node_t *node = NULL;
for (cur = sys_slist_peek_head(list);
cur != NULL; cur = sys_slist_peek_next(cur)) {
node = (bt_mesh_client_node_t *)cur;
if (node->ctx.addr == tx_dst) {
+ bt_mesh_irq_unlock();
return true;
}
}
+ bt_mesh_irq_unlock();
return false;
}
@@ -200,7 +212,9 @@ int bt_mesh_client_send_msg(struct bt_mesh_model *model,
if ((err = bt_mesh_model_send(model, ctx, msg, cb, cb_data)) != 0) {
osi_free(node);
} else {
+ bt_mesh_irq_lock();
sys_slist_append(&internal->queue, &node->client_node);
+ bt_mesh_irq_unlock();
k_delayed_work_init(&node->timer, timer_handler);
k_delayed_work_submit(&node->timer, timeout ? timeout : CONFIG_BLE_MESH_CLIENT_MSG_TIMEOUT);
}
@@ -293,7 +307,9 @@ int bt_mesh_client_free_node(bt_mesh_client_node_t *node)
}
// Release the client node from the queue
+ bt_mesh_irq_lock();
sys_slist_find_and_remove(&internal->queue, &node->client_node);
+ bt_mesh_irq_unlock();
// Free the node
osi_free(node);
|
Remove the BUILD_COOJA variable from .travis.yml | @@ -80,18 +80,18 @@ env:
- TEST_NAME='compile-base'
- TEST_NAME='compile-arm-ports-01'
- TEST_NAME='compile-arm-ports-02'
- - TEST_NAME='rpl-lite' BUILD_COOJA=true
- - TEST_NAME='rpl-classic' BUILD_COOJA=true
- - TEST_NAME='tun-rpl-br' BUILD_COOJA=true
+ - TEST_NAME='rpl-lite'
+ - TEST_NAME='rpl-classic'
+ - TEST_NAME='tun-rpl-br'
- TEST_NAME='coap-lwm2m'
- TEST_NAME='script-base'
- - TEST_NAME='simulation-base' BUILD_COOJA=true
- - TEST_NAME='ieee802154' BUILD_COOJA=true
+ - TEST_NAME='simulation-base'
+ - TEST_NAME='ieee802154'
- TEST_NAME='compile-nxp-ports'
- TEST_NAME='documentation'
- TEST_NAME='compile-tools'
- TEST_NAME='native-runs'
- - TEST_NAME='ipv6' BUILD_COOJA=true
- - TEST_NAME='ipv6-nbr' BUILD_COOJA=true
+ - TEST_NAME='ipv6'
+ - TEST_NAME='ipv6-nbr'
- TEST_NAME='out-of-tree-build'
- TEST_NAME='packet-parsing'
|
CMSIS-DAP: small modification in new DAP_PC_Info command | @@ -1158,7 +1158,6 @@ The <b>DAP_PC_Info Command</b> provides information about the Performance Counte
- <b>bit 0..1</b>: DataSize: number of bytes recorded (0=BYTE, 1=SHORT, 2=WORD)
- <b>bit 2..3</b>: NoRanges: channel data provides additional range bits (see below)
- <b>bit 4..5</b>: tSource: channel provides time stamp information (see below)
- - <b>bit 6</b>: DiffCom: channel communicates optionally differences instead of contiguous stream
- \b NoBits: resolution of the channel in bits
- \b IdString: is a up to 8 character 8-bit US ASCII string that identifies the channel
- \b UnitString: is a up to 8 character 8-bit US ASCII string that identifies the measurement unit of the channel (V, mA, kHz)
@@ -1221,7 +1220,7 @@ The range information is provided in the upper data bits. For example a data ch
MaxVal[1] = 20.0; // A/D result = 0xFFF in range 0 represents 20.0mA
\endcode
-For a channel that reports <b><MinVal = MaxVal = 0</b> the formula needs to be provided by the debugger as the debug unit is using perhaps an external shunt resistor.
+For a channel that reports <b>MinVal = MaxVal = 0</b> the formula needs to be provided by the debugger as the debug unit is using perhaps an external shunt resistor.
<b>DAP_PC_Info Response for \b ID=0x02: Get possible data capturing frequencies for recording of a specific channel</b>
\code
|
Tune PLL after loading INI file | @@ -1655,6 +1655,10 @@ int LMS7_Device::LoadConfig(const char *filename, int ind)
lime::LMS7002M* lms = lms_list.at(ind == -1 ? lms_chip_id : ind);
if (lms->LoadConfig(filename)==0)
{
+ //tune PLLs as saved VCO settings may not work
+ lms->SetFrequencySX(false, lms->GetFrequencySX(false));
+ lms->SetFrequencySX(true, lms->GetFrequencySX(true));
+ lms->TuneVCO(lime::LMS7002M::VCO_CGEN);
lms->Modify_SPI_Reg_bits(LMS7param(MAC),1,true);
return SetFPGAInterfaceFreq(-1, -1, -1000, -1000);
}
|
(543) adjust the TLS-detection refex for SSL2
We found the regex we're using for TLS detection works for TLS and SSL3
but wasn't matching when we see SSL2. This adjusts that regex to match
both. | @@ -208,8 +208,20 @@ typedef unsigned int bool;
// the future, consider adding some buffering of intitial payload data on a
// channel until you have enough to satisfy TLS and other protocol detection.
//
+//#define PAYLOAD_BYTESRC 5
+//#define PAYLOAD_REGEX "^16030[0-3].{4}"
+//
+// Another iteration after finding the Java SSLSocketClient program in our
+// oracle-java integration tests was connecting to the server using SSL2
+// instead of SSL3. SSL3 is what we know as TLS. SSL2 appears to use the same
+// records except they can use a different header. The updated regex below
+// looks for either form though the "magic" for SSL2 is pretty weak.
+//
+// The updated regex is also now using non-capturing groups to improve
+// performance of TLS detection.
+//
#define PAYLOAD_BYTESRC 5
-#define PAYLOAD_REGEX "^16030[0-3].{4}"
+#define PAYLOAD_REGEX "^(?:(?:16030[0-3].{4})|(?:8[0-9a-fA-F]{3}01))"
// libmusl requires LD_LIBRARY_PATH
#define LD_LIB_ENV "LD_LIBRARY_PATH"
|
OpenCanopy: Revert
Was unintentionally causing redraw of all of screen right and below mouse position every frame.
Found in . | @@ -639,27 +639,35 @@ GuiOverlayPointer (
//
BaseX = (INT64) PointerPos.Pos.X - BOOT_CURSOR_OFFSET * DrawContext->Scale;
- MaxWidth = DrawContext->Screen.Width;
if (BaseX < 0) {
ImageOffsetX = (UINT32) -BaseX;
DrawBaseX = 0;
} else {
ImageOffsetX = 0;
DrawBaseX = (UINT32) BaseX;
- MaxWidth -= DrawBaseX;
}
+ //
+ // MaxWidth/Height are for subsequent GuiDrawToBuffer, but also for
+ // saved PointerOldDraw size below; so we replicate out here clipping
+ // which is done inside GuiDrawToBuffer, in order to only redraw the
+ // minimum required.
+ // BaseX/Y may be negative but will then add, and will not overflow
+ // when within valid bounds.
+ //
+ MaxWidth = MIN (CursorImage->Width - ImageOffsetX, (UINT32) (DrawContext->Screen.Width - BaseX));
+
BaseY = (INT64) PointerPos.Pos.Y - BOOT_CURSOR_OFFSET * DrawContext->Scale;
- MaxHeight = DrawContext->Screen.Height;
if (BaseY < 0) {
ImageOffsetY = (UINT32) -BaseY;
DrawBaseY = 0;
} else {
ImageOffsetY = 0;
DrawBaseY = (UINT32) BaseY;
- MaxHeight -= DrawBaseY;
}
+ MaxHeight = MIN (CursorImage->Height - ImageOffsetY, (UINT32) (DrawContext->Screen.Height - BaseY));
+
GuiDrawToBuffer (
CursorImage,
DrawContext->CursorOpacity,
|
Do not call instcombine explicitly anymore
The extra calls seem to not be needed anymore with current LLVM versions
for good quality results, they just slow down the WG function IR generation. | @@ -283,9 +283,7 @@ kernel_compiler_passes(cl_device_id device, llvm::Module *input,
if (currentWgMethod == "loopvec" && SPMDDevice)
passes.push_back("scalarizer");
- passes.push_back("instcombine");
passes.push_back("STANDARD_OPTS");
- passes.push_back("instcombine");
// Due to unfortunate phase-ordering problems with store sinking,
// loop deletion does not always apply when executing -O3 only
|
Fix FreeBSD specific UDP stats counter bug. | #ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 339004 2018-09-28 19:47:32Z tuexen $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 339022 2018-09-30 12:16:06Z tuexen $");
#endif
#include <netinet/sctp_os.h>
@@ -4460,6 +4460,11 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
SCTP_TCB_LOCK(stcb);
atomic_subtract_int(&stcb->asoc.refcnt, 1);
}
+#endif
+#if defined(__FreeBSD__)
+ if (port) {
+ UDPSTAT_INC(udps_opackets);
+ }
#endif
SCTP_STAT_INCR(sctps_sendpackets);
SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
@@ -4917,6 +4922,11 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
sin6->sin6_port = prev_port;
}
SCTPDBG(SCTP_DEBUG_OUTPUT3, "return from send is %d\n", ret);
+#if defined(__FreeBSD__)
+ if (port) {
+ UDPSTAT_INC(udps_opackets);
+ }
+#endif
SCTP_STAT_INCR(sctps_sendpackets);
SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
if (ret) {
@@ -11982,6 +11992,11 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockaddr *dst,
return;
}
SCTPDBG(SCTP_DEBUG_OUTPUT3, "return from send is %d\n", ret);
+#if defined(__FreeBSD__)
+ if (port) {
+ UDPSTAT_INC(udps_opackets);
+ }
+#endif
SCTP_STAT_INCR(sctps_sendpackets);
SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks);
|
data tree MAINTENANCE simplify key check | @@ -1875,7 +1875,7 @@ lyd_compare(const struct lyd_node *node1, const struct lyd_node *node2, int opti
if (!(node1->schema->flags & LYS_KEYLESS) && !(options & LYD_COMPARE_FULL_RECURSION)) {
/* lists with keys, their equivalence is based on their keys */
for (struct lysc_node *key = ((struct lysc_node_list*)node1->schema)->child;
- key && key->nodetype == LYS_LEAF && (key->flags & LYS_KEY);
+ key && (key->flags & LYS_KEY);
key = key->next) {
if (lyd_compare(iter1, iter2, options)) {
return LY_ENOT;
@@ -2051,7 +2051,7 @@ lyd_dup_recursive(const struct lyd_node *node, struct lyd_node *parent, struct l
/* always duplicate keys of a list */
child = orig->child;
for (struct lysc_node *key = ((struct lysc_node_list *)dup->schema)->child;
- key && key->nodetype == LYS_LEAF && (key->flags & LYS_KEY);
+ key && (key->flags & LYS_KEY);
key = key->next) {
if (!child) {
/* possibly not keys are present in filtered tree */
|
Removing dlsym calls from src/transport.c. They became unnecessary
because wrap.c now uses _dl_sym to resolve functions as they are
used. | @@ -34,16 +34,6 @@ struct _transport_t
int fd;
} file;
};
-
- // These fields are used to avoid infinite recursion since we call
- // write and sendto from write and sendto.
- //
- // We *could* remove them and use fields from g_fn from wrap.c instead.
- // However, I don't want to do this because it would create a dependency
- // from transport to wrap. (A dep the other way is fine)
- ssize_t (*write)(int, const void *, size_t);
- ssize_t (*sendto)(int, const void *, size_t, int,
- const struct sockaddr *, socklen_t);
};
transport_t*
@@ -175,15 +165,10 @@ transportSend(transport_t* t, const char* msg)
{
if (!t || !msg) return -1;
- // Use these to avoid infinite recursion...
- if (!t->write) t->write = dlsym(RTLD_NEXT, "write");
- if (!t->sendto) t->sendto = dlsym(RTLD_NEXT, "sendto");
- if (!t->write || !t->sendto) return -1;
-
switch (t->type) {
case CFG_UDP:
if (t->udp.sock != -1) {
- int rc = t->sendto(t->udp.sock, msg, strlen(msg), 0,
+ int rc = sendto(t->udp.sock, msg, strlen(msg), 0,
(struct sockaddr *)&t->udp.saddr, sizeof(t->udp.saddr));
if (rc < 0) {
switch (errno) {
@@ -198,7 +183,7 @@ transportSend(transport_t* t, const char* msg)
break;
case CFG_FILE:
if (t->file.fd != -1) {
- int bytes = t->write(t->file.fd, msg, strlen(msg));
+ int bytes = write(t->file.fd, msg, strlen(msg));
if (bytes < 0) {
// TBD do something here
} else {
|
improved detection of ESSID change within merged cap files | @@ -1460,7 +1460,7 @@ if((apstaessidlistecleaned != NULL) && (hccapxbestoutname != NULL))
essidok = 0;
for(d = 0; d < apstaessidcountcleaned; d++)
{
- if((memcmp(zeiger->mac_ap, zeigeressid->mac_ap, 6) == 0) && (memcmp(zeiger->mac_sta, zeigeressid->mac_sta, 6) == 0))
+ if((memcmp(zeiger->mac_ap, zeigeressid->mac_ap, 6) == 0))
{
if(memcmp(&essidold, zeigeressid->essid, zeigeressid->essidlen) != 0)
{
|
[CLI] Add help message for enterprise query | @@ -51,9 +51,9 @@ type outConf struct {
}
var enterpriseKeyCmd = &cobra.Command{
- Use: "query <config key>",
+ Use: "query (admins | <config key>)",
Short: "Print config values of enterprise",
- Long: "'permissions' show everything you can set as special key",
+ Long: "'permissions' show everything you can set as special config key",
Args: cobra.MinimumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
|
lovr.data.newTextureData can create empty textures; | @@ -35,10 +35,19 @@ int l_lovrDataNewModelData(lua_State* L) {
}
int l_lovrDataNewTextureData(lua_State* L) {
+ TextureData* textureData = NULL;
+ if (lua_type(L, 1) == LUA_TNUMBER) {
+ int width = luaL_checknumber(L, 1);
+ int height = luaL_checknumber(L, 2);
+ lovrAssert(width > 0 && height > 0, "TextureData dimensions must be positive");
+ textureData = lovrTextureDataGetBlank(width, height, 0x0, FORMAT_RGBA);
+ } else {
Blob* blob = luax_readblob(L, 1, "Texture");
- TextureData* textureData = lovrTextureDataFromBlob(blob);
- luax_pushtype(L, TextureData, textureData);
+ textureData = lovrTextureDataFromBlob(blob);
lovrRelease(&blob->ref);
+ }
+
+ luax_pushtype(L, TextureData, textureData);
lovrRelease(&textureData->ref);
return 1;
}
|
readme DOC updated | @@ -35,7 +35,7 @@ as well as YANG 1.1 ([RFC 7950](https://tools.ietf.org/html/rfc7950)).
* C compiler
* cmake >= 2.8.12
-* libpcre2 >= 10.30 (including devel package)
+* libpcre2 >= 10.21 (including devel package)
* note, that PCRE is supposed to be compiled with unicode support (configure's options
`--enable-utf` and `--enable-unicode-properties`)
@@ -181,22 +181,6 @@ well as its man page are installed together with the library itself.
There is also [README](./tools/lint/examples/README.md) describing some examples of
using `yanglint`.
-libyang supports YANG extensions via a plugin mechanism. Some of the plugins (for
-NACM or Metadata) are available out of the box and installed together with libyang.
-However, when libyang is not installed and `yanglint(1)` is used from the build
-directory, the plugins are not available. There are two options:
-
-1. Install libyang.
-```
-# make install
-```
-
-2. Set environment variable `LIBYANG_EXTENSIONS_PLUGINS_DIR` to contain path to the
- built extensions plugin (`./src/extensions` from the build directory).
-```
-$ LIBYANG_EXTENSIONS_PLUGINS_DIR="`pwd`/src/extensions" ./yanglint
-```
-
## Tests
libyang includes several tests built with [cmocka](https://cmocka.org/). The tests
|
Update simple.c
To use `SSL_CTX_use_certificate_chain_file` instead of `SSL_CTX_use_certificate_file` | @@ -200,7 +200,7 @@ static int setup_ssl(const char *cert_file, const char *key_file, const char *ci
#endif
/* load certificate and private key */
- if (SSL_CTX_use_certificate_file(accept_ctx.ssl_ctx, cert_file, SSL_FILETYPE_PEM) != 1) {
+ if (SSL_CTX_use_certificate_chain_file(accept_ctx.ssl_ctx, cert_file) != 1) {
fprintf(stderr, "an error occurred while trying to load server certificate file:%s\n", cert_file);
return -1;
}
|
autoprop: auto-republish props for new runtime
Checks to see if we've changed the runtime version. If we have, publish
all the props at that new runtime version. | $: %0
make=(map @ta [next=(unit @da) =task]) :: things to make
hear=(set desk) :: observed desks
+ vers=path :: runtime version
sole=sole-id :: the way out
==
::
+* this .
def ~(. (default-agent this %|) bowl)
des ~(. (default:shoe this command) bowl)
+ rev rev:.^(vere %$ /(scot %p our.bowl)//(scot %da now.bowl)/zen/ver)
::
++ on-init
^- (quip card _this)
- [~ this]
+ :_ this(vers rev)
+ [%pass /vers %arvo %b %wait (add now.bowl ~m5)]~
::
++ on-save !>(state)
++ on-load
==
|^ =* base base.task
:+ %sag
+ =/ ver=@ta
+ =+ rev=rev
+ ?. ?=([%vere @ ~] rev)
+ (rap 3 (join '-' rev))
+ (fall (slaw %ta i.t.rev) i.t.rev)
?- -.task
?(%solid %brass %ivory) /[dap.bowl]/[name]/pill
%desk /[dap.bowl]/[name]/jam
=^ caz this (on-command sole %run i.tasks)
$(tasks t.tasks, cards (weld cards caz))
::
+ ?: ?=([%vers ~] wire)
+ :: on-wake, republish props if we're on a new runtime
+ ::
+ ?> ?=(%wake +<.sign)
+ =/ next=card
+ [%pass /vers %arvo %b %wait (add now.bowl ~m5)]
+ ?^ error.sign
+ %- (slog 'on-wake vers failed' u.error.sign)
+ [[next]~ this]
+ ?: =(rev vers) [[next]~ this]
+ =/ tasks=(list @ta) ~(tap in ~(key by make))
+ =| cards=(list card)
+ |-
+ ?~ tasks [[next cards] this]
+ =^ caz this (on-command sole %run i.tasks)
+ $(tasks t.tasks, cards (weld cards caz))
+ ::
?> ?=([%desk @ ~] wire)
=* desk i.t.wire
?. ?=(%writ +<.sign)
|
Fix missing object name for named job objects (Thanks Alex!) | @@ -699,6 +699,10 @@ NTSTATUS PhpGetBestObjectName(
if (!NT_SUCCESS(status))
goto CleanupExit;
+ // dmex: Don't do anything when we already have a valid job object name.
+ if (!PhIsNullOrEmptyString(ObjectName))
+ goto CleanupExit;
+
if (handleGetClientIdName && NT_SUCCESS(PhGetJobProcessIdList(dupHandle, &processIdList)))
{
PH_STRING_BUILDER sb;
|
config_tools/schema: fix division operator in error messages
The division operator in XPATH is `div`, not `/`. Fix it in an error
message of the assertions. | <xs:assert test="sum(//memory/range[not(@id)]/@size) > (sum(/acrn-config//vm[load_order != 'SERVICE_VM']//memory/size) + sum(/acrn-config//vm[load_order != 'SERVICE_VM']//size_hpa)) * 1024 * 1024">
<xs:annotation acrn:severity="warning" acrn:report-on="/acrn-config//vm[load_order != 'SERVICE_VM']//memory">
- <xs:documentation>The total memory size allocated to all VMs is larger then available host memory ({(sum(/acrn-config//vm[load_order != 'SERVICE_VM']//memory/size) + sum(/acrn-config//vm[load_order != 'SERVICE_VM']//size_hpa))} MB > {sum(//memory/range[not(@id)]/@size) / 1048576} MB). Reduce total allocated User VM memory size.</xs:documentation>
+ <xs:documentation>The total memory size allocated to all VMs is larger then available host memory ({(sum(/acrn-config//vm[load_order != 'SERVICE_VM']//memory/size) + sum(/acrn-config//vm[load_order != 'SERVICE_VM']//size_hpa))} MB > {sum(//memory/range[not(@id)]/@size) div 1048576} MB). Reduce total allocated User VM memory size.</xs:documentation>
</xs:annotation>
</xs:assert>
|
Add config params for shared data usage in Mbed-OS | "macro_name": "MCUBOOT_DATA_SHARING",
"value": null
},
+ "share-data-base-address": {
+ "help": "Start of reserved RAM region for data shared between bootloader and application",
+ "macro_name": "MCUBOOT_SHARED_DATA_BASE",
+ "value": null
+ },
+ "share-data-size": {
+ "help": "Size of reserved RAM region for data shared between bootloader and application",
+ "macro_name": "MCUBOOT_SHARED_DATA_SIZE",
+ "value": null
+ },
"direct-xip": {
"help": "Enable ability to boot update candidates in-place.",
"macro_name": "MCUBOOT_DIRECT_XIP",
|
microbitv2: Reset power LED & i2c state when the target is reset and run. | @@ -148,6 +148,14 @@ static void prerun_board_config(void)
gpio_init_combined_int();
}
+// Return reset button and LED to default state
+static void reset_power_led_state()
+{
+ reset_pressed = 0;
+ power_led_sleep_state_on = PWR_LED_SLEEP_STATE_DEFAULT;
+ main_shutdown_state = MAIN_SHUTDOWN_WAITING;
+}
+
// Handle the reset button behavior, this function is called in the main task every 30ms
void handle_reset_button()
{
@@ -159,7 +167,6 @@ void handle_reset_button()
if (!reset_pressed && (gpio_get_reset_btn_fwrd() || wake_from_reset)) {
// Reset button pressed
target_set_state(RESET_PROGRAM);
- i2c_clearBuffers();
reset_pressed = 1;
gpio_reset_count = 0;
wake_from_reset = 0;
@@ -396,10 +403,7 @@ void board_usb_sof_event(void)
void board_vfs_stream_closed_hook()
{
- // Return reset button and LED to default state
- reset_pressed = 0;
- power_led_sleep_state_on = PWR_LED_SLEEP_STATE_DEFAULT;
- main_shutdown_state = MAIN_SHUTDOWN_WAITING;
+ reset_power_led_state();
// Clear any pending I2C response
i2c_clearBuffers();
@@ -513,6 +517,17 @@ uint8_t usbd_hid_no_activity(uint8_t *buf)
return 0;
}
+// This function is called before the rest of target_set_state code, so it will
+// reset the micro:bit specific features state before the target state is executed
+static uint8_t target_set_state_microbit(target_state_t state)
+{
+ if (state == RESET_RUN) {
+ i2c_clearBuffers();
+ reset_power_led_state();
+ }
+ return 0;
+}
+
const board_info_t g_board_info = {
.info_version = kBoardInfoVersion,
.family_id = kNordic_Nrf52_FamilyID,
@@ -521,6 +536,7 @@ const board_info_t g_board_info = {
.daplink_target_url = "https://microbit.org/device/?id=@B&v=@V",
.prerun_board_config = prerun_board_config,
.target_cfg = &target_device_nrf52833,
+ .target_set_state = target_set_state_microbit,
.board_vendor = "Micro:bit Educational Foundation",
.board_name = "BBC micro:bit V2",
};
|
[mechanics] Temporary fix for prismatic constraint in rotation
Simply negating the rotation part of jachq for first two components of
H seems to fix the behaviour, but probably this needs work in the
elaboration of H, and this solution will certainly cause problems on
the position level.
Temporary work-around for issue | @@ -533,6 +533,13 @@ void PrismaticJointR::Jd1d2(double X1, double Y1, double Z1, double q10, double
_jachq->setValue(4, 11, q12);
_jachq->setValue(4, 12, -q11);
_jachq->setValue(4, 13, _jachq->getValue(3, 12));
+
+ for (int i=0; i<2; i++) {
+ for (int j=3; j<7; j++) {
+ _jachq->setValue(i,j, -_jachq->getValue(i,j));
+ _jachq->setValue(i,j+7, -_jachq->getValue(i,j+7));
+ }
+ }
return;
}
}
|
xfconf-plugin: Add memleak label during testing phase | @@ -13,3 +13,7 @@ add_plugin (
LINK_ELEKTRA elektra-ease
LINK_LIBRARIES "${XFCONF_LIBRARIES}"
ADD_TEST TEST_README COMPONENT libelektra${SO_VERSION}-experimental)
+
+if (ADD_TESTINGPHASE)
+ set_property (TEST "testmod_xfconf" PROPERTY LABELS memleak)
+endif ()
|
BugID:17952514: add linkkit keil project to stm32f429zi | linux_only_targets="athostapp blink coapapp helloworld http2app httpapp linkkit_gateway linkkitapp meshapp modbus_demo mqttapp otaapp tls udataapp udevapp ulocationapp yts"
-windows_only_targets="helloworld|COMPILER=armcc helloworld|COMPILER=iar"
+windows_only_targets="helloworld|COMPILER=armcc linkkitapp|COMPILER=armcc helloworld|COMPILER=iar"
|
adds "make pills" target | -.PHONY: build build-all install cross release test clean
+.PHONY: build build-all install cross release test pills clean
build:
nix-build -A urbit -A herb --no-out-link
@@ -18,6 +18,10 @@ release:
test:
sh/test
+pills:
+ sh/update-solid-pill
+ sh/update-brass-pill
+
clean:
rm -rf ./out ./work
rm -f result result-*
|
[mod_userdir] use 2-element cache
use 2-element cache, can be getpwnam() lookup is expensive
cache lifetime is 60 seconds
homedir paths are not expected to change quickly | @@ -31,12 +31,23 @@ typedef struct {
PLUGIN_DATA;
plugin_config defaults;
plugin_config conf;
+ time_t cache_ts[2];
+ buffer cache_user[2];
+ buffer cache_path[2];
} plugin_data;
INIT_FUNC(mod_userdir_init) {
return calloc(1, sizeof(plugin_data));
}
+FREE_FUNC(mod_userdir_free) {
+ plugin_data * const p = p_d;
+ free(p->cache_user[0].ptr);
+ free(p->cache_user[1].ptr);
+ free(p->cache_path[0].ptr);
+ free(p->cache_path[1].ptr);
+}
+
static void mod_userdir_merge_config_cpv(plugin_config * const pconf, const config_plugin_value_t * const cpv) {
switch (cpv->k_id) { /* index into static config_plugin_keys_t cpk[] */
case 0: /* userdir.path */
@@ -149,14 +160,41 @@ static handler_t mod_userdir_docroot_construct(request_st * const r, plugin_data
if (buffer_string_is_empty(p->conf.basepath)) {
#ifdef HAVE_PWD_H
- /* XXX: future: might add cache; getpwnam() lookup is expensive */
- struct passwd *pwd = getpwnam(u);
- if (pwd) {
- buffer_copy_string(b, pwd->pw_dir);
+ /* getpwnam() lookup is expensive; first check 2-element cache */
+ const time_t cur_ts = log_monotonic_secs;
+ int cached = -1;
+ const int cache_sz =(int)(sizeof(p->cache_user)/sizeof(*p->cache_user));
+ for (int i = 0; i < cache_sz; ++i) {
+ if (cur_ts - p->cache_ts[i] < 60 && p->cache_user[i].used
+ && buffer_eq_slen(&p->cache_user[i], u, ulen)) {
+ cached = i;
+ break;
+ }
+ }
+ struct passwd *pwd;
+ if (cached >= 0) {
+ buffer_copy_buffer(b, &p->cache_path[cached]);
+ buffer_append_path_len(b, CONST_BUF_LEN(p->conf.path));
+ }
+ else if ((pwd = getpwnam(u))) {
+ const size_t plen = strlen(pwd->pw_dir);
+ buffer_copy_string_len(b, pwd->pw_dir, plen);
buffer_append_path_len(b, CONST_BUF_LEN(p->conf.path));
if (!stat_cache_path_isdir(b)) {
return HANDLER_GO_ON;
}
+ /* update cache, replacing oldest entry */
+ cached = 0;
+ time_t cache_ts = p->cache_ts[0];
+ for (int i = 1; i < cache_sz; ++i) {
+ if (cache_ts > p->cache_ts[i]) {
+ cache_ts = p->cache_ts[i];
+ cached = i;
+ }
+ }
+ p->cache_ts[cached] = cur_ts;
+ buffer_copy_string_len(&p->cache_path[cached], b->ptr, plen);
+ buffer_copy_string_len(&p->cache_user[cached], u, ulen);
}
else /* user not found */
#endif
@@ -277,6 +315,7 @@ int mod_userdir_plugin_init(plugin *p) {
p->name = "userdir";
p->init = mod_userdir_init;
+ p->cleanup = mod_userdir_free;
p->handle_physical = mod_userdir_docroot_handler;
p->set_defaults = mod_userdir_set_defaults;
|
esp32c3-devkit-rust-1: Remove not needed -msmall-data-limit=0 compilation flag | @@ -27,8 +27,6 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32c3_out.ld
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32c3.ld
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32c3_rom.ld
-ARCHCFLAGS += -msmall-data-limit=0
-ARCHCXXFLAGS += -msmall-data-limit=0
ARCHPICFLAGS = -fpic
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
CMS_add0_cert.pod: various improvements of the description | =head1 NAME
-CMS_add0_cert, CMS_add1_cert, CMS_get1_certs, CMS_add0_crl, CMS_add1_crl, CMS_get1_crls
+CMS_add0_cert, CMS_add1_cert, CMS_get1_certs,
+CMS_add0_crl, CMS_add1_crl, CMS_get1_crls
- CMS certificate and CRL utility functions
=head1 SYNOPSIS
@@ -19,25 +20,30 @@ CMS_add0_cert, CMS_add1_cert, CMS_get1_certs, CMS_add0_crl, CMS_add1_crl, CMS_ge
=head1 DESCRIPTION
-CMS_add0_cert() and CMS_add1_cert() add certificate B<cert> to B<cms>.
-must be of type signed data or enveloped data.
+CMS_add0_cert() and CMS_add1_cert() add certificate I<cert> to I<cms>.
+I<cms> must be of type signed data or (authenticated) enveloped data.
+For signed data, such a certificate can be used to fill in the signer
+certificate and may also be helpful for chain building in certificate validation.
-CMS_get1_certs() returns all certificates in B<cms>.
+CMS_get1_certs() returns all certificates in I<cms>.
-CMS_add0_crl() and CMS_add1_crl() add CRL B<crl> to B<cms>. CMS_get1_crls()
-returns any CRLs in B<cms>.
+CMS_add0_crl() and CMS_add1_crl() add CRL I<crl> to I<cms>.
+I<cms> must be of type signed data or (authenticated) enveloped data.
+For signed data, such a CRL may be used in certificate validation.
+
+CMS_get1_crls() returns all CRLs in I<cms>.
=head1 NOTES
-The CMS_ContentInfo structure B<cms> must be of type signed data or enveloped
-data or an error will be returned.
+The CMS_ContentInfo structure I<cms> must be of type signed data or enveloped
+data or authenticated enveloped data or an error will be returned.
-For signed data certificates and CRLs are added to the B<certificates> and
-B<crls> fields of SignedData structure. For enveloped data they are added to
-B<OriginatorInfo>.
+For signed data, certificates and CRLs are added to the I<certificates> and
+I<crls> fields of SignedData structure.
+For enveloped data they are added to B<OriginatorInfo>.
-As the B<0> implies CMS_add0_cert() adds B<cert> internally to B<cms> and it
-must not be freed up after the call as opposed to CMS_add1_cert() where B<cert>
+As the 0 implies, CMS_add0_cert() adds I<cert> internally to I<cms> and it
+must not be freed up after the call as opposed to CMS_add1_cert() where I<cert>
must be freed up.
The same certificate or CRL must not be added to the same cms structure more
@@ -50,7 +56,7 @@ CMS_add0_cert(), CMS_add1_cert() and CMS_add0_crl() and CMS_add1_crl() return
CMS_get1_certs() and CMS_get1_crls() return the STACK of certificates or CRLs
or NULL if there are none or an error occurs. The only error which will occur
-in practice is if the B<cms> type is invalid.
+in practice is if the I<cms> type is invalid.
=head1 SEE ALSO
|
Update version to 3.5.270 | #define MAT_VERSION_HPP
// WARNING: DO NOT MODIFY THIS FILE!
// This file has been automatically generated, manual changes will be lost.
-#define BUILD_VERSION_STR "3.5.200.1"
-#define BUILD_VERSION 3,5,200,1
+#define BUILD_VERSION_STR "3.5.270.1"
+#define BUILD_VERSION 3,5,270,1
#ifndef RESOURCE_COMPILER_INVOKED
#include "ctmacros.hpp"
@@ -18,7 +18,7 @@ namespace MAT_NS_BEGIN {
uint64_t const Version =
((uint64_t)3 << 48) |
((uint64_t)5 << 32) |
- ((uint64_t)200 << 16) |
+ ((uint64_t)270 << 16) |
((uint64_t)1);
} MAT_NS_END
|
zephyr/shim/chip/it8xxx2/power_policy.c: Format with clang-format
BRANCH=none
TEST=none | @@ -29,8 +29,8 @@ const struct pm_state_info *pm_policy_next_state(uint8_t cpu, int32_t ticks)
* To check if given power state is enabled and
* could be used.
*/
- if (pm_policy_state_lock_is_active(
- pm_states[i].state, PM_ALL_SUBSTATES)) {
+ if (pm_policy_state_lock_is_active(pm_states[i].state,
+ PM_ALL_SUBSTATES)) {
continue;
}
|
groups: remove remnant groups from recent | @@ -43,7 +43,9 @@ function RecentGroups(props: { recent: string[]; associations: Associations }) {
<Box fontSize={0} px={1} py={2} color="gray">
Recent Groups
</Box>
- {props.recent.slice(1, 5).map((g) => {
+ {props.recent.filter((e) => {
+ return (e in associations?.contacts);
+ }).slice(1, 5).map((g) => {
const assoc = associations.contacts[g];
const color = uxToHex(assoc?.metadata?.color || "0x0");
return (
|
add single mass option for neutrinos | @@ -108,7 +108,7 @@ class Cosmology(object):
m_nu (:obj:`float`, optional): Total mass in eV of the massive
neutrinos present. Defaults to 0.
m_nu_type (:obj:`str`, optional): The type of massive neutrinos. Should
- be one of 'inverted', 'normal', 'equal' or 'list'. The default
+ be one of 'inverted', 'normal', 'equal', 'single', or 'list'. The default
of None is the same as 'normal'.
w0 (:obj:`float`, optional): First order term of dark energy equation
of state. Defaults to -1.
@@ -450,6 +450,11 @@ class Cosmology(object):
mnu_list[0] = m_nu[0]/3.
mnu_list[1] = m_nu[0]/3.
mnu_list[2] = m_nu[0]/3.
+ elif (m_nu_type == 'single'):
+ mnu_list = [0]*3
+ mnu_list[0] = m_nu[0]
+ mnu_list[1] = 0.
+ mnu_list[2] = 0.
# Check which of the neutrino species are non-relativistic today
N_nu_mass = 0
|
Now using K_MIN/K_MAX from ccl_splines | #include "ccl.h"
#include <stdio.h>
+#include "ccl_params.h"
int main(int argc, char * argv[])
{
@@ -24,7 +25,6 @@ int main(int argc, char * argv[])
ccl_parameters params = ccl_parameters_create_lcdm_nu(Omega_c, Omega_b, Omega_k,h, A_s, n_s, Neff, Nmass, mnu, &status);
ccl_cosmology * cosmo = ccl_cosmology_create(params, config);
-
// Open file to read k values from CLASS at which to compute things
input = fopen("./only_CCL_passed_params_3massless_pk_nl.dat", "r");
@@ -37,7 +37,7 @@ int main(int argc, char * argv[])
// Open file to output results
output = fopen("./neutrinos_3massless_nl_pk_test.out", "w");
while((fscanf(input, "%le %le\n", &k, &no)!=EOF)){
- if ((k<K_MIN) || (k>K_MAX)) continue;
+ if ((k<ccl_splines->K_MIN_DEFAULT) || (k>ccl_splines->K_MAX)) continue;
// Note CLASS k's are in h/Mpc but CCL takes k's in 1/Mpc, so we convert.
double p = ccl_nonlin_matter_power(cosmo, k * h , 1.0, &status);
// CCL outputs P(k) in Mpc^3, but we want to compare to class, which outputs in (Mpc/h)^3, so convert. Output is in k-> h / Mpc, P(k)-> (Mpc/h)^3.
|
Fix saving on Mac app | @@ -28,6 +28,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate {
Python.shared.isScriptRunning = false
}
+ /// Saves current editing document.
+ @IBAction func saveDoc(_ sender: Any) {
+ (NSApp.keyWindow?.contentViewController as? EditorViewController)?.document?.save(self)
+ }
+
// MARK: - Application delegate
func applicationDidFinishLaunching(_ aNotification: Notification) {
|
landscape: ignore punctuation tokenizing URLs
Tiny fix to the URL regex so that it doesn't store punctuation marks (e.g. ",") inside the urls, breaking the links. | import urbitOb from 'urbit-ob';
-const URL_REGEX = new RegExp(String(/^((\w+:\/\/)[-a-zA-Z0-9:@;?&=\/%\+\.\*!'\(\),\$_\{\}\^~\[\]`#|]+)/.source));
+const URL_REGEX = new RegExp(String(/^((\w+:\/\/)[-a-zA-Z0-9:@;?&=\/%\+\.\*!'\(\),\$_\{\}\^~\[\]`#|]+\w)/.source));
const isUrl = (string) => {
try {
|
bsp/nordic_pca10095_net: Set empty IPC region for bootloader build
IPC is not used in bootloader but linker were complaining about IPC
region being not present. | @@ -20,6 +20,7 @@ MEMORY
{
FLASH (rx) : ORIGIN = 0x01000000, LENGTH = 0x4000
RAM (rwx) : ORIGIN = 0x21000000, LENGTH = 0x10000
+ IPC (rw) : ORIGIN = 0x20000400, LENGTH = 0
}
/* The bootloader does not contain an image header */
|
Allow imports of packages required to build YT specific main() of jaeger components. | @@ -260,7 +260,8 @@ ALLOW cloud -> vendor/github.com/rcrowley/go-metrics
# CONTRIB-865. Jaeger YT plugin. responsible: prime@
ALLOW yt/jaeger/plugin -> vendor/github.com/jaegertracing/jaeger
ALLOW yt/jaeger/plugin -> vendor/github.com/uber/jaeger-lib
+ALLOW yt/jaeger/plugin -> vendor/github.com/uber/jaeger-client-go
ALLOW yt/jaeger/plugin -> vendor/github.com/spf13/viper
-
+ALLOW yt/jaeger/plugin -> vendor/github.com/gorilla/handlers
DENY .* -> vendor/
|
Improve handling of HTTP 401 Unauthorized
The wsmancli returns an error immediately after receiving
an HTTP 401 Unauthorized response.
The handling of authentication should be improved to better
conform to RFC 2616.
Author of the patch:
Thomas Derr (DFS Deutsche Flugsicherung GmbH, https://www.dfs.de/) | @@ -459,6 +459,7 @@ wsmc_handler( WsManClient *cl,
long http_code;
long auth_avail = 0;
char *_user = NULL, *_pass = NULL;
+ int _no_auth = 0; /* 0 if authentication is used, 1 if no authentication was used */
u_buf_t *response = NULL;
//char *soapaction;
char *tmp_str = NULL;
@@ -564,6 +565,7 @@ wsmc_handler( WsManClient *cl,
_user = wsmc_get_user(cl);
_pass = wsmc_get_password(cl);
if (_user && _pass && cl->data.auth_set) {
+ _no_auth = 0;
r = curl_easy_setopt(curl, CURLOPT_HTTPAUTH, cl->data.auth_set);
if (r != CURLE_OK) {
cl->fault_string = u_strdup(curl_easy_strerror(r));
@@ -584,6 +586,11 @@ wsmc_handler( WsManClient *cl,
curl_err("curl_easy_setopt(curl, CURLOPT_USERPWD, ..) failed");
goto DONE;
}
+ } else {
+ /* request without user credentials, remember this for
+ * later use when it might become necessary to print an error message
+ */
+ _no_auth = 1;
}
if (wsman_debug_level_debugged(DEBUG_LEVEL_MESSAGE)) {
@@ -616,6 +623,24 @@ wsmc_handler( WsManClient *cl,
break;
case 401:
// The server requires authentication.
+ /* RFC 2616 states:
+ *
+ * If the request already included Authorization credentials, then the 401
+ * response indicates that authorization has been refused for those
+ * credentials. If the 401 response contains the same challenge as the
+ * prior response, and the user agent has already attempted
+ * authentication at least once, then the user SHOULD be presented the
+ * entity that was given in the response, since that entity might
+ * include relevant diagnostic information.
+ */
+ if (_no_auth == 0) {
+ /* no authentication credentials were used. It is only
+ * possible to write a message about the current situation. There
+ * is no information about the last attempt to access the resource.
+ * Maybe at a later point in time I will implement more state information.
+ */
+ fprintf(stdout,"Authentication failed, please retry\n");
+ }
break;
default:
// The status code does not indicate success.
|
loadable_apps/micom/messaging : Fix Out-of-bounds read
overrun-local: Overrunning array of 0 4-byte elements at element index 0 (byte offset 3) by dereferencing pointer &sigset. [Note: The source code implementation of the function has been overridden by a builtin model.] | @@ -115,14 +115,13 @@ static void multi_recv_callback(msg_reply_type_t msg_type, msg_recv_buf_t *recv_
printf("[M] OK: Multicast(nonblock)Recv [%s].\n", (char *)recv_data->buf);
}
-static void set_messaging_signal(void)
+static void set_messaging_signal(sigset_t *sigset;)
{
- sigset_t sigset;
- sigfillset(&sigset);
- sigdelset(&sigset, SIGMSG_MESSAGING);
- sigdelset(&sigset, SIGUSR1);
- (void)sigprocmask(SIG_SETMASK, &sigset, NULL);
+ sigfillset(sigset);
+ sigdelset(sigset, SIGMSG_MESSAGING);
+ sigdelset(sigset, SIGUSR1);
+ (void)sigprocmask(SIG_SETMASK, sigset, NULL);
}
static int multi_recv_nonblock(int argc, FAR char *argv[])
@@ -130,8 +129,9 @@ static int multi_recv_nonblock(int argc, FAR char *argv[])
int ret;
msg_callback_info_t cb_info;
msg_recv_buf_t data;
+ sigset_t sigset;
- set_messaging_signal();
+ set_messaging_signal(&sigset);
cb_info.cb_func = multi_recv_callback;
cb_info.cb_data = NULL;
@@ -229,7 +229,7 @@ static int nonblock_recv_test(void)
msg_callback_info_t cb_info;
msg_recv_buf_t data;
- set_messaging_signal();
+ set_messaging_signal(&sigset);
cb_info.cb_func = recv_callback;
cb_info.cb_data = NULL;
|
guybrush: implement usb_pd_policy stubs
Implement pd stubs in usb_pd_policy. Based on zork implementation.
TEST=Build
BRANCH=None | int pd_check_vconn_swap(int port)
{
- /* TODO */
- return 0;
+ /*
+ * Do not allow vconn swap 5V rail is off
+ * S5_PGOOD depends on PG_PP5000_S5 being asserted,
+ * so GPIO_S5_PGOOD is a reasonable proxy for PP5000_S5
+ */
+ return gpio_get_level(GPIO_S5_PGOOD);
}
void pd_power_supply_reset(int port)
{
- /* TODO */
+ /*
+ * Don't need to shutoff VBus if we are not sourcing it
+ * TODO: Ensure Vbus sourcing is being disabled appropriately to
+ * avoid invalid TC states
+ */
+ if (ppc_is_sourcing_vbus(port)) {
+ /* Disable VBUS. */
+ ppc_vbus_source_enable(port, 0);
+
+ /* Enable discharge if we were previously sourcing 5V */
+ if (IS_ENABLED(CONFIG_USB_PD_DISCHARGE))
+ pd_set_vbus_discharge(port, 1);
+ }
+
+ /* Notify host of power info change. */
+ pd_send_host_event(PD_EVENT_POWER_CHANGE);
}
int pd_set_power_supply_ready(int port)
{
- /* TODO */
- return 0;
+ int rv;
+
+ /* Disable charging. */
+ rv = ppc_vbus_sink_enable(port, 0);
+ if (rv)
+ return rv;
+
+ if (IS_ENABLED(CONFIG_USB_PD_DISCHARGE))
+ pd_set_vbus_discharge(port, 0);
+
+ /* Provide Vbus. */
+ rv = ppc_vbus_source_enable(port, 1);
+ if (rv)
+ return rv;
+
+ /* Notify host of power info change. */
+ pd_send_host_event(PD_EVENT_POWER_CHANGE);
+
+ return EC_SUCCESS;
}
int board_vbus_source_enabled(int port)
|
stm32/modmachine: Handle case of no MICROPY_PY_MACHINE_I2C. | @@ -558,7 +558,9 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_RTC), MP_ROM_PTR(&pyb_rtc_type) },
{ MP_ROM_QSTR(MP_QSTR_ADC), MP_ROM_PTR(&pyb_adc_type) },
#endif
+#if MICROPY_PY_MACHINE_I2C
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&machine_i2c_type) },
+#endif
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&machine_hard_spi_type) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&pyb_uart_type) },
{ MP_ROM_QSTR(MP_QSTR_WDT), MP_ROM_PTR(&pyb_wdt_type) },
|
Add Doxygen to new functions | #include <cassert>
-/* See header for documentation. */
-void compute_partition_averages_rgb(
+/**
+ * @brief Compute the average RGB color of each partition.
+ *
+ * The algorithm here uses a vectorized sequential scan and per-partition
+ * color accumulators, using select() to mask texel lanes in other partitions.
+ *
+ * We only accumulate sums for N-1 partitions during the scan; the value for
+ * the last partition can be computed given that we know the block-wide average
+ * already.
+ *
+ * Because of this we could reduce the loop iteration count so it "just" spans
+ * the max texel index needed for the N-1 partitions, which could need fewer
+ * iterations than the full block texel count. However, this makes the loop
+ * count erratic and causes more branch mispredictions so is a net loss.
+ *
+ * @param pi The partitioning to use.
+ * @param blk The block data to process.
+ * @param[out] averages The output averages. Unused partition indices will
+ * not be initialized, and lane<3> will be zero.
+ */
+static void compute_partition_averages_rgb(
const partition_info& pi,
const image_block& blk,
vfloat4 averages[BLOCK_MAX_PARTITIONS]
@@ -176,8 +195,27 @@ void compute_partition_averages_rgb(
}
}
-/* See header for documentation. */
-void compute_partition_averages_rgba(
+/**
+ * @brief Compute the average RGBA color of each partition.
+ *
+ * The algorithm here uses a vectorized sequential scan and per-partition
+ * color accumulators, using select() to mask texel lanes in other partitions.
+ *
+ * We only accumulate sums for N-1 partitions during the scan; the value for
+ * the last partition can be computed given that we know the block-wide average
+ * already.
+ *
+ * Because of this we could reduce the loop iteration count so it "just" spans
+ * the max texel index needed for the N-1 partitions, which could need fewer
+ * iterations than the full block texel count. However, this makes the loop
+ * count erratic and causes more branch mispredictions so is a net loss.
+ *
+ * @param pi The partitioning to use.
+ * @param blk The block data to process.
+ * @param[out] averages The output averages. Unused partition indices will
+ * not be initialized.
+ */
+static void compute_partition_averages_rgba(
const partition_info& pi,
const image_block& blk,
vfloat4 averages[BLOCK_MAX_PARTITIONS]
|
common/usbc_intr_task.c: Format with clang-format
BRANCH=none
TEST=none | @@ -57,8 +57,7 @@ static void service_one_port(int port)
tcpc_alert(port);
now = get_time();
- if (timestamp_expired(storm_tracker[port].time,
- &now)) {
+ if (timestamp_expired(storm_tracker[port].time, &now)) {
/* Reset timer into future */
storm_tracker[port].time.val = now.val + ALERT_STORM_INTERVAL;
@@ -122,7 +121,6 @@ void pd_interrupt_handler_task(void *p)
*/
while ((tcpc_get_alert_status() & port_mask) &&
pd_is_port_enabled(port)) {
-
service_one_port(port);
}
|
utils: fix leak on exception (CID 312999) | @@ -931,6 +931,7 @@ int flb_utils_proxy_url_split(const char *in_url, char **out_protocol,
/* Parse username:passwrod part. */
tmp = strchr(proto_sep, ':');
if (!tmp) {
+ flb_free(protocol);
return -1;
}
username = mk_string_copy_substr(proto_sep, 0, tmp - proto_sep);
|
mesh: Remove redundant 'provisioned' variable
This variable is both redundant as well as problematic when it comes
to adding persistent-storage-based provisioning information, which
will not come through main.c or the bt_mesh_provision() API. Just
remove it and use bt_mesh.valid which serves the same purpose in
practice. | #include "settings.h"
u8_t g_mesh_addr_type;
-static bool provisioned;
int bt_mesh_provision(const u8_t net_key[16], u16_t net_idx,
u8_t flags, u32_t iv_index, u32_t seq,
@@ -62,8 +61,6 @@ int bt_mesh_provision(const u8_t net_key[16], u16_t net_idx,
memcpy(bt_mesh.dev_key, dev_key, 16);
- provisioned = true;
-
if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
BT_DBG("Storing network information persistently");
bt_mesh_store_net(addr, dev_key);
@@ -102,7 +99,7 @@ int bt_mesh_provision(const u8_t net_key[16], u16_t net_idx,
void bt_mesh_reset(void)
{
- if (!provisioned) {
+ if (!bt_mesh.valid) {
return;
}
@@ -143,8 +140,6 @@ void bt_mesh_reset(void)
memset(bt_mesh.rpl, 0, sizeof(bt_mesh.rpl));
- provisioned = false;
-
bt_mesh_scan_disable();
bt_mesh_beacon_disable();
@@ -155,7 +150,7 @@ void bt_mesh_reset(void)
bool bt_mesh_is_provisioned(void)
{
- return provisioned;
+ return bt_mesh.valid;
}
int bt_mesh_prov_enable(bt_mesh_prov_bearer_t bearers)
|
Updated masternode connections | @@ -2118,11 +2118,13 @@ void ThreadCheckDarkSendPool()
{
c++;
- MilliSleep(5000);
+ MilliSleep(1000);
//printf("ThreadCheckDarkSendPool::check timeout\n");
darkSendPool.CheckTimeout();
- if(c % 60 == 0){
+ int mnTimeout = 60;
+
+ if(c % mnTimeout == 0){
LOCK(cs_main);
/*
cs_main is required for doing masternode.Check because something
@@ -2156,8 +2158,10 @@ void ThreadCheckDarkSendPool()
CleanTransactionLocksList();
}
+ int mnRefresh = 5; //(5*5)
+
//try to sync the masternode list and payment list every 5 seconds from at least 3 nodes
- if(c % (5*5) == 0 && RequestedMasterNodeList < 3){
+ if(c % mnRefresh == 0 && RequestedMasterNodeList < 3){
bool fIsInitialDownload = IsInitialBlockDownload();
if(!fIsInitialDownload) {
LOCK(cs_vNodes);
@@ -2184,7 +2188,8 @@ void ThreadCheckDarkSendPool()
activeMasternode.ManageStatus();
}
- if(c % (60*5) == 0){
+ //if(c % (60*5) == 0){
+ if(c % 60 == 0){
//if we've used 1/5 of the masternode list, then clear the list.
if((int)vecMasternodesUsed.size() > (int)vecMasternodes.size() / 5)
vecMasternodesUsed.clear();
|
board/dojo/board.c: Format with clang-format
BRANCH=none
TEST=none
Tricium: disable | @@ -435,8 +435,8 @@ const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {
},
};
-void board_set_charge_limit(int port, int supplier, int charge_ma,
- int max_ma, int charge_mv)
+void board_set_charge_limit(int port, int supplier, int charge_ma, int max_ma,
+ int charge_mv)
{
/* Limit input current lower than 2944 mA for safety */
charge_ma = MIN(charge_ma, 2944);
|
decisions: some last comments integrated | @@ -22,7 +22,7 @@ It was found unexpected that this assert will fail.
When doing a second `kdbGet` with a new keyset no keys will be returned when no backends report changed data, because kdb internally thinks the data is already up-to-date.
A unit test by @atmaxinger:
-```
+```c
static void test_doubleGet (void)
{
printf("running %s\n", __func__);
@@ -104,9 +104,9 @@ The name is not relevant.
It is always read-only, because the key is in at least one keyset (the internal one).
Pseudo code example:
-```
+```c
Key * key = keyNew ("dir:/something", KEY_VALUE, "my value", KEY_END);
-keyCopy (key_dup, key, ELEKTRA_COW);
+keyCopy (key_dup, key, ELEKTRA_CP_COW);
assert (keyString(key) == keyString(key_dup));
keySetString (key_dup, "other value"); // COW done here
assert (keyString(key) != keyString(key_dup));
@@ -117,6 +117,21 @@ assert (keyName(key) == keyName(key_dup)); // stays always valid
This is already implemented for the MMAP cache, so the implementation should be straightforward:
Do the same COW duplications as done for MMAP but with a different flag.
+@kodebach wrote:
+
+> What I wanted to say is that mmap already does COW, so we can reuse the code and probably the flag.
+> If there is some code that is only needed for mmap and not COW, we could make mmap set two flags one for mmap and one for the general COW code.
+
+For the metadata, however, also COW KeySets might be needed (at least with the current API).
+Example:
+
+```c
+keyCopy (cow, key, ELEKTRA_CP_COW);
+KeySet * cowMeta = keyMeta (cow);
+ksAppendKey (cowMeta, keyNew ("meta:/whatever", KEY_VALUE, "abc", KEY_END));
+ksRemoveByName (cowMeta, "meta:/type");
+```
+
**Pros:**
- Elektra doesn't require MMAP
@@ -133,7 +148,7 @@ Do the same COW duplications as done for MMAP but with a different flag.
@kodebach wrote:
-> Change the API and remove KeySet from kdbGet and kdbSet (also option 4 in #4574).
+> Change the API and remove KeySet from kdbGet and kdbSet also option 4 in [#4574](https://pull.libelektra.org/4574).
> If the keyset is owned by the KDB handle, it should not be as big surprise, if there is extra data in there.
> I certainly wouldn't try to asset anything on the contents of a KeySet that I don't own directly, unless the condition is explicitly documented somewhere.
@@ -158,7 +173,13 @@ Semantics can be provided without additional code or overhead in the core.
## Notes
+Problem "Fewer Keys" was found to be a ["horrible problem"](https://pull.libelektra.org/4619)
+
Issues where the problem described here was found confusing:
- [#760](https://issues.libelektra.org/760)
- [#1363](https://issues.libelektra.org/1363)
+
+@mpranj wrote about the performance for `MMAP Cache without parent key`:
+
+> in my benchmarks the pointer correction was never a bottleneck.
|
fix typo & add negative test case for test_equal_complex | @@ -159,7 +159,7 @@ static void test_equal_object()
static void test_equal_complex()
{
- json_t *value1, *value2;
+ json_t *value1, *value2, *value3;
const char *complex_json =
"{"
@@ -176,15 +176,25 @@ static void test_equal_complex()
value1 = json_loads(complex_json, 0, NULL);
value2 = json_loads(complex_json, 0, NULL);
+ value3 = json_loads(complex_json, 0, NULL);
if(!value1 || !value2)
fail("unable to parse JSON");
if(!json_equal(value1, value2))
- fail("json_equal fails for two inequal strings");
+ fail("json_equal fails for two equal objects");
+
+ json_array_set_new(json_object_get(json_object_get(value2, "object"),
+ "array-in-object"), 1, json_false());
+ if(json_equal(value1, value2))
+ fail("json_equal fails for two inequal objects");
+
+ json_object_set_new(json_object_get(json_object_get(value3, "object"),
+ "object-in-object"), "foo", json_string("baz"));
+ if(json_equal(value1, value3))
+ fail("json_equal fails for two inequal objects");
json_decref(value1);
json_decref(value2);
-
- /* TODO: There's no negative test case here */
+ json_decref(value3);
}
static void run_tests()
|
fix Queue.h mpool bug | @@ -68,7 +68,7 @@ public:
private:
struct rt_messagequeue mID;
- char mPool[(sizeof(struct rt_messagequeue) + sizeof(T)) * queue_sz];
+ char mPool[(sizeof(void *) + RT_ALIGN(sizeof(T), RT_ALIGN_SIZE)) * queue_sz];
};
}
|
porting/blemesh: add missing defs
Added defs included in Mesh sync | #define MYNEWT_VAL_BLE_MESH_OOB_OUTPUT_SIZE (4)
#endif
+#ifndef MYNEWT_VAL_BLE_MESH_PROXY_MSG_LEN
+#if MYNEWT_VAL_BLE_MESH_PB_GATT
+#define MYNEWT_VAL_BLE_MESH_PROXY_MSG_LEN (66)
+#elif MYNEWT_VAL_BLE_MESH_GATT_PROXY
+#define MYNEWT_VAL_BLE_MESH_PROXY_MSG_LEN (33)
+#endif
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_MODEL_VND_MSG_CID_FORCE
+#define MYNEWT_VAL_BLE_MESH_MODEL_VND_MSG_CID_FORCE (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_ACCESS_LAYER_MSG
+#define MYNEWT_VAL_BLE_MESH_ACCESS_LAYER_MSG (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_IV_UPDATE_SEQ_LIMIT
+#define MYNEWT_VAL_BLE_MESH_IV_UPDATE_SEQ_LIMIT (0x800000)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_PROV_OOB_PUBLIC_KEY
+#define MYNEWT_VAL_BLE_MESH_PROV_OOB_PUBLIC_KEY (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_ADV_EXT
+#define MYNEWT_VAL_BLE_MESH_ADV_EXT (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_ADV_LEGACY
+#define MYNEWT_VAL_BLE_MESH_ADV_LEGACY (1)
+#endif
#ifndef MYNEWT_VAL_BSP_NRF51
#define MYNEWT_VAL_BSP_NRF51 (0)
|
doc: update package installation commands to resolve dependencies | @@ -124,7 +124,7 @@ Then use:
make package
```
-which will create a package for distributions where a Generator is implemented.
+which will create packages for distributions where a Generator is implemented.
You can find the generated packages in the `packages` directory of the build directory.
@@ -145,12 +145,20 @@ To install the packages run this in the `packages` directory:
dpkg -i *
```
+If any dependency problems appear, run following command to install the missing dependencies:
+
+```sh
+apt-get -f install
+```
+
#### Fedora
-To install the packages run this in the `packages` directory:
+To install RPM packages we recommend using `yum localinstall` since installing with `rpm` doesn't resolve missing dependencies.
+
+Run following command in the `packages` directory:
```sh
-rpm -U *
+yum localinstall *
```
### make
|
Declare dot_compute static to avoid conflicts in multiarch builds | @@ -77,7 +77,7 @@ static void ddot_kernel_8(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *d)
#endif
-FLOAT dot_compute(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
+static FLOAT dot_compute(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
{
BLASLONG i=0;
BLASLONG ix=0,iy=0;
@@ -189,7 +189,6 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
#else
mode = BLAS_DOUBLE | BLAS_REAL;
#endif
-fprintf(stderr,"threaded ddot with %d threads\n",nthreads);
blas_level1_thread_with_return_value(mode, n, 0, 0, &dummy_alpha,
x, inc_x, y, inc_y, result, 0,
( void *)dot_thread_function, nthreads);
|
[mod_sockproxy] reset http vers, avoid rare crash (fixes
(thx ultimator)
x-ref:
"Random Segfaults with version 1.4.64 w/ mod_sockproxy and ALPN h2" | @@ -163,6 +163,7 @@ static handler_t mod_sockproxy_connection_accept(connection *con, void *p_d) {
hctx->create_env = sockproxy_create_env_connect;
hctx->response = chunk_buffer_acquire();
r->http_status = -1; /*(skip HTTP processing)*/
+ r->http_version = HTTP_VERSION_UNSET;
}
return HANDLER_GO_ON;
|
Add missing malloc assert; | @@ -586,6 +586,7 @@ static ModelData* openvr_newModelData(Device device, bool animated) {
uint32_t componentCount = state.renderModels->GetComponentCount(renderModelName);
renderModels = malloc(componentCount * sizeof(*renderModels));
renderModelTextures = malloc(componentCount * sizeof(*renderModelTextures));
+ lovrAssert(renderModels && renderModelTextures, "Out of memory");
for (uint32_t i = 0; i < componentCount; i++) {
if (namesSize < charCount + 256) {
namesSize += 256;
|
mesa: Add v3d and kmsro driver as well
Videocore 5/6 support was added as a separate driver in mesa: v3d. Enable
this so we can have it available for Raspberry Pi 4. Also, this driver
depends on kmsro. | # as default. To state out clearly that Raspi needs dri3 and to avoid surprises
# in case oe-core changes this default, we set dri3 explicitly.
PACKAGECONFIG_append_rpi = " gallium ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)}"
-GALLIUMDRIVERS_append_rpi = ",vc4"
+GALLIUMDRIVERS_append_rpi = ",vc4,v3d,kmsro"
DRIDRIVERS_rpi = ""
|
fix undeclared variable error
# Conflicts:
# library/ssl_tls13_client.c | @@ -120,9 +120,7 @@ static int ssl_tls13_write_exts_client_hello( mbedtls_ssl_context *ssl,
* extension list must be kept to write
* the total extension list size in the end.
*/
-#if defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED)
int ret;
-#endif /* MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED */
unsigned char* extension_start;
size_t cur_ext_len; /* Size of the current extension */
size_t total_ext_len; /* Size of list of extensions */
|
wifi: optimize espnow when disconnect pm enable | @@ -297,7 +297,9 @@ static esp_err_t example_espnow_init(void)
ESP_ERROR_CHECK( esp_now_init() );
ESP_ERROR_CHECK( esp_now_register_send_cb(example_espnow_send_cb) );
ESP_ERROR_CHECK( esp_now_register_recv_cb(example_espnow_recv_cb) );
-
+#if CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE
+ ESP_ERROR_CHECK( esp_now_set_wake_window(65535) );
+#endif
/* Set primary master key. */
ESP_ERROR_CHECK( esp_now_set_pmk((uint8_t *)CONFIG_ESPNOW_PMK) );
|
bootloader: explicit initialization | @@ -478,7 +478,7 @@ void bootloader_utility_load_boot_image(const bootloader_state_t *bs, int start_
{
int index = start_index;
esp_partition_pos_t part;
- esp_image_metadata_t image_data;
+ esp_image_metadata_t image_data = {0};
if (start_index == TEST_APP_INDEX) {
if (check_anti_rollback(&bs->test) && try_load_partition(&bs->test, &image_data)) {
|
VERSION bump to version 1.3.52 | @@ -31,7 +31,7 @@ endif()
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(SYSREPO_MAJOR_VERSION 1)
set(SYSREPO_MINOR_VERSION 3)
-set(SYSREPO_MICRO_VERSION 51)
+set(SYSREPO_MICRO_VERSION 52)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
[mod_proxy] proxy_response_headers load v earlier
proxy_response_headers() issue variable load slightly earlier | @@ -1034,9 +1034,10 @@ static handler_t proxy_create_env_connect(gw_handler_ctx *gwhctx) {
static handler_t proxy_response_headers(request_st * const r, struct http_response_opts_t *opts) {
/* response headers just completed */
handler_ctx *hctx = (handler_ctx *)opts->pdata;
+ http_header_remap_opts * const remap_hdrs = &hctx->conf.header;
if (light_btst(r->resp_htags, HTTP_HEADER_UPGRADE)) {
- if (hctx->conf.header.upgrade && r->http_status == 101) {
+ if (remap_hdrs->upgrade && r->http_status == 101) {
/* 101 Switching Protocols; transition to transparent proxy */
gw_set_transparent(&hctx->gw);
http_response_upgrade_read_body_unknown(r);
@@ -1055,21 +1056,24 @@ static handler_t proxy_response_headers(request_st * const r, struct http_respon
/* rewrite paths, if needed */
- if (NULL == hctx->conf.header.urlpaths
- && NULL == hctx->conf.header.hosts_response)
+ if (NULL == remap_hdrs->urlpaths && NULL == remap_hdrs->hosts_response)
return HANDLER_GO_ON;
+ buffer *vb;
if (light_btst(r->resp_htags, HTTP_HEADER_LOCATION)) {
- buffer *vb = http_header_response_get(r, HTTP_HEADER_LOCATION, CONST_STR_LEN("Location"));
- if (vb) http_header_remap_uri(vb, 0, &hctx->conf.header, 0);
+ vb = http_header_response_get(r, HTTP_HEADER_LOCATION,
+ CONST_STR_LEN("Location"));
+ if (vb) http_header_remap_uri(vb, 0, remap_hdrs, 0);
}
if (light_btst(r->resp_htags, HTTP_HEADER_CONTENT_LOCATION)) {
- buffer *vb = http_header_response_get(r, HTTP_HEADER_CONTENT_LOCATION, CONST_STR_LEN("Content-Location"));
- if (vb) http_header_remap_uri(vb, 0, &hctx->conf.header, 0);
+ vb = http_header_response_get(r, HTTP_HEADER_CONTENT_LOCATION,
+ CONST_STR_LEN("Content-Location"));
+ if (vb) http_header_remap_uri(vb, 0, remap_hdrs, 0);
}
if (light_btst(r->resp_htags, HTTP_HEADER_SET_COOKIE)) {
- buffer *vb = http_header_response_get(r, HTTP_HEADER_SET_COOKIE, CONST_STR_LEN("Set-Cookie"));
- if (vb) http_header_remap_setcookie(vb, 0, &hctx->conf.header);
+ vb = http_header_response_get(r, HTTP_HEADER_SET_COOKIE,
+ CONST_STR_LEN("Set-Cookie"));
+ if (vb) http_header_remap_setcookie(vb, 0, remap_hdrs);
}
return HANDLER_GO_ON;
|
build CHANGE normalize cmake's build type | @@ -30,6 +30,17 @@ set(CMAKE_MACOSX_RPATH TRUE)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif()
+# normalize build type string
+string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UPPER)
+if ("${BUILD_TYPE_UPPER}" STREQUAL "RELEASE")
+ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE)
+elseif ("${BUILD_TYPE_UPPER}" STREQUAL "DEBUG")
+ set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE)
+elseif ("${BUILD_TYPE_UPPER}" STREQUAL "RELWITHDEBINFO")
+ set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Build Type" FORCE)
+elseif ("${BUILD_TYPE_UPPER}" STREQUAL "RELWITHDEBUG")
+ set(CMAKE_BUILD_TYPE "RelWithDebug" CACHE STRING "Build Type" FORCE)
+endif()
add_compile_options(-Wall -Wextra -fvisibility=hidden -std=gnu99)
set(CMAKE_C_FLAGS_PACKAGE "-g -O2 -DNDEBUG")
|
Explicitly disable compression in cmake builds for now | @@ -102,6 +102,9 @@ set (MONGOC_ENABLE_CRYPTO_CNG 0)
set (MONGOC_ENABLE_CRYPTO_SYSTEM_PROFILE 0)
+set (MONGOC_ENABLE_COMPRESSION 0)
+set (MONGOC_ENABLE_COMPRESSION_SNAPPY 0)
+
if (OPENSSL_FOUND)
set (MONGOC_ENABLE_SSL 1)
set (MONGOC_ENABLE_SSL_OPENSSL 1)
|
nshlib: support c++ access nsh api
N/A | @@ -799,6 +799,11 @@ extern const char g_fmtsignalrecvd[];
* Public Function Prototypes
****************************************************************************/
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+
/* Initialization */
#ifdef CONFIG_NSH_ROMFSETC
@@ -1403,4 +1408,8 @@ int nsh_foreach_var(FAR struct nsh_vtbl_s *vtbl, nsh_foreach_var_t cb,
FAR void *arg);
#endif
+#if defined(__cplusplus)
+}
+#endif
+
#endif /* __APPS_NSHLIB_NSH_H */
|
build ARM64 in CI action | @@ -23,11 +23,17 @@ if %ERRORLEVEL% neq 0 goto end
msbuild /m SystemInformer.sln -property:Configuration=Debug -property:Platform=x64 -verbosity:normal
if %ERRORLEVEL% neq 0 goto end
+msbuild /m SystemInformer.sln -property:Configuration=Debug -property:Platform=ARM64 -verbosity:normal
+if %ERRORLEVEL% neq 0 goto end
+
msbuild /m Plugins\Plugins.sln -property:Configuration=Debug -property:Platform=Win32 -verbosity:normal
if %ERRORLEVEL% neq 0 goto end
msbuild /m Plugins\Plugins.sln -property:Configuration=Debug -property:Platform=x64 -verbosity:normal
if %ERRORLEVEL% neq 0 goto end
+msbuild /m Plugins\Plugins.sln -property:Configuration=Debug -property:Platform=ARM64 -verbosity:normal
+if %ERRORLEVEL% neq 0 goto end
+
:end
pause
|
Add SDL_sound, fix --D to -D | @@ -116,9 +116,9 @@ make -j4
run the following commands in the Terminal
```
sudo dnf -y groupinstall "Development Tools" "Development Libraries"
-sudo dnf -y install ruby rubygem-{tk{,-doc},rake,test-unit} cmake libglvnd-devel libglvnd-gles freeglut-devel clang libXext-devel
+sudo dnf -y install ruby rubygem-{tk{,-doc},rake,test-unit} cmake libglvnd-devel libglvnd-gles freeglut-devel clang libXext-devel SDL_sound
git clone --recursive https://github.com/nesbox/TIC-80 && cd TIC-80/build
-cmake .. --DCMAKE_CXX_COMPILER=clang++
+cmake .. -DCMAKE_CXX_COMPILER=clang++
make -j4
```
|
web-ui: fix issues with folding/unfolding | @@ -141,15 +141,16 @@ export default class TreeView extends React.Component {
createOpener () {
const tree = this
- const { unfolded } = this.state
return class Opener extends React.Component {
onClick = (event) => {
- const { item } = this.props
+ const { onClick, item } = this.props
+ const { unfolded } = tree.state
const newUnfolded = unfolded.filter(p => p !== item.path)
if (newUnfolded.length === unfolded.length) {
newUnfolded.push(item.path)
}
tree.updateUnfolded(newUnfolded)
+ onClick(event)
event.stopPropagation()
}
@@ -179,17 +180,28 @@ export default class TreeView extends React.Component {
const tree = this
const strategies = {
click: [ function unfoldOnSelectionByPath (item) {
- if (!this.isSelected(item) && item.children && item.children.length > 0) {
+ if (!this.isSelected(item) && item.children) {
const newUnfolded = unfolded.filter(p => p !== item.path)
if (newUnfolded.length === unfolded.length) {
newUnfolded.push(item.path)
tree.updateUnfolded(newUnfolded)
+ const newVal = this.state.get().unfolded.filter(i => i !== item)
+ if(newVal.length === this.state.get().unfolded.length)
+ newVal.push(item)
+ this.state.set({ unfolded: newVal })
}
}
return this.inputs.get().onSelect(item, this.inputs.get().ancestors, this.inputs.get().model)
} ],
fold: [ function unfoldByPath (item) {
- return !unfolded.find(p => p === item.path)
+ const isFolded = !unfolded.find(p => p === item.path)
+ if (!isFolded) {
+ const newVal = this.state.get().unfolded.filter(i => i !== item)
+ if(newVal.length === this.state.get().unfolded.length)
+ newVal.push(item)
+ this.state.set({ unfolded: newVal })
+ }
+ return isFolded
} ]
}
|
increase esp stack size to 5000 in test | #include <stdbool.h>
/* Platform thread stack size and priority. */
-#define IOT_THREAD_DEFAULT_STACK_SIZE 3840
+#define IOT_THREAD_DEFAULT_STACK_SIZE 5000
#define IOT_THREAD_DEFAULT_PRIORITY 5
/* Provide additional serializer initialization functions. */
|
Docs/add warning if data structure not change | @@ -120,6 +120,16 @@ In other cases, it should be noted that enums have the ``int`` type.
In common, ``int32_t`` and ``int``, as well as ``uint32_t`` and ``unsigned int``, are different types.
+If users do not make the aforementioned updates to format strings in their applications, the following error will be reported during compilation:
+
+.. code-block:: none
+
+ /Users/name/esp/esp-rainmaker/components/esp-insights/components/esp_diagnostics/include/esp_diagnostics.h:238:29: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
+ 238 | esp_diag_log_event(tag, "EV (%u) %s: " format, esp_log_timestamp(), tag, ##__VA_ARGS__); \
+ | ^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
+ | |
+ | uint32_t {aka long unsigned int}
+ uint32_t {aka long unsigned int}
Removing ``CONFIG_COMPILER_DISABLE_GCC8_WARNINGS`` Build Option
------------------------------------------------------------------
|
[numerics] gfc3d_ipm : test if the Jacobian matrix contains NaN
- only the 3x3_QpH case
- to avoid MA57 to run into troubles with incinsistent matrix
- shoul be also extended to other cases for JR | @@ -1271,7 +1271,7 @@ void gfc3d_IPM(GlobalFrictionContactProblem* restrict problem, double* restrict
/* r_rhs = [ ] */
/* [ -Qp*(H*v + w) ] nd */
-
+ int jacobian_is_nan = 0;
switch ( options->iparam[SICONOS_FRICTION_3D_IPM_IPARAM_LS_FORM] )
{
case SICONOS_FRICTION_3D_IPM_IPARAM_LS_3X3_NOSCAL:
@@ -1371,6 +1371,7 @@ void gfc3d_IPM(GlobalFrictionContactProblem* restrict problem, double* restrict
NM_insert(J, minusQpHt, 0, m + nd);
NM_insert(J, eye_nd, m, m + nd);
+
NM_free(minusQpH);
NM_free(minusQpHt);
@@ -1390,6 +1391,12 @@ void gfc3d_IPM(GlobalFrictionContactProblem* restrict problem, double* restrict
free(r_check);
free(Qp_primalConstraint);
+ jacobian_is_nan = NM_isnan(J);
+ if (jacobian_is_nan)
+ {
+ numerics_printf_verbose(0, "The Jacobian matrix J contains NaN");
+ break;
+ }
NSM_linearSolverParams(J)->solver = NSM_HSL;
if ( options->iparam[SICONOS_FRICTION_3D_IPM_IPARAM_REFINEMENT] == SICONOS_FRICTION_3D_IPM_IPARAM_REFINEMENT_YES )
@@ -1401,6 +1408,8 @@ void gfc3d_IPM(GlobalFrictionContactProblem* restrict problem, double* restrict
}
else
{
+
+
NM_LDLT_solve(J, rhs, 1);
}
@@ -1564,6 +1573,12 @@ void gfc3d_IPM(GlobalFrictionContactProblem* restrict problem, double* restrict
printf("ERROR\n");
}
}
+ if (jacobian_is_nan)
+ {
+ hasNotConverged = 2;
+ J = NM_free(J);
+ break;
+ }
/* computing the affine step-length */
alpha_primal = getStepLength(velocity, d_velocity, nd, n, 1.0); //gmm);
@@ -2206,7 +2221,7 @@ void gfc3d_ipm_set_default(SolverOptions* options)
options->iparam[SICONOS_FRICTION_3D_IPM_IPARAM_UPDATE_S] = 0;
- options->iparam[SICONOS_FRICTION_3D_IPM_IPARAM_LS_FORM] = SICONOS_FRICTION_3D_IPM_IPARAM_LS_2X2_QPH;
+ options->iparam[SICONOS_FRICTION_3D_IPM_IPARAM_LS_FORM] = SICONOS_FRICTION_3D_IPM_IPARAM_LS_3X3_QPH;
//options->iparam[SICONOS_FRICTION_3D_IPARAM_RESCALING] = SICONOS_FRICTION_3D_RESCALING_BALANCING_MHHT;
options->iparam[SICONOS_FRICTION_3D_IPARAM_RESCALING] = SICONOS_FRICTION_3D_RESCALING_NO;
|
ames: revert added debug print | ::
++ on-sink-cork
^+ peer-core
- ~> %slog.0^leaf+"ames: got cork {<[her.channel bone]>}"
=/ =message-pump-state
(~(gut by snd.peer-state) bone *message-pump-state)
=? peer-core ?=(^ next-wake.packet-pump-state.message-pump-state)
|
FIX: hold cache_lock when access config and prefix info. | @@ -992,9 +992,12 @@ static void stats_engine(struct default_engine *engine,
char val[128];
int len;
- pthread_mutex_lock(&engine->stats.lock);
+ pthread_mutex_lock(&engine->cache_lock);
len = sprintf(val, "%"PRIu64, (uint64_t)assoc_prefix_count());
add_stat("curr_prefixes", 13, val, len, cookie);
+ pthread_mutex_unlock(&engine->cache_lock);
+
+ pthread_mutex_lock(&engine->stats.lock);
len = sprintf(val, "%"PRIu64, engine->stats.reclaimed);
add_stat("reclaimed", 9, val, len, cookie);
len = sprintf(val, "%"PRIu64, (uint64_t)engine->stats.evictions);
@@ -1011,11 +1014,14 @@ static void stats_engine(struct default_engine *engine,
add_stat("sticky_bytes", 12, val, len, cookie);
len = sprintf(val, "%"PRIu64, (uint64_t)engine->stats.curr_bytes);
add_stat("bytes", 5, val, len, cookie);
+ pthread_mutex_unlock(&engine->stats.lock);
+
+ pthread_mutex_lock(&engine->cache_lock);
len = sprintf(val, "%"PRIu64, (uint64_t)engine->config.sticky_limit);
add_stat("sticky_limit", 12, val, len, cookie);
len = sprintf(val, "%"PRIu64, (uint64_t)engine->config.maxbytes);
add_stat("engine_maxbytes", 15, val, len, cookie);
- pthread_mutex_unlock(&engine->stats.lock);
+ pthread_mutex_unlock(&engine->cache_lock);
}
static void stats_vbucket(struct default_engine *engine,
|
Fixed an issue where only the first piece of geometry had its construction history deleted. This caused issues when baking multiple pieces of geometry in Maya 2022.3. | @@ -19,7 +19,6 @@ houdiniEngine_bakeAsset(string $assetNode)
if(`objectType -isAType "shape" $desc`) {
delete -ch $desc;
$hasShape = 1;
- break;
}
if(`objectType -isAType "instancer" $desc`) {
$hasShape = 1;
|
nice to have symbol file even in release | @@ -59,7 +59,7 @@ FLAGSZ80= -i$(SRC) -i$(INCLUDE) -i$(RES) -i$(LIBSRC) -i$(LIBINCLUDE)
#release: FLAGS= $(DEFAULT_FLAGS) -O1 -fomit-frame-pointer
release: FLAGS= $(DEFAULT_FLAGS) -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto
release: LIBMD= $(LIB)/libmd.a
-release: pre-build out/rom.bin
+release: pre-build out/rom.bin out/symbol.txt
debug: FLAGS= $(DEFAULT_FLAGS) -O1 -ggdb -DDEBUG=1
debug: LIBMD= $(LIB)/libmd_debug.a
|
Report errors in Observe and Override handlers | @@ -49,9 +49,18 @@ bool FunctionOverride::HookRunPureScriptFunction(RED4ext::CClassFunction* apFunc
for (const auto& call : calls)
{
const auto result = call->ScriptFunction(as_args(args), call->Environment);
+
+ if (!result.valid())
+ {
+ auto logger = call->Environment["__logger"].get<std::shared_ptr<spdlog::logger>>();
+ logger->error(result.get<sol::error>().what());
+
+ continue;
+ }
+
if (!call->Forward)
{
- if (result.valid() && ret.value && ret.type)
+ if (ret.value && ret.type)
Scripting::ToRED(result.get<sol::object>(), &ret);
return true;
@@ -212,6 +221,16 @@ void FunctionOverride::HandleOverridenFunction(RED4ext::IScriptable* apContext,
for (const auto& call : calls)
{
const auto result = call->ScriptFunction(as_args(args), call->Environment);
+
+ if (!result.valid())
+ {
+ auto logger = call->Environment["__logger"].get<std::shared_ptr<spdlog::logger>>();
+ logger->error(result.get<sol::error>().what());
+
+ continue;
+ }
+
+
if (!call->Forward)
{
if (apFunction->returnType)
@@ -220,7 +239,7 @@ void FunctionOverride::HandleOverridenFunction(RED4ext::IScriptable* apContext,
redResult.type = apFunction->returnType->type;
redResult.value = apOut;
- if (result.valid() && apOut)
+ if (apOut)
Scripting::ToRED(result.get<sol::object>(), &redResult);
}
|
Build: Fix shellcheck | @@ -176,7 +176,7 @@ package() {
for i in *.dsl ; do
iasl "$i" || exit 1
done
- mv *.aml "${dstdir}/Docs/AcpiSamples/Binaries" || exit 1
+ mv ./*.aml "${dstdir}/Docs/AcpiSamples/Binaries" || exit 1
cd - || exit 1
utilScpts=(
|
tigertail: fix USB timing
Add some disconnect time between mux selections.
This ensures that USB VBUS will fall and a USB
disconenct will happen.
BRANCH=None
TEST=ran on tigertail
Commit-Ready: Nick Sanders
Tested-by: Nick Sanders | @@ -310,10 +310,16 @@ void set_mux_state(int state)
gpio_set_level(GPIO_SEL_RELAY_A, 0);
gpio_set_level(GPIO_SEL_RELAY_B, 0);
- /* Reconnect in the requested direction. */
+ /* Let USB disconnect. */
+ msleep(100);
+
+ /* Reconnect VBUS/CC in the requested direction. */
gpio_set_level(GPIO_SEL_RELAY_A, !dir && enabled);
gpio_set_level(GPIO_SEL_RELAY_B, dir && enabled);
+ /* Reconnect data. */
+ msleep(10);
+
gpio_set_level(GPIO_USB_C_SEL_B, dir);
gpio_set_level(GPIO_USB_C_OE_N, !enabled);
|
[config_tool] Duplicate VM name
refine error messages. | @@ -332,8 +332,8 @@ export default {
console.log(vmNameArr)
for (let i = 0; i < vmNameArr.length - 1; i++) {
if (vmNameArr[i] === vmNameArr[i + 1]) {
- alert("There are duplicate VM name with" + vmNameArr[i]
- + ",\n please your VM name");
+ alert("ERROR\n" + `Multiple VMs have the same name: ${vmNameArr[i]}.` +
+ "Your configuration cannot be saved." + "Make sure each VM has a unique name.");
errorFlag = true
}
}
|
Fix bash breaklines | @@ -97,9 +97,9 @@ jobs:
# Make cmocka from source w/ 32b setup
- run: git clone https://git.cryptomilk.org/projects/cmocka.git ~/cmocka
- run: >
- cd $(mktemp -d /tmp/build.XXXX) && \
- cmake ~/cmocka -DCMAKE_TOOLCHAIN_FILE=~/cmocka/cmake/Toolchain-cross-m32.cmake && \
- make && \
+ cd $(mktemp -d /tmp/build.XXXX) &&
+ cmake ~/cmocka -DCMAKE_TOOLCHAIN_FILE=~/cmocka/cmake/Toolchain-cross-m32.cmake &&
+ make &&
sudo make install
# Piggyback on the cmocka 32b toolchain
- run: >
|
evp_test: fix rebase mistake with no_gost | @@ -77,7 +77,7 @@ push @files, qw(
evppkey_ecdsa.txt
evppkey_kas.txt
evppkey_mismatch.txt
- ) unless $no_ec || $no_gost;
+ ) unless $no_ec;
push @files, qw(evpciph_aes_gcm_siv.txt) unless $no_siv;
# A list of tests that only run with the default provider
|
VERSION bump to version 2.1.51 | @@ -64,7 +64,7 @@ endif()
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(SYSREPO_MAJOR_VERSION 2)
set(SYSREPO_MINOR_VERSION 1)
-set(SYSREPO_MICRO_VERSION 50)
+set(SYSREPO_MICRO_VERSION 51)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
/sur/hood: report aeon, abortive fix for +read-kelvin-local | :~ leaf/"/sys/kelvin: {<[lal num]:weft>}"
leaf/"base hash: {?:((gth len 1) <meb> <(head meb)>)}"
leaf/"%cz hash: {<hash>}"
+ leaf/"remote aeon: {<aeon.arak>}"
leaf/"force on: {?:(=(~ add.rein.arak) "~" <add.rein.arak>)}"
leaf/"force off: {?:(=(~ sub.rein.arak) "~" <sub.rein.arak>)}"
==
q:(need (~(get an:cloy ankh) /sys/kelvin))
::
++ read-kelvin-local
- |= [our=ship =desk now=@da]
- .^(weft cx+/(scot %p our)/[desk]/(scot %da now)/sys/kelvin)
+ |= [our=ship =desk =aeon]
+ .^(weft cx+/(scot %p our)/[desk]/(scot %ud aeon)/sys/kelvin)
::
++ read-kelvin-foreign
|= [=ship =desk =aeon]
|
[snitch] :bug: Add declaration of retire_p signal for post-incr write-back | @@ -154,6 +154,7 @@ module snitch #(
logic [31:0] lsu_qaddr;
logic retire_load; // retire a load instruction
+ logic retire_p; // retire from post-increment instructions
logic retire_i; // retire the rest of the base instruction set
logic retire_acc; // retire an instruction we offloaded
|
Remove stray include of complex.h
already provided conditionally by common.h via openblas_utest.h
Unconditional inclusion breaks older Android and similar platforms that use OPENBLAS_COMPLEX_STRUCT | @@ -32,7 +32,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**********************************************************************************/
#include "openblas_utest.h"
-#include <complex.h>
CTEST( zdotu,zdotu_n_1)
{
|
Fix allocation of graphics heap memory | @@ -32,8 +32,7 @@ bool GraphicsMemory::GraphicsHeapLocation(
CLR_UINT8 *&graphicsStartingAddress,
CLR_UINT8 *&graphicsEndingAddress)
{
- // requesting 2MB
- CLR_INT32 graphicsMemoryBlockSize = 2 * 1024 * 1024;
+ CLR_UINT32 graphicsMemoryBlockSize = requested;
CLR_INT32 memoryCaps = MALLOC_CAP_8BIT | MALLOC_CAP_32BIT | MALLOC_CAP_SPIRAM;
@@ -45,14 +44,15 @@ bool GraphicsMemory::GraphicsHeapLocation(
}
// We don't want to allocate upfront
- if (requested == 0)
+ if (graphicsMemoryBlockSize == 0)
{
// We don't allocate anything here
return false;
}
// Get Largest free block in SPIRam
- CLR_INT32 spiramMaxSize = heap_caps_get_largest_free_block(memoryCaps);
+ CLR_UINT32 spiramMaxSize = heap_caps_get_largest_free_block(memoryCaps);
+
if (spiramMaxSize == 0)
{
// No SPIRAM, try and allocate small block in normal ram to keep allocator happy for
@@ -60,14 +60,16 @@ bool GraphicsMemory::GraphicsHeapLocation(
// Should be able to use with small screens
memoryCaps ^= MALLOC_CAP_SPIRAM;
- spiramMaxSize = requested;
+ spiramMaxSize = heap_caps_get_largest_free_block(memoryCaps);
}
if (spiramMaxSize < graphicsMemoryBlockSize) // limit the size to what is available
{
graphicsMemoryBlockSize = spiramMaxSize;
}
+
graphicsStartingAddress = (CLR_UINT8 *)heap_caps_malloc(graphicsMemoryBlockSize, memoryCaps);
+
ASSERT(graphicsStartingAddress != NULL);
graphicsEndingAddress = (CLR_UINT8 *)(graphicsStartingAddress + graphicsMemoryBlockSize);
|
Add missing psa_pake_cs_get_family() | @@ -1224,6 +1224,20 @@ static void psa_pake_cs_set_primitive(
psa_pake_primitive_t primitive
);
+/** Retrieve the PAKE family from a PAKE cipher suite.
+ *
+ * This function may be declared as `static` (i.e. without external
+ * linkage). This function may be provided as a function-like macro,
+ * but in this case it must evaluate its argument exactly once.
+ *
+ * \param[in] cipher_suite The cipher suite structure to query.
+ *
+ * \return The PAKE family stored in the cipher suite structure.
+ */
+static psa_pake_family_t psa_pake_cs_get_family(
+ const psa_pake_cipher_suite_t* cipher_suite
+ );
+
/** Retrieve the hash algorithm from a PAKE cipher suite.
*
* This function may be declared as `static` (i.e. without external
@@ -1811,6 +1825,12 @@ static inline void psa_pake_cs_set_primitive(
cipher_suite->bits = (uint16_t) (0xFFFF & primitive);
}
+static inline psa_pake_family_t psa_pake_cs_get_family(
+ const psa_pake_cipher_suite_t *cipher_suite)
+{
+ return(cipher_suite->family);
+}
+
static inline psa_algorithm_t psa_pake_cs_get_hash(
const psa_pake_cipher_suite_t *cipher_suite)
{
|
Emulator: use atexit handler to restore terminal state | @@ -136,12 +136,17 @@ void send_host_interrupt(uint32_t num)
}
}
+static void shutdown_cleanup(void)
+{
+ // Restore terminal state
+ tcsetattr(STDIN_FILENO, TCSANOW, &original_tconfig);
+}
+
static void handle_int_signal(int num)
{
(void) num;
- // Restore terminal state
- tcsetattr(STDIN_FILENO, TCSANOW, &original_tconfig);
+ shutdown_cleanup();
exit(1);
}
@@ -383,6 +388,13 @@ int main(int argc, char *argv[])
exit(1);
}
+ if (atexit(shutdown_cleanup) < 0)
+ {
+ perror("error setting up atexit handler");
+ tcsetattr(STDIN_FILENO, TCSANOW, &original_tconfig);
+ exit(1);
+ }
+
switch (mode)
{
case MODE_NORMAL:
@@ -410,10 +422,7 @@ int main(int argc, char *argv[])
case MODE_COSIMULATION:
dbg_set_stop_on_fault(proc, false);
if (run_cosimulation(proc, verbose) < 0)
- {
- tcsetattr(STDIN_FILENO, TCSANOW, &original_tconfig);
return 1; // Failed
- }
break;
@@ -428,9 +437,6 @@ int main(int argc, char *argv[])
free(mem_dump_filename);
- // Restore terminal state
- tcsetattr(STDIN_FILENO, TCSANOW, &original_tconfig);
-
dump_instruction_stats(proc);
if (block_device_open)
close_block_device();
|
server session FEATURE improved call home messages | @@ -3375,7 +3375,7 @@ nc_ch_client_thread(void *arg)
if (nc_server_ch_client_thread_session_cond_wait(session, data)) {
goto cleanup;
}
- VRB("Call Home client \"%s\" session terminated, reconnecting...", data->client_name);
+ VRB("Call Home client \"%s\" session terminated.", data->client_name);
/* LOCK */
client = nc_server_ch_client_with_endpt_lock(data->client_name);
@@ -3395,6 +3395,7 @@ nc_ch_client_thread(void *arg)
/* sleep until we should reconnect TODO wake up sometimes to check for new notifications */
reconnect_in = (time(NULL) - client->conn.period.anchor_time) % (client->conn.period.period * 60);
+ VRB("Call Home client \"%s\" reconnecting in %d seconds.", data->client_name, reconnect_in);
sleep(reconnect_in);
/* LOCK */
|
in_mqtt: use new input chunk registration calls | @@ -122,6 +122,8 @@ static int mqtt_data_append(char *topic, size_t topic_len,
char *pack;
msgpack_object root;
msgpack_unpacked result;
+ msgpack_packer mp_pck;
+ msgpack_sbuffer mp_sbuf;
struct flb_in_mqtt_config *ctx = in_context;
/* Convert our incoming JSON to MsgPack */
@@ -144,27 +146,30 @@ static int mqtt_data_append(char *topic, size_t topic_len,
}
root = result.data;
- /* Mark the start of a 'buffer write' operation */
- flb_input_buf_write_start(ctx->i_ins);
+ /* Initialize local msgpack buffer */
+ msgpack_sbuffer_init(&mp_sbuf);
+ msgpack_packer_init(&mp_pck, &mp_sbuf, msgpack_sbuffer_write);
- msgpack_pack_array(&ctx->i_ins->mp_pck, 2);
- flb_pack_time_now(&ctx->i_ins->mp_pck);
+ /* Pack data */
+ msgpack_pack_array(&mp_pck, 2);
+ flb_pack_time_now(&mp_pck);
n_size = root.via.map.size;
- msgpack_pack_map(&ctx->i_ins->mp_pck, n_size + 1);
- msgpack_pack_str(&ctx->i_ins->mp_pck, 5);
- msgpack_pack_str_body(&ctx->i_ins->mp_pck, "topic", 5);
- msgpack_pack_str(&ctx->i_ins->mp_pck, topic_len);
- msgpack_pack_str_body(&ctx->i_ins->mp_pck, topic, topic_len);
+ msgpack_pack_map(&mp_pck, n_size + 1);
+ msgpack_pack_str(&mp_pck, 5);
+ msgpack_pack_str_body(&mp_pck, "topic", 5);
+ msgpack_pack_str(&mp_pck, topic_len);
+ msgpack_pack_str_body(&mp_pck, topic, topic_len);
/* Re-pack original KVs */
for (i = 0; i < n_size; i++) {
- msgpack_pack_object(&ctx->i_ins->mp_pck, root.via.map.ptr[i].key);
- msgpack_pack_object(&ctx->i_ins->mp_pck, root.via.map.ptr[i].val);
+ msgpack_pack_object(&mp_pck, root.via.map.ptr[i].key);
+ msgpack_pack_object(&mp_pck, root.via.map.ptr[i].val);
}
- /* End of buffer write */
- flb_input_buf_write_end(ctx->i_ins);
+
+ flb_input_chunk_append_raw(ctx->i_ins, NULL, 0, mp_sbuf.data, mp_sbuf.size);
+ msgpack_sbuffer_destroy(&mp_sbuf);
msgpack_unpacked_destroy(&result);
flb_free(pack);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.