message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Add missing underscore in bindswitch documentation
The missing underscore after "toggle" causes the underline to continue
for a whole sentence. | @@ -381,7 +381,7 @@ runtime.
*bindswitch* [--locked] [--no-warn] <switch>:<state> <command>
Binds <switch> to execute the sway command _command_ on state changes.
Supported switches are _lid_ (laptop lid) and _tablet_ (tablet mode)
- switches. Valid values for _state_ are _on_, _off_ and _toggle. These
+ switches. Valid values for _state_ are _on_, _off_ and _toggle_. These
switches are on when the device lid is shut and when tablet mode is active
respectively. _toggle_ is also supported to run a command both when the
switch is toggled on or off.
|
fix the warning when compiling bsp_uart project | @@ -42,7 +42,7 @@ app_vars_t app_vars;
void cb_compare(void);
void cb_uartTxDone(void);
-void cb_uartRxCb(void);
+uint8_t cb_uartRxCb(void);
//=========================== main ============================================
@@ -101,7 +101,7 @@ void cb_uartTxDone(void) {
}
}
-void cb_uartRxCb(void) {
+uint8_t cb_uartRxCb(void) {
uint8_t byte;
// toggle LED
@@ -112,4 +112,6 @@ void cb_uartRxCb(void) {
// echo that byte over serial
uart_writeByte(byte);
+
+ return 0;
}
\ No newline at end of file
|
port handling not needed | @@ -139,10 +139,6 @@ static int cmd_debug_nodes( struct reply_t *r ) {
static int cmd_announce( struct reply_t *r, const char hostname[], int port, int minutes ) {
time_t lifetime;
- if( port < 0 || port > 65534 ) {
- return 1;
- }
-
if( minutes < 0 ) {
lifetime = LONG_MAX;
} else {
@@ -154,9 +150,7 @@ static int cmd_announce( struct reply_t *r, const char hostname[], int port, int
if( kad_announce( hostname, port, lifetime ) >= 0 ) {
#ifdef FWD
// Add port forwarding
- if( port != 0 ) {
fwd_add( port, lifetime );
- }
#endif
if( minutes < 0 ) {
r_printf( r ,"Start regular announcements for the entire run time (port %d).\n", port );
|
Include lv_conf.h in lv_area.h | @@ -16,6 +16,11 @@ extern "C" {
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
+#ifdef LV_CONF_INCLUDE_SIMPLE
+#include "lv_conf.h"
+#else
+#include "../../../lv_conf.h"
+#endif
/*********************
* DEFINES
|
ossl_cmp_msg_check_update(): fix two wrong error return values (-1 instead of 0) | @@ -775,6 +775,11 @@ int ossl_cmp_msg_check_update(OSSL_CMP_CTX *ctx, const OSSL_CMP_MSG *msg,
CMP_R_RECIPNONCE_UNMATCHED))
return 0;
+ /* if not yet present, learn transactionID */
+ if (ctx->transactionID == NULL
+ && !OSSL_CMP_CTX_set1_transactionID(ctx, hdr->transactionID))
+ return 0;
+
/*
* RFC 4210 section 5.1.1 states: the recipNonce is copied from
* the senderNonce of the previous message in the transaction.
@@ -783,11 +788,6 @@ int ossl_cmp_msg_check_update(OSSL_CMP_CTX *ctx, const OSSL_CMP_MSG *msg,
if (!ossl_cmp_ctx_set1_recipNonce(ctx, hdr->senderNonce))
return 0;
- /* if not yet present, learn transactionID */
- if (ctx->transactionID == NULL
- && !OSSL_CMP_CTX_set1_transactionID(ctx, hdr->transactionID))
- return -1;
-
/*
* Store any provided extraCerts in ctx for future use,
* such that they are available to ctx->certConf_cb and
@@ -798,7 +798,7 @@ int ossl_cmp_msg_check_update(OSSL_CMP_CTX *ctx, const OSSL_CMP_MSG *msg,
/* this allows self-signed certs */
X509_ADD_FLAG_UP_REF | X509_ADD_FLAG_NO_DUP
| X509_ADD_FLAG_PREPEND))
- return -1;
+ return 0;
if (ossl_cmp_hdr_get_protection_nid(hdr) == NID_id_PasswordBasedMAC) {
/*
|
ci(micropython) add rp2 port
Related: | @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- port: ['unix', 'esp32', 'stm32']
+ port: ['unix', 'esp32', 'stm32', 'rp2']
steps:
- uses: ammaraskar/gcc-problem-matcher@master
- name: Install Dependencies
@@ -27,7 +27,7 @@ jobs:
- name: Update ${{ matrix.port }} port submodules
if: matrix.port != 'esp32'
# VARIANT needed for unix
- run: make -C ports/${{ matrix.port }} VARIANT=dev DEBUG=1 submodules
+ run: make -C ports/${{ matrix.port }} VARIANT=dev DEBUG=1 USER_C_MODULES=../../lib/lv_bindings/bindings.cmake submodules
- name: Checkout LVGL submodule
working-directory: ./lib/lv_bindings/lvgl
run: |
@@ -48,16 +48,18 @@ jobs:
run: |
source tools/ci.sh && ci_esp32_build
- # STM32 port
+ # STM32 & RPi Pico port
- name: arm-none-eabi-gcc
- if: matrix.port == 'stm32'
+ if: matrix.port == 'stm32' || matrix.port == 'rp2'
uses: fiam/arm-none-eabi-gcc@v1
with:
release: '9-2019-q4' # The arm-none-eabi-gcc release to use.
- name: Build STM32 port
if: matrix.port == 'stm32'
run: make -j $(nproc) -C ports/stm32 BOARD=STM32F7DISC
-
+ - name: Build Raspberry Pi PICO port
+ if: matrix.port == 'rp2'
+ run: make -j $(nproc) -C ports/rp2 BOARD=PICO USER_C_MODULES=../../lib/lv_bindings/bindings.cmake
# Unix port
- name: Build Unix port
if: matrix.port == 'unix'
|
Document port changes on client. | @@ -704,6 +704,7 @@ int quic_client(const char* ip_address_text, int server_port,
struct sockaddr_storage local_address;
if (picoquic_get_local_address(fd, &local_address) != 0) {
memset(&local_address, 0, sizeof(struct sockaddr_storage));
+ fprintf(stderr, "Could not read local address.\n");
}
address_updated = 1;
@@ -711,10 +712,21 @@ int quic_client(const char* ip_address_text, int server_port,
if (client_address.ss_family == AF_INET) {
((struct sockaddr_in *)&client_address)->sin_port =
((struct sockaddr_in *)&local_address)->sin_port;
+ fprintf(stdout, "IPv4 port: %d.\n", ((struct sockaddr_in*)& client_address)->sin_port);
}
else {
((struct sockaddr_in6 *)&client_address)->sin6_port =
((struct sockaddr_in6 *)&local_address)->sin6_port;
+ fprintf(stdout, "IPv6 port: %d.\n", ((struct sockaddr_in6*)& client_address)->sin6_port);
+ }
+ if (F_log != stdout && F_log != stderr && F_log != NULL)
+ {
+ fprintf(F_log, "Client port (AF=%d): %d.\n",
+ client_address.ss_family,
+ (client_address.ss_family == AF_INET)?
+ ((struct sockaddr_in*) & client_address)->sin_port:
+ ((struct sockaddr_in6*) & client_address)->sin6_port
+ );
}
if (F_log != NULL) {
fprintf(F_log, "Local address updated\n");
@@ -893,7 +905,10 @@ int quic_client(const char* ip_address_text, int server_port,
if (migration_started && force_migration == 3){
if (address_updated) {
if (picoquic_compare_addr((struct sockaddr *)&x_from, (struct sockaddr *)&client_address) != 0) {
- fprintf(F_log, "Dropping packet sent from wrong address\n");
+ fprintf(F_log, "Dropping packet sent from wrong address, port: %d\n",
+ (client_address.ss_family == AF_INET) ?
+ ((struct sockaddr_in*) & x_from)->sin_port :
+ ((struct sockaddr_in6*) & x_from)->sin6_port);
send_length = 0;
}
}
|
zuse: change name of +ordered-map to +on and add alias, change name of +traverse to +dip as per talk with ted | =/ b ;;((tree [key=key val=value]) a)
?> (apt:((ordered-map key value) ord) b)
b
-:: +ordered-map: treap with user-specified horizontal order
+++ ordered-map on
+:: +on: treap with user-specified horizontal order, ordered-map
::
:: Conceptually smaller items go on the left, so the item with the
:: smallest key can be popped off the head. If $key is `@` and
:: WARNING: ordered-map will not work properly if two keys can be
:: unequal under noun equality but equal via the compare gate
::
-++ ordered-map
+++ on
+ ~/ %on
|* [key=mold val=mold]
=> |%
+$ item [key=key val=val]
--
:: +compare: item comparator for horizontal order
::
+ ~% %comp +>+ ~
|= compare=$-([key key] ?)
- ~% %ordered-map ..part ~
+ ~% %core + ~
|%
:: +all: apply logical AND boolean test on all values
::
?~ a b
::
$(a l.a, b [n.a $(a r.a)])
- :: +traverse: stateful partial inorder traversal
+ :: +dip: stateful partial inorder traversal
::
:: Mutates .state on each run of .f. Starts at .start key, or if
:: .start is ~, starts at the head (item with smallest key). Stops
:: keys. Each run of .f can replace an item's value or delete the
:: item.
::
- ++ traverse
- ~/ %traverse
+ ++ dip
+ ~/ %dip
|* state=mold
|= $: a=(tree item)
=state
|
fix rtconfig.py param: DEVICE = cortex-m3 in other platform. | @@ -43,7 +43,7 @@ if PLATFORM == 'gcc':
OBJDUMP = PREFIX + 'objdump'
OBJCPY = PREFIX + 'objcopy'
- DEVICE = ' -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections'
+ DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
CFLAGS = DEVICE + ' -Dgcc'
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
@@ -114,7 +114,7 @@ elif PLATFORM == 'iar':
CFLAGS += ' --no_clustering'
CFLAGS += ' --no_scheduling'
CFLAGS += ' --endian=little'
- CFLAGS += ' --cpu=Cortex-M0'
+ CFLAGS += ' --cpu=Cortex-M3'
CFLAGS += ' -e'
CFLAGS += ' --fpu=None'
CFLAGS += ' --dlib_config "' + EXEC_PATH + '/arm/INC/c/DLib_Config_Normal.h"'
@@ -124,7 +124,7 @@ elif PLATFORM == 'iar':
AFLAGS += ' -s+'
AFLAGS += ' -w+'
AFLAGS += ' -r'
- AFLAGS += ' --cpu Cortex-M0'
+ AFLAGS += ' --cpu Cortex-M3'
AFLAGS += ' --fpu None'
AFLAGS += ' -S'
|
Enforce min/max on color picker rgb inputs | @@ -142,20 +142,24 @@ class CustomPalettePicker extends Component {
}
colorChange = e => {
- if (e.target.id == "colorR")
+ const min = 0;
+ const max = 31;
+ const value = Math.max(min, Math.min(max, e.currentTarget.value))
+
+ if (e.target.id === "colorR")
{
- this.setState({currentR: e.target.value});
- this.setCurrentColor(e.target.value, this.state.currentG, this.state.currentB);
+ this.setState({currentR: value || ""});
+ this.setCurrentColor(value, this.state.currentG, this.state.currentB);
}
- else if (e.target.id == "colorG")
+ else if (e.target.id === "colorG")
{
- this.setState({currentG: e.target.value});
- this.setCurrentColor(this.state.currentR, e.target.value, this.state.currentB);
+ this.setState({currentG: value || ""});
+ this.setCurrentColor(this.state.currentR, value, this.state.currentB);
}
- else if (e.target.id == "colorB")
+ else if (e.target.id === "colorB")
{
- this.setState({currentB: e.target.value});
- this.setCurrentColor(this.state.currentR, this.state.currentG, e.target.value);
+ this.setState({currentB: value || ""});
+ this.setCurrentColor(this.state.currentR, this.state.currentG, value);
}
}
|
Remove unnecessary condition in acquiring image data | @@ -3812,10 +3812,6 @@ Image_composite_mathematics(int argc, VALUE *argv, VALUE self)
char compose_args[200];
rm_check_destroyed(self);
- if (argc > 0)
- {
- composite_image = rm_check_destroyed(rm_cur_image(argv[0]));
- }
switch (argc)
{
@@ -3836,6 +3832,7 @@ Image_composite_mathematics(int argc, VALUE *argv, VALUE self)
break;
}
+ composite_image = rm_check_destroyed(rm_cur_image(argv[0]));
(void) sprintf(compose_args, "%-.16g,%-.16g,%-.16g,%-.16g", NUM2DBL(argv[1]), NUM2DBL(argv[2]), NUM2DBL(argv[3]), NUM2DBL(argv[4]));
SetImageArtifact(composite_image,"compose:args", compose_args);
@@ -3893,11 +3890,6 @@ composite_tiled(int bang, int argc, VALUE *argv, VALUE self)
image = rm_check_destroyed(self);
}
- if (argc > 0)
- {
- comp_image = rm_check_destroyed(rm_cur_image(argv[0]));
- }
-
channels = extract_channels(&argc, argv);
switch (argc)
@@ -3914,6 +3906,8 @@ composite_tiled(int bang, int argc, VALUE *argv, VALUE self)
break;
}
+ comp_image = rm_check_destroyed(rm_cur_image(argv[0]));
+
if (!bang)
{
image = rm_clone_image(image);
@@ -11935,12 +11929,6 @@ Image_remap(int argc, VALUE *argv, VALUE self)
#endif
image = rm_check_frozen(self);
- if (argc > 0)
- {
- VALUE t = rm_cur_image(argv[0]);
- remap_image = rm_check_destroyed(t);
- RB_GC_GUARD(t);
- }
GetQuantizeInfo(&quantize_info);
@@ -11959,6 +11947,8 @@ Image_remap(int argc, VALUE *argv, VALUE self)
break;
}
+ remap_image = rm_check_destroyed(rm_cur_image(argv[0]));
+
#if defined(IMAGEMAGICK_7)
exception = AcquireExceptionInfo();
(void) RemapImage(&quantize_info, image, remap_image, exception);
|
build: fix 'make clean' issue
Remove Bourne shell expansion in command.
Make invokes /bin/sh, which is not necessarily bash, and
recongize bash sppecific syntax. | @@ -38,7 +38,7 @@ gotest: image
$(MAKE) -C $(subst -clean,,$@) clean
clean:
- $(MAKE) {contgen,boot,stage3,mkfs,examples,test}-clean
+ $(MAKE) $(addsuffix -clean,contgen boot stage3 mkfs examples test)
$(MAKE) -C gotests clean
$(Q) $(RM) -f $(FS) $(IMAGE) $(IMAGE).dup
$(Q) $(RM) -fd $(dir $(IMAGE)) output
|
Remove debugging prints from util/add-depends.pl | @@ -15,13 +15,11 @@ my $buildfile = $config{build_file};
my $buildfile_new = "$buildfile.$$";
my $depext = $target{dep_extension} || ".d";
my @deps =
- grep { print STDERR "$_ exists: ", -f $_ ? "yes" : "no", "\n"; -f $_ }
+ grep { -f $_ }
map { (my $x = $_) =~ s|\.o$|$depext|; $x; }
grep { $unified_info{sources}->{$_}->[0] =~ /\.cc?$/ }
keys %{$unified_info{sources}};
-print STDERR "\@deps = ( ", join(", ", @deps), " )\n";
-
open IBF, $buildfile or die "Trying to read $buildfile: $!\n";
open OBF, '>', $buildfile_new or die "Trying to write $buildfile_new: $!\n";
while (<IBF>) {
|
Correct UART_INIT macro for F4 and F0 targets | @@ -221,7 +221,7 @@ extern uint8_t Uart8_RxBuffer[];
Uart##num##_PAL.Uart_cfg.cr1 = 0; \
Uart##num##_PAL.Uart_cfg.cr2 = 0; \
Uart##num##_PAL.Uart_cfg.cr3 = 0; \
- Uart##num##_TxBuffer = (uint8_t*)chHeapAlloc(NULL, tx_buffer_size); \
+ Uart##num##_PAL.TxBuffer = Uart##num##_TxBuffer; \
Uart##num##_PAL.TxRingBuffer.Initialize( Uart##num##_PAL.TxBuffer, tx_buffer_size); \
Uart##num##_PAL.TxOngoingCount = 0; \
Uart##num##_PAL.RxBuffer = Uart##num##_RxBuffer; \
|
out_flowcounter: switch to PRIu64 for 32bit/64bit compat | #include <stdio.h>
#include <stdlib.h>
+#include <inttypes.h>
#include <time.h>
#include <fluent-bit/flb_info.h>
@@ -108,10 +109,10 @@ static void output_fcount(FILE* f, struct flb_out_fcount_config *ctx,
{
fprintf(f,
"[%s] [%lu, {"
- "\"counts\":%lu, "
- "\"bytes\":%lu, "
- "\"counts/%s\":%lu, "
- "\"bytes/%s\":%lu }"
+ "\"counts\":%"PRIu64", "
+ "\"bytes\":%"PRIu64", "
+ "\"counts/%s\":%"PRIu64", "
+ "\"bytes/%s\":%"PRIu64" }"
"]\n",
PLUGIN_NAME, buf->until,
buf->counts,
|
fix formatting of CMake file | @@ -11,8 +11,7 @@ endif ()
execute_process (
COMMAND ${Python3_EXECUTABLE} -c "import pip,wheel"
RESULT_VARIABLE EXIT_CODE
- OUTPUT_QUIET
-)
+ OUTPUT_QUIET)
if (NOT EXIT_CODE EQUAL 0)
remove_tool (fuse "python3-modules pip and wheel not both available")
@@ -24,8 +23,8 @@ install (CODE "execute_process(COMMAND
${Python3_EXECUTABLE} setup.py bdist_wheel
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )")
-# Install the package (the .whl file) and its dependencies (which are fetched from PyPI) into a subdirectory of the global
-# installation location (--target)
+# Install the package (the .whl file) and its dependencies (which are fetched from PyPI) into a subdirectory of the global installation
+# location (--target)
install (CODE "execute_process(COMMAND
${Python3_EXECUTABLE} -m pip install --target \"${CMAKE_INSTALL_PREFIX}/fuse\" --no-cache-dir ./dist/elektra_fuse-1.0.0-py3-none-any.whl
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )")
|
KDB List-Tools: Support paths containing spaces | #
# @tags org
-EXEC_PATH=@CMAKE_INSTALL_PREFIX@/@TARGET_TOOL_EXEC_FOLDER@
+EXEC_PATH="@CMAKE_INSTALL_PREFIX@/@TARGET_TOOL_EXEC_FOLDER@"
if [ -d "$KDB_EXEC_PATH" ]; then
- EXEC_PATH=$KDB_EXEC_PATH
+ EXEC_PATH="$KDB_EXEC_PATH"
fi
# list all installed tools
echo "External tools are located in $EXEC_PATH"
-ls $EXEC_PATH
+ls "$EXEC_PATH"
|
Fix a bug in test_sslversions
The TLSv1.4 tolerance test wasn't testing what we thought it was. | @@ -159,6 +159,7 @@ sub modify_supported_versions_filter
} elsif ($testtype == WITH_TLS1_4) {
$ext = pack "C5",
0x04, # Length
+ 0x03, 0x05, #TLSv1.4
0x03, 0x04; #TLSv1.3
}
if ($testtype == REVERSE_ORDER_VERSIONS
|
Experimenting with the price | @@ -11,7 +11,7 @@ presskit_download_link :
app_icon : # assets/appicon.png # Automatically populates if not set and if iOS app ID is set. Otherwise enter path to icon file manually.
app_name : # Automatically populates if not set and if iOS app ID is set. Otherwise enter manually.
-app_price : $4.99 / $11.99 / 3-day Trial # Automatically populates if not set and if iOS app ID is set. Otherwise enter manually.
+app_price : $7.99 / $14.99 / 3-day Trial # Automatically populates if not set and if iOS app ID is set. Otherwise enter manually.
app_description : Code Python on iOS
enable_smart_app_banner : true # Set to true to show a smart app banner at top of page on mobile devices.
|
arch/arm/makefile: linking libraries with GCC should use option -l | @@ -99,13 +99,16 @@ ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),)
endif
LIBPATH_OPT = -L
+ LIBRARY_OPT = -l
SCRIPT_OPT = -T
else
LIBPATH_OPT = --userlibpath
- EXTRA_LIBS += arm_vectors.o
+ LIBRARY_OPT = --library=
SCRIPT_OPT = --scatter=
+ EXTRA_LIBS += arm_vectors.o
endif
+
LDFLAGS += $(addprefix $(SCRIPT_OPT),$(call CONVERT_PATH,$(ARCHSCRIPT))) $(EXTRALINKCMDS)
LIBPATHS += $(LIBPATH_OPT) $(call CONVERT_PATH,$(TOPDIR)$(DELIM)staging)
@@ -114,9 +117,9 @@ ifeq ($(BOARDMAKE),y)
LIBPATHS += $(LIBPATH_OPT) $(call CONVERT_PATH,$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board)
endif
-LDLIBS = $(patsubst %.a,%,$(patsubst lib%,--library=%,$(LINKLIBS)))
+LDLIBS = $(patsubst %.a,%,$(patsubst lib%,$(LIBRARY_OPT)%,$(LINKLIBS)))
ifeq ($(BOARDMAKE),y)
- LDLIBS += --library=board
+ LDLIBS += $(LIBRARY_OPT)board
endif
VPATH += chip
|
luci-app-ssr-plus: fix subscribe bugs about grpc and sni | @@ -192,6 +192,13 @@ local function processData(szType, content)
result.read_buffer_size = 2
result.write_buffer_size = 2
end
+ if info.net == 'grpc' then
+ if info.path then
+ result.serviceName = info.path
+ elseif info.serviceName then
+ result.serviceName = info.serviceName
+ end
+ end
if info.net == 'quic' then
result.quic_guise = info.type
result.quic_key = info.key
@@ -202,7 +209,11 @@ local function processData(szType, content)
end
if info.tls == "tls" or info.tls == "1" then
result.tls = "1"
+ if info.sni then
+ result.tls_host = info.sni
+ elseif info.host then
result.tls_host = info.host
+ end
result.insecure = 1
else
result.tls = "0"
|
Change top object to Object instance instead of Object class | @@ -2450,9 +2450,24 @@ void mrbc_vm_begin( struct VM *vm )
}
// set self to reg[0]
- vm->regs[0].tt = MRBC_TT_CLASS;
- vm->regs[0].cls = mrbc_class_object;
+ // create instance of Object
+ mrbc_value v;
+ v.tt = MRBC_TT_OBJECT;
+ v.instance = (mrbc_instance *)mrbc_alloc(vm, sizeof(mrbc_instance));
+ if( v.instance == NULL ) return; // ENOMEM
+ if( mrbc_kv_init_handle(vm, &v.instance->ivar, 0) != 0 ) {
+ mrbc_raw_free(v.instance);
+ v.instance = NULL;
+ return;
+ }
+
+ v.instance->ref_count = 1;
+ v.instance->tt = MRBC_TT_OBJECT; // for debug only.
+ v.instance->cls = mrbc_class_object;
+ vm->regs[0] = v;
+
+ // Empty callinfo
vm->callinfo_tail = NULL;
// target_class
|
Set bFirstStep=0 in Evolve loop after first step | @@ -543,6 +543,11 @@ void Evolve(BODY *body,CONTROL *control,FILES *files,MODULE *module,OUTPUT *outp
/* Get auxiliary properties for next step -- first call
was prior to loop. */
PropertiesAuxiliary(body,control,update);
+
+ // If control->Evolve.bFirstStep hasn't been switched off by now, do so.
+ if (control->Evolve.bFirstStep) {
+ control->Evolve.bFirstStep = 0;
+ }
}
if (control->Io.iVerbose >= VERBPROG)
|
Update README.md
restore broken readme | -# TIC-80 API
-
-Here will api docs
-
+TIC-80 issue tracker
+=======
+This is the official issues tracker of <http://tic.computer>. Feel free to open a new issue if you are experiencing a bug or would like to see a new feature. You can either [browse existing issues](https://github.com/nesbox/tic.computer/issues) or [create a new issue](https://github.com/nesbox/tic.computer/issues/new).
+Thanks!
|
Fixed typos after reviewing | @@ -33,7 +33,7 @@ When done right, contribution brings a lot to a project, but also to the contrib
For example, it brings together external visions and skills to build, improve or fix parts of this project. Most of the contributors were first mere users of a project before to become contributors. They often got through contribution in order to add a feature they wanted, or fix an issue that was bothering them. The result is also, on their side, the feeling of being part of a great project.
-Contribution allows contributors to learn faster and gain skills. In fact, some contributors in open source projects became quite famous and were able to build their carreer around their contributions. That is whay contribution also brings a feeling of gratification for participating in something big.
+Contribution allows contributors to learn faster and gain skills. In fact, some contributors in open source projects became quite famous and were able to build their carreer around their contributions. This is why contribution also brings a feeling of gratification for participating in something big.
Eventually, it allows to meet new people with common interest while talking to other contributors in the process of adding, improving or fixing.
@@ -106,7 +106,7 @@ Working on the code:
- Fork the main repository you want to work on.
- Clone the forked repo to your machine.
- Create and checkout a new local branch.
-- Start workink on the code.
+- Start working on the code.
- Commit your changes to the working local branch.
- Push your local branch to your forked remote repo.
|
Remove unused custom event | -#define EVENT_NEW_SESSION SDL_USEREVENT
-#define EVENT_NEW_FRAME (SDL_USEREVENT + 1)
-#define EVENT_STREAM_STOPPED (SDL_USEREVENT + 2)
+#define EVENT_NEW_FRAME SDL_USEREVENT
+#define EVENT_STREAM_STOPPED (SDL_USEREVENT + 1)
|
Add help text to repl line. | (when (and (not *compile-only*) (or *should-repl* *no-file*))
(if-not *quiet*
- (print "Janet " janet/version "-" janet/build " " (os/which) "/" (os/arch)))
+ (print "Janet " janet/version "-" janet/build " " (os/which) "/" (os/arch) " - '(doc)' for help"))
(flush)
(defn getprompt [p]
(def [line] (parser/where p))
|
fix bug: skipping constructor when txdef contains error | @@ -226,7 +226,7 @@ func (l *luaTxDef) hash() []byte {
func (l *luaTxDef) Constructor(args string) *luaTxDef {
argsLen := len([]byte(args))
- if argsLen == 0 {
+ if argsLen == 0 || l.cErr != nil {
return l
}
|
sdl: audio: add SDL_DequeueAudio() | @@ -10,6 +10,14 @@ static int SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len)
return -1;
}
#endif
+
+#if !(SDL_VERSION_ATLEAST(2,0,5))
+#pragma message("SDL_DequeueAudio is not supported before SDL 2.0.5")
+static int SDL_DequeueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len)
+{
+ return -1;
+}
+#endif
*/
import "C"
import (
@@ -315,6 +323,18 @@ func QueueAudio(dev AudioDeviceID, data []byte) error {
return nil
}
+// DequeueAudio (https://wiki.libsdl.org/SDL_DequeueAudio)
+func DequeueAudio(dev AudioDeviceID, data []byte) error {
+ sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&data))
+ _data := unsafe.Pointer(sliceHeader.Data)
+ _len := (C.Uint32)(sliceHeader.Len)
+ if C.SDL_DequeueAudio(dev.c(), _data, _len) != 0 {
+ return GetError()
+ }
+ return nil
+}
+
+
// MixAudio (https://wiki.libsdl.org/SDL_MixAudio)
func MixAudio(dst, src *uint8, len_ uint32, volume int) {
_dst := (*C.Uint8)(unsafe.Pointer(dst))
|
Fix stray semicolon | @@ -1754,7 +1754,7 @@ TEST( Full_TCP, AFQP_SOCKETS_Socket_InvalidInputParams )
* number of sockets can be created concurrently.
*/
#ifdef integrationtestportableMAX_NUM_UNSECURE_SOCKETS
- #define MAX_NUM_SOCKETS integrationtestportableMAX_NUM_UNSECURE_SOCKETS;
+ #define MAX_NUM_SOCKETS integrationtestportableMAX_NUM_UNSECURE_SOCKETS
#else
#define MAX_NUM_SOCKETS 5u
#endif
|
perf(non-null judgment):
add non-null judgment of "output_ptr->field_ptr" in in hlfabricDiscoveryPayloadPacked() | @@ -450,6 +450,10 @@ __BOATSTATIC BOAT_RESULT hlfabricDiscoveryPayloadPacked(BoatHlfabricTx *tx_ptr,
output_ptr->field_len = packedLength;
output_ptr->field_ptr = BoatMalloc(packedLength);
+ if(output_ptr->field_ptr == NULL){
+ BoatLog(BOAT_LOG_CRITICAL, "Fail to allocate output_ptr->field_ptr buffer.");
+ boat_throw(BOAT_ERROR_COMMON_OUT_OF_MEMORY, hlfabricPayloadPacked_exception);
+ }
memcpy(output_ptr->field_ptr, signatureHeaderPacked.field_ptr, signatureHeaderPacked.field_len);
memcpy(output_ptr->field_ptr + signatureHeaderPacked.field_len, payloadDataPacked.field_ptr, payloadDataPacked.field_len);
|
Workaround: AmigaOS4's W3D Nova doesn't support SPIR-V OpImageSampleProjImplicitLod, therefore OGLES2 cannot handle texture2Dproj here for now. | @@ -22,11 +22,19 @@ static int comments = 1;
#define ShadAppend(S) shad = Append(shad, &shad_cap, S)
+#ifdef AMIGA
+// 2D Rectangle 3D CubeMap Stream
+const char* texvecsize[] = {"vec2", "vec2", "vec2", "vec3", "vec2"};
+const char* texxyzsize[] = {"st", "st", "st", "stp", "st"};
+// 2D Rectangle 3D CubeMap Stream
+const char* texname[] = {"texture2D", "texture2D", "texture2D", "textureCube", "textureStreamIMG"}; // textureRectange and 3D are emulated with 2D
+#else
// 2D Rectangle 3D CubeMap Stream
const char* texvecsize[] = {"vec4", "vec2", "vec2", "vec3", "vec2"};
const char* texxyzsize[] = {"stpq", "st", "st", "stp", "st"};
// 2D Rectangle 3D CubeMap Stream
const char* texname[] = {"texture2DProj", "texture2D", "texture2D", "textureCube", "textureStreamIMG"}; // textureRectange and 3D are emulated with 2D
+#endif
const char* texnoproj[] = {"texture2D", "texture2D", "texture2D", "textureCube", "textureStreamIMG"}; // textureRectange and 3D are emulated with 2D
const char* texsampler[] = {"sampler2D", "sampler2D", "sampler2D", "samplerCube", "samplerStreamIMG"};
int texnsize[] = {2, 2, 3, 3, 2};
|
mac_address_t: size to 6 bytes so it represents wire format | @@ -23,17 +23,23 @@ typedef struct mac_address_t_
union
{
u8 bytes[6];
- u64 as_u64;
+ struct
+ {
+ u32 first_4;
+ u16 last_2;
+ } __clib_packed u;
};
} mac_address_t;
+STATIC_ASSERT ((sizeof (mac_address_t) == 6),
+ "MAC address must represent the on wire format");
+
extern const mac_address_t ZERO_MAC_ADDRESS;
static_always_inline void
mac_address_from_bytes (mac_address_t * mac, const u8 * bytes)
{
/* zero out the last 2 bytes, then copy over only 6 */
- mac->as_u64 = 0;
clib_memcpy (mac->bytes, bytes, 6);
}
@@ -47,21 +53,23 @@ mac_address_to_bytes (const mac_address_t * mac, u8 * bytes)
static_always_inline int
mac_address_is_zero (const mac_address_t * mac)
{
- return (0 == mac->as_u64);
+ return (0 == mac->u.first_4 && 0 == mac->u.last_2);
}
static_always_inline u64
mac_address_as_u64 (const mac_address_t * mac)
{
- return (mac->as_u64);
+ u64 *as_u64;
+
+ as_u64 = (u64 *) mac->bytes;
+
+ return (*as_u64);
}
static_always_inline void
mac_address_from_u64 (u64 u, mac_address_t * mac)
{
- mac->as_u64 = u;
- mac->bytes[4] = 0;
- mac->bytes[5] = 0;
+ clib_memcpy (mac->bytes, &u, 6);
}
static_always_inline void
|
fix drag to other monitor | @@ -2183,7 +2183,7 @@ movemouse(const Arg *arg)
ev.xmotion.x_root > selmon->mx + selmon->mw ||
ev.xmotion.y_root < selmon->my ||
ev.xmotion.y_root > selmon->my + selmon->mh) {
- if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
+ if ((m = recttomon(ev.xmotion.x_root, ev.xmotion.y_root, 2, 2)) != selmon) {
XRaiseWindow(dpy, c->win);
fprintf(stderr, "x, %d", ev.xmotion.x_root);
sendmon(c, m);
|
Add cxa_throw_hook | @@ -776,6 +776,9 @@ static void throw_exception(__cxa_exception *ex)
report_failure(err, ex);
}
+typedef void (*cxa_throw_hook_t)(void*, std::type_info*, void(*)(void*)) noexcept;
+
+__attribute__((weak)) cxa_throw_hook_t cxa_throw_hook = nullptr;
/**
* ABI function for throwing an exception. Takes the object to be thrown (the
@@ -786,6 +789,11 @@ extern "C" void __cxa_throw(void *thrown_exception,
std::type_info *tinfo,
void(*dest)(void*))
{
+ if (cxa_throw_hook)
+ {
+ cxa_throw_hook(thrown_exception, tinfo, dest);
+ }
+
__cxa_exception *ex = reinterpret_cast<__cxa_exception*>(thrown_exception) - 1;
ex->referenceCount = 1;
|
libhfuzz/instrument: don't add 1 byte values to the dynamic dictionary | @@ -238,7 +238,7 @@ static inline bool instrumentLimitEvery(uint64_t step) {
}
static inline void instrumentAddConstMemInternal(const void* mem, size_t len) {
- if (len == 0) {
+ if (len <= 1) {
return;
}
if (len > sizeof(globalCmpFeedback->valArr[0].val)) {
|
Mesh:setVertexMap accepts a Blob for fast updates; | @@ -203,6 +203,14 @@ int l_lovrMeshSetVertexMap(lua_State* L) {
return 0;
}
+ if (lua_type(L, 2) == LUA_TUSERDATA) {
+ Blob* blob = luax_checktypeof(L, 2, Blob);
+ size_t size = luaL_optinteger(L, 3, 4);
+ lovrAssert(size == 2 || size == 4, "Size of Mesh indices should be 2 bytes or 4 bytes");
+ uint32_t count = blob->size / size;
+ IndexPointer indices = lovrMeshWriteIndices(mesh, count, size);
+ memcpy(indices.raw, blob->data, blob->size);
+ } else {
luaL_checktype(L, 2, LUA_TTABLE);
uint32_t count = lua_objlen(L, 2);
uint32_t vertexCount = lovrMeshGetVertexCount(mesh);
@@ -228,6 +236,7 @@ int l_lovrMeshSetVertexMap(lua_State* L) {
lua_pop(L, 1);
}
+ }
return 0;
}
|
docs - gpcopy add --parallelize-leaf-partitions option
* docs - gpcopy add --parallelize-leaf-partitions option
Will be backported to 5X_STABLE
* docs - gpcopy supports copying leaf partitions of a partitioned table.
* docs - gpcopy fix typos. | [<b>--exclude-table-file</b> <varname>table-file1</varname>]
[ <b>--exclude-table-file</b> <varname>table-file2</varname>] ... ]]
[<b>--skip-existing</b> | <b>--truncate</b> | <b>--drop</b> | <b>--append</b> ]
+ [<b>--parallelize-leaf-partitions</b>]
[<b>--dry-run</b>]
[<b>--analyze</b>]
[<b>--validate</b> <varname>type</varname>]
<pd>For smaller tables, copying tables using the Greenplum Database master is
more efficient than using segment instances.</pd>
</plentry>
+ <plentry>
+ <pt>--parallelize-leaf-partitions</pt>
+ <pd>If specified, the utility copies the leaf partition tables of a partitioned
+ table in parallel. The default is to copy the partitioned table as a single
+ table based on the root partition table. </pd>
+ <pd>If the <codeph>--validate</codeph> option is also specified, the utility
+ validates each leaf partition table during the copy process and then
+ validates the entire partitioned table.</pd>
+ </plentry>
<plentry>
<pt>--quiet</pt>
<pd>If specified, suppress status messages at the command prompt. The messages
<p><b>Copying Partitioned Tables</b></p>
<p>When copying data for a partitioned table, if a leaf partition has been exchanged
with an external table, that leaf partition is created, but data is not copied. </p>
- <p>You cannot copy an individual leaf partition, you must copy the entire
- partitioned table.</p>
+ <p>If you specify copying leaf partitions of a partitioned table with an option such
+ as <codeph>--include-table</codeph> or <codeph>--exclude-table</codeph>,
+ <codeph>gpcopy</codeph> creates the partitioned table if it does not exist.
+ Only the data for the specified leaf partitions are added to the partitioned
+ table. Specifying individual leaf partitions is useful when the entire
+ partitioned tabled does not need to be copied.</p>
<p><codeph>gpcopy</codeph> does not support table data distribution checking when
copying a partitioned table that is defined with a leaf table that is an
external table or if a leaf table is defined with a distribution policy that is
|
Fix path copy error and add more logs.
Since we didn't copy the null terminator to temp_filepath, dirname could return the wrong result. | @@ -226,7 +226,7 @@ int checkSingleAof(char *aof_filename, char *aof_filepath, int last_file, int fi
FILE *fp = fopen(aof_filepath, "r+");
if (fp == NULL) {
- printf("Cannot open file: %s, aborting...\n", aof_filename);
+ printf("Cannot open file %s: %s, aborting...\n", aof_filepath, strerror(errno));
exit(1);
}
@@ -336,7 +336,7 @@ int checkSingleAof(char *aof_filename, char *aof_filepath, int last_file, int fi
int fileIsRDB(char *filepath) {
FILE *fp = fopen(filepath, "r");
if (fp == NULL) {
- printf("Cannot open file: %s\n", filepath);
+ printf("Cannot open file %s: %s\n", filepath, strerror(errno));
exit(1);
}
@@ -372,7 +372,7 @@ int fileIsManifest(char *filepath) {
int is_manifest = 0;
FILE *fp = fopen(filepath, "r");
if (fp == NULL) {
- printf("Cannot open file: %s\n", filepath);
+ printf("Cannot open file %s: %s\n", filepath, strerror(errno));
exit(1);
}
@@ -554,7 +554,7 @@ int redis_check_aof_main(int argc, char **argv) {
}
/* In the glibc implementation dirname may modify their argument. */
- memcpy(temp_filepath, filepath, strlen(filepath));
+ memcpy(temp_filepath, filepath, strlen(filepath) + 1);
dirpath = dirname(temp_filepath);
/* Select the corresponding verification method according to the input file type. */
|
Re-enable properties test
the issue was fixed but the test was not re-enabled | @@ -61,7 +61,6 @@ public class OCResourceTest {
public void testProperties(){
OCResource r = new OCResource();
assertNotNull(r);
- fail("Not properly implemented\nsetProperties implementation crashes VM");
r.setProperties((OCResourcePropertiesMask.OC_DISCOVERABLE | OCResourcePropertiesMask.OC_OBSERVABLE));
assertTrue((r.getProperties() & OCResourcePropertiesMask.OC_DISCOVERABLE) == OCResourcePropertiesMask.OC_DISCOVERABLE);
assertTrue((r.getProperties() & OCResourcePropertiesMask.OC_OBSERVABLE) == OCResourcePropertiesMask.OC_OBSERVABLE);
|
Toyota safety: fixed rounding logic | @@ -40,11 +40,13 @@ static void toyota_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {
// scale by dbc_factor
torque_meas_new = (torque_meas_new * toyota_dbc_eps_torque_factor) / 100;
- // increase torque_meas by 1 to be conservative on rounding
- torque_meas_new += (torque_meas_new > 0 ? 1 : -1);
-
// update array of sample
update_sample(&toyota_torque_meas, torque_meas_new);
+
+ // increase torque_meas by 1 to be conservative on rounding
+ toyota_torque_meas.min--;
+ toyota_torque_meas.max++;
+
}
// enter controls on rising edge of ACC, exit controls on ACC off
|
[kernel] fix a const error with g++ 5.4.0 in | @@ -452,10 +452,10 @@ struct UpdateShapeVisitor : public SiconosVisitor
void SiconosBulletCollisionManager_impl::updateAllShapesForDS(const BodyDS &bds)
{
- SP::UpdateShapeVisitor updateShapeVisitor(std11::make_shared<UpdateShapeVisitor>(*this));
+ UpdateShapeVisitor updateShapeVisitor(*this);
std::vector<std11::shared_ptr<BodyShapeRecord> >::iterator it;
for (it = bodyShapeMap[&bds].begin(); it != bodyShapeMap[&bds].end(); it++)
- (*it)->acceptSP(updateShapeVisitor);
+ (*it)->accept(updateShapeVisitor);
}
template<typename ST, typename BT, typename BR>
|
Document Windows command line usage
PR <https://github.com/Genymobile/scrcpy/pull/1973> | @@ -199,3 +199,36 @@ scrcpy -m 1920
scrcpy -m 1024
scrcpy -m 800
```
+
+
+## Command line on Windows
+
+Some Windows users are not familiar with the command line. Here is how to open a
+terminal and run `scrcpy` with arguments:
+
+ 1. Press <kbd>Windows</kbd>+<kbd>r</kbd>, this opens a dialog box.
+ 2. Type `cmd` and press <kbd>Enter</kbd>, this opens a terminal.
+ 3. Go to your _scrcpy_ directory, by typing (adapt the path):
+
+ ```bat
+ cd C:\Users\user\Downloads\scrcpy-win64-xxx
+ ```
+
+ and press <kbd>Enter</kbd>
+ 4. Type your command. For example:
+
+ ```bat
+ scrcpy --record file.mkv
+ ```
+
+If you plan to always use the same arguments, create a file `myscrcpy.bat`
+(enable [show file extensions] to avoid confusion) in the `scrcpy` directory,
+containing your command. For example:
+
+```bat
+scrcpy --prefer-text --turn-screen-off --stay-awake
+```
+
+Then just double-click on that file.
+
+[show file extensions]: https://www.howtogeek.com/205086/beginner-how-to-make-windows-show-file-extensions/
|
Update TransmissionPolicyManager.cpp
Spelling | @@ -147,7 +147,7 @@ namespace ARIASDK_NS_BEGIN {
LOCKGUARD(m_scheduledUploadMutex);
if ((m_isPaused) || (m_scheduledUploadAborted))
{
- LOG_TRACE("Paused, not uploading anything until resumed");
+ LOG_TRACE("Paused or upload aborted: cancel pending upload task.");
cancelUploadTask(); // If there is a pending upload task, kill it
return;
}
|
Avoid compiler complaining
initialize some local variables | @@ -790,11 +790,11 @@ EXT_RETURN tls_construct_ctos_psk(SSL *s, WPACKET *pkt, unsigned int context,
X509 *x, size_t chainidx, int *al)
{
#ifndef OPENSSL_NO_TLS1_3
- uint32_t now, agesec, agems;
- size_t reshashsize, pskhashsize, binderoffset, msglen, idlen;
+ uint32_t now, agesec, agems = 0;
+ size_t reshashsize = 0, pskhashsize = 0, binderoffset, msglen, idlen = 0;
unsigned char *resbinder = NULL, *pskbinder = NULL, *msgstart = NULL;
- const unsigned char *id;
- const EVP_MD *handmd = NULL, *mdres, *mdpsk;
+ const unsigned char *id = 0;
+ const EVP_MD *handmd = NULL, *mdres = NULL, *mdpsk = NULL;
EXT_RETURN ret = EXT_RETURN_FAIL;
SSL_SESSION *psksess = NULL;
int dores = 0;
|
add power-of-two check to posix_memalign, pr | @@ -136,6 +136,7 @@ int posix_memalign(void** p, size_t alignment, size_t size) {
// The spec also dictates we should not modify `*p` on an error. (issue#27)
// <http://man7.org/linux/man-pages/man3/posix_memalign.3.html>
if (alignment % sizeof(void*) != 0) return EINVAL; // no `p==NULL` check as it is declared as non-null
+ if ((alignment & (~alignment + 1)) != alignment) return EINVAL; // not a power of 2
void* q = mi_malloc_aligned(size, alignment);
if (q==NULL && size != 0) return ENOMEM;
*p = q;
|
Fix default process properties window theme | @@ -174,6 +174,7 @@ INT CALLBACK PhpPropSheetProc(
PhSetWindowContext(hwndDlg, 0xF, propSheetContext);
SetWindowLongPtr(hwndDlg, GWLP_WNDPROC, (LONG_PTR)PhpPropSheetWndProc);
+ if (PhEnableThemeSupport) // NOTE: Required for compatibility. (dmex)
PhInitializeWindowTheme(hwndDlg, PhEnableThemeSupport);
PhRegisterWindowCallback(hwndDlg, PH_PLUGIN_WINDOW_EVENT_TYPE_TOPMOST, NULL);
|
perf-tools/tau: update patch to work with fuzz factor=0 for latest release | ---- a/plugins/testplugins/Makefile 2017-11-06 18:05:39.000000000 -0800
-+++ b/plugins/testplugins/Makefile 2018-05-16 15:30:48.000000000 -0700
+--- plugins/testplugins/Makefile.orig 2019-04-28 07:15:43.000000000 -0500
++++ plugins/testplugins/Makefile 2019-05-22 16:12:33.000000000 -0500
CFLAGS = $(TAU_MPI_COMPILE_INCLUDE) $(TAU_INCLUDE) $(TAU_DEFS) $(USER_OPT) $(TAU_INTERNAL_FLAGS) -fPIC
-LDFLAGS = $(TAU_MPI_LIB)
+LDFLAGS = -L$(TAU_PREFIX_INSTALL_DIR)/lib $(TAU_MPI_LIB)
- OBJS = libtau_plugin_function_registration_complete.so libtau_plugin_atomic_event_trigger.so libtau_plugin_atomic_event_registration_complete.so libtau_plugin_end_of_execution.so libtau_plugin_interrupt_trigger.so tau_plugin_function_registration_complete.o tau_plugin_atomic_event_trigger.o tau_plugin_atomic_event_registration_complete.o tau_plugin_end_of_execution.o tau_plugin_interrupt_trigger.o
-
---- a/plugins/examples/Makefile 2018-04-20 12:42:00.000000000 -0700
-+++ b/plugins/examples/Makefile 2018-05-16 15:30:48.000000000 -0700
-@@ -15,7 +15,7 @@
-
- CFLAGS = $(TAU_MPI_COMPILE_INCLUDE) $(TAU_INCLUDE) $(TAU_DEFS) $(USER_OPT) $(TAU_INTERNAL_FLAGS) -fPIC -I.
-
--LDFLAGS = $(TAU_MPI_LIB)
-+LDFLAGS = -L$(TAU_PREFIX_INSTALL_DIR)/lib $(TAU_MPI_LIB)
-
- OBJS = libTAU-filter-plugin.so libTAU-mpit-recommend-sharp-usage-plugin.so libTAU-mpit-mvapich-free_unused_vbufs.so tau_plugin_example_disable_instrumentation_runtime.o tau_plugin_example_mpit_recommend_sharp_usage.o tau_plugin_example_free_unused_vbufs.o tau_plugin_sos.o
+ OBJS = libtau_plugin_phases.so libtau_plugin_function_registration_complete.so libtau_plugin_atomic_event_trigger.so libtau_plugin_atomic_event_registration_complete.so libtau_plugin_end_of_execution.so libtau_plugin_interrupt_trigger.so tau_plugin_function_registration_complete.o tau_plugin_phases.o tau_plugin_atomic_event_trigger.o tau_plugin_atomic_event_registration_complete.o tau_plugin_end_of_execution.o tau_plugin_interrupt_trigger.o
|
examples/sntp: Document that SNTP-over-DHCP resets other NTP servers
Closes | @@ -22,7 +22,7 @@ See `initialize_sntp` function for details.
## Obtaining time using LwIP SNTP-over-DHCP module
-NTP server addresses could be automatically aquired via DHCP server option 42. This could be usefull on closed environments where public NTPs are not accessible
+NTP server addresses could be automatically acquired via DHCP server option 42. This could be useful on closed environments where public NTPs are not accessible
or to prefer local servers and reduce traffic to the outer world.
See following menuconfig options:
* `Component config-->LWIP-->SNTP-->Maximum number of NTP servers`
@@ -30,6 +30,10 @@ See following menuconfig options:
* `Component config-->LWIP-->SNTP-->Maximum number of NTP servers aquired via DHCP`
* `Component config-->LWIP-->Enable LWIP Debug-->Enable SNTP debug messages`
+Please note, that `dhcp_set_ntp_servers()` does not only set NTP servers provided by DHCP, but also resets all other NTP server configured before. If you want to keep both manually configured and DHCP obtained NTP servers, please use the API in this order:
+* Enable SNTP-over-DHCP before getting the IP using `sntp_servermode_dhcp()`
+* Set the static NTP servers after receiving the DHCP lease using `sntp_setserver()`
+
## Timekeeping
Once time is synchronized, ESP32 will perform timekeeping using built-in timers.
|
vcl: fix nonblocking accept with >1 event in the queue
We discard unwanted events until we get an ACCEPTED.
But if we are non-blocking we need to check the queue
length every time and EAGAIN if empty before waiting.
Type: fix | @@ -1464,11 +1464,11 @@ vppcom_session_accept (uint32_t listen_session_handle, vppcom_endpt_t * ep,
is_nonblocking = VCL_SESS_ATTR_TEST (listen_session->attr,
VCL_SESS_ATTR_NONBLOCK);
+ while (1)
+ {
if (svm_msg_q_is_empty (wrk->app_event_queue) && is_nonblocking)
return VPPCOM_EAGAIN;
- while (1)
- {
if (svm_msg_q_sub (wrk->app_event_queue, &msg, SVM_Q_WAIT, 0))
return VPPCOM_EAGAIN;
|
board/jinlon/thermal.c: Format with clang-format
BRANCH=none
TEST=none | @@ -141,8 +141,7 @@ static const struct fan_step fan_table_tablet[] = {
#define NUM_FAN_LEVELS ARRAY_SIZE(fan_table_clamshell)
-BUILD_ASSERT(ARRAY_SIZE(fan_table_clamshell) ==
- ARRAY_SIZE(fan_table_tablet));
+BUILD_ASSERT(ARRAY_SIZE(fan_table_clamshell) == ARRAY_SIZE(fan_table_tablet));
int fan_table_to_rpm(int fan, int *temp)
{
@@ -168,9 +167,12 @@ int fan_table_to_rpm(int fan, int *temp)
temp[TEMP_SENSOR_3] < prev_tmp[TEMP_SENSOR_3] ||
temp[TEMP_SENSOR_4] < prev_tmp[TEMP_SENSOR_4]) {
for (i = current_level; i > 0; i--) {
- if (temp[TEMP_SENSOR_1] < fan_step_table[i].off[TEMP_SENSOR_1] &&
- temp[TEMP_SENSOR_4] < fan_step_table[i].off[TEMP_SENSOR_4] &&
- temp[TEMP_SENSOR_3] < fan_step_table[i].off[TEMP_SENSOR_3])
+ if (temp[TEMP_SENSOR_1] <
+ fan_step_table[i].off[TEMP_SENSOR_1] &&
+ temp[TEMP_SENSOR_4] <
+ fan_step_table[i].off[TEMP_SENSOR_4] &&
+ temp[TEMP_SENSOR_3] <
+ fan_step_table[i].off[TEMP_SENSOR_3])
current_level = i - 1;
else
break;
@@ -179,9 +181,12 @@ int fan_table_to_rpm(int fan, int *temp)
temp[TEMP_SENSOR_3] > prev_tmp[TEMP_SENSOR_3] ||
temp[TEMP_SENSOR_4] > prev_tmp[TEMP_SENSOR_4]) {
for (i = current_level; i < NUM_FAN_LEVELS; i++) {
- if ((temp[TEMP_SENSOR_1] > fan_step_table[i].on[TEMP_SENSOR_1] &&
- temp[TEMP_SENSOR_4] > fan_step_table[i].on[TEMP_SENSOR_4]) ||
- temp[TEMP_SENSOR_3] > fan_step_table[i].on[TEMP_SENSOR_3])
+ if ((temp[TEMP_SENSOR_1] >
+ fan_step_table[i].on[TEMP_SENSOR_1] &&
+ temp[TEMP_SENSOR_4] >
+ fan_step_table[i].on[TEMP_SENSOR_4]) ||
+ temp[TEMP_SENSOR_3] >
+ fan_step_table[i].on[TEMP_SENSOR_3])
current_level = i + 1;
else
break;
@@ -212,10 +217,8 @@ int fan_table_to_rpm(int fan, int *temp)
void board_override_fan_control(int fan, int *tmp)
{
- if (chipset_in_state(CHIPSET_STATE_ON |
- CHIPSET_STATE_ANY_SUSPEND)) {
+ if (chipset_in_state(CHIPSET_STATE_ON | CHIPSET_STATE_ANY_SUSPEND)) {
fan_set_rpm_mode(FAN_CH(fan), 1);
- fan_set_rpm_target(FAN_CH(fan),
- fan_table_to_rpm(fan, tmp));
+ fan_set_rpm_target(FAN_CH(fan), fan_table_to_rpm(fan, tmp));
}
}
|
lib: monkey: sync changes provided in | @@ -237,6 +237,9 @@ static int mk_rconf_read(struct mk_rconf *conf, const char *path)
buf[--len] = 0;
}
}
+ else {
+ mk_config_error(path, line, "Length of content has execeded limit");
+ }
/* Line number */
line++;
|
[numerics] correct typos in users message | @@ -3039,7 +3039,7 @@ int NM_LU_factorize(NumericsMatrix* A, unsigned keep)
p->dWork = (double*) malloc(A->size1 * sizeof(double));
p->dWorkSize = A->size1;
CSparseMatrix_factors* cs_lu_A = (CSparseMatrix_factors*) malloc(sizeof(CSparseMatrix_factors));
- numerics_printf_verbose(2,"NM_LU_factorize,, we compute factors and keep it" );
+ numerics_printf_verbose(2,"NM_LU_factorize, we compute factors and keep it" );
DEBUG_EXPR(cs_print(NM_csc(A),0));
CHECK_RETURN(CSparsematrix_lu_factorization(1, NM_csc(A), DBL_EPSILON, cs_lu_A));
p->linear_solver_data = cs_lu_A;
@@ -3121,13 +3121,13 @@ int NM_LU_solve(NumericsMatrix* A, double *b, unsigned int nrhs, unsigned keep)
switch (p->solver)
{
case NSM_CS_LUSOL:
- numerics_printf_verbose(2,"NM_gesv, using CSparse" );
+ numerics_printf_verbose(2,"NM_LU_solve, using CSparse" );
if (keep == NM_KEEP_FACTORS)
{
NM_LU_factorize(A, keep);
- numerics_printf_verbose(2,"NM_gesv, we solve with given factors" );
+ numerics_printf_verbose(2,"NM_LU_solve, we solve with given factors" );
for(unsigned int j=0; j < nrhs ; j++ )
{
info = !CSparseMatrix_solve((CSparseMatrix_factors *)NSM_linear_solver_data(p), NSM_workspace(p), &b[j*A->size1]);
|
OpenCanopy: Improve ScrollSelected bounds checking | @@ -229,7 +229,12 @@ InternelBootPickerScrollSelected (
INT64 EntryOffsetX;
UINT32 EntryWidth;
- if (mBootPicker.Hdr.Obj.NumChildren == 1) {
+ ASSERT (mBootPicker.SelectedIndex < mBootPicker.Hdr.Obj.NumChildren);
+
+ //
+ // No scroll required if nothing off screen
+ //
+ if (mBootPicker.Hdr.Obj.Width <= mBootPickerContainer.Obj.Width) {
return 0;
}
//
|
Added malloc / free so they forward to MEM_alloc / MEM_free | }
+#if (ENABLE_NEWLIB == 0)
+// enable standard libc compatibility
+#define malloc(x) MEM_alloc(x)
+#define free(x) MEM_free(x)
+#endif // ENABLE_NEWLIB
+
+
/**
* \brief
* Return available memory in bytes
|
Fix a bug in function pipe_rx
GCC 7 found this issue with a compiling warning,
and this bug has been confirmed by module owner. | @@ -390,7 +390,7 @@ pipe_rx (vlib_main_t * vm,
vlib_validate_buffer_enqueue_x2 (vm, node, next_index,
to_next, n_left_to_next,
- bi0, bi1, next0, next0);
+ bi0, bi1, next0, next1);
}
while (n_left_from > 0 && n_left_to_next > 0)
{
|
win: fix build error and comment style | @@ -153,15 +153,15 @@ TEST_IMPL(GLM_PREFIX, quat_copy) {
TEST_IMPL(GLM_PREFIX, quat_from_vecs) {
versor q1, q2, q3, q4, q5, q6, q7;
- vec3 v1 = {1.f, 0.f, 0.f}, v2 = {1.f, 0.f, 0.f}; // parallel
- vec3 v3 = {0.f, 1.f, 0.f}, v4 = {1.f, 0.f, 0.f}; // perpendicular
- vec3 v5 = {0.f, 0.f, 1.f}, v6 = {0.f, 0.f, -1.f}; // straight
- vec3 v7, v8; // random
- vec3 v9 = {0.57735026f, 0.57735026f, 0.57735026f}, // acute
+ vec3 v1 = {1.f, 0.f, 0.f}, v2 = {1.f, 0.f, 0.f}; /* parallel */
+ vec3 v3 = {0.f, 1.f, 0.f}, v4 = {1.f, 0.f, 0.f}; /* perpendicular */
+ vec3 v5 = {0.f, 0.f, 1.f}, v6 = {0.f, 0.f, -1.f}; /* straight */
+ vec3 v7, v8; /* random */
+ vec3 v9 = {0.57735026f, 0.57735026f, 0.57735026f}, /* acute */
v10 = {0.70710678f, 0.70710678f, 0.f};
- vec3 v11 = {0.87287156f, 0.21821789f, 0.43643578f}, // obtuse
+ vec3 v11 = {0.87287156f, 0.21821789f, 0.43643578f}, /* obtuse */
v12 = {-0.87287156f, 0.21821789f, 0.43643578f};
- vec3 v13 = {}; // zero
+ vec3 v13 = GLM_VEC3_ZERO_INIT; /* zero */
GLM(quat_from_vecs)(v1, v2, q1);
ASSERTIFY(test_assert_quat_eq_identity(q1))
|
Fix ignored files list. | Makedefs
autom4te.cache
/config.h
-config.log
-config.status
-cups/libcups.a
-cups/org.pwg.ippsample.*
-cups/test.raster
-cups/testarray
-cups/testclient
-cups/testdest
-cups/testfile
-cups/testhttp
-cups/testi18n
-cups/testipp
-cups/testoptions
-cups/testraster
-data
-man/mantohtml
-examples/pwg-raster-samples*
-parts
-prime
-server/ippserver
-stage
-tools/ippdoclint
-tools/ippeveprinter
-tools/ippfind
-tools/ippproxy
-tools/ipptool
-tools/ipptransform
-tools/ipptransform3d
-vcnet/.vs
-vcnet/packages
-vcnet/x64
-xcode/DerivedData
+/config.log
+/config.status
+/cups/libcups.a
+/cups/org.pwg.ippsample.*
+/cups/test.raster
+/cups/testarray
+/cups/testclient
+/cups/testdest
+/cups/testfile
+/cups/testhttp
+/cups/testi18n
+/cups/testipp
+/cups/testoptions
+/cups/testraster
+/data
+/man/mantohtml
+/examples/pwg-raster-samples*
+/parts
+/prime
+/server/ippserver
+/stage
+/tools/ipp3dprinter
+/tools/ippdoclint
+/tools/ippeveprinter
+/tools/ippfind
+/tools/ippproxy
+/tools/ipptool
+/tools/ipptransform
+/tools/ipptransform3d
+/vcnet/.vs
+/vcnet/packages
+/vcnet/x64
+/xcode/DerivedData
xcuserdata
*.dSYM
*.log
|
Added a reference in readme
Just in case someone wants to finish the port for poser_octavioradii.c | @@ -115,7 +115,7 @@ Component Type | Component | Description | Authors
Poser | [poser_charlesslow.c](src/poser_charlesslow.c) | A very slow, but exhaustive poser system. Calibration only. | [@cnlohr](https://github.com/cnlohr)
Poser | [poser_daveortho.c](src/poser_daveortho.c) | A very fast system using orthograpic view and affine transformations. Calibration only (for now) | [@ultramn](https://github.com/ultramn)
Poser | [poser_dummy.c](src/poser_dummy.c) | Template for posers | [@cnlohr](https://github.com/cnlohr)
-Poser | [poser_octavioradii.c](src/poser_octavioradii.c) | A potentially very fast poser that works by finding the best fit of the distances from the lighthouse to each sensor that matches the known distances between sensors, given the known angles of a lighthouse sweep. Incomplete- distances appear to be found correctly, but more work needed to turn this into a pose. | [@mwturvey](https://github.com/mwturvey) and [@octavio2895](https://github.com/octavio2895)
+Poser | [poser_octavioradii.c](src/poser_octavioradii.c) | A potentially very fast poser that works by finding the best fit of the distances from the lighthouse to each sensor that matches the known distances between sensors, given the known angles of a lighthouse sweep. Incomplete- distances appear to be found correctly, but more work needed to turn this into a pose. Based on [this python code](https://github.com/octavio2895/lh_tools). | [@mwturvey](https://github.com/mwturvey) and [@octavio2895](https://github.com/octavio2895)
Poser | [poser_turveytori.c](src/poser_turveytori.c) | A moderately fast, fairly high precision poser that works by determine the angle at the lighthouse between many sets of two sensors. Using the inscirbed angle theorom, each set defines a torus of possible locations of the lighthouse. Multiple sets define multiple tori, and this poser finds most likely location of the lighthouse using least-squares distance. Best suited for calibration, but is can be used for real-time tracking on a powerful system. | [@mwturvey](https://github.com/mwturvey)
Poser | [poser_epnp.c](src/poser_epnp.c) | Reasonably fast and accurate calibration and tracker that uses the [EPNP algorithm](https://en.wikipedia.org/wiki/Perspective-n-Point#EPnP) to solve the perspective and points problem. Suitable for fast tracking, but does best with >5-6 sensor readings. | [@jdavidberger](https://github.com/jdavidberger)
Poser | [poser_sba.c](src/poser_sba.c) (default) | Reasonably fast and accurate calibration and tracker but is dependent on a 'seed' poser to give it an initial estimate. This then performs [bundle adjustment](https://en.wikipedia.org/wiki/Bundle_adjustment) to minimize reprojection error given both ligthhouse readings. This has the benefit of greatly increasing accuracy by incorporating all the light data that is available. Set 'SBASeedPoser' config option to specify the seed poser; default is EPNP. | [@jdavidberger](https://github.com/jdavidberger)
|
links: remove stray semicolon | @@ -82,7 +82,7 @@ class LinkWindow extends Component<LinkWindowProps, {}> {
}
return (
<Box ref={ref}>
- <LinkItem key={index.toString()} {...linkProps} />;
+ <LinkItem key={index.toString()} {...linkProps} />
</Box>
);
});
|
libhfuzz/instrument: allow for more constdict values with cmp4 and with cmp8 | @@ -313,14 +313,14 @@ void __sanitizer_cov_trace_cmp2(uint16_t Arg1, uint16_t Arg2) {
void __sanitizer_cov_trace_cmp4(uint32_t Arg1, uint32_t Arg2) {
/* Add 4byte values to the const_dictionary if they exist within the binary */
if (cmpFeedback && instrumentLimitEvery(4095)) {
- if (Arg1 > 0xffff && Arg1 < 0xffff0000) {
+ if (Arg1 > 0xffff) {
uint32_t bswp = __builtin_bswap32(Arg1);
if (util_32bitValInBinary(Arg1) || util_32bitValInBinary(bswp)) {
instrumentAddConstMemInternal(&Arg1, sizeof(Arg1));
instrumentAddConstMemInternal(&bswp, sizeof(bswp));
}
}
- if (Arg2 > 0xffff && Arg2 < 0xffff0000) {
+ if (Arg2 > 0xffff) {
uint32_t bswp = __builtin_bswap32(Arg2);
if (util_32bitValInBinary(Arg2) || util_32bitValInBinary(bswp)) {
instrumentAddConstMemInternal(&Arg2, sizeof(Arg2));
@@ -335,14 +335,14 @@ void __sanitizer_cov_trace_cmp4(uint32_t Arg1, uint32_t Arg2) {
void __sanitizer_cov_trace_cmp8(uint64_t Arg1, uint64_t Arg2) {
/* Add 8byte values to the const_dictionary if they exist within the binary */
if (cmpFeedback && instrumentLimitEvery(4095)) {
- if (Arg1 > 0xffff && Arg1 < 0xffffffffffff0000) {
+ if (Arg1 > 0xffffff) {
uint64_t bswp = __builtin_bswap64(Arg1);
if (util_64bitValInBinary(Arg1) || util_64bitValInBinary(bswp)) {
instrumentAddConstMemInternal(&Arg1, sizeof(Arg1));
instrumentAddConstMemInternal(&bswp, sizeof(bswp));
}
}
- if (Arg2 > 0xffff && Arg2 < 0xffffffffffff0000) {
+ if (Arg2 > 0xffffff) {
uint64_t bswp = __builtin_bswap64(Arg2);
if (util_64bitValInBinary(Arg2) || util_64bitValInBinary(bswp)) {
instrumentAddConstMemInternal(&Arg2, sizeof(Arg2));
|
Bump CCP to 4.0.1.1 for bug fix | @@ -269,7 +269,7 @@ resources:
branch: {{ccp-git-branch}}
private_key: {{ccp-git-key}}
uri: {{ccp-git-remote}}
- tag_filter: 1.0.4
+ tag_filter: 1.0.4.1
- name: terraform
type: terraform
|
[util/string] Some more cleanup in split iterator. | // Provides convenient way to split strings.
// Check iterator_ut.cpp to get examples of usage.
-namespace NStringSplitterContainerConsumer {
+namespace NPrivate {
template <class Container>
struct TContainerConsumer {
using value_type = typename Container::value_type;
@@ -22,20 +22,20 @@ namespace NStringSplitterContainerConsumer {
{
}
- template<class Element>
- void operator()(Element&& e) const {
- this->operator()(C_, std::forward<Element>(e));
+ template<class Char>
+ void operator()(TGenericStringBuf<Char> e) const {
+ this->operator()(C_, e);
}
private:
- template<class OtherContainer, class Element>
- auto operator()(OtherContainer* c, Element&& e) const -> decltype(c->push_back(value_type(std::forward<Element>(e)))) {
- return c->push_back(value_type(std::forward<Element>(e)));
+ template<class OtherContainer, class Char>
+ auto operator()(OtherContainer* c, TGenericStringBuf<Char> e) const -> decltype(c->push_back(value_type(e))) {
+ return c->push_back(value_type(e));
}
- template<class OtherContainer, class Element>
- auto operator()(OtherContainer* c, Element&& e) const -> decltype(c->insert(value_type(std::forward<Element>(e)))) {
- return c->insert(value_type(std::forward<Element>(e)));
+ template<class OtherContainer, class Char>
+ auto operator()(OtherContainer* c, TGenericStringBuf<Char> e) const -> decltype(c->insert(value_type(e))) {
+ return c->insert(value_type(e));
}
Container* C_;
@@ -79,7 +79,7 @@ struct TStlIteratorFace: public It, public TStlIterator<TStlIteratorFace<It>> {
template <class Container>
inline void Collect(Container* c) {
Y_ASSERT(c);
- NStringSplitterContainerConsumer::TContainerConsumer<Container> consumer(c);
+ ::NPrivate::TContainerConsumer<Container> consumer(c);
this->Consume(consumer);
}
|
vere: patch version bump (v0.10.3) [ci skip] | set -e
-URBIT_VERSION="0.10.1"
+URBIT_VERSION="0.10.3"
deps=" \
curl gmp sigsegv argon2 ed25519 ent h2o scrypt sni uv murmur3 secp256k1 \
|
Change arg to cms_CompressedData_init_bio to be const
The argument to this function is declared const in the header file. However
the implementation did not have this. This issue is only visible when using
enable-zlib. | @@ -60,7 +60,7 @@ CMS_ContentInfo *cms_CompressedData_create(int comp_nid)
return NULL;
}
-BIO *cms_CompressedData_init_bio(CMS_ContentInfo *cms)
+BIO *cms_CompressedData_init_bio(const CMS_ContentInfo *cms)
{
CMS_CompressedData *cd;
const ASN1_OBJECT *compoid;
|
stm32/boards/NUCLEO_WB55: Add more CPU pins and aliases to SW1/2/3. | ,PA5
,PA6
,PA7
+,PA8
+,PA9
+,PA10
+,PA11
+,PA12
+,PA13
+,PA14
+,PA15
,PB0
,PB1
,PB2
,PC1
,PC2
,PC3
+,PC4
+,PC5
+,PC6
+,PC10
+,PC11
+,PC12
+,PC13
+,PD0
+,PD1
+,PE4
SW,PC4
+SW1,PC4
+SW2,PD0
+SW3,PD1
LED_GREEN,PB0
LED_RED,PB1
LED_BLUE,PB5
|
Sockeye TN: Start updating checks section | @@ -363,7 +363,7 @@ All declared input ports must have a corresponding node declaration in the modul
When a module is instantiated a list of port mappings can be specified.
An input port mapping creates a node outside the module that overlays the node inside the module.
An output port mapping creates a node inside the module that overlays the node outside the module.
-Not all ports a module defines have to be mapped.
+Not all ports a module declares have to be mapped.
Not mapping an input port simply means there is no connection to the corresponding node inside the module.
For unmapped output ports there will be an empty node inside the module, which is a dead end for address resolution.
@@ -571,12 +571,41 @@ The specification for the Texas Instruments OMAP4460 SoC used on the PandaboardE
\chapter{Checks on the AST}
\label{chap:checks}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-The Sockeye compiler performs some sanity checks on the parsed AST.
+The Sockeye compiler performs two sets of checks.
+The first checks are on a module level.
+Without concrete arguments to the modules not everything can be checked at module level.
+That is why the second set of checks is run when the modules are fully instantiated.
-\section{No Duplicate Identifiers}
+\section{Module Level Checks}
+
+
+\section{Decoding Net Level Checks}
+\subsection{No Module Instantiation Loops}
+This check makes sure, that there are no loops in module instantiations which would cause the compiler to not terminate.
+
+\subsection{No Duplicate Ports}
+This check makes sure, that there are no duplicate input or output ports.
+Not that having the same node declared as an input and an output port is allowed and results in the node being passed through the module.
+
+\todo{This check is currently not implemented.
+For input ports the error will go unnoticed but it also has no effect on the well-formedness of the decoding net.
+For output ports it will result in a \texttt{DuplicateIdentifier} error (see Section~\ref{sec:check_dupl_ident}).}
+
+\subsection{No Duplicate Port Mapping}
+This check makes sure that a port is not mapped twice in the same module instantiation.
+
+\subsection{No Map to Undefined Port}
+This check makes sure that there are no port mappings to ports not declared by the instantiated module.
+
+\todo{This check is currently not implemented.
+For input ports the error will result in a \texttt{UndefinedReference} error.
+For output ports the error will go unnoticed}
+
+\subsection{No Duplicate Identifiers}
+\label{sec:check_dupl_ident}
This check makes sure that there aren't two node declarations with the same identifier.
-\section{No References to Undefined Nodes}
+\subsection{No References to Undefined Nodes}
This check makes sure that all nodes referenced in translation sets and overlays are declared.
|
fix(fabric test):
add fabric test case "TxInvokeFail_Args_Lack2" | @@ -449,6 +449,35 @@ START_TEST(test_002Transaction_0019TxInvokeFail_Args_Lack1)
}
END_TEST
+START_TEST(test_002Transaction_0020TxInvokeFail_Args_Lack2)
+{
+ BSINT32 rtnVal;
+ BoatHlfabricTx tx_ptr;
+ BoatHlfabricWallet *g_fabric_wallet_ptr = NULL;
+ BoatHlfabricWalletConfig wallet_config = get_fabric_wallet_settings();
+ BoatIotSdkInit();
+ /* 1. execute unit test */
+ rtnVal = BoatWalletCreate(BOAT_PROTOCOL_HLFABRIC, NULL, &wallet_config, sizeof(BoatHlfabricWalletConfig));
+ g_fabric_wallet_ptr = BoatGetWalletByIndex(rtnVal);
+
+ rtnVal = BoatHlfabricTxInit(&tx_ptr, g_fabric_wallet_ptr, NULL, "mycc", NULL, "mychannel", "Org1MSP");
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+ rtnVal = BoatHlfabricWalletSetNetworkInfo(tx_ptr.wallet_ptr, wallet_config.nodesCfg);
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+ long int timesec = 0;
+ time(×ec);
+ rtnVal = BoatHlfabricTxSetTimestamp(&tx_ptr, timesec, 0);
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+ rtnVal = BoatHlfabricTxSetArgs(&tx_ptr, "invoke", "a", NULL);
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+ rtnVal = BoatHlfabricTxSubmit(&tx_ptr);
+ ck_assert_int_eq(rtnVal, BOAT_ERROR);
+ BoatIotSdkDeInit();
+ fabricWalletConfigFree(wallet_config);
+}
+END_TEST
+
+
Suite *make_transaction_suite(void)
{
/* Create Suite */
@@ -479,6 +508,7 @@ Suite *make_transaction_suite(void)
tcase_add_test(tc_transaction_api, test_002Transaction_0017TxInvokeFail_Txptr_NULL);
tcase_add_test(tc_transaction_api, test_002Transaction_0018TxInvokeFail_Args_NULL);
tcase_add_test(tc_transaction_api, test_002Transaction_0019TxInvokeFail_Args_Lack1);
+ tcase_add_test(tc_transaction_api, test_002Transaction_0020TxInvokeFail_Args_Lack2);
return s_transaction;
}
|
Do not call SDL_Quit()
It may crash in i965_dri.so when calling SDL_Quit (probably a driver
bug). To avoid a segmentation fault, do not call SDL_Quit(). | @@ -297,7 +297,9 @@ SDL_bool show_screen(const char *serial, Uint16 local_port) {
ret = SDL_FALSE;
goto screen_finally_stop_decoder;
}
- atexit(SDL_Quit);
+ // FIXME it may crash in SDL_Quit in i965_dri.so
+ // As a workaround, do not call SDL_Quit() (we are exiting anyway).
+ // atexit(SDL_Quit);
// Bilinear resizing
if (!SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1")) {
|
server: scheduler: new helpers to cleanup threads | @@ -64,8 +64,9 @@ static inline int _next_target(struct mk_server *server)
cur = (ctx->workers[0].accepted_connections -
ctx->workers[0].closed_connections);
- if (cur == 0)
+ if (cur == 0) {
return 0;
+ }
/* Finds the lowest load worker */
for (i = 1; i < server->workers; i++) {
@@ -474,6 +475,7 @@ int mk_sched_init(struct mk_server *server)
mk_mem_free(ctx);
return -1;
}
+ memset(ctx->workers, '\0', size);
/* Initialize helpers */
pthread_mutex_init(&pth_mutex, NULL);
@@ -596,19 +598,43 @@ int mk_sched_check_timeouts(struct mk_sched_worker *sched,
return 0;
}
-int mk_sched_threads_purge(struct mk_sched_worker *sched)
+static int sched_thread_cleanup(struct mk_sched_worker *sched,
+ struct mk_list *list)
{
int c = 0;
struct mk_list *tmp;
struct mk_list *head;
struct mk_http_thread *mth;
- mk_list_foreach_safe(head, tmp, &sched->threads_purge) {
+ mk_list_foreach_safe(head, tmp, list) {
mth = mk_list_entry(head, struct mk_http_thread, _head);
+ if (mth->close == MK_TRUE) {
+ mk_sched_drop_connection(mth->session->conn, sched,
+ mth->session->server);
+ }
mk_http_thread_destroy(mth);
c++;
}
+ return c;
+
+}
+
+int mk_sched_threads_purge(struct mk_sched_worker *sched)
+{
+ int c = 0;
+
+ c = sched_thread_cleanup(sched, &sched->threads_purge);
+ return c;
+}
+
+int mk_sched_threads_destroy_all(struct mk_sched_worker *sched)
+{
+ int c = 0;
+
+ c = sched_thread_cleanup(sched, &sched->threads_purge);
+ c += sched_thread_cleanup(sched, &sched->threads);
+
return c;
}
|
README: add youtube links | @@ -16,6 +16,12 @@ Flight Controller Firmware
QUICKSILVER comes with configuration application for Windows, MacOS and Linux.
It's source and pre-compiled binaries can be found [here](https://github.com/BossHobby/Configurator).
+## In-Action
+
+* [Youtube - Tarkusx FPV - DIY Frame](https://www.youtube.com/watch?v=ZXH9SbvfqHQ)
+* [Youtube - FPV_EvilMunkey - T Minus 2 Weeks till Whoop Wars](https://www.youtube.com/watch?v=s61xWGj3SnI)
+* [Youtube - Tinywhoop, Toothpick and co ! - iFlight Baby Nazgul](https://www.youtube.com/watch?v=pGUtswiukks)
+
## Contributing
Contributions are welcome and encouraged.
\ No newline at end of file
|
CCode: Simplify `elektraHexcodeConvFromHex` | */
static inline int elektraHexcodeConvFromHex (char c)
{
- if (c == '0')
- return 0;
- else if (c == '1')
- return 1;
- else if (c == '2')
- return 2;
- else if (c == '3')
- return 3;
- else if (c == '4')
- return 4;
- else if (c == '5')
- return 5;
- else if (c == '6')
- return 6;
- else if (c == '7')
- return 7;
- else if (c == '8')
- return 8;
- else if (c == '9')
- return 9;
- else if (c == 'a' || c == 'A')
- return 10;
- else if (c == 'b' || c == 'B')
- return 11;
- else if (c == 'c' || c == 'C')
- return 12;
- else if (c == 'd' || c == 'D')
- return 13;
- else if (c == 'e' || c == 'E')
- return 14;
- else if (c == 'f' || c == 'F')
- return 15;
- else
+ if (c >= '0' && c <= '9') return c - '0';
+ if (c >= 'a' && c <= 'f') return c - 'a' + 10;
+ if (c >= 'A' && c <= 'F') return c - 'A' + 10;
+
return 0; /* Unknown escape char */
}
|
tutorial: update envvars for prod build | @@ -57,11 +57,11 @@ module.exports = {
new webpack.DefinePlugin({
'process.env.LANDSCAPE_STREAM': JSON.stringify(process.env.LANDSCAPE_STREAM),
'process.env.LANDSCAPE_SHORTHASH': JSON.stringify(process.env.LANDSCAPE_SHORTHASH),
- 'process.env.TUTORIAL_HOST': JSON.stringify('~hastuc-dibtux'),
+ 'process.env.TUTORIAL_HOST': JSON.stringify('~difmex-passed'),
'process.env.TUTORIAL_GROUP': JSON.stringify('beginner-island'),
- 'process.env.TUTORIAL_CHAT': JSON.stringify('chat-8401'),
- 'process.env.TUTORIAL_BOOK': JSON.stringify('notebook-9148'),
- 'process.env.TUTORIAL_LINKS': JSON.stringify('links-4353'),
+ 'process.env.TUTORIAL_CHAT': JSON.stringify('introduce-yourself-7010'),
+ 'process.env.TUTORIAL_BOOK': JSON.stringify('guides-9684'),
+ 'process.env.TUTORIAL_LINKS': JSON.stringify('community-articles-2143'),
}),
// new HtmlWebpackPlugin({
// title: 'Hot Module Replacement',
|
ci: remove esp32h2 from default targets | @@ -300,6 +300,10 @@ class BuildSystem:
'Linux': 'linux',
}
+ # ESP32H2-TODO: IDF-4559
+ # Build only apps who has ESP32-H2 in the README.md supported targets table.
+ DEFAULT_TARGETS = ['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp8684', 'linux']
+
@classmethod
def build_prepare(cls, build_item):
app_path = build_item.app_dir
@@ -417,10 +421,10 @@ class BuildSystem:
def _supported_targets(cls, app_path):
readme_file_content = BuildSystem._read_readme(app_path)
if not readme_file_content:
- return cls.FORMAL_TO_USUAL.values() # supports all targets if no readme found
+ return cls.DEFAULT_TARGETS # supports all default targets if no readme found
match = re.findall(BuildSystem.SUPPORTED_TARGETS_REGEX, readme_file_content)
if not match:
- return cls.FORMAL_TO_USUAL.values() # supports all targets if no such header in readme
+ return cls.DEFAULT_TARGETS # supports all default targets if no such header in readme
if len(match) > 1:
raise NotImplementedError("Can't determine the value of SUPPORTED_TARGETS in {}".format(app_path))
support_str = match[0].strip()
|
Fix async bool. | @@ -142,7 +142,7 @@ context_new(struct ub_ctx* ctx, const char* name, int rrtype, int rrclass,
}
lock_basic_unlock(&ctx->cfglock);
q->node.key = &q->querynum;
- q->async = (cb != NULL && cb_event != NULL);
+ q->async = (cb != NULL || cb_event != NULL);
q->cb = cb;
q->cb_event = cb_event;
q->cb_arg = cbarg;
|
cache: update plugin docu | @@ -31,4 +31,5 @@ Incompatible with storage plugins, which do not always produce the same keyset o
concerning the same configuration file. A notable example here is the `ini` plugin (see issue #2592).
The cache files are located in the user's home directory below `~/.cache/elektra/` and
-shall not be altered, otherwise the behavior is undefined.
+shall not be altered, otherwise the behavior is undefined. If `XDG_CACHE_HOME` is set, the
+cache files are located below `$XDG_CACHE_HOME/elektra`.
|
test_spi: fixed redundant quotes in test descriptions | @@ -661,7 +661,7 @@ static const ptest_func_t slave_test_func = {
#define TEST_SPI_MASTER_SLAVE(name, param_group, extra_tag) \
PARAM_GROUP_DECLARE(name, param_group) \
- TEST_MASTER_SLAVE(name, param_group, "[spi_ms][test_env=Example_SPI_Multi_device][timeout=120]"#extra_tag, &master_test_func, &slave_test_func)
+ TEST_MASTER_SLAVE(name, param_group, "[spi_ms][test_env=Example_SPI_Multi_device][timeout=120]"extra_tag, &master_test_func, &slave_test_func)
/************ Master Code ***********************************************/
static void test_master_init(void** arg)
|
doc: PG 13 relnotes: fix uuid item | @@ -1806,7 +1806,7 @@ Author: Peter Eisentraut <[email protected]>
<para>
Previously <acronym>UUID</acronym> generation functions were only
- available external modules <xref linkend="uuid-ossp"/> or <xref
+ available via external modules <xref linkend="uuid-ossp"/> and <xref
linkend="pgcrypto"/> were installed.
</para>
</listitem>
|
Add npm script for rerunning cli when engine or compiler is modified | "coverage": "jest --coverage --runInBand || true",
"missing-translations": "node src/lang/list_missing.js",
"make:cli": "webpack --config webpack.cli.config.js",
- "cli": "node out/cli/gb-studio-cli.js"
+ "cli": "node out/cli/gb-studio-cli.js",
+ "cli:watch": "sh -c 'PROJECT_FILE=$0; PROJECT_ROOT=$(dirname $PROJECT_FILE); fswatch -0 out/cli/gb-studio-cli.js appData/src/gb | xargs -0 -I {} sh -c \"npm run cli compile $PROJECT_FILE && open $PROJECT_ROOT/build/rom/game.gb\";'"
},
"keywords": [],
"author": "GB Studio",
|
cmerge: work around enum wrapping in python binding | #include "kdbmerge.h"
%}
-
ckdb::KeySet * elektraMerge (ckdb::KeySet * our, ckdb::Key * ourRoot, ckdb::KeySet * their, ckdb::Key * theirRoot, ckdb::KeySet * base, ckdb::Key * baseRoot, ckdb::Key * resultKey,
ckdb::MergeStrategy strategy, ckdb::Key * informationKey);
int elektraMergeGetConflicts (ckdb::Key * informationKey);
+%inline %{
+ // we wrap the elektraMerge function, because I haven't found a way to correctly wrap the enum ...
+ ckdb::KeySet * elektraMergeWrap (ckdb::KeySet * our, ckdb::Key * ourRoot, ckdb::KeySet * their, ckdb::Key * theirRoot, ckdb::KeySet * base, ckdb::Key * baseRoot, ckdb::Key * resultKey,
+ int strategy, ckdb::Key * informationKey) {
+ return elektraMerge (our, ourRoot, their, theirRoot, base, baseRoot, resultKey, (ckdb::MergeStrategy) strategy, informationKey);
+ }
+%}
+
%pythoncode {
from enum import Enum
class ConflictStrategy(Enum):
ABORT = 1
- INTERACTIVE = 2
OUR = 3
THEIR = 4
@@ -46,6 +52,6 @@ class MergeResult:
class Merger:
def merge(self, base, ours, theirs, root, conflictStrategy):
informationKey = kdb.Key()
- res = elektraMerge(ours.keys.getKeySet(), ours.root.getKey(), theirs.keys.getKeySet(), theirs.root.getKey(), base.keys.getKeySet(), base.root.getKey(), root.getKey(), conflictStrategy.value, informationKey.getKey())
+ res = elektraMergeWrap(ours.keys.getKeySet(), ours.root.getKey(), theirs.keys.getKeySet(), theirs.root.getKey(), base.keys.getKeySet(), base.root.getKey(), root.getKey(), conflictStrategy.value, informationKey.getKey())
return MergeResult(res, informationKey)
};
|
pybricks/common/ColorLight: use new Color type
This simplifies the code a lot, and a separate brightness argument is no longer required. | @@ -36,20 +36,9 @@ STATIC mp_obj_t common_ColorLight_internal_on(size_t n_args, const mp_obj_t *pos
// Parse arguments
PB_PARSE_ARGS_METHOD(n_args, pos_args, kw_args,
common_ColorLight_internal_obj_t, self,
- PB_ARG_REQUIRED(color),
- PB_ARG_DEFAULT_INT(brightness, 100));
-
- if (color_in == mp_const_none) {
- color_in = pb_const_color_black;
- }
-
- pbio_color_t color = pb_type_enum_get_value(color_in, &pb_enum_type_Color);
- mp_int_t brightness = pb_obj_get_pct(brightness_in);
+ PB_ARG_REQUIRED(color));
- pbio_color_hsv_t hsv;
- pbio_color_to_hsv(color, &hsv);
- hsv.v = brightness;
- pb_assert(pbio_color_light_on_hsv(self->light, &hsv));
+ pb_assert(pbio_color_light_on_hsv(self->light, pb_type_Color_get_hsv(color_in)));
return mp_const_none;
}
|
test: psa_pake: fixes in ecjpake_setup()
Both changes concern the ERR_INJECT_UNINITIALIZED_ACCESS case:
removed unnecessary psa_pake_abort()
added psa_pake_get_implicit_key() | @@ -687,6 +687,7 @@ void ecjpake_setup( int alg_arg, int key_type_pw_arg, int key_usage_pw_arg,
unsigned char *output_buffer = NULL;
size_t output_len = 0;
const uint8_t unsupp_id[] = "abcd";
+ psa_key_derivation_operation_t key_derivation;
PSA_INIT( );
@@ -713,23 +714,20 @@ void ecjpake_setup( int alg_arg, int key_type_pw_arg, int key_usage_pw_arg,
{
TEST_EQUAL( psa_pake_set_user( &operation, NULL, 0 ),
expected_error );
- PSA_ASSERT( psa_pake_abort( &operation ) );
TEST_EQUAL( psa_pake_set_peer( &operation, NULL, 0 ),
expected_error );
- PSA_ASSERT( psa_pake_abort( &operation ) );
TEST_EQUAL( psa_pake_set_password_key( &operation, key ),
expected_error );
- PSA_ASSERT( psa_pake_abort( &operation ) );
TEST_EQUAL( psa_pake_set_role( &operation, role ),
expected_error );
- PSA_ASSERT( psa_pake_abort( &operation ) );
TEST_EQUAL( psa_pake_output( &operation, PSA_PAKE_STEP_KEY_SHARE,
NULL, 0, NULL ),
expected_error );
- PSA_ASSERT( psa_pake_abort( &operation ) );
- TEST_EQUAL( psa_pake_input( &operation, PSA_PAKE_STEP_KEY_SHARE, NULL, 0),
+ TEST_EQUAL( psa_pake_input( &operation, PSA_PAKE_STEP_KEY_SHARE,
+ NULL, 0 ),
+ expected_error );
+ TEST_EQUAL( psa_pake_get_implicit_key( &operation, &key_derivation ),
expected_error );
- PSA_ASSERT( psa_pake_abort( &operation ) );
goto exit;
}
|
driver/ppc/aoz1380.c: Format with clang-format
BRANCH=none
TEST=none | @@ -157,7 +157,6 @@ const struct ppc_drv aoz1380_drv = {
.is_sourcing_vbus = &aoz1380_is_sourcing_vbus,
.vbus_sink_enable = &aoz1380_vbus_sink_enable,
.vbus_source_enable = &aoz1380_vbus_source_enable,
- .set_vbus_source_current_limit =
- &aoz1380_set_vbus_source_current_limit,
+ .set_vbus_source_current_limit = &aoz1380_set_vbus_source_current_limit,
.interrupt = &aoz1380_interrupt,
};
|
Fix KPH install check and change KPH driver start to Auto | @@ -91,7 +91,12 @@ NTSTATUS KphConnect2(
_In_ PWSTR FileName
)
{
- return KphConnect2Ex(DeviceName, FileName, NULL);
+ KPH_PARAMETERS parameters;
+
+ parameters.SecurityLevel = KphSecuritySignatureCheck;
+ parameters.CreateDynamicConfiguration = TRUE;
+
+ return KphConnect2Ex(DeviceName, FileName, ¶meters);
}
NTSTATUS KphConnect2Ex(
@@ -117,12 +122,12 @@ NTSTATUS KphConnect2Ex(
status = KphConnect(fullDeviceName);
- if (status == STATUS_ADDRESS_ALREADY_EXISTS)
+ if (NT_SUCCESS(status) || status == STATUS_ADDRESS_ALREADY_EXISTS)
return status;
// Load the driver, and try again.
- KphInstall(DeviceName, FileName);
+ KphInstallEx(DeviceName, FileName, Parameters);
// Try to open the device again.
@@ -281,7 +286,7 @@ NTSTATUS KphInstallEx(
return STATUS_OBJECT_NAME_NOT_FOUND;
}
- if (NT_SUCCESS(NtOpenProcessToken(
+ if (NT_SUCCESS(status = NtOpenProcessToken(
NtCurrentProcess(),
TOKEN_ADJUST_PRIVILEGES,
&tokenHandle
@@ -291,6 +296,9 @@ NTSTATUS KphInstallEx(
NtClose(tokenHandle);
}
+ if (!NT_SUCCESS(status))
+ goto CleanupExit;
+
keyName = PhConcatStrings(
2,
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\",
@@ -339,7 +347,7 @@ NTSTATUS KphInstallEx(
if (!NT_SUCCESS(status = NtSetValueKey(keyHandle, &valueName, 0, REG_DWORD, ¶meters, sizeof(ULONG))))
goto CleanupExit;
- parameters = SERVICE_DEMAND_START;
+ parameters = SERVICE_AUTO_START;
RtlInitUnicodeString(&valueName, L"Start");
if (!NT_SUCCESS(status = NtSetValueKey(keyHandle, &valueName, 0, REG_DWORD, ¶meters, sizeof(ULONG))))
goto CleanupExit;
|
Added note about resource usage during elaboration to docs
On computers with limited resources (like main memory) the elaboration will fail with the message 'make: *** [firrtl_temp] Error 137'. Since no further explaination of the error is given, its meaning should be mentioned in the docs. | @@ -49,6 +49,8 @@ Simulating The Default Example
To compile the example design, run ``make`` in the selected verilator or VCS directory.
This will elaborate the ``RocketConfig`` in the example project.
+.. Note:: The elaboration of ``RocketConfig`` requires about 6.5 GB of main memory. Otherwise the process will fail with ``make: *** [firrtl_temp] Error 137`` which is most likely related to limited resources. Other configurations might require even more main memory.
+
An executable called ``simulator-chipyard-RocketConfig`` will be produced.
This executable is a simulator that has been compiled based on the design that was built.
You can then use this executable to run any compatible RV64 code.
|
sim: Write image_ok properly
With stricter checking of alignment, always write the image ok flag as a
group of 'align' bytes. | @@ -229,7 +229,8 @@ fn try_norevert(flash: &Flash, areadesc: &AreaDesc) -> Flash {
assert_eq!(c::boot_go(&mut fl, &areadesc), 0);
// Write boot_ok
- fl.write(0x040000 - align, &[1]).unwrap();
+ let ok = [1u8, 0, 0, 0, 0, 0, 0, 0];
+ fl.write(0x040000 - align, &ok[..align]).unwrap();
assert_eq!(c::boot_go(&mut fl, &areadesc), 0);
fl
}
|
common/usbc/usb_mode.c: Format with clang-format
BRANCH=none
TEST=none | @@ -196,22 +196,22 @@ bool enter_usb_cable_is_capable(int port)
if (a2_rev30.usb_40_support == USB4_NOT_SUPPORTED)
return false;
/*
- * For VDM version < 2.0 or VDO version < 1.3, do not enter USB4
- * mode if the cable -
- * doesn't support modal operation or
- * doesn't support Intel SVID or
- * doesn't have rounded support.
+ * For VDM version < 2.0 or VDO version < 1.3, do not
+ * enter USB4 mode if the cable - doesn't support modal
+ * operation or doesn't support Intel SVID or doesn't
+ * have rounded support.
*/
} else {
const struct pd_discovery *disc =
pd_get_am_discovery(port, TCPCI_MSG_SOP);
union tbt_mode_resp_cable cable_mode_resp = {
- .raw_value = pd_get_tbt_mode_vdo(port,
- TCPCI_MSG_SOP_PRIME) };
+ .raw_value = pd_get_tbt_mode_vdo(
+ port, TCPCI_MSG_SOP_PRIME)
+ };
if (!disc->identity.idh.modal_support ||
- !pd_is_mode_discovered_for_svid(port,
- TCPCI_MSG_SOP_PRIME, USB_VID_INTEL) ||
+ !pd_is_mode_discovered_for_svid(
+ port, TCPCI_MSG_SOP_PRIME, USB_VID_INTEL) ||
cable_mode_resp.tbt_rounded !=
TBT_GEN3_GEN4_ROUNDED_NON_ROUNDED)
return false;
|
fix use of protoc for mobile mapkit; add MAPKIT_IDL_INCLUDES helper macro | @@ -150,7 +150,8 @@ XSUBPPFLAGS=
ARCH_TOOL=${tool:"tools/archiver"}
PROTOC=${tool:"contrib/tools/protoc"}
-PROTOC_STYLEGUIDE=${tool:"contrib/tools/protoc/plugins/cpp_styleguide"}
+PROTOC_STYLEGUIDE_OUT=--cpp_styleguide_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE
+PROTOC_PLUGIN_STYLEGUIDE=--plugin=protoc-gen-cpp_styleguide=${tool:"contrib/tools/protoc/plugins/cpp_styleguide"}
FML_TOOL=${tool:"tools/relev_fml_codegen"}
FML_UNUSED_TOOL=${tool:"tools/relev_fml_unused"}
LUA_TOOL=${tool:"tools/lua"}
@@ -349,7 +350,7 @@ module BASE_UNIT {
PROTO_HEADER_INCLUDE=contrib/libs/protobuf/stubs/once.h contrib/libs/protobuf/io/coded_stream.h contrib/libs/protobuf/wire_format_lite_inl.h contrib/libs/protobuf/descriptor.h contrib/libs/protobuf/reflection_ops.h contrib/libs/protobuf/wire_format.h
PROTO_HEADER_EXTS=.pb.h
- CPP_PROTO_CMDLINE=${cwd;rootdir;input:File} $PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE -I=$ARCADIA_BUILD_ROOT -I=$PROTO_PATH --cpp_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE --cpp_styleguide_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE --plugin=protoc-gen-cpp_styleguide=$PROTOC_STYLEGUIDE ${input;rootrel:File}
+ CPP_PROTO_CMDLINE=${cwd;rootdir;input:File} $PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE -I=$ARCADIA_BUILD_ROOT -I=$PROTO_PATH --cpp_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE $PROTOC_STYLEGUIDE_OUT $PROTOC_PLUGIN_STYLEGUIDE ${input;rootrel:File}
CPP_EV_OPTS=--plugin=protoc-gen-event2cpp=${tool:"tools/event2cpp"} --event2cpp_out=$ARCADIA_BUILD_ROOT -I=$ARCADIA_ROOT/library/eventlog
when ($GRPC_FLAG == "yes") {
@@ -390,6 +391,8 @@ module BASE_UNIT {
otherwise {
when ($ARCADIA_MAPKIT) {
PROTOC=$MAPKIT_SDK_RESOURCE_GLOBAL/mapkit_sdk/bin/protoc
+ PROTOC_STYLEGUIDE_OUT=
+ PROTOC_PLUGIN_STYLEGUIDE=
PROTO_PATH=$MAPKIT_SDK_RESOURCE_GLOBAL/mapkit_sdk/include
MACRO_ALIAS(PROTO_CMD MAPKIT_CPP_PROTO_CMD)
PROTO_SOURCE_INCLUDE=
@@ -2919,3 +2922,12 @@ macro RUN_PYTHON(Args...) {
SETUP_RUN_PYTHON()
RUN(${PYTHON_BIN} $Args)
}
+
+MAPKIT_IDL_INCLUDES=
+macro MAPKIT_ADDINCL(Dirs...) {
+ ADDINCL($Dirs)
+ SET_APPEND(MAPKIT_IDL_INCLUDES $Dirs)
+}
+
+ANDROID_SDK_ROOT=${ANDROID_SDK_RESOURCE_GLOBAL}/android_sdk
+
|
bare-arm/lib: Re-add dummy strstr() and memchr().
Needed to build Pycopy. | @@ -126,3 +126,13 @@ size_t strlen(const char *s) {
}
return ss - s;
}
+
+// Dummy functions, used just in a couple of places.
+
+char *strstr(const char *where, const char *what) {
+ return NULL;
+}
+
+void *memchr(const void *s, int c, size_t n) {
+ return NULL;
+}
|
[Cita][#1249]add return value at the endof code | @@ -203,6 +203,7 @@ void BoatCitaWalletDeInit(BoatCitaWallet *wallet_ptr)
BOAT_RESULT BoatCitaTxSetQuotaLimit(BoatCitaTx *tx_ptr, BUINT64 quota_limit_value)
{
+ BOAT_RESULT result = BOAT_SUCCESS;
if (tx_ptr == NULL)
{
BoatLog(BOAT_LOG_CRITICAL, "Arguments cannot be NULL.");
@@ -211,6 +212,7 @@ BOAT_RESULT BoatCitaTxSetQuotaLimit(BoatCitaTx *tx_ptr, BUINT64 quota_limit_valu
// Set quotaLimit
tx_ptr->rawtx_fields.quota = quota_limit_value;
+ return result;
}
|
idf.py: Add check for new cmake cache values | @@ -150,6 +150,32 @@ def detect_cmake_generator():
raise FatalError("To use %s, either the 'ninja' or 'GNU make' build tool must be available in the PATH" % PROG)
+def _strip_quotes(value, regexp=re.compile(r"^\"(.*)\"$|^'(.*)'$|^(.*)$")):
+ """
+ Strip quotes like CMake does during parsing cache entries
+ """
+
+ return [x for x in regexp.match(value).groups() if x is not None][0].rstrip()
+
+
+def _new_cmakecache_entries(cache_path, new_cache_entries):
+ if not os.path.exists(cache_path):
+ return True
+
+ current_cache = parse_cmakecache(cache_path)
+
+ if new_cache_entries:
+ current_cache = parse_cmakecache(cache_path)
+
+ for entry in new_cache_entries:
+ key, value = entry.split("=", 1)
+ current_value = current_cache.get(key, None)
+ if current_value is None or _strip_quotes(value) != current_value:
+ return True
+
+ return False
+
+
def _ensure_build_directory(args, always_run_cmake=False):
"""Check the build directory exists and that cmake has been run there.
@@ -175,7 +201,8 @@ def _ensure_build_directory(args, always_run_cmake=False):
if not os.path.isdir(build_dir):
os.makedirs(build_dir)
cache_path = os.path.join(build_dir, "CMakeCache.txt")
- if not os.path.exists(cache_path) or always_run_cmake:
+
+ if always_run_cmake or _new_cmakecache_entries(cache_path, args.define_cache_entry):
if args.generator is None:
args.generator = detect_cmake_generator()
try:
@@ -230,7 +257,7 @@ def parse_cmakecache(path):
for line in f:
# cmake cache lines look like: CMAKE_CXX_FLAGS_DEBUG:STRING=-g
# groups are name, type, value
- m = re.match(r"^([^#/:=]+):([^:=]+)=(.+)\n$", line)
+ m = re.match(r"^([^#/:=]+):([^:=]+)=(.*)\n$", line)
if m:
result[m.group(1)] = m.group(3)
return result
|
HV:initialize variables before reference in vmx.c
to avoid complains from code static scan tool | @@ -372,7 +372,7 @@ static void init_guest_state(struct vcpu *vcpu)
/* Limit */
limit = 0xFFFF;
} else if (get_vcpu_mode(vcpu) == PAGE_PROTECTED_MODE) {
- descriptor_table gdtb;
+ descriptor_table gdtb = {0, 0};
/* Base *//* TODO: Should guest GDTB point to host GDTB ? */
/* Obtain the current global descriptor table base */
@@ -407,7 +407,7 @@ static void init_guest_state(struct vcpu *vcpu)
/* Limit */
limit = 0xFFFF;
} else if (get_vcpu_mode(vcpu) == PAGE_PROTECTED_MODE) {
- descriptor_table idtb ;
+ descriptor_table idtb = {0, 0};
/* TODO: Should guest IDTR point to host IDTR ? */
asm volatile ("sidt %0"::"m" (idtb));
@@ -660,8 +660,8 @@ static void init_host_state(__unused struct vcpu *vcpu)
uint64_t trbase_lo;
uint64_t trbase_hi;
uint64_t realtrbase;
- descriptor_table gdtb;
- descriptor_table idtb;
+ descriptor_table gdtb = {0, 0};
+ descriptor_table idtb = {0, 0};
uint16_t tr_sel;
pr_dbg("*********************");
|
removed fake test in rb_port_test | @@ -43,13 +43,9 @@ class RbPortTest < Test::Unit::TestCase
assert_equal(nil, @@meta.call('say_null'))
- # TODO: Solve <nil> return
- #assert_equal(12, @@meta.call('say_multiply', 3, 4))
- assert_equal(nil, @@meta.call('say_multiply', 3, 4))
+ assert_equal(12, @@meta.call('say_multiply', 3, 4))
- # TODO: Solve <nil> return
- #assert_equal('Hello world!', @@meta.call('say_hello', 'world'))
- assert_equal(nil, @@meta.call('say_hello', 'world'))
+ assert_equal('Hello world!', @@meta.call('say_hello', 'world'))
end
end
|
in_tail: fix leak on exit (CID 184436) | @@ -154,6 +154,7 @@ struct flb_tail_config *flb_tail_config_create(struct flb_input_instance *i_ins,
ctx->multiline = FLB_TRUE;
ret = flb_tail_mult_create(ctx, i_ins, config);
if (ret == -1) {
+ flb_tail_config_destroy(ctx);
return NULL;
}
}
@@ -167,6 +168,7 @@ struct flb_tail_config *flb_tail_config_create(struct flb_input_instance *i_ins,
ctx->docker_mode = FLB_TRUE;
ret = flb_tail_dmode_create(ctx, i_ins, config);
if (ret == -1) {
+ flb_tail_config_destroy(ctx);
return NULL;
}
}
|
SOVERSION bump to version 4.2.8 | @@ -39,7 +39,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 4)
set(SYSREPO_MINOR_SOVERSION 2)
-set(SYSREPO_MICRO_SOVERSION 7)
+set(SYSREPO_MICRO_SOVERSION 8)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
linux-raspberrypi: Bump 4.19 revision to fix RPi 4 arm64 builds
See: | @@ -3,7 +3,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/linux-raspberrypi:"
LINUX_VERSION ?= "4.19.56"
LINUX_RPI_BRANCH ?= "rpi-4.19.y"
-SRCREV = "e8a66b4f610b3a20bae8f706256d230135916c26"
+SRCREV = "9d1deec93fa8b1b4953ff5e9210349f3c85b9a8d"
SRC_URI = " \
git://github.com/raspberrypi/linux.git;protocol=git;branch=${LINUX_RPI_BRANCH} \
"
|
Fix typo in firesim initialization in init-submodules-no-riscv-tools.sh | @@ -38,7 +38,7 @@ git config --unset submodule.vlsi/hammer-cadence-plugins.update
git config --unset submodule.vlsi/hammer-synopsys-plugins.update
git config --unset submodule.vlsi/hammer-mentor-plugins.update
-if [ "NO_FIRESIM" = false ]; then
+if [ $NO_FIRESIM = false ]; then
# Renable firesim and init only the required submodules to provide
# all required scala deps, without doing a full build-setup
git config --unset submodule.sims/firesim.update
|
Update README instructions for ORCA install | @@ -43,8 +43,9 @@ Follow [appropriate linux steps](README.linux.md) for getting your system ready
```bash
cd depends
-conan remote add conan-gpdb https://api.bintray.com/conan/greenplum-db/gpdb-oss
-conan install --build
+./configure
+make
+make install_local
cd ..
```
|
Fix PhGetApplicationIcon for multiple DPI | @@ -2221,17 +2221,30 @@ HICON PhGetApplicationIcon(
{
static HICON smallIcon = NULL;
static HICON largeIcon = NULL;
+ static LONG systemDpi = 0;
- LONG dpiValue;
+ if (systemDpi != PhGetSystemDpi())
+ {
+ if (smallIcon)
+ {
+ DestroyIcon(smallIcon);
+ smallIcon = NULL;
+ }
+ if (largeIcon)
+ {
+ DestroyIcon(largeIcon);
+ largeIcon = NULL;
+ }
+
+ systemDpi = PhGetSystemDpi();
+ }
if (!smallIcon || !largeIcon)
{
- dpiValue = PhGetSystemDpi();
-
if (!smallIcon)
- smallIcon = PhLoadIcon(PhInstanceHandle, MAKEINTRESOURCE(IDI_PROCESSHACKER), PH_LOAD_ICON_SIZE_SMALL, 0, 0, dpiValue);
+ smallIcon = PhLoadIcon(PhInstanceHandle, MAKEINTRESOURCE(IDI_PROCESSHACKER), PH_LOAD_ICON_SIZE_SMALL, 0, 0, systemDpi);
if (!largeIcon)
- largeIcon = PhLoadIcon(PhInstanceHandle, MAKEINTRESOURCE(IDI_PROCESSHACKER), PH_LOAD_ICON_SIZE_LARGE, 0, 0, dpiValue);
+ largeIcon = PhLoadIcon(PhInstanceHandle, MAKEINTRESOURCE(IDI_PROCESSHACKER), PH_LOAD_ICON_SIZE_LARGE, 0, 0, systemDpi);
}
return SmallIcon ? smallIcon : largeIcon;
|
BugID:23379380:Enable esp8266 ap mode to enable device softap Wi-Fi provision | @@ -304,6 +304,9 @@ bool ICACHE_FLASH_ATTR start_wifi_ap(const char * ssid, const char * pass){
if(pass){
sprintf(config.password, pass);
}
+
+ config.max_connection = 4;
+
return wifi_softap_set_config(&config);
}
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.