message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Fix formatting and message re-use | @@ -433,21 +433,22 @@ notationDecl(void *userData,
{
XmlwfUserData *data = (XmlwfUserData *)userData;
NotationList *entry = malloc(sizeof(NotationList));
+ const char *errorMessage = "Unable to store NOTATION for output\n";
if (entry == NULL) {
- fprintf(stderr, "Unable to store NOTATION for output\n");
+ fputs(errorMessage, stderr);
return; /* Nothing we can really do about this */
}
entry->notationName = xcsdup(notationName);
if (entry->notationName == NULL) {
- fprintf(stderr, "Unable to store NOTATION for output\n");
+ fputs(errorMessage, stderr);
free(entry);
return;
}
if (systemId != NULL) {
entry->systemId = xcsdup(systemId);
if (entry->systemId == NULL) {
- fprintf(stderr, "Unable to store NOTATION for output\n");
+ fputs(errorMessage, stderr);
free((void *)entry->notationName);
free(entry);
return;
@@ -459,7 +460,7 @@ notationDecl(void *userData,
if (publicId != NULL) {
entry->publicId = xcsdup(publicId);
if (entry->publicId == NULL) {
- fprintf(stderr, "Unable to store NOTATION for output\n");
+ fputs(errorMessage, stderr);
free((void *)entry->systemId); /* Safe if it's NULL */
free((void *)entry->notationName);
free(entry);
|
docs/library/uio: Remove description of uio.open().
Given that this function is exact alias of builtins.open(), it makes no
sense to expose it thru uio module too, increasing binary code size.
So, deprecate such usage and remove it from docs. | @@ -186,15 +186,6 @@ described here.
for stream operations. If an operation is not completed in the time
alloted, ``OSError(ETIMEDOUT)`` is raised.
-Functions
----------
-
-.. function:: open(name, mode='r', **kwargs)
-
- Open a file. Builtin ``open()`` function is aliased to this function.
- All ports (which provide access to file system) are required to support
- *mode* parameter, but support for other arguments vary by port.
-
Classes
-------
|
kdb: fix kdbGet global postgetstorage parent key | @@ -894,6 +894,8 @@ int kdbGet (KDB * handle, KeySet * ks, Key * parentKey)
splitMerge (split, ks);
}
+ keySetName (parentKey, keyName (initialParent));
+
elektraGlobalGet (handle, ks, parentKey, POSTGETSTORAGE, INIT);
elektraGlobalGet (handle, ks, parentKey, POSTGETSTORAGE, MAXONCE);
elektraGlobalGet (handle, ks, parentKey, POSTGETSTORAGE, DEINIT);
|
zonemd, unbound-control auth_zone_reload errors when ZONEMD fails. | @@ -2566,14 +2566,17 @@ do_auth_zone_reload(RES* ssl, struct worker* worker, char* arg)
auth_zone_verify_zonemd(z, &worker->env, &worker->env.mesh->mods,
&reason, 0, 0);
if(reason && z->zone_expired) {
+ lock_rw_unlock(&z->lock);
(void)ssl_printf(ssl, "error zonemd for %s failed: %s\n",
arg, reason);
+ free(reason);
+ return;
} else if(reason && strcmp(reason, "ZONEMD verification successful")
==0) {
(void)ssl_printf(ssl, "%s: %s\n", arg, reason);
}
- free(reason);
lock_rw_unlock(&z->lock);
+ free(reason);
send_ok(ssl);
}
|
VERSION bump to version 2.0.215 | @@ -61,7 +61,7 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
# set version of the project
set(LIBYANG_MAJOR_VERSION 2)
set(LIBYANG_MINOR_VERSION 0)
-set(LIBYANG_MICRO_VERSION 214)
+set(LIBYANG_MICRO_VERSION 215)
set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION})
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
|
moved dump_a_chip to debug output, minor code style fix | static struct stlink_chipid_params *devicelist;
-void dump_a_chip (FILE *fp, struct stlink_chipid_params *dev) {
- fprintf(fp, "# Device Type: %s\n", dev->dev_type);
- fprintf(fp, "# Reference Manual: RM%s\n", dev->ref_manual_id);
- fprintf(fp, "#\n");
- fprintf(fp, "chip_id 0x%x\n", dev->chip_id);
- fprintf(fp, "flash_type %d\n", dev->flash_type);
- fprintf(fp, "flash_size_reg 0x%x\n", dev->flash_size_reg);
- fprintf(fp, "flash_pagesize 0x%x\n", dev->flash_pagesize);
- fprintf(fp, "sram_size 0x%x\n", dev->sram_size);
- fprintf(fp, "bootrom_base 0x%x\n", dev->bootrom_base);
- fprintf(fp, "bootrom_size 0x%x\n", dev->bootrom_size);
- fprintf(fp, "option_base 0x%x\n", dev->option_base);
- fprintf(fp, "option_size 0x%x\n", dev->option_size);
- fprintf(fp, "flags %d\n\n", dev->flags);
+void dump_a_chip (struct stlink_chipid_params *dev) {
+ DLOG("# Device Type: %s\n", dev->dev_type);
+ DLOG("# Reference Manual: RM%s\n", dev->ref_manual_id);
+ DLOG("#\n");
+ DLOG("chip_id 0x%x\n", dev->chip_id);
+ DLOG("flash_type %d\n", dev->flash_type);
+ DLOG("flash_size_reg 0x%x\n", dev->flash_size_reg);
+ DLOG("flash_pagesize 0x%x\n", dev->flash_pagesize);
+ DLOG("sram_size 0x%x\n", dev->sram_size);
+ DLOG("bootrom_base 0x%x\n", dev->bootrom_base);
+ DLOG("bootrom_size 0x%x\n", dev->bootrom_size);
+ DLOG("option_base 0x%x\n", dev->option_base);
+ DLOG("option_size 0x%x\n", dev->option_size);
+ DLOG("flags %d\n\n", dev->flags);
}
struct stlink_chipid_params *stlink_chipid_get_params(uint32_t chip_id) {
struct stlink_chipid_params *params = NULL;
for (params = devicelist; params != NULL; params = params->next)
if (params->chip_id == chip_id) {
- fprintf(stdout, "\ndetected chip_id parametres\n\n");
- dump_a_chip(stdout, params);
+ DLOG("detected chip_id parameters\n\n");
+ dump_a_chip(params);
break;
}
|
OcAppleKernelLib: Verify VTable length only via extern relocs. | @@ -565,7 +565,7 @@ InternalInitializeVtablePatchData (
++EntryOffset
) {
if (VtableData[EntryOffset] == 0) {
- Result = MachoGetSymbolByRelocationOffset64 (
+ Result = MachoGetSymbolByExternRelocationOffset64 (
MachoContext,
(VtableSymbol->Value + (EntryOffset * sizeof (*VtableData))),
&Symbol
|
Fixed a few minor typos in the comments for the C++ wrapper classes | @@ -58,7 +58,7 @@ namespace details {
/**
* Recursive interface type for defining the interface functions for `MessageHandler`.
*
- * These types define a virtual `operator()` for handling a specific SBP message type,
+ * These types define a virtual `handle_sbp_msg()` for handling a specific SBP message type,
* as well as a function for registering it as a SBP callback.
*
* @note These types aren't meant to be used directly by application code.
@@ -114,7 +114,7 @@ class CallbackInterface<MsgType> {
* `sbp_state_t`.
*
* Classes that derive from `MessageHandler` need to implement
- * void handle_sbp_msg(uint16_t sender_id, uint8_t message_length, const MsgType& msg) const;
+ * void handle_sbp_msg(uint16_t sender_id, uint8_t message_length, const MsgType& msg);
* for each `MsgType` in the list of message types given as template parameters.
*
* Due to the nature of the callback registration in libsbp we dissallow copying or
|
Fix external/pstdint.h header in Autotools. | @@ -34,6 +34,11 @@ libtcodgui_la_CXXFLAGS = $(CXXFLAGS) -I$(top_srcdir)/../../include/gui
libtcodgui_la_LIBADD = libtcodxx.la libtcod.la
+externalincludedir = $(includedir)/libtcod/external
+externalinclude_HEADERS = \
+ ../../include/external/pstdint.h
+
+
otherincludedir = $(includedir)/libtcod/gui
otherinclude_HEADERS = \
../../include/gui/button.hpp \
@@ -121,7 +126,6 @@ pkginclude_HEADERS = \
../../include/list.h \
../../include/zip.h \
../../include/mersenne.h \
- ../../include/external/pstdint.h \
../../include/bresenham.hpp \
../../include/mersenne.hpp \
../../include/bsp.hpp \
|
CLI save injected code | @@ -2993,6 +2993,9 @@ void initConsole(Console* console, tic_mem* tic, FileSystem* fs, Config* config,
else if(strcmp(arg, "-skip") == 0)
console->skipStart = true;
+ else if(strcmp(arg, "-save") == 0)
+ saveCart(console);
+
else continue;
argp |= 0b1 << i;
|
Optimize greater1 encoding loop
Calculating the c1 variable need not be a serial operation! | @@ -584,29 +584,34 @@ void kvz_encode_coeff_nxn_avx2(encoder_state_t * const state,
ctx_set++;
}
- c1 = 1;
-
base_ctx_mod = (type == 0) ? &(cabac->ctx.cu_one_model_luma[4 * ctx_set]) :
&(cabac->ctx.cu_one_model_chroma[4 * ctx_set]);
num_c1_flag = MIN(num_non_zero, C1FLAG_NUMBER);
first_c2_flag_idx = -1;
+
+ /*
+ * c1s_pattern is 16 base-4 numbers: 3, 3, 3, ... , 3, 2 (c1 will never
+ * be less than 0 or greater than 3, so two bits per iter are enough).
+ * It's essentially the values that c1 will be for the next iteration as
+ * long as we have not encountered any >1 symbols. Count how long run of
+ * such symbols there is in the beginning of this CG, and zero all c1's
+ * that are located at or after the first >1 symbol.
+ */
+ const uint32_t c1s_pattern = 0xfffffffe;
+ uint32_t n_nongt1_bits = _tzcnt_u32(coeffs_gt1_bits);
+ uint32_t c1s_nextiter = _bzhi_u32(c1s_pattern, n_nongt1_bits);
+ first_c2_flag_idx = n_nongt1_bits >> 1;
+
+ c1 = 1;
for (idx = 0; idx < num_c1_flag; idx++) {
- uint32_t shamt = (idx << 1) + 1;
+ uint32_t shamt = idx << 1;
uint32_t symbol = (coeffs_gt1_bits >> shamt) & 1;
cabac->cur_ctx = &base_ctx_mod[c1];
CABAC_BIN(cabac, symbol, "coeff_abs_level_greater1_flag");
- if (symbol) {
- c1 = 0;
-
- if (first_c2_flag_idx == -1) {
- first_c2_flag_idx = idx;
- }
- } else if ((c1 < 3) && (c1 > 0)) {
- c1++;
- }
+ c1 = (c1s_nextiter >> shamt) & 3;
}
if (c1 == 0) {
|
Default output to stdout if no output directory was specified | @@ -206,27 +206,24 @@ void usage_formats()
FILE * open_outfile(const char * cid_name, const char * binlog_name, const char * out_dir, const char * out_ext)
{
- int ret = 0;
+ if (out_dir == NULL) {
+ return stdout;
+ }
char filename[512];
- if (ret == 0) {
- if (out_dir != NULL) {
- ret = picoquic_sprintf(filename, sizeof(filename), NULL, "%s%c%s.%s",
+ int ret = picoquic_sprintf(filename, sizeof(filename), NULL, "%s%c%s.%s",
out_dir, PICOQUIC_FILE_SEPARATOR, cid_name, out_ext);
- } else {
- ret = picoquic_sprintf(filename, sizeof(filename), NULL, "%s.%s",
- cid_name, out_ext);
- }
+
if (ret != 0) {
DBG_PRINTF("Cannot format file name for connection %s in file %s", cid_name, binlog_name);
- }
+ return NULL;
}
- if (ret == 0) {
- return picoquic_file_open(filename, "w");
- } else {
- return NULL;
+ FILE * f = picoquic_file_open(filename, "w");
+ if (f == NULL) {
+ fprintf(stderr, "Could not open '%s' for writing (err=%d)", filename, errno);
}
+ return f;
}
int convert_csv(const picoquic_connection_id_t * cid, void * ptr)
@@ -626,8 +623,13 @@ int convert_qlog(const picoquic_connection_id_t* cid, void* ptr)
ret = -1;
}
+ FILE * f_txtlog = open_outfile(cid_name, appctx->binlog_name, appctx->out_dir, "qlog");
+ if (f_txtlog == NULL) {
+ return -1;
+ }
+
svg_context_t qlog;
- qlog.f_txtlog = open_outfile(cid_name, appctx->binlog_name, appctx->out_dir, "qlog");
+ qlog.f_txtlog = f_txtlog;
qlog.f_template = appctx->f_template;
qlog.cid_name = cid_name;
qlog.start_time = appctx->log_time;
|
hv: remove UEFI_OS_LOADER_NAME from Kconfig
Since UEFI boot is no longer supported. | @@ -334,14 +334,6 @@ config L1D_FLUSH_VMENTRY_ENABLED
bool "Enable L1 cache flush before VM entry"
default n
-config UEFI_OS_LOADER_NAME
- string "UEFI OS loader name"
- default "\\EFI\\BOOT\\bootx64.efi"
- help
- Name of the UEFI bootloader that starts the Service VM. This is
- typically the systemd-boot or Grub bootloader but could be any other
- UEFI executable.
-
config MCE_ON_PSC_WORKAROUND_DISABLED
bool "Force to disable software workaround for Machine Check Error on Page Size Change"
default n
|
use also ESSIDs with two characters length | @@ -592,7 +592,7 @@ static void writeessidsweeped(FILE *fhout, uint8_t essidlen, uint8_t *essid)
static int l1, l2;
static uint8_t sweepstring[PSKSTRING_LEN_MAX] = {};
-for(l1 = 3; l1 <= essidlen; l1++)
+for(l1 = 2; l1 <= essidlen; l1++)
{
for(l2 = 0; l2 <= essidlen -l1; l2++)
{
@@ -600,7 +600,7 @@ for(l1 = 3; l1 <= essidlen; l1++)
memcpy(&sweepstring, &essid[l2], l1);
if(writeessidremoved(fhout, l1, sweepstring) == true)
{
- writepsk(fhout, (char*)sweepstring);
+ writeessidadd(fhout, (char*)sweepstring);
}
}
}
|
CUPS_EXE_FILE_PERM: also match host_os_name on *-gnu, to also catch kfreebsd-gnu
Debian's kfreebsd-gnu architectures (kfreebsd-amd64 and kfreebsd-i386) work as Debian/GNU systems, hence with a 755 CUP_EXE_FILE_PERM, not 555 | @@ -53,7 +53,7 @@ dnl Default executable file permissions
AC_ARG_WITH(exe_file_perm, [ --with-exe-file-perm set default executable permissions value, default=0555],
CUPS_EXE_FILE_PERM="$withval",
[case "$host_os_name" in
- linux* | gnu*)
+ linux* | gnu* | *-gnu)
CUPS_EXE_FILE_PERM="755"
;;
*)
|
Clean default scenario | @@ -70,40 +70,6 @@ void Init_Context(void)
// Fill basic messages
Init_Messages();
- // * Msg buffer is filled with 3 Tx messages
- // * Each message is filled with 7 bytes for header + 64 data bytes (0,1,2,3...) + 64 data bytes to 0
- //
- // msg_buffer
- // +-----------------------------------+
- // | Msg Tx | Msg Tx | Msg Tx |
- // | 1 | 2 | 3 |
- // +-----------------------------------+
- //
- // Tx Tasks Luos Tasks
- // +------------+ +------------+
- // | Msg Tx 1 | | Msg Rx 1 |
- // |------------| |------------|
- // | Msg Tx 2 | | Msg Rx 2 |
- // |------------| |------------|
- // | Msg Tx 3 | | Msg Rx 3 |
- // |------------| |------------|
- // | 0 | | 0 |
- // |------------| |------------|
- // | etc... | | etc... |
- // +------------+ +------------+
- //
-
- // Create TX_TASK_NUMBER Tx Tasks
- for (uint16_t i = 0; i < TX_TASK_NUMBER - 1; i++)
- {
- Robus_SendMsg(default_sc.App_1.app->ll_service, (msg_t *)(transmit_msg + (sizeof(msg_t) * i)));
- }
-
- // Create LUOS_TASK_NUMBER Luos Tasks
- for (uint16_t i = 0; i < LUOS_TASK_NUMBER; i++)
- {
- MsgAlloc_LuosTaskAlloc(default_sc.App_1.app->ll_service, (msg_t *)(transmit_msg + (i) * (sizeof(msg_t) + 1)));
- }
if (IS_ASSERT())
{
printf("[FATAL] Can't initialize scenario context\n");
|
try building oidc-agent-desktop without replacing oidc-agent | @@ -65,7 +65,7 @@ Depends: ${misc:Depends},
oidc-agent-cli,
xterm | x-terminal-emulator,
yad
-Replaces: oidc-agent (<= 4.0.2-1), oidc-agent-prompt (<= 4.0.2-1)
+Replaces: oidc-agent-prompt (<= 4.0.2-1)
Description: oidc-agent desktop integration
Desktop integration files for oidc-gen and oidc-agent and for creating the user
dialog.
|
[bsp][imxrt1052-evk]: fix parameter type incompatible error | @@ -234,7 +234,7 @@ static void _search_i2c_device(rt_device_t dev, uint8_t cmd)
msgs[0].addr = i;
msgs[1].addr = i;
- len = rt_i2c_transfer(dev, msgs, 2);
+ len = rt_i2c_transfer((struct rt_i2c_bus_device *)dev, msgs, 2);
if (len == 2)
{
count++;
|
pyapi CHANGE do not cover libyang messaging in own printer | @@ -172,6 +172,7 @@ static struct PyModuleDef ncModule = {
PyMODINIT_FUNC
PyInit_netconf2(void)
{
+ void* clb;
PyObject *nc;
/* import libyang Python module to have it available */
@@ -187,7 +188,9 @@ PyInit_netconf2(void)
*/
/* set print callback */
+ clb = ly_get_log_clb();
nc_set_print_clb(clb_print);
+ ly_set_log_clb(clb, 1);
if (PyType_Ready(&ncSessionType) == -1) {
return NULL;
|
Use empty class when NME_APPLOVIN_KEY is not specified | package org.haxe.nme;
+
+::if NME_APPLOVIN_KEY::
+
import com.applovin.sdk.AppLovinSdk;
import com.applovin.sdk.AppLovinSdkConfiguration;
import com.applovin.sdk.AppLovinAdRewardListener;
@@ -10,6 +13,7 @@ import com.applovin.adview.AppLovinInterstitialAd;
import com.applovin.adview.AppLovinInterstitialAdDialog;
import com.applovin.sdk.AppLovinAdLoadListener;
import com.applovin.sdk.AppLovinAdSize;
+
import org.haxe.nme.HaxeObject;
import android.content.Context;
@@ -229,5 +233,9 @@ class NmeAppLovin
else
adDialog.show();
}
+
}
+::else::
+class NmeAppLovin { }
+::end::
|
Add !BUILD_PROTECTED && !BUILD_KERNEL dependency for ENABLE_STACKMONITOR flag
This feature internally uses kernel data structures and thus should not be
enabled during kernel build(BUILD_KERNEL) and protected build (BUILD_PROTECTED) | @@ -107,12 +107,13 @@ config ENABLE_PS
config ENABLE_STACKMONITOR
bool "Stack monitor"
default n
+ depends on !BUILD_PROTECTED && !BUILD_KERNEL
select STACK_COLORATION
---help---
The stack monitor is a daemon that will periodically assess
stack usage by all tasks and threads in the system. This
feature depends on internal OS features and, hence, is
- not available if the kernel build is selected.
+ not available if the kernel build or protected build is selected.
if ENABLE_STACKMONITOR
config STACKMONITOR_PRIORITY
|
fix typeroute~ prototype | @@ -22,11 +22,9 @@ static t_int *typeroute_perform(t_int *w)
int nblock = (int)(w[2]);
t_float *in = (t_float *)(w[3]);
t_float *out = (t_float *)(w[4]);
- t_float sig;
while (nblock--)
{
- sig = *in1++;
- *out++ = sig;
+ *out++ = *in++;
}
return (w + 5);
}
@@ -50,11 +48,11 @@ void typeroute_tilde_setup(void)
{
typeroute_class = class_new(gensym("typeroute~"),
(t_newmethod)typeroute_new,
- (t_method)typeroute_free,
+ 0,
sizeof(t_typeroute),
CLASS_DEFAULT,
0);
class_addmethod(typeroute_class, nullfn, gensym("signal"), 0);
class_addmethod(typeroute_class, (t_method) typeroute_dsp, gensym("dsp"), A_CANT, 0);
class_addbang(typeroute_class, typeroute_bang);
-
+}
|
docs: Fix typo in naming the Celsius family | @@ -78,7 +78,7 @@ is:
- NV1 family: NV1
- NV3 (aka RIVA) family: NV3, NV3T
- NV4 (aka TNT) family: NV4, NV5
-- Calsius family: NV10, NV15, NV1A, NV11, NV17, NV1F, NV18
+- Celsius family: NV10, NV15, NV1A, NV11, NV17, NV1F, NV18
- Kelvin family: NV20, NV2A, NV25, NV28
- Rankine family: NV30, NV35, NV31, NV36, NV34
- Curie family:
|
Analysis workflow, also fix other makefiles. | @@ -291,9 +291,19 @@ jobs:
cd expat-2.2.10
echo "./configure SHELL=/usr/bin/bash CONFIG_SHELL=/usr/bin/bash --prefix=\"$prepath/expat\" --exec-prefix=\"$prepath/expat\" --bindir=\"$prepath/expat/bin\" --includedir=\"$prepath/expat/include\" --mandir=\"$prepath/expat/man\" --libdir=\"$prepath/expat/lib\""
./configure SHELL=/usr/bin/bash CONFIG_SHELL=/usr/bin/bash --prefix="$prepath/expat" --exec-prefix="$prepath/expat" --bindir="$prepath/expat/bin" --includedir="$prepath/expat/include" --mandir="$prepath/expat/man" --libdir="$prepath/expat/lib"
- mv Makefile Makefile.orig
# fixup shell from space in pathname
+ mv Makefile Makefile.orig
sed -e 's?^SHELL=.*$?SHELL=/usr/bin/sh?' < Makefile.orig > Makefile
+ mv lib/Makefile lib/Makefile.orig
+ sed -e 's?^SHELL=.*$?SHELL=/usr/bin/sh?' < lib/Makefile.orig > lib/Makefile
+ mv doc/Makefile doc/Makefile.orig
+ sed -e 's?^SHELL=.*$?SHELL=/usr/bin/sh?' < doc/Makefile.orig > doc/Makefile
+ mv examples/Makefile examples/Makefile.orig
+ sed -e 's?^SHELL=.*$?SHELL=/usr/bin/sh?' < examples/Makefile.orig > examples/Makefile
+ mv tests/Makefile tests/Makefile.orig
+ sed -e 's?^SHELL=.*$?SHELL=/usr/bin/sh?' < tests/Makefile.orig > tests/Makefile
+ mv xmlwf/Makefile xmlwf/Makefile.orig
+ sed -e 's?^SHELL=.*$?SHELL=/usr/bin/sh?' < xmlwf/Makefile.orig > xmlwf/Makefile
echo "make"
make
echo "make install"
|
let linop_sum use md_zsum | @@ -34,6 +34,8 @@ struct sum_data {
long *imgd_strs;
long *img_strs;
+
+ unsigned long flags;
};
static DEF_TYPEID(sum_data);
@@ -58,6 +60,7 @@ static struct sum_data* sum_create_data(int N, const long imgd_dims[N], unsigned
long level_dims[N];
md_select_dims(N, flags, level_dims, imgd_dims);
+ data->flags = flags;
data->levels = md_calc_size(N, level_dims);
// image dimensions
@@ -87,7 +90,8 @@ static void sum_apply(const linop_data_t* _data, complex float* dst, const compl
auto data = CAST_DOWN(sum_data, _data);
md_clear(data->N, data->img_dims, dst, CFL_SIZE);
- md_zaxpy2(data->N, data->imgd_dims, data->img_strs, dst, 1. / sqrtf(data->levels), data->imgd_strs, src);
+ md_zsum(data->N, data->imgd_dims, data->flags, dst, src);
+ md_zsmul(data->N, data->img_dims, dst, dst, 1. / sqrtf(data->levels));
}
@@ -96,7 +100,8 @@ static void sum_apply_adjoint(const linop_data_t* _data, complex float* dst, con
auto data = CAST_DOWN(sum_data, _data);
md_clear(data->N, data->imgd_dims, dst, CFL_SIZE);
- md_zaxpy2(data->N, data->imgd_dims, data->imgd_strs, dst, 1. / sqrtf(data->levels), data->img_strs, src);
+ md_copy2(data->N, data->imgd_dims, data->imgd_strs, dst, data->img_strs, src, CFL_SIZE);
+ md_zsmul(data->N, data->imgd_dims, dst, dst, 1. / sqrtf(data->levels));
}
|
[mod_fastcgi] move delayed connect() into switch()
move delayed connect() handling into switch() | @@ -2120,22 +2120,7 @@ static handler_t fcgi_write_request(server *srv, handler_ctx *hctx) {
int ret;
- /* we can't handle this in the switch as we have to fall through in it */
- if (hctx->state == FCGI_STATE_CONNECT_DELAYED) {
- int socket_error = fdevent_connect_status(hctx->fd);
- if (socket_error != 0) {
- fcgi_proc_connect_error(srv, hctx->host, hctx->proc, hctx, socket_error);
- return HANDLER_ERROR;
- }
- /* go on with preparing the request */
- hctx->state = FCGI_STATE_PREPARE_WRITE;
- }
-
-
switch(hctx->state) {
- case FCGI_STATE_CONNECT_DELAYED:
- /* should never happen */
- return HANDLER_WAIT_FOR_EVENT;
case FCGI_STATE_INIT:
/* do we have a running process for this host (max-procs) ? */
hctx->proc = NULL;
@@ -2196,6 +2181,16 @@ static handler_t fcgi_write_request(server *srv, handler_ctx *hctx) {
case 0: /* everything is ok, go on */
break;
}
+ /* fallthrough */
+ case FCGI_STATE_CONNECT_DELAYED:
+ if (hctx->state == FCGI_STATE_CONNECT_DELAYED) { /*(not FCGI_STATE_INIT)*/
+ int socket_error = fdevent_connect_status(hctx->fd);
+ if (socket_error != 0) {
+ fcgi_proc_connect_error(srv, hctx->host, hctx->proc, hctx, socket_error);
+ return HANDLER_ERROR;
+ }
+ /* go on with preparing the request */
+ }
fcgi_set_state(srv, hctx, FCGI_STATE_PREPARE_WRITE);
/* fallthrough */
|
make sure we return 0 from __clone | @@ -1002,8 +1002,9 @@ void patchClone()
printf("mprotect failed\n");
}
- uint8_t ass[1] = {
- 0xc3 //retq
+ uint8_t ass[6] = {
+ 0xc3, // retq
+ 0xb8, 0x00, 0x00, 0x00, 0x00 // mov $0x0,%eax
};
memcpy(clone, ass, sizeof(ass));
|
[core] con->uri.scheme is maintained lowercase
con->uri.scheme is maintained lowercase "http" or "https"
so scheme string comparisons need not be case-insensitive | @@ -78,7 +78,7 @@ int http_response_buffer_append_authority(server *srv, connection *con, buffer *
{
unsigned short listen_port = sock_addr_get_port(&our_addr);
unsigned short default_port = 80;
- if (buffer_is_equal_caseless_string(con->uri.scheme, CONST_STR_LEN("https"))) {
+ if (buffer_is_equal_string(con->uri.scheme, CONST_STR_LEN("https"))) {
default_port = 443;
}
if (0 == listen_port) listen_port = srv->srvconf.port;
@@ -1440,8 +1440,7 @@ int http_cgi_headers (server *srv, connection *con, http_cgi_opts *opts, http_cg
rc |= cb(vdata, CONST_STR_LEN("REQUEST_SCHEME"),
CONST_BUF_LEN(con->uri.scheme));
- if (buffer_is_equal_caseless_string(con->uri.scheme,
- CONST_STR_LEN("https"))) {
+ if (buffer_is_equal_string(con->uri.scheme, CONST_STR_LEN("https"))) {
rc |= cb(vdata, CONST_STR_LEN("HTTPS"), CONST_STR_LEN("on"));
}
|
dnstap io, cast void unused return value. | @@ -158,17 +158,17 @@ char* fstrm_describe_control(void* pkt, size_t len)
}
frametype = sldns_read_uint32(pkt);
if(frametype == FSTRM_CONTROL_FRAME_ACCEPT) {
- sldns_str_print(&str, &slen, "accept");
+ (void)sldns_str_print(&str, &slen, "accept");
} else if(frametype == FSTRM_CONTROL_FRAME_START) {
- sldns_str_print(&str, &slen, "start");
+ (void)sldns_str_print(&str, &slen, "start");
} else if(frametype == FSTRM_CONTROL_FRAME_STOP) {
- sldns_str_print(&str, &slen, "stop");
+ (void)sldns_str_print(&str, &slen, "stop");
} else if(frametype == FSTRM_CONTROL_FRAME_READY) {
- sldns_str_print(&str, &slen, "ready");
+ (void)sldns_str_print(&str, &slen, "ready");
} else if(frametype == FSTRM_CONTROL_FRAME_FINISH) {
- sldns_str_print(&str, &slen, "finish");
+ (void)sldns_str_print(&str, &slen, "finish");
} else {
- sldns_str_print(&str, &slen, "type%d", (int)frametype);
+ (void)sldns_str_print(&str, &slen, "type%d", (int)frametype);
}
/* show the content type options */
@@ -178,22 +178,22 @@ char* fstrm_describe_control(void* pkt, size_t len)
uint32_t field_type = sldns_read_uint32(pos);
uint32_t field_len = sldns_read_uint32(pos+4);
if(remain < field_len) {
- sldns_str_print(&str, &slen, "malformed_field");
+ (void)sldns_str_print(&str, &slen, "malformed_field");
break;
}
if(field_type == FSTRM_CONTROL_FIELD_TYPE_CONTENT_TYPE) {
char tempf[512];
- sldns_str_print(&str, &slen, " content-type(");
+ (void)sldns_str_print(&str, &slen, " content-type(");
if(field_len < sizeof(tempf)-1) {
memmove(tempf, pos+8, field_len);
tempf[field_len] = 0;
- sldns_str_print(&str, &slen, "%s", tempf);
+ (void)sldns_str_print(&str, &slen, "%s", tempf);
} else {
- sldns_str_print(&str, &slen, "<error-too-long>");
+ (void)sldns_str_print(&str, &slen, "<error-too-long>");
}
- sldns_str_print(&str, &slen, ")");
+ (void)sldns_str_print(&str, &slen, ")");
} else {
- sldns_str_print(&str, &slen,
+ (void)sldns_str_print(&str, &slen,
" field(type %u, length %u)",
(unsigned int)field_type,
(unsigned int)field_len);
@@ -202,7 +202,7 @@ char* fstrm_describe_control(void* pkt, size_t len)
remain -= (8 + field_len);
}
if(remain > 0)
- sldns_str_print(&str, &slen, " trailing-bytes"
+ (void)sldns_str_print(&str, &slen, " trailing-bytes"
"(length %u)", (unsigned int)remain);
return strdup(buf);
}
|
build: adding prototype enumeration for error types | # define LIBFEC_ENABLED 1
#endif
+// error handling
+#if 0
+#define LIQUID_ERROR_STRLEN (256);
+extern int liquid_errval;
+extern char liquid_errstr[LIQUID_ERROR_STRLEN];
+#endif
+
+// basic error types
+typedef enum {
+ // everything ok
+ LIQUID_OK=0,
+
+ // invalid parameter, or configuration; examples:
+ // - setting bandwidth of a filter to a negative number
+ // - setting FFT size to zero
+ // - create a spectral periodogram object with window size greater than nfft
+ LIQUID_ERROR_INVALID_CONFIGURATION,
+
+ // input out of range; examples:
+ // - try to take log of -1
+ // - try to create an FFT plan of size zero
+ LIQUID_ERROR_INPUT_VALUE_OUT_OF_RANGE,
+
+ // invalid vector length or dimension; examples
+ // - trying to refer to the 17th element of a 2 x 2 matrix
+ LIQUID_ERROR_INPUT_DIMENSION_OUT_OF_RANGE,
+
+ // invalid mode; examples:
+ // - try to create a modem of type 'LIQUID_MODEM_XXX' which does not exit
+ LIQUID_ERROR_INVALID_MODE,
+
+ // unsupported mode (e.g. LIQUID_FEC_CONV_V27 with 'libfec' not installed)
+ LIQUID_ERROR_UNSUPPORTED_MODE,
+
+ // object has not been created or properly initialized
+ // - try to run firfilt_crcf_execute(NULL, ...)
+ // - try to modulate using an arbitrary modem without initializing the constellation
+ LIQUID_ERROR_OBJECT_NOT_INITIALIZED,
+
+ // not enough memory allocated for operation; examples:
+ // - try to factor 100 = 2*2*5*5 but only give 3 spaces for factors
+ LIQUID_ERROR_INSUFFICIENT_MEMORY,
+
+ // file input/output; examples:
+ // - could not open a file for writing because of insufficient permissions
+ // - could not open a file for reading because it does not exist
+ // - try to read more data than a file has space for
+ // - could not parse line in file (improper formatting)
+ LIQUID_ERROR_FILE_IO,
+
+ // internal logic error; this is a bug with liquid and should be reported immediately
+ LIQUID_ERROR_INTERNAL_LOGIC,
+
+} liquid_error_type;
+
+// format error internally and print to standard output
+// _file : name of file (preprocessor macro)
+// _line : line number (preprocessor macro)
+// _method : method or function name
+// _message : error message
+int liquid_format_error(const char * _file,
+ unsigned int _line,
+ const char * _method,
+ int _error_type,
+ const char * _message,
+ ...);
+
+#if 0
+// pre-processor function as wrapper around internal method to get file name
+// and line number for source of error
+#define liquid_error(method, type, message, ...) {
+ liquid_format_error(__FILE__, __LINE__, method, type, message, ...);
+}
+#endif
+
+#if 0
+void liquid_error_verbose(void);
+void liquid_error_quiet(void);
+#endif
//
// Debugging macros
|
Prototype set_blocking_action() | @@ -2808,6 +2808,7 @@ int check_blocking_chance(entity *ent);
int check_blocking_conditions(entity *ent, entity *other, s_collision_attack *attack);
int check_blocking_eligible(entity *ent, entity *other, s_collision_attack *attack);
int check_blockpain(entity *ent, s_collision_attack *attack);
+void set_blocking_action(entity *ent, entity *other, s_collision_attack *attack);
int buffer_pakfile(char *filename, char **pbuffer, size_t *psize);
size_t ParseArgs(ArgList *list, char *input, char *output);
int getsyspropertybyindex(ScriptVariant *var, int index);
|
Fixed wrong NID in SceDisplay | @@ -1153,7 +1153,7 @@ modules:
ksceDisplayRegisterVblankStartCallback: 0x7FB0BD28
ksceDisplayRegisterVblankStartCallbackInternal: 0x4AE2A2B1
ksceDisplaySetBrightness: 0x9E3C6DC6
- ksceDisplaySetDisplayColorSpaceMode: 0x8D79D187
+ ksceDisplaySetColorSpaceMode: 0x8D79D187
ksceDisplaySetFrameBuf: 0x289D82FE
ksceDisplaySetFrameBufInternal: 0x16466675
ksceDisplaySetInvertColors: 0x19140ACD
|
Set temporary verbose mode for libcurl | @@ -32,6 +32,7 @@ ebi::util::curl::Easy::Easy() {
curl_global_init(CURL_GLOBAL_DEFAULT);
curlHandle = curl_easy_init();
if ( curlHandle ) {
+ curl_easy_setopt(curlHandle, CURLOPT_VERBOSE, 1L); // TODO: remove this
curl_easy_setopt(curlHandle, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt(curlHandle, CURLOPT_SSL_VERIFYHOST, 0L);
curl_easy_setopt(curlHandle, CURLOPT_USERAGENT, "libcurl-agent/1.0");
|
tools: acrn-manager: update Makefile
Update the Makefiel to sync the compiler options with devicemode
and enable options to harden software.
Acked-by: Eddie Dong | +T := $(CURDIR)
+OUT_DIR ?= $(shell mkdir -p $(T)/build;cd $(T)/build;pwd)
+CC ?= gcc
-OUT_DIR ?= .
+CFLAGS := -g -O0 -std=gnu11
+CFLAGS += -D_GNU_SOURCE
+CFLAGS += -DNO_OPENSSL
+CFLAGS += -m64
+CFLAGS += -Wall -ffunction-sections
+CFLAGS += -Werror
+CFLAGS += -O2 -D_FORTIFY_SOURCE=2
+CFLAGS += -Wformat -Wformat-security -fno-strict-aliasing
+CFLAGS += -fpie -fpic
+#FIXME: remove me. work-around for system() calls, which will be removed
+CFLAGS += -Wno-format-truncation -Wno-unused-result
-CFLAGS := -Wall
CFLAGS += -I../../devicemodel/include
CFLAGS += -I../../devicemodel/include/public
CFLAGS += -I../../hypervisor/include
-CFLAGS += -fpie
+
+GCC_MAJOR=$(shell echo __GNUC__ | $(CC) -E -x c - | tail -n 1)
+GCC_MINOR=$(shell echo __GNUC_MINOR__ | $(CC) -E -x c - | tail -n 1)
+
+#enable stack overflow check
+STACK_PROTECTOR := 1
+
+ifdef STACK_PROTECTOR
+ifeq (true, $(shell [ $(GCC_MAJOR) -gt 4 ] && echo true))
+CFLAGS += -fstack-protector-strong
+else
+ifeq (true, $(shell [ $(GCC_MAJOR) -eq 4 ] && [ $(GCC_MINOR) -ge 9 ] && echo true))
+CFLAGS += -fstack-protector-strong
+else
+CFLAGS += -fstack-protector
+endif
+endif
+endif
ifeq ($(RELEASE),0)
CFLAGS += -g -DMNGR_DEBUG
endif
-LDFLAGS := -L$(OUT_DIR)
-LDFLAGS += -lacrn-mngr
-LDFLAGS += -lpthread
+LDFLAGS := -Wl,-z,noexecstack
+LDFLAGS += -Wl,-z,relro,-z,now
LDFLAGS += -pie
+LDFLAGS += -L$(OUT_DIR)
+LDFLAGS += -lpthread
+LDFLAGS += -lacrn-mngr
.PHONY: all
all: $(OUT_DIR)/libacrn-mngr.a $(OUT_DIR)/acrn_mngr.h $(OUT_DIR)/acrnctl $(OUT_DIR)/acrnd
@@ -42,11 +73,12 @@ clean:
rm -f $(OUT_DIR)/acrnctl
rm -f $(OUT_DIR)/acrn_mngr.o
rm -f $(OUT_DIR)/libacrn-mngr.a
+ rm -f $(OUT_DIR)/acrnd
ifneq ($(OUT_DIR),.)
rm -f $(OUT_DIR)/acrn_mngr.h
rm -f $(OUT_DIR)/acrnd.service
+ rm -rf $(OUT_DIR)
endif
- rm -f $(OUT_DIR)/acrnd
.PHONY: install
install: $(OUT_DIR)/acrnctl $(OUT_DIR)/acrn_mngr.h $(OUT_DIR)/libacrn-mngr.a
|
possibel fix for endianess error | @@ -3994,10 +3994,10 @@ if(linktype == DLT_IEEE802_11_RADIO)
return;
}
rth = (rth_t*)capptr;
- #ifdef BIG_ENDIAN_HOST
- rth->it_len = byte_swap_16(rth->it_len);
- rth->it_present = byte_swap_32(rth->it_present);
- #endif
+// #ifdef BIG_ENDIAN_HOST
+// rth->it_len = byte_swap_16(rth->it_len);
+// rth->it_present = byte_swap_32(rth->it_present);
+// #endif
if(rth->it_len > caplen)
{
pcapreaderrors++;
@@ -4031,9 +4031,9 @@ else if(linktype == DLT_PPI)
return;
}
ppi = (ppi_t*)capptr;
- #ifdef BIG_ENDIAN_HOST
- ppi->pph_len = byte_swap_16(ppi->pph_len);
- #endif
+// #ifdef BIG_ENDIAN_HOST
+// ppi->pph_len = byte_swap_16(ppi->pph_len);
+// #endif
if(ppi->pph_len > caplen)
{
pcapreaderrors++;
@@ -4054,11 +4054,11 @@ else if(linktype == DLT_PRISM_HEADER)
return;
}
prism = (prism_t*)capptr;
- #ifdef BIG_ENDIAN_HOST
- prism->msgcode = byte_swap_32(prism->msgcode);
- prism->msglen = byte_swap_32(prism->msglen);
- prism->frmlen.data = byte_swap_32(prism->frmlen.data);
- #endif
+// #ifdef BIG_ENDIAN_HOST
+// prism->msgcode = byte_swap_32(prism->msgcode);
+// prism->msglen = byte_swap_32(prism->msglen);
+// prism->frmlen.data = byte_swap_32(prism->frmlen.data);
+// #endif
if(prism->msglen > caplen)
{
if(prism->frmlen.data > caplen)
@@ -4083,9 +4083,9 @@ else if(linktype == DLT_IEEE802_11_RADIO_AVS)
return;
}
avs = (avs_t*)capptr;
- #ifdef BIG_ENDIAN_HOST
- avs->len = byte_swap_32(avs->len);
- #endif
+// #ifdef BIG_ENDIAN_HOST
+// avs->len = byte_swap_32(avs->len);
+// #endif
if(avs->len > caplen)
{
pcapreaderrors++;
|
include/charge_ramp.h: Format with clang-format
BRANCH=none
TEST=none | #include "timer.h"
/* Charge ramp state used for checking VBUS */
-enum chg_ramp_vbus_state {
- CHG_RAMP_VBUS_RAMPING,
- CHG_RAMP_VBUS_STABLE
-};
+enum chg_ramp_vbus_state { CHG_RAMP_VBUS_RAMPING, CHG_RAMP_VBUS_STABLE };
/**
* Check if VBUS is too low
@@ -81,11 +78,15 @@ int chg_ramp_is_detected(void);
* @voltage Negotiated charge voltage.
*/
void chg_ramp_charge_supplier_change(int port, int supplier, int current,
- timestamp_t registration_time, int voltage);
+ timestamp_t registration_time,
+ int voltage);
#else
-static inline void chg_ramp_charge_supplier_change(
- int port, int supplier, timestamp_t registration_time) { }
+static inline void
+chg_ramp_charge_supplier_change(int port, int supplier,
+ timestamp_t registration_time)
+{
+}
#endif
#endif /* __CROS_EC_CHARGE_RAMP_H */
|
add (noreplace) to %config option for slurm.conf to avoid squashing admin edits | @@ -891,7 +891,7 @@ rm -rf $RPM_BUILD_ROOT
# 9/8/14 [email protected] - provide starting config file
%if 0%{?OHPC_BUILD}
-%config %{_sysconfdir}/slurm.conf
+%config (noreplace) %{_sysconfdir}/slurm.conf
%endif
# 11/13/14 [email protected] - include systemd files
|
CMake: macOS move_lib supports imported libraries; | @@ -705,17 +705,17 @@ elseif(APPLE)
function(move_lib)
if(TARGET ${ARGV0})
get_target_property(TARGET_TYPE ${ARGV0} TYPE)
- if(${TARGET_TYPE} STREQUAL "MODULE_LIBRARY")
+ if(${TARGET_TYPE} STREQUAL "SHARED_LIBRARY")
add_custom_command(TARGET move_files POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
- $<TARGET_FILE:${ARGV0}>
- ${EXE_DIR}/$<TARGET_FILE_NAME:${ARGV0}>
+ $<TARGET_SONAME_FILE:${ARGV0}>
+ ${EXE_DIR}/$<TARGET_SONAME_FILE_NAME:${ARGV0}>
)
else()
add_custom_command(TARGET move_files POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
- $<TARGET_SONAME_FILE:${ARGV0}>
- ${EXE_DIR}/$<TARGET_SONAME_FILE_NAME:${ARGV0}>
+ $<TARGET_FILE:${ARGV0}>
+ ${EXE_DIR}/$<TARGET_FILE_NAME:${ARGV0}>
)
endif()
endif()
|
docs/esp32: Mention Signal in GPIO section of quickref. | @@ -171,6 +171,10 @@ Notes:
* The pull value of some pins can be set to ``Pin.PULL_HOLD`` to reduce power
consumption during deepsleep.
+There's a higher-level abstraction :ref:`machine.Signal <machine.Signal>`
+which can be used to invert a pin. Useful for illuminating active-low LEDs
+using ``on()`` or ``value(1)``.
+
UART (serial bus)
-----------------
|
Comment change: exclude more unreachable code from coverage | @@ -1318,7 +1318,7 @@ XmlUtf8Encode(int c, char *buf)
buf[3] = (char)((c & 0x3f) | 0x80);
return 4;
}
- return 0;
+ return 0; /* LCOV_EXCL_LINE: this case too is eliminated before calling */
}
int FASTCALL
|
out_stdout: create buffer for tag | @@ -213,6 +213,7 @@ static void cb_stdout_flush(void *data, size_t bytes,
size_t off = 0, cnt = 0;
struct flb_out_stdout_config *ctx = out_context;
char *json = NULL;
+ char *buf = NULL;
uint64_t json_len;
(void) i_ins;
@@ -227,15 +228,24 @@ static void cb_stdout_flush(void *data, size_t bytes,
fflush(stdout);
}
else {
+ /* A tag might not contain a NULL byte */
+ buf = flb_malloc(tag_len + 1);
+ if (!buf) {
+ flb_errno();
+ FLB_OUTPUT_RETURN(FLB_RETRY);
+ }
+ memcpy(buf, tag, tag_len);
+ buf[tag_len] = '\0';
msgpack_unpacked_init(&result);
while (msgpack_unpack_next(&result, data, bytes, &off)) {
- printf("[%zd] %s: [", cnt++, tag);
+ printf("[%zd] %s: [", cnt++, buf);
flb_time_pop_from_msgpack(&tmp, &result, &p);
printf("%"PRIu32".%09lu, ", (uint32_t)tmp.tm.tv_sec, tmp.tm.tv_nsec);
msgpack_object_print(stdout, *p);
printf("]\n");
}
msgpack_unpacked_destroy(&result);
+ flb_free(buf);
}
FLB_OUTPUT_RETURN(FLB_OK);
|
vere: avoids allocations by attempting synchronous terminal writes | @@ -313,11 +313,13 @@ _term_tcsetattr(c3_i fil_i, c3_i act_i, const struct termios* tms_u)
return ret_i;
}
-/* _term_write_cb(): general write callback.
+/* _term_it_write_cb(): general write callback.
*/
static void
-_term_write_cb(uv_write_t* wri_u, c3_i sas_i)
+_term_it_write_cb(uv_write_t* wri_u, c3_i sas_i)
{
+ // write failure is logged, but otherwise ignored.
+ //
if ( 0 != sas_i ) {
u3l_log("term: write: %s\n", uv_strerror(sas_i));
}
@@ -333,17 +335,48 @@ _term_it_write(u3_utty* uty_u,
uv_buf_t* buf_u,
void* ptr_v)
{
- uv_write_t* wri_u = c3_malloc(sizeof(*wri_u));
- c3_w ret_w;
+ // work off a local copy of the buffer, in case we need
+ // to manipulate the length/pointer
+ //
+ uv_buf_t fub_u = { .base = buf_u->base, .len = buf_u->len };
+ uv_stream_t* han_u = (uv_stream_t*)&(uty_u->pop_u);
+ c3_i ret_i;
+
+ // try to write synchronously
+ //
+ while ( 1 ) {
+ ret_i = uv_try_write(han_u, &fub_u, 1);
+
+ if ( (ret_i > 0) && (ret_i < fub_u.len) ) {
+ fub_u.len -= ret_i;
+ fub_u.base += ret_i;
+ continue;
+ }
+ else {
+ break;
+ }
+ }
+ // cue an async write if necessary
+ //
+ if ( UV_EAGAIN == ret_i ) {
+ uv_write_t* wri_u = c3_malloc(sizeof(*wri_u));
wri_u->data = ptr_v;
- if ( (ret_w = uv_write(wri_u,
- (uv_stream_t*)&(uty_u->pop_u),
- buf_u, 1,
- _term_write_cb)) )
- {
- u3l_log("term: write: %s\n", uv_strerror(ret_w));
+ // invoke callback manually on error
+ //
+ if ( (ret_i = uv_write(wri_u, han_u, &fub_u, 1, _term_it_write_cb)) ) {
+ _term_it_write_cb(wri_u, ret_i);
+ }
+ }
+ else {
+ // synchronous write failure is logged, but otherwise ignored
+ //
+ if ( ret_i < 0 ) {
+ u3l_log("term: write: %s\n", uv_strerror(ret_i));
+ }
+
+ c3_free(ptr_v);
}
}
|
SOVERSION bump to version 2.8.6 | @@ -63,7 +63,7 @@ set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
set(LIBYANG_MINOR_SOVERSION 8)
-set(LIBYANG_MICRO_SOVERSION 5)
+set(LIBYANG_MICRO_SOVERSION 6)
set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION})
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
|
Completions: Improve code to detect options | @@ -18,6 +18,20 @@ function __join -d 'Join variables into one variable using a given separator'
echo $joined
end
+function __includes_options -d 'Check if the values starting at position 3 contain the options specified at position one and two'
+ set -l opt_long $argv[1]
+ set -l opt_short $argv[2]
+ set -l input $argv[3..-1]
+
+ test -n $opt_long
+ set opt_long "--$opt_long"
+ test -n $opt_short
+ set opt_short "-\w*$opt_short"
+ set -l options (__join '|' $opt_long $opt_short)
+
+ string match -r -- $options "$input"
+end
+
# =========
# = Input =
# =========
@@ -40,30 +54,11 @@ function __input_includes -d 'Check if the current command buffer contains one o
end
function __input_includes_options -d 'Check if the current command buffer contains one of the given options'
- set -l opt_long $argv[1]
- set -l opt_short $argv[2]
-
- test -n $opt_long
- and set -l options --$opt_long
-
- test -n $opt_short
- and set -l options $options -$opt_short
-
- __input_includes $options
+ __includes_options $argv[1] $argv[2] (commandline -op)
end
function __input_left_includes_options -d 'Check if the input to the left of the current buffer contains one of the given options'
- set -l opt_long $argv[1]
- set -l opt_short $argv[2]
- set -l input (commandline -opc)
-
- test -n $opt_long
- set opt_long "--$opt_long"
- test -n $opt_short
- set opt_short "-\w*$opt_short"
- set -l options (__join '|' $opt_long $opt_short)
-
- string match -r -- $options "$input"
+ __includes_options $argv[1] $argv[2] (commandline -opc)
end
# =======
|
Fixed compiler warnings when no music used | @@ -281,10 +281,10 @@ const compile = async (
.join(`\n`) +
`\n` +
`const unsigned char * music_tracks[] = {\n` +
- (music.map(track => track.dataName + "_Data").join(", ") || 0) +
+ (music.map(track => track.dataName + "_Data").join(", ") || "0, 0") +
`\n};\n\n` +
`const unsigned char music_banks[] = {\n` +
- (music.map(track => track.bank).join(", ") || 0) +
+ (music.map(track => track.bank).join(", ") || "0, 0") +
`\n};\n\n` +
`unsigned char script_variables[${precompiled.variables.length +
1}] = { 0 };\n`;
|
X509_PUBKEY_set(): Fix error reporting | @@ -99,11 +99,10 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey)
{
X509_PUBKEY *pk = NULL;
- if (x == NULL)
+ if (x == NULL || pkey == NULL) {
+ ERR_raise(ERR_LIB_X509, ERR_R_PASSED_NULL_PARAMETER);
return 0;
-
- if (pkey == NULL)
- goto unsupported;
+ }
if (pkey->ameth != NULL) {
if ((pk = X509_PUBKEY_new()) == NULL) {
@@ -137,8 +136,10 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey)
OPENSSL_free(der);
}
- if (pk == NULL)
- goto unsupported;
+ if (pk == NULL) {
+ ERR_raise(ERR_LIB_X509, X509_R_UNSUPPORTED_ALGORITHM);
+ goto error;
+ }
X509_PUBKEY_free(*x);
if (!EVP_PKEY_up_ref(pkey)) {
@@ -165,9 +166,6 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey)
pk->pkey = pkey;
return 1;
- unsupported:
- ERR_raise(ERR_LIB_X509, X509_R_UNSUPPORTED_ALGORITHM);
-
error:
X509_PUBKEY_free(pk);
return 0;
|
docs(flex) update flex.md
Description sentences "LV_FLEX_FLOW_ROW_WRAP_REVERSE" and "LV_FLEX_FLOW_COLUMN_WRAP_REVERSE" are corrected. | @@ -39,8 +39,8 @@ The possible values for `flex_flow` are:
- `LV_FLEX_FLOW_COLUMN_WRAP` Place the children in a column with wrapping
- `LV_FLEX_FLOW_ROW_REVERSE` Place the children in a row without wrapping but in reversed order
- `LV_FLEX_FLOW_COLUMN_REVERSE` Place the children in a column without wrapping but in reversed order
-- `LV_FLEX_FLOW_ROW_WRAP_REVERSE` Place the children in a row without wrapping but in reversed order
-- `LV_FLEX_FLOW_COLUMN_WRAP_REVERSE` Place the children in a column without wrapping but in reversed order
+- `LV_FLEX_FLOW_ROW_WRAP_REVERSE` Place the children in a row with wrapping but in reversed order
+- `LV_FLEX_FLOW_COLUMN_WRAP_REVERSE` Place the children in a column with wrapping but in reversed order
### Flex align
To manage the placement of the children use `lv_obj_set_flex_align(obj, main_place, cross_place, track_cross_place)`
|
release: urbit-os-v1.0.34 | /- glob
/+ default-agent, verb, dbug
|%
-++ hash 0v4.sc96b.vnevk.1j41q.98hpu.u6hpe
+++ hash 0v2.gm6p4.0gctq.j5uu6.pgkan.8jq93
+$ state-0 [%0 hash=@uv glob=(unit (each glob:glob tid=@ta))]
+$ all-states
$% state-0
|
Disabled O2 in release for avoiding compiler options to fail. | @@ -177,23 +177,19 @@ if(WIN32 AND MSVC)
add_compile_options(/GR-)
# Enable optimizations
- add_compile_options(/O2)
+ # add_compile_options(/O2) # TODO: Enable when runtime checks can be disabled properly
add_compile_options(/Oi)
add_compile_options(/Oy)
- # Disable runtime checks (not compatible with O2)
- foreach(FLAG_VAR
- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE
- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
- CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE
- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
- )
- string(REGEX REPLACE "/RTC[^ ]*" "" ${FLAG_VAR} "${${FLAG_VAR}}")
-
- message(STATUS "-------------------------------------------------------")
- message(STATUS "${${FLAG_VAR}}")
- message(STATUS "-------------------------------------------------------")
- endforeach(FLAG_VAR)
+ # TODO: Disable runtime checks (not compatible with O2)
+ # foreach(FLAG_VAR
+ # CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE
+ # CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
+ # CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE
+ # CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
+ # )
+ # string(REGEX REPLACE "/RTC[^ ]*" "" ${FLAG_VAR} "${${FLAG_VAR}}")
+ # endforeach(FLAG_VAR)
if(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
# Enable debug symbols
|
board/ghost/usbc_config.h: Format with clang-format
BRANCH=none
TEST=none | #define CONFIG_USB_PD_PORT_MAX_COUNT 2
#endif
-enum usbc_port {
- USBC_PORT_C0 = 0,
- USBC_PORT_C1,
- USBC_PORT_COUNT
-};
+enum usbc_port { USBC_PORT_C0 = 0, USBC_PORT_C1, USBC_PORT_COUNT };
#endif /* __CROS_EC_USBC_CONFIG_H */
|
e_loader_attic: fix a use after free issue
Fixes | @@ -199,6 +199,7 @@ static OSSL_STORE_INFO *new_EMBEDDED(const char *new_pem_name,
return NULL;
}
+ data->blob = embedded;
data->pem_name =
new_pem_name == NULL ? NULL : OPENSSL_strdup(new_pem_name);
@@ -207,7 +208,6 @@ static OSSL_STORE_INFO *new_EMBEDDED(const char *new_pem_name,
store_info_free(info);
info = NULL;
}
- data->blob = embedded;
return info;
}
|
Update scrollbar scrolling speed | @@ -1381,8 +1381,8 @@ void Widget_UpdateSize( LCUI_Widget w )
LCUI_Rect r;
RectF2Rect( rect, r );
Widget_InvalidateArea( w->parent, &r, SV_PADDING_BOX );
- r.width = (int)(w->box.graph.width + 0.5);
- r.height = (int)(w->box.graph.height + 0.5);
+ r.width = roundi( w->box.graph.width );
+ r.height = roundi( w->box.graph.height );
Widget_InvalidateArea( w->parent, &r, SV_PADDING_BOX );
if( w->parent->style->sheet[key_width].type == SVT_AUTO
|| w->parent->style->sheet[key_height].type == SVT_AUTO ) {
|
correct performance cut owing to removal of Makefile switches | @@ -16,7 +16,7 @@ export OBJ_DIR = obj
export BIN_DIR = bin
export SRC_DIR = src
export UTIL_DIR = src/utils
-export CXX ?= g++
+export CXX = g++
ifeq ($(DEBUG),1)
export CXXFLAGS = -Wall -Wextra -DDEBUG -D_DEBUG -g -O0 -D_FILE_OFFSET_BITS=64 -fPIC $(INCLUDES)
else
@@ -25,10 +25,9 @@ endif
# If the user has specified to do so, tell the compile to use rand() (instead of mt19937).
ifeq ($(USE_RAND),1)
-export CXXFLAGS = -DUSE_RAND
+export CXXFLAGS += -DUSE_RAND
else
-# Although we really want c++11, g++ 4.6.3 (as used by Travis) uses 'gnu++0x'
-export CXXFLAGS = -std=gnu++0x
+export CXXFLAGS += -std=c++11
endif
export LIBS = -lz
@@ -165,6 +164,7 @@ install: all
print_banner:
@echo "Building BEDTools:"
@echo "========================================================="
+ $(info $$CXXFLAGS is [${CXXFLAGS}])
.PHONY: print_banner
# make the "obj/" and "bin/" directories, if they don't exist
|
io: release socket on exception (CID 300962) | @@ -136,6 +136,7 @@ FLB_INLINE int flb_io_net_connect(struct flb_upstream_conn *u_conn,
ret = bind(fd, (struct sockaddr *) &addr, sizeof(addr));
if (ret == -1) {
flb_errno();
+ flb_socket_close(fd);
flb_error("[io] could not bind source_address=%s",
u->net.source_address);
return -1;
|
list actual branch as well as desired for list option | @@ -44,7 +44,8 @@ fi
function list_repo(){
repodirname=$AOMP_REPOS/$reponame
cd $repodirname
-echo `git config --get remote.origin.url` " " $COBRANCH " " `git log --numstat --format="%h" |head -1`
+abranch=`git branch | awk '/\*/ { print $2; }'`
+echo `git config --get remote.origin.url` " desired: " $COBRANCH " actual: " $abranch " " `git log --numstat --format="%h" |head -1`
}
function clone_or_pull(){
|
Fix PhOpenThemeData typo | @@ -521,15 +521,15 @@ PVOID PhOpenThemeData(
if (baseAddress)
{
- if (!(OpenThemeDataForDpi_I = PhGetDllBaseProcedureAddress(baseAddress, "OpenThemeDataForDpi", 0)))
- OpenThemeData_I = PhGetDllBaseProcedureAddress(baseAddress, "OpenThemeDat", 0);
+ OpenThemeDataForDpi_I = PhGetDllBaseProcedureAddress(baseAddress, "OpenThemeDataForDpi", 0);
+ OpenThemeData_I = PhGetDllBaseProcedureAddress(baseAddress, "OpenThemeData", 0);
}
}
PhEndInitOnce(&initOnce);
}
- if (OpenThemeDataForDpi_I)
+ if (OpenThemeDataForDpi_I && DpiValue)
return OpenThemeDataForDpi_I(WindowHandle, ClassList, DpiValue);
if (OpenThemeData_I)
return OpenThemeData_I(WindowHandle, ClassList);
|
decision: apply suggestion | @@ -102,6 +102,9 @@ The `spec` plugin should check if it is a valid array, i.e.:
which is a possibility also in all the alternatives of this decision.
- A `user:/` or `dir:/` key can change the semantics of a `system:/` array,
if not avoided by `spec`.
+- user-facing documentation should contain a note like:
+ "Mixing array and non-array keys in arrays is not supported.
+ In many cases the trivial solution is to move the array part into a separate child-key."
## Related Decisions
|
[awm2] Extra background rects are pushed to video memory | @@ -753,13 +753,13 @@ impl Desktop {
// Copy the bits of the background that we decided we needed to redraw
logs.push(format!("Extra background draws:"));
- for background_copy_rect in self.compositor_state.extra_background_draws.drain(..) {
+ for background_copy_rect in self.compositor_state.extra_background_draws.iter() {
logs.push(format!("\t{background_copy_rect}"));
//println!("Drawing background rect {background_copy_rect}");
Self::copy_rect(
&mut *self.desktop_background_layer.get_slice(self.desktop_frame),
&mut *self.screen_buffer_layer.get_slice(self.desktop_frame),
- background_copy_rect,
+ *background_copy_rect,
);
}
@@ -781,6 +781,10 @@ impl Desktop {
}
self.compositor_state.extra_draws.borrow_mut().clear();
+ for background_copy_rect in self.compositor_state.extra_background_draws.drain(..) {
+ Self::copy_rect(buffer, vmem, background_copy_rect);
+ }
+
for full_redraw_rect in self.compositor_state.rects_to_fully_redraw.drain(..) {
Self::copy_rect(buffer, vmem, full_redraw_rect);
}
|
update unit test module source | "import System;\n" \
"\n" \
"abstract class UnitTest {\n" \
-" var METHOD_NAME_PADDING = ' ';\n" \
-" var RESULTS_PADDING = ' ';\n" \
-" var ASSERTION_PADDING = ' ';\n" \
+" const METHOD_NAME_PADDING = ' ';\n" \
+" const RESULTS_PADDING = ' ';\n" \
+" const ASSERTION_PADDING = ' ';\n" \
" var forceOnlyFailures = false;\n" \
" var forceExitOnFailure = false;\n" \
"\n" \
|
Fix typos in string/find-all documentation | @@ -599,7 +599,7 @@ static const JanetReg string_cfuns[] = {
JDOC("(string/find-all patt str)\n\n"
"Searches for all instances of pattern patt in string "
"str. Returns an array of all indices of found patterns. Overlapping "
- "instances of the pattern are counted individual, meaning a byte in string "
+ "instances of the pattern are counted individually, meaning a byte in str "
"may contribute to multiple found patterns.")
},
{
|
store/loader_file.c: fix char-subscripts warning.
This happens on systems that perform is* character classifictions as
array lookup, e.g. NetBSD. | @@ -1216,9 +1216,9 @@ static int file_name_check(OSSL_STORE_LOADER_CTX *ctx, const char *name)
* Last, check that the rest of the extension is a decimal number, at
* least one digit long.
*/
- if (!isdigit(*p))
+ if (!ossl_isdigit(*p))
return 0;
- while (isdigit(*p))
+ while (ossl_isdigit(*p))
p++;
# ifdef __VMS
@@ -1227,7 +1227,7 @@ static int file_name_check(OSSL_STORE_LOADER_CTX *ctx, const char *name)
*/
if (*p == ';')
for (p++; *p != '\0'; p++)
- if (!isdigit(*p))
+ if (!ossl_isdigit(*p))
break;
# endif
|
Fix Break in Perf Public Script | @@ -3,8 +3,6 @@ $PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
# Root directory of the project.
$RootDir = Split-Path $PSScriptRoot -Parent
-$RootDir = Split-Path $RootDir -Parent
-
$ResultsPath = Join-Path $RootDir "artifacts/PerfDataResults"
# Enumerate files
|
Call before and after fork on single process | @@ -233,6 +233,11 @@ static void *srv_start_no_gvl(void *s_) {
sock_io_thread = 1;
defer(iodine_start_io_thread, NULL, NULL);
fprintf(stderr, "\n");
+ if (s->processes == 1 || (s->processes == 0 && s->threads > 0)) {
+ /* single worker */
+ RubyCaller.call(Iodine, rb_intern("before_fork"));
+ RubyCaller.call(Iodine, rb_intern("after_fork"));
+ }
facil_run(.threads = s->threads, .processes = s->processes,
.on_idle = iodine_on_idle, .on_finish = iodine_join_io_thread);
return NULL;
|
util/lock/file_lock.c: Format with clang-format
BRANCH=none
TEST=none | @@ -100,8 +100,8 @@ static int file_lock_open_or_create(struct ipc_lock *lock)
if (!tmpdir)
return -1;
- if (snprintf(path, sizeof(path), "%s/%s",
- tmpdir, lock->filename) < 0) {
+ if (snprintf(path, sizeof(path), "%s/%s", tmpdir,
+ lock->filename) < 0) {
return -1;
}
} else {
@@ -115,10 +115,9 @@ static int file_lock_open_or_create(struct ipc_lock *lock)
return -1;
}
- if (snprintf(path, sizeof(path),
- "%s/%s", dir, lock->filename) < 0)
+ if (snprintf(path, sizeof(path), "%s/%s", dir, lock->filename) <
+ 0)
return -1;
-
}
lock->fd = open(path, O_RDWR | O_CREAT, 0600);
|
filter_kubernetes: fix error/warn message for local Pod | @@ -715,8 +715,13 @@ int flb_kube_meta_init(struct flb_kube *ctx, struct flb_config *config)
ret = get_api_server_info(ctx, ctx->namespace, ctx->podname,
&meta_buf, &meta_size);
if (ret == -1) {
- flb_error("[filter_kube] could not get meta for POD %s",
+ if (!ctx->podname) {
+ flb_warn("[filter_kube] could not get meta for local POD");
+ }
+ else {
+ flb_warn("[filter_kube] could not get meta for POD %s",
ctx->podname);
+ }
return -1;
}
flb_info("[filter_kube] API server connectivity OK");
|
config: EHL passthough network to pre-launched VM for hybrid_rt
For EHL hybrid_rt scenario, the requirement needs a network device
passthough to pre-launched VM0.
Acked-by: Victor Sun | </vuart>
<pci_devs desc="pci devices list">
<pci_dev desc="pci device">00:17.0 SATA controller: Intel Corporation Device 4b63</pci_dev>
+ <pci_dev desc="pci device">00:1d.2 Ethernet controller: Intel Corporation Device 4bb0</pci_dev>
</pci_devs>
<mmio_resources desc="mmio devices list to passthrough">
<TPM2 desc="TPM2 device">n</TPM2>
|
net/lwip: ping receive function shows the exact length.
ping v4 and v6 shows the exact legnth of received ping reply.
> payload length + icmp header length | @@ -235,6 +235,7 @@ static int nu_ping_recv(int family, int s, struct timespec *ping_time)
int ok = 0;
ip6hdr = (struct ip6_hdr *)buf;
+ len = IP6H_PLEN(ip6hdr);
curp = (char *)(buf + sizeof(struct ip6_hdr));
nexth = ip6hdr->_nexth;
@@ -248,6 +249,7 @@ static int nu_ping_recv(int family, int s, struct timespec *ping_time)
nexth = frag_hdr->_nexth;
curp += (sizeof(struct ip6_frag_hdr));
+ len -= (sizeof(struct ip6_frag_hdr));
break;
}
case IP6_NEXTH_ICMP6:
@@ -276,6 +278,7 @@ static int nu_ping_recv(int family, int s, struct timespec *ping_time)
inet_ntop(family, (void *)&((struct sockaddr_in *)from)->sin_addr, addr_str, 64);
iphdr = (struct ip_hdr *)buf;
+ len = htons(IPH_LEN(iphdr)) - IP_HLEN;
iecho = (struct icmp_echo_hdr *)(buf + (IPH_HL(iphdr) * 4));
if (iecho->type == ICMP_ER) {
status = OK;
|
common/keyboard_backlight.c: Format with clang-format
BRANCH=none
TEST=none | @@ -22,9 +22,13 @@ static struct kblight_conf kblight;
static int current_percent;
static uint8_t current_enable;
-__overridable void board_kblight_init(void) {}
+__overridable void board_kblight_init(void)
+{
+}
-__overridable void board_kblight_shutdown(void) {}
+__overridable void board_kblight_shutdown(void)
+{
+}
static int kblight_init(void)
{
@@ -89,7 +93,6 @@ int kblight_get_enabled(void)
return -1;
}
-
int kblight_register(const struct kblight_drv *drv)
{
kblight.drv = drv;
@@ -162,12 +165,11 @@ static int cc_kblight(int argc, char **argv)
if (kblight_enable(i > 0))
return EC_ERROR_PARAM1;
}
- ccprintf("Keyboard backlight: %d%% enabled: %d\n",
- kblight_get(), kblight_get_enabled());
+ ccprintf("Keyboard backlight: %d%% enabled: %d\n", kblight_get(),
+ kblight_get_enabled());
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(kblight, cc_kblight,
- "percent",
+DECLARE_CONSOLE_COMMAND(kblight, cc_kblight, "percent",
"Get/set keyboard backlight");
static enum ec_status
@@ -182,8 +184,7 @@ hc_get_keyboard_backlight(struct host_cmd_handler_args *args)
return EC_RES_SUCCESS;
}
DECLARE_HOST_COMMAND(EC_CMD_PWM_GET_KEYBOARD_BACKLIGHT,
- hc_get_keyboard_backlight,
- EC_VER_MASK(0));
+ hc_get_keyboard_backlight, EC_VER_MASK(0));
static enum ec_status
hc_set_keyboard_backlight(struct host_cmd_handler_args *args)
@@ -197,5 +198,4 @@ hc_set_keyboard_backlight(struct host_cmd_handler_args *args)
return EC_RES_SUCCESS;
}
DECLARE_HOST_COMMAND(EC_CMD_PWM_SET_KEYBOARD_BACKLIGHT,
- hc_set_keyboard_backlight,
- EC_VER_MASK(0));
+ hc_set_keyboard_backlight, EC_VER_MASK(0));
|
Document perf counters in Diagnostics.md | @@ -72,4 +72,50 @@ First off, you're going to need xperf and wpa. Installing the [Windows ADK](http
## Counters
+To assist investigations into running systems, MsQuic has a number of performance counters that are updated during runtime. These counters are exposed as an array of unsigned 64-bit integers, via a global `GetParam` parameter.
+Sample code demonstrating how to query the performance counters:
+```c
+uint64_t Counters[QUIC_PERF_COUNTER_MAX];
+uint32_t BufferLength = sizeof(Counters);
+MsQuic->GetParam(
+ NULL,
+ QUIC_PARAM_LEVEL_GLOBAL,
+ QUIC_PARAM_GLOBAL_PERF_COUNTERS,
+ &BufferLength,
+ Counters);
+```
+
+Each of the counters available is described here:
+Counter | Description
+--------|------------
+QUIC_PERF_COUNTER_CONN_CREATED | Total connections ever allocated
+QUIC_PERF_COUNTER_CONN_HANDSHAKE_FAIL | Total connections that failed during handshake
+QUIC_PERF_COUNTER_CONN_APP_REJECT | Total connections rejected by the application
+QUIC_PERF_COUNTER_CONN_RESUMED | Total connections resumed
+QUIC_PERF_COUNTER_CONN_ACTIVE | Connections currently allocated
+QUIC_PERF_COUNTER_CONN_CONNECTED | Connections currently in the connected state
+QUIC_PERF_COUNTER_CONN_PROTOCOL_ERRORS | Total connections shutdown with a protocol error
+QUIC_PERF_COUNTER_CONN_NO_ALPN | Total connection attempts with no matching ALPN
+QUIC_PERF_COUNTER_STRM_ACTIVE | Current streams allocated
+QUIC_PERF_COUNTER_PKTS_SUSPECTED_LOST | Total suspected packets lost
+QUIC_PERF_COUNTER_PKTS_DROPPED | Total packets dropped for any reason
+QUIC_PERF_COUNTER_PKTS_DECRYPTION_FAIL | Total packets with decryption failures
+QUIC_PERF_COUNTER_UDP_RECV | Total UDP datagrams received
+QUIC_PERF_COUNTER_UDP_SEND | Total UDP datagrams sent
+QUIC_PERF_COUNTER_UDP_RECV_BYTES | Total UDP payload bytes received
+QUIC_PERF_COUNTER_UDP_SEND_BYTES | Total UDP payload bytes sent
+QUIC_PERF_COUNTER_UDP_RECV_EVENTS | Total UDP receive events
+QUIC_PERF_COUNTER_UDP_SEND_CALLS | Total UDP send API calls
+QUIC_PERF_COUNTER_APP_SEND_BYTES | Total bytes sent by applications
+QUIC_PERF_COUNTER_APP_RECV_BYTES | Total bytes received by applications
+QUIC_PERF_COUNTER_CONN_QUEUE_DEPTH | Current connections queued for processing
+QUIC_PERF_COUNTER_CONN_OPER_QUEUE_DEPTH | Current connection operations queued
+QUIC_PERF_COUNTER_CONN_OPER_QUEUED | Total connection operations queued ever
+QUIC_PERF_COUNTER_CONN_OPER_COMPLETED | Total connection operations processed ever
+QUIC_PERF_COUNTER_WORK_OPER_QUEUE_DEPTH | Current worker operations queued
+QUIC_PERF_COUNTER_WORK_OPER_QUEUED | Total worker operations queued ever
+QUIC_PERF_COUNTER_WORK_OPER_COMPLETED | Total worker operations processed ever
+
+On the latest version of Windows, these counters are also exposed via PerfMon.exe under the `QUIC Performance Counters` category. The values exposed via PerfMon only represent kernel mode usages of MsQuic, and do not include user mode counters. Counters are also captured at the beginning of MsQuic ETW traces, and unlike PerfMon, include all MsQuic instances running on the system, both user and kernel mode.
+
# FAQ
|
Remove "unused variable self" warnings from Luacheck
The "self" variable not being used in a method is very common and something that
can easily happen when defining functions with ":" syntax | -- [2] https://github.com/vim-syntastic/syntastic
ignore = {
- "212/_.*", -- Unused argument, (unless name starts with "_")
- "411/err", -- Redefining local (unless called "err")
- "421/err", -- Shadowing local (unless called "err")
+ "212/_.*", -- Unused argument, when name starts with "_"
+ "212/self", -- Unused argument "self"
+ "411/err", -- Redefining local "err"
+ "421/err", -- Shadowing local "err"
"542", -- Empty if branch.
"6..", -- Whitespace warnings
}
|
Updated epoll wrappers. | @@ -233,15 +233,15 @@ int nsa_epoll_create(int size)
}
-/* ###### NEAT select() implementation ################################### */
-int nsa_epoll_ctl(int epfd, int op, int fd, struct epoll_event* event)
+/* ###### NEAT epoll_create1() implementation ############################ */
+int nsa_epoll_create(int flags)
{
abort();
}
/* ###### NEAT epoll_ctl() implementation ################################ */
-int nsa_epoll_wait(int epfd, struct epoll_event* events, int maxevents, int timeout)
+int nsa_epoll_ctl(int epfd, int op, int fd, struct epoll_event* event)
{
abort();
}
|
Nicer comment text. | @@ -52,7 +52,7 @@ void* fstrm_create_control_frame_start(char* contenttype, size_t* len)
* 4byte 0: control indicator.
* 4byte bigendian: length of control frame
* 4byte bigendian: type START
- * 4byte bigendian: frame option: content-type
+ * 4byte bigendian: option: content-type
* 4byte bigendian: length of string
* string of content type (dnstap)
*/
|
More reasonable default vertical ranges. Replace flat 1000 with (height * 2), or (vertical res / 2) if model doesn't have a height. | @@ -10126,9 +10126,32 @@ s_model *load_cached_model(char *name, char *owner, char unload)
newanim->range.z.min = (int) - newchar->grabdistance / 3; //zmin
newanim->range.z.max = (int)newchar->grabdistance / 3; //zmax
newanim->range.y.min = T_MIN_BASEMAP; //amin
- newanim->range.y.max = 1000; //amax
+
+ // Vertical range default.
+ // If we have a model height, then double it.
+ // Otherwise use half the vertical screen size.
+ if (newchar->size.y)
+ {
+ newanim->range.y.max = newchar->size.y * 2;
+ }
+ else
+ {
+ newanim->range.y.max = videomodes.vRes / 2;
+ }
+
newanim->range.base.min = T_MIN_BASEMAP; //Base min.
- newanim->range.base.max = 1000; //Base max.
+
+ // Base range default.
+ // Same logic as veritcal range default.
+ if (newchar->size.y)
+ {
+ newanim->range.base.max = newchar->size.y * 2;
+ }
+ else
+ {
+ newanim->range.base.max = videomodes.vRes / 2;
+ }
+
newanim->energycost = NULL;
newanim->chargetime = 2; // Default for backwards compatibility
newanim->projectile.shootframe = -1;
|
newlib: Fix adjtime, returns the amount of time remaining from any previous adjustment
If the olddelta argument is not a null pointer, the adjtime function returns information
about any previous time adjustment that has not yet completed.
Closes: | @@ -193,6 +193,18 @@ static void adjtime_corr_stop (void)
int adjtime(const struct timeval *delta, struct timeval *outdelta)
{
#if defined( WITH_FRC ) || defined( WITH_RTC )
+ if(outdelta != NULL){
+ _lock_acquire(&s_adjust_time_lock);
+ adjust_boot_time();
+ if (adjtime_start != 0) {
+ outdelta->tv_sec = adjtime_total_correction / 1000000L;
+ outdelta->tv_usec = adjtime_total_correction % 1000000L;
+ } else {
+ outdelta->tv_sec = 0;
+ outdelta->tv_usec = 0;
+ }
+ _lock_release(&s_adjust_time_lock);
+ }
if(delta != NULL){
int64_t sec = delta->tv_sec;
int64_t usec = delta->tv_usec;
@@ -211,18 +223,6 @@ int adjtime(const struct timeval *delta, struct timeval *outdelta)
adjtime_total_correction = sec * 1000000L + usec;
_lock_release(&s_adjust_time_lock);
}
- if(outdelta != NULL){
- _lock_acquire(&s_adjust_time_lock);
- adjust_boot_time();
- if (adjtime_start != 0) {
- outdelta->tv_sec = adjtime_total_correction / 1000000L;
- outdelta->tv_usec = adjtime_total_correction % 1000000L;
- } else {
- outdelta->tv_sec = 0;
- outdelta->tv_usec = 0;
- }
- _lock_release(&s_adjust_time_lock);
- }
return 0;
#else
return -1;
|
added fclairamb/ftpserver
Issue: | @@ -371,6 +371,9 @@ ALLOW .* -> vendor/github.com/pariz/gountries
# CONTRIB-1630- Go binding for qemu/qmp runtime
ALLOW .* -> vendor/github.com/intel/govmm/qemu
+# CONTRIB-1650 golang ftp server library with a sample implementation
+ALLOW .* -> vendor/github.com/fclairamb/ftpserver
+
#
# Temporary exceptions.
#
|
Entering power off now disables FSMC | // See LICENSE file in the project root for full license information.
//
+#include <ch.h>
+#include <hal.h>
+#include <hal_nf_community.h>
#include <nanoHAL_Power.h>
#include <nanoHAL_v2.h>
#include <target_platform.h>
#include <cmsis_os.h>
-#include <hal.h>
-#include <hal_nf_community.h>
-#include <ch.h>
+
+#if (HAL_USE_FSMC == TRUE)
+#include <fsmc_sdram_lld.h>
+#endif
uint32_t WakeupReasonStore;
@@ -42,6 +46,11 @@ void CPU_SetPowerMode(PowerLevel_type powerLevel)
// stop watchdog
wdgStop(&WDGD1);
+ #if (HAL_USE_FSMC == TRUE)
+ // shutdown memory
+ fsmcSdramStop(&SDRAMD);
+ #endif
+
// gracefully shutdown everything
nanoHAL_Uninitialize_C();
|
Fix icon path in README
The data/ directory was moved to app/data/.
Refs | # scrcpy (v1.23)
-<img src="data/icon.svg" width="128" height="128" alt="scrcpy" align="right" />
+<img src="app/data/icon.svg" width="128" height="128" alt="scrcpy" align="right" />
_pronounced "**scr**een **c**o**py**"_
|
Increase was file size limit to 256MB.
Fix | @@ -126,7 +126,7 @@ M3Result repl_load (const char* fn)
if (fsize < 8) {
result = "file is too small";
goto on_error;
- } else if (fsize > 64*1024*1024) {
+ } else if (fsize > 256*1024*1024) {
result = "file is too big";
goto on_error;
}
|
king: remove spurious Term changes | @@ -562,10 +562,6 @@ localClient doneSignal = fst <$> mkRAcquire start stop
writeTQueue wq [Term.Trace "interrupt\r\n"]
writeTQueue rq $ Ctl $ Cord "c"
loop rd
- else if w == 20 then do
- -- DC4 (^T)
- atomically $ writeTQueue wq [Term.Trace "<stat>\r\n"]
- loop rd
else if w <= 26 then do
case pack [BS.w2c (w + 97 - 1)] of
"d" -> atomically doneSignal
|
Modified to accept new key structure | @@ -147,9 +147,7 @@ bool CAlert::RelayTo(CNode* pnode) const
bool CAlert::CheckSignature() const
{
- CKey key;
- if (!key.SetPubKey(ParseHex(fTestNet ? pszTestKey : pszMainKey)))
- return error("CAlert::CheckSignature() : SetPubKey failed");
+ CPubKey key(ParseHex(fTestNet ? pszTestKey : pszMainKey));
if (!key.Verify(Hash(vchMsg.begin(), vchMsg.end()), vchSig))
return error("CAlert::CheckSignature() : verify signature failed");
|
A missing semicolon prevents compilation with ENGINE_REF_COUNT_DEBUG enabled. | @@ -82,7 +82,7 @@ int engine_free_util(ENGINE *e, int not_locked)
else
i = --e->struct_ref;
#endif
- engine_ref_debug(e, 0, -1)
+ engine_ref_debug(e, 0, -1);
if (i > 0)
return 1;
REF_ASSERT_ISNT(i < 0);
|
Skip ResizeMemory if no need to grow | @@ -120,6 +120,9 @@ d_m3OpDef (MemGrow)
u32 requiredPages = memory->numPages + numPagesToGrow;
_r0 = memory->numPages;
+ if (numPagesToGrow == 0)
+ return nextOp ();
+
M3Result r = ResizeMemory (runtime, requiredPages);
if (r)
_r0 = -1;
|
Doc: Update history section of EC_GROUP API's.
Fixes
The remaining functions are at least as old as 0.9.8 so it is
not worth documenting this. | @@ -247,8 +247,8 @@ L<EC_GFp_simple_method(3)>, L<d2i_ECPKParameters(3)>
=head1 HISTORY
EC_GROUP_method_of() was deprecated in OpenSSL 3.0.
-
-EC_GROUP_check_named_curve() and EC_GROUP_get_field_type() were added in OpenSSL 3.0.
+EC_GROUP_get0_field(), EC_GROUP_check_named_curve() and EC_GROUP_get_field_type() were added in OpenSSL 3.0.
+EC_GROUP_get0_order(), EC_GROUP_order_bits() and EC_GROUP_get0_cofactor() were added in OpenSSL 1.1.0.
=head1 COPYRIGHT
|
Packages: "test" and "test-debug" targets for deb. | @@ -76,7 +76,7 @@ CONFIGURE_ARGS=\
export CR=\\n
default:
- @echo "valid targets: all modules unit $(addprefix unit-, $(MODULES)) clean"
+ @echo "valid targets: all modules unit $(addprefix unit-, $(MODULES)) test test-debug clean"
all: check-build-depends unit modules
@@ -219,10 +219,30 @@ unit-%: check-build-depends-% | debuild-%
find debuild-$*/ -maxdepth 1 -type f -exec cp {} debs/ \;
ln -s debuild-$*/$(SRCDIR)/build $@
+test: unit modules
+ @{ \
+ for so in `find debuild-*/unit-$(VERSION)/debian/build-unit/ -type f -name "*.so"` ; do \
+ soname=`basename $${so}` ; \
+ test -h debuild/unit-$(VERSION)/debian/build-unit/build/$${soname} || \
+ ln -fs `pwd`/$${so} debuild/unit-$(VERSION)/debian/build-unit/build/$${soname} ; \
+ done ; \
+ ( cd debuild/unit-$(VERSION)/debian/build-unit && ./test/run.py ) ; \
+ }
+
+test-debug: unit modules
+ @{ \
+ for so in `find debuild-*/unit-$(VERSION)/debian/build-unit-debug/ -type f -name "*.so"` ; do \
+ soname=`basename $${so}` ; \
+ test -h debuild/unit-$(VERSION)/debian/build-unit-debug/build/$${soname} || \
+ ln -fs `pwd`/$${so} debuild/unit-$(VERSION)/debian/build-unit-debug/build/$${soname} ; \
+ done ; \
+ ( cd debuild/unit-$(VERSION)/debian/build-unit-debug && ./test/run.py ) ; \
+ }
+
clean:
rm -rf debuild debuild-* debs ../../build
find . -maxdepth 1 -type l -delete
-.PHONY: default all modules check-build-depends clean
+.PHONY: default all modules check-build-depends test test-debug clean
.SECONDARY:
|
Add ability in viz tool to see accel | @@ -435,8 +435,14 @@ function create_tracked_object(info, external) {
objs[info.tracker].angVelocity =
new THREE.Line(angVelocityGeom, new THREE.LineDashedMaterial({color : 0x00FFFF, scale : .1}));
+ var accelGeom = new THREE.Geometry();
+ accelGeom.vertices.push(new THREE.Vector3(0, 0, 0), new THREE.Vector3(0, 0, 0));
+ objs[info.tracker].accel =
+ new THREE.Line(accelGeom, new THREE.LineBasicMaterial({color : 0xFF00FF, linewidth : 3}));
+
group.add(objs[info.tracker].velocity);
group.add(objs[info.tracker].angVelocity);
+ group.add(objs[info.tracker].accel);
if (external) {
external_group.add(group);
@@ -518,7 +524,21 @@ function set_object_position(obj, name = null) {
fpv_camera.lookAt(lookAt);
}
}
+function update_fullstate(v) {
+ var obj = {
+ tracker : v[1],
+ position : [ parseFloat(v[3]), parseFloat(v[4]), parseFloat(v[5]) ],
+ quat : [ parseFloat(v[6]), parseFloat(v[7]), parseFloat(v[8]), parseFloat(v[9]) ],
+ accel : [ parseFloat(v[16]), parseFloat(v[17]), parseFloat(v[18]) ],
+ };
+ if (objs[obj.tracker] == null || objs[obj.tracker].velocity == null) {
+ return;
+ }
+
+ objs[obj.tracker].accel.geometry.vertices[1].set(obj.accel[0], obj.accel[1], obj.accel[2]);
+ objs[obj.tracker].accel.geometry.verticesNeedUpdate = true;
+}
function update_velocity(v) {
var obj = {
tracker : v[1],
@@ -634,7 +654,26 @@ function scrollConsoleToTop() {
}
}
var polys = {};
+function add_axis(v) {
+ var fv = v.map(parseFloat);
+ var name = v[2];
+
+ scene.remove(polys[name]);
+
+ if (fv[3] <= 1e-5)
+ return;
+
+ var group = new THREE.Group();
+ var helper = new THREE.AxesHelper(fv[3]);
+ group.add(helper);
+ group.position.set(fv[4], fv[5], fv[6]);
+ group.quaternion.fromArray([ fv[8], fv[9], fv[10], fv[7] ]);
+ group.tooltip = name;
+ polys[name] = group;
+
+ scene.add(group);
+}
function add_sphere(v) {
var fv = v.map(parseFloat);
@@ -706,8 +745,10 @@ var survive_log_handlers = {
},
"POLY" : add_poly,
"SPHERE" : add_sphere,
+ "AXIS" : add_axis,
"POSE" : update_object,
"VELOCITY" : update_velocity,
+ "FULL_STATE" : update_fullstate,
"EXTERNAL_VELOCITY" : function(v) { update_velocity(v, true, true); },
"EXTERNAL_POSE" : function(v) { update_object(v, true, true); },
"DISCONNECT" : function(v) { delete_tracked_object(v[1]); },
|
Try to install php5-dev instead of php-dev. | @@ -36,7 +36,7 @@ pushd "$DEPS_DIR"
doxygen \
graphviz \
python-dev \
- php-dev \
+ php5-dev \
liblua5.2-dev \
octave-pkg-dev \
r-base \
|
update docs/gftp.1 | -.TH GFTP 1 "MARCH 2007"
+.TH GFTP 1 "JUNE 2020"
.SH NAME
gftp - file transfer client for *NIX based machines.
.SH SYNOPSIS
@@ -14,7 +14,7 @@ gftp - file transfer client for *NIX based machines.
.I directory
.B ]]
.SH DESCRIPTION
-gFTP is a file transfer client for *NIX based machines. It currently has a text interface and a GTK+ 1.2/2.x graphical interface. It currently supports the FTP, FTPS (control connection only), HTTP, HTTPS, SSH and FSP protocols.
+gFTP is a file transfer client for *NIX based machines. It currently has a text interface and a GTK graphical interface. It currently supports the FTP, FTPS (control connection only), and SSH protocols.
.SH OPTIONS
You may enter a url on the command line that gFTP will automatically connect to when it starts up.
.IP "\-\-help, \-h"
@@ -24,7 +24,7 @@ Display some information about how gFTP was built. Please send the output of thi
.IP "\-\-version, \-v"
Display the current version of gFTP.
.IP proto
-This specifies the protocol that should be used. It can currently be one of the following options: ftp, ftps, http, https, ssh, fsp, local and bookmark. If omitted, the protocol specified by the default_protocol option will be used.
+This specifies the protocol that should be used. It can currently be one of the following options: ftp, ftps, ssh, local and bookmark. If omitted, the protocol specified by the default_protocol option will be used.
.IP user
The username that will be used to log into the remote server. If omitted, your current username will be used for most protocols. For the FTP protocol, the anonymous username will be used.
.IP pass
@@ -45,6 +45,6 @@ Per user configuration file. Most of these options can be edited inside gFTP. Th
.RS
Per user bookmarks file.
.SH BUGS
-If you find any bugs in gFTP, please report them to GNOME's Bugzilla at http://bugzilla.gnome.org/
+Report bugs at https://github.com/masneyb/gftp/issues
.SH AUTHOR
Brian Masney <[email protected]> - http://www.gftp.org/
|
Add PLATFORM_INTENDED_DEVICE_FAMILY to generated platform configuration.
The value is derived from the fpga-family encoded in the platform
database and may be passed to megafunctions as "intended_device_family"
to get proper simulated semantics for a target architecture. | @@ -54,6 +54,26 @@ def emitHeader(f, afu_ifc_db, platform_db, comment="//"):
afu_ifc_db['file_name'], comment))
+def getIntendedDevFamily(platform_db):
+ try:
+ f = platform_db['fpga-family']
+ except KeyError:
+ # Older platform databases didn't include fpga-family
+ f = 'A10'
+
+ # Map OPAE platform_db families to megafunction names.
+ families = dict()
+ families['A'] = 'Arria'
+ families['S'] = 'Stratix'
+
+ # Is the encoded fpga-family a single letter followed by a number?
+ if ((f[0] in families) and f[1].isdigit()):
+ # Yes -- return the expanded family and the version number
+ return families[f[0]] + f[1:]
+
+ return "Unknown"
+
+
#
# Compute derived parameter values based on the database. These
# are typically computations more easily done here in Python than
@@ -177,6 +197,11 @@ def emitConfig(args, afu_ifc_db, platform_db, platform_defaults_db,
f.write("`define PLATFORM_CLASS_NAME_IS_" +
platform_db['platform-name'].upper() + " 1\n\n")
+ f.write("// This may be passed as the \"intended_device_family\"\n" +
+ "// parameter to simulated megafunctions.\n")
+ f.write("`define PLATFORM_INTENDED_DEVICE_FAMILY \"" +
+ getIntendedDevFamily(platform_db) + "\"\n\n")
+
f.write("`define AFU_TOP_MODULE_NAME " +
afu_ifc_db['module-name'] + "\n")
f.write("`define PLATFORM_SHIM_MODULE_NAME " +
|
Enable coverage testing on Fedora 30.
Now that coverage testing works reliably with gcc9 it makes sense to enable it for CI. | @@ -219,6 +219,7 @@ my $oyVm =
&VM_IMAGE => 'fedora:30',
&VM_ARCH => VM_ARCH_AMD64,
&VMDEF_PGSQL_BIN => '/usr/pgsql-{[version]}/bin',
+ &VMDEF_COVERAGE_C => true,
&VMDEF_DEBUG_INTEGRATION => false,
|
Split long string in test_nsalloc_long_namespace()
C99 compilers are only obliged to cope with 4095 character strings
literals. Split the parse string so that it is under this limit. | @@ -11085,7 +11085,7 @@ END_TEST
START_TEST(test_nsalloc_long_namespace)
{
- const char *text =
+ const char *text1 =
"<"
/* 64 characters per line */
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789AZ"
@@ -11121,7 +11121,8 @@ START_TEST(test_nsalloc_long_namespace)
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789AZ"
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789AZ"
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789AZ"
- "='http://example.org/'>\n"
+ "='http://example.org/'>\n";
+ const char *text2 =
"<"
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789AZ"
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789AZ"
@@ -11180,7 +11181,9 @@ START_TEST(test_nsalloc_long_namespace)
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text1, strlen(text1),
+ XML_FALSE) != XML_STATUS_ERROR &&
+ _XML_Parse_SINGLE_BYTES(parser, text2, strlen(text2),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_nsalloc_xmlns() */
|
task_construct takes an argument to pass to entry point | @@ -82,16 +82,17 @@ static void _tasking_add_task_to_runlist(task_small_t* task) {
list_tail->next = task;
}
-task_small_t* task_construct(uint32_t entry_point) {
+task_small_t* task_construct(void* entry_point, void* arg1) {
task_small_t* new_task = kmalloc(sizeof(task_small_t));
memset(new_task, 0, sizeof(task_small_t));
new_task->id = next_pid++;
uint32_t stack_size = 0x1000;
char *stack = kmalloc(stack_size);
- uint32_t *stack_top = (uint32_t *)(stack + stack_size - 0x4); // point to top of malloc'd stack
- *(stack_top--) = entry_point; //Address of task's startup function
+ uint32_t *stack_top = (uint32_t *)(stack + stack_size - 0x4); // point to top of malloc'd stack
+ *(stack_top--) = arg1; //argument to entry point
+ *(stack_top--) = entry_point; //address of task's entry point
*(stack_top--) = 0; //eax
*(stack_top--) = 0; //ebx
*(stack_top--) = 0; //esi
@@ -154,15 +155,14 @@ void tasking_init() {
// the runtime state will be whatever we were doing after tasking_init returns.
// so, anything we set to be restored in this first task's setup state will be overwritten when it's preempted for the first time.
// thus, we can pass anything for the entry point of this first task, since it won't be used.
- _current_task_small = task_construct(NULL);
+ _current_task_small = task_construct(NULL, NULL);
_task_list_head = _current_task_small;
//init another
- //task_small_t* buddy = task_construct((uint32_t)&task2);
- //task_small_t* buddy1 = task_construct((uint32_t)&task3);
- for (int i = 0; i < MAX_TASKS; i++) {
- task_construct((uint32_t)task_new);
+ //task_small_t* buddy = task_construct((uint32_t)&task2, NULL);
+ //task_small_t* buddy1 = task_construct((uint32_t)&task_sleepy, NULL);
+ for (int i = 0; i < 9; i++) {
+ task_construct((uint32_t)task_new, i);
}
-
printf_info("Multitasking initialized");
kernel_end_critical();
}
|
out_file: use flb_metrics.h header | #include <fluent-bit/flb_pack.h>
#include <fluent-bit/flb_utils.h>
#include <fluent-bit/flb_time.h>
+#include <fluent-bit/flb_metrics.h>
#include <msgpack.h>
-#include <cmetrics/cmetrics.h>
-#include <cmetrics/cmt_encode_text.h>
-#include <cmetrics/cmt_decode_msgpack.h>
-
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
|
Remove WIDE class | @@ -159,8 +159,8 @@ union {
strDataTmp_t tmp;
} strings;
-WIDE internalStorage_t N_storage_real;
-#define N_storage (*(WIDE internalStorage_t*) PIC(&N_storage_real))
+internalStorage_t N_storage_real;
+#define N_storage (*(internalStorage_t*) PIC(&N_storage_real))
static const char const CONTRACT_ADDRESS[] = "New contract";
|
Fix test/recipes/80-test_ca.t to skip_all properly in a subtest
It's perfectlt ok to 'plan skip_all' in a subtest, but in that case,
it must really be inside the subtest.
Fixes | @@ -113,16 +113,18 @@ test_revoke('both_generalizedtime', {
sub test_revoke {
my ($filename, $opts) = @_;
- # Before Perl 5.12.0, the range of times Perl could represent was limited by
- # the size of time_t, so Time::Local was hamstrung by the Y2038 problem -
- # Perl 5.12.0 onwards use an internal time implementation with a guaranteed
- # >32-bit time range on all architectures, so the tests involving post-2038
- # times won't fail provided we're running under that version or newer
- if ($] < 5.012000) {
- plan skip_all => 'Perl >= 5.12.0 required to run certificate revocation tests';
- }
-
subtest "Revoke certificate and generate CRL: $filename" => sub {
+ # Before Perl 5.12.0, the range of times Perl could represent was
+ # limited by the size of time_t, so Time::Local was hamstrung by the
+ # Y2038 problem
+ # Perl 5.12.0 onwards use an internal time implementation with a
+ # guaranteed >32-bit time range on all architectures, so the tests
+ # involving post-2038 times won't fail provided we're running under
+ # that version or newer
+ plan skip_all =>
+ 'Perl >= 5.12.0 required to run certificate revocation tests'
+ if $] < 5.012000;
+
$ENV{CN2} = $filename;
ok(
run(app(['openssl',
|
Solve threading bug for new macos versions without pthread extensions. | #include <share.h>
#endif
#elif defined(__linux__) || \
- ((defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__) && (!defined(MAC_OS_X_VERSION_10_12) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12))
+ ((defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__)
#define _GNU_SOURCE
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/types.h>
-#elif ((defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__)) && (defined(MAC_OS_X_VERSION_10_12) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12)
- #include <pthread.h>
#elif defined(__FreeBSD__)
#include <sys/thr.h>
#elif defined(__HAIKU__) || defined(__BEOS__)
@@ -71,15 +69,7 @@ uint64_t thread_id_get_current(void)
return (uint64_t)syscall(SYS_gettid);
#endif
#elif (defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__)
- #if defined(MAC_OS_X_VERSION_10_12) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12
- uint64_t thread_id;
-
- pthread_threadid_np(NULL, &thread_id);
-
- return (uint64_t)thread_id;
- #else
return (uint64_t)syscall(SYS_thread_selfid);
- #endif
#elif defined(__FreeBSD__)
long thread_id = 0;
|
Use all available CPU cores on Travis | @@ -12,4 +12,4 @@ env:
- CMAKE_CALL="cmake -DZYAN_DEV_MODE=ON -DCMAKE_BUILD_TYPE=Release .."
script:
- - mkdir build && cd build && eval "${CMAKE_CALL}" && VERBOSE=1 make
+ - mkdir build && cd build && eval "${CMAKE_CALL}" && VERBOSE=1 make -j2
|
fixed IAR project add LIBS | @@ -54,13 +54,13 @@ def IARAddGroup(parent, name, files, project_path):
fn = f.rfile()
name = fn.name
path = os.path.dirname(fn.abspath)
-
basename = os.path.basename(path)
path = _make_path_relative(project_path, path)
path = os.path.join(path, name)
file = SubElement(group, 'file')
file_name = SubElement(file, 'name')
+
if os.path.isabs(path):
file_name.text = path.decode(fs_encoding)
else:
@@ -87,6 +87,18 @@ def IARProject(target, script):
LINKFLAGS = ''
CCFLAGS = ''
Libs = []
+ lib_prefix = ['lib', '']
+ lib_suffix = ['.a', '.o', '']
+
+ def searchLib(group):
+ for path_item in group['LIBPATH']:
+ for prefix_item in lib_prefix:
+ for suffix_item in lib_suffix:
+ lib_full_path = os.path.join(path_item, prefix_item + item + suffix_item)
+ if os.path.isfile(lib_full_path):
+ return lib_full_path
+ else:
+ return ''
# add group
for group in script:
@@ -106,16 +118,13 @@ def IARProject(target, script):
if group.has_key('LIBS') and group['LIBS']:
for item in group['LIBS']:
- lib_path = ''
-
- for path_item in group['LIBPATH']:
- full_path = os.path.join(path_item, item + '.a')
- if os.path.isfile(full_path): # has this library
- lib_path = full_path
-
+ lib_path = searchLib(group)
if lib_path != '':
lib_path = _make_path_relative(project_path, lib_path)
Libs += [lib_path]
+ # print('found lib isfile: ' + lib_path)
+ else:
+ print('not found LIB: ' + item)
# make relative path
paths = set()
|
Fixed use of IsGhostNodeType | @@ -911,7 +911,7 @@ vtkPLOT3DReader::ReadGrid(FILE *xyzFp)
unsigned char value = 0;
for (vtkIdType ptIdx = 0; ptIdx < numIds; ptIdx++)
{
- if (avtGhostData::IsGhostNodeType(ids->GetId(ptIdx), NODE_NOT_APPLICABLE_TO_PROBLEM))
+ if (avtGhostData::IsGhostNodeType(gnp[ids->GetId(ptIdx)], avtGhostNodeTypes::NODE_NOT_APPLICABLE_TO_PROBLEM))
{
// The node is iblanked, so the entire zone should be iblanked too.
avtGhostData::AddGhostZoneType(value, avtGhostZoneTypes::ZONE_NOT_APPLICABLE_TO_PROBLEM);
|
out_influxdb: fix escaping in string fields | static const uint64_t ONE_BILLION = 1000000000;
-static int influxdb_escape(char *out, const char *str, int size) {
+static int influxdb_escape(char *out, const char *str, int size, bool quote) {
int out_size = 0;
int i;
for (i = 0; i < size; ++i) {
char ch = str[i];
- if (isspace(ch) || ch == ',' || ch == '=' || ch == '"') {
+ if (quote ? (ch == '"') : (isspace(ch) || ch == ',' || ch == '=')) {
out[out_size++] = '\\';
}
out[out_size++] = ch;
@@ -159,7 +159,7 @@ int influxdb_bulk_append_kv(struct influxdb_bulk *bulk,
}
/* key */
- bulk->len += influxdb_escape(bulk->ptr + bulk->len, key, k_len);
+ bulk->len += influxdb_escape(bulk->ptr + bulk->len, key, k_len, false);
/* separator */
bulk->ptr[bulk->len] = '=';
@@ -170,7 +170,7 @@ int influxdb_bulk_append_kv(struct influxdb_bulk *bulk,
bulk->ptr[bulk->len] = '"';
bulk->len++;
}
- bulk->len += influxdb_escape(bulk->ptr + bulk->len, val, v_len);
+ bulk->len += influxdb_escape(bulk->ptr + bulk->len, val, v_len, quote);
if (quote) {
bulk->ptr[bulk->len] = '"';
bulk->len++;
|
fix: merge apdu.md into ethapp.asc | @@ -94,6 +94,8 @@ The address can be optionally checked on the device before being returned.
#### Description
+https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md
+
This command signs an Ethereum transaction after having the user validate the following parameters
- Gas price
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.