message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Fix path encoding, changed with latest Valhalla | @@ -410,7 +410,7 @@ namespace carto {
try {
tripDirections = directions.Build(directionsOptions, tripPath);
- std::vector<valhalla::midgard::PointLL> shape = valhalla::midgard::decode7<std::vector<PointLL> >(tripDirections.shape());
+ std::vector<valhalla::midgard::PointLL> shape = valhalla::midgard::decode<std::vector<PointLL> >(tripDirections.shape());
points.reserve(points.size() + shape.size());
epsg3857Points.reserve(epsg3857Points.size() + shape.size());
|
apps: Fix deprecation conditional in speed.c | @@ -1471,11 +1471,11 @@ int speed_main(int argc, char **argv)
#if !defined(OPENSSL_NO_CAST) && !defined(OPENSSL_NO_DEPRECATED_3_0)
CAST_KEY cast_ks;
#endif
+#ifndef OPENSSL_NO_DEPRECATED_3_0
static const unsigned char key16[16] = {
0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0,
0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12
};
-#ifndef OPENSSL_NO_DEPRECATED_3_0
static const unsigned char key24[24] = {
0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0,
0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12,
|
Migrate old non union events to union version | @@ -333,6 +333,24 @@ export const migrateFrom120To200Event = event => {
}
};
}
+ if(event.args && event.command === "EVENT_ACTOR_MOVE_TO") {
+ return {
+ ...event,
+ args: {
+ actorId: event.args.actorId,
+ x: {
+ type: "number",
+ value: event.args.x,
+ },
+ y: {
+ type: "number",
+ value: event.args.y,
+ },
+ useCollisions: false,
+ verticalFirst: false,
+ }
+ };
+ }
if(event.args && event.command === "EVENT_ACTOR_SET_POSITION_TO_VALUE") {
return {
...event,
@@ -350,6 +368,22 @@ export const migrateFrom120To200Event = event => {
}
};
}
+ if(event.args && event.command === "EVENT_ACTOR_SET_POSITION") {
+ return {
+ ...event,
+ args: {
+ actorId: event.args.actorId,
+ x: {
+ type: "number",
+ value: event.args.x,
+ },
+ y: {
+ type: "number",
+ value: event.args.y,
+ }
+ }
+ };
+ }
if(event.args && event.command === "EVENT_ACTOR_SET_DIRECTION_TO_VALUE") {
return {
...event,
@@ -363,6 +397,43 @@ export const migrateFrom120To200Event = event => {
}
};
}
+ if(event.args && event.command === "EVENT_ACTOR_SET_DIRECTION") {
+ return {
+ ...event,
+ args: {
+ actorId: event.args.actorId,
+ direction: {
+ type: "direction",
+ value: event.args.direction,
+ }
+ }
+ };
+ }
+ if(event.args && event.command === "EVENT_ACTOR_SET_FRAME_TO_VALUE") {
+ return {
+ ...event,
+ command: "EVENT_ACTOR_SET_FRAME",
+ args: {
+ actorId: event.args.actorId,
+ frame: {
+ type: "variable",
+ value: event.args.variable,
+ }
+ }
+ };
+ }
+ if(event.args && event.command === "EVENT_ACTOR_SET_FRAME") {
+ return {
+ ...event,
+ args: {
+ actorId: event.args.actorId,
+ frame: {
+ type: "number",
+ value: event.args.frame,
+ }
+ }
+ };
+ }
return event;
};
|
[numerics] fix wrong parameter in DGETRS call | @@ -151,7 +151,7 @@ int gfc3d_reformulation_local_problem(GlobalFrictionContactProblem* problem, Fri
#ifdef USE_NM_GESV
NM_gesv_expert(M,qtmp,NM_KEEP_FACTORS);
#else
- DGETRS(LA_NOTRANS, n, m, M->matrix0, n, ipiv, qtmp, 1, &infoDGETRS);
+ DGETRS(LA_NOTRANS, n, 1, M->matrix0, n, ipiv, qtmp, n, &infoDGETRS);
#endif
|
Include arch in ubuntu/debian repo instructions
See | @@ -139,7 +139,7 @@ alternative option below.
$ wget -O - https://deb.goaccess.io/gnugpg.key | gpg --dearmor \
| sudo tee /usr/share/keyrings/goaccess.gpg >/dev/null
- $ echo "deb [signed-by=/usr/share/keyrings/goaccess.gpg] https://deb.goaccess.io/ $(lsb_release -cs) main" \
+ $ echo "deb [signed-by=/usr/share/keyrings/goaccess.gpg arch=$(dpkg --print-architecture)] https://deb.goaccess.io/ $(lsb_release -cs) main" \
| sudo tee /etc/apt/sources.list.d/goaccess.list
$ sudo apt-get update
$ sudo apt-get install goaccess
|
hv: fixup format of log message in vm_load.c | @@ -151,7 +151,7 @@ int general_sw_loader(struct vm *vm, struct vcpu *vcpu)
if (is_vcpu_bsp(vcpu)) {
/* Set VCPU entry point to kernel entry */
vcpu->entry_addr = sw_kernel->kernel_entry_addr;
- pr_info("%s, VM *d VCPU %hu Entry: 0x%016llx ",
+ pr_info("%s, VM %hu VCPU %hu Entry: 0x%016llx ",
__func__, vm->vm_id, vcpu->vcpu_id, vcpu->entry_addr);
}
|
Failure of set_safety_mode falls back to SILENT. Failure to set silent results in hanging | @@ -117,9 +117,16 @@ void EXTI3_IRQHandler(void) {
void set_safety_mode(uint16_t mode, int16_t param) {
int err = set_safety_hooks(mode, param);
if (err == -1) {
- puts("Error: safety set mode failed\n");
- while (true) {} // ERROR: we can't continue if safety mode isn't succesfully set
- } else {
+ puts("Error: safety set mode failed. Falling back to SILENT\n");
+ mode = SAFETY_SILENT;
+ err = set_safety_hooks(mode, 0);
+ if (err == -1) {
+ puts("Error: Failed setting SILENT mode. Hanging\n");
+ while (true) {
+ // TERMINAL ERROR: we can't continue if SILENT safety mode isn't succesfully set
+ }
+ }
+ }
switch (mode) {
case SAFETY_SILENT:
set_intercept_relay(false);
@@ -154,7 +161,6 @@ void set_safety_mode(uint16_t mode, int16_t param) {
}
can_init_all();
}
-}
// ***************************** USB port *****************************
|
safe method get icon for foreground | @@ -378,7 +378,18 @@ public class RhodesService extends Service {
Logger.D(TAG, "innerStartForeground() prepare builder PRE");
Builder builder = AndroidFunctionalityManager.getAndroidFunctionality().getNotificationBuilder(this, CHANNEL_ID, "Rhomobile Platform Service");
Logger.D(TAG, "innerStartForeground() prepare builder 1");
+
+ try {
+ android.content.res.Resources res = getContext().getPackageManager()
+ .getResourcesForApplication(getApplicationContext().getPackageName());
+ int id_icon = res.getIdentifier("icon", "mipmap", getApplicationContext().getPackageName());
+ builder.setSmallIcon(id_icon);
+ } catch (Exception e) {
builder.setSmallIcon(R.mipmap.icon);
+ Logger.E(TAG, "Resources of icon not found!!!");
+ }
+
+
Logger.D(TAG, "innerStartForeground() prepare builder 2");
builder.setPriority(Notification.PRIORITY_HIGH);
Logger.D(TAG, "innerStartForeground() prepare builder 3");
|
Delete frc when all outstanding crypto data is acknowledged | @@ -1332,6 +1332,18 @@ static size_t conn_retry_early_payloadlen(ngtcp2_conn *conn) {
return 0;
}
+static void conn_cryptofrq_clear(ngtcp2_conn *conn, ngtcp2_pktns *pktns) {
+ ngtcp2_frame_chain *frc;
+ ngtcp2_ksl_it it;
+
+ for (it = ngtcp2_ksl_begin(&pktns->crypto.tx.frq); !ngtcp2_ksl_it_end(&it);
+ ngtcp2_ksl_it_next(&it)) {
+ frc = ngtcp2_ksl_it_get(&it);
+ ngtcp2_frame_chain_del(frc, conn->mem);
+ }
+ ngtcp2_ksl_clear(&pktns->crypto.tx.frq);
+}
+
/*
* conn_cryptofrq_unacked_offset returns the CRYPTO frame offset by
* taking into account acknowledged offset. If there is no data to
@@ -1868,6 +1880,7 @@ static ngtcp2_ssize conn_write_handshake_pkt(ngtcp2_conn *conn, uint8_t *dest,
crypto_offset = conn_cryptofrq_unacked_offset(conn, pktns);
if (crypto_offset == (size_t)-1) {
+ conn_cryptofrq_clear(conn, pktns);
break;
}
@@ -2765,6 +2778,7 @@ static ngtcp2_ssize conn_write_pkt(ngtcp2_conn *conn, uint8_t *dest,
crypto_offset = conn_cryptofrq_unacked_offset(conn, pktns);
if (crypto_offset == (size_t)-1) {
+ conn_cryptofrq_clear(conn, pktns);
break;
}
|
Fix refreshing plugin nodes after disabling a plugin | * plugins
*
* Copyright (C) 2010-2011 wj32
- * Copyright (C) 2017 dmex
+ * Copyright (C) 2017-2018 dmex
*
* This file is part of Process Hacker.
*
@@ -782,9 +782,8 @@ INT_PTR CALLBACK PhpPluginsDlgProc(
PhSetPluginDisabled(&baseNameRef, TRUE);
- ClearPluginsTree(context);
- PhpEnumerateLoadedPlugins(context);
- TreeNew_AutoSizeColumn(context->TreeNewHandle, PH_PLUGIN_TREE_COLUMN_ITEM_NAME, TN_AUTOSIZE_REMAINING_SPACE);
+ RemovePluginsNode(context, selectedNode);
+
SetWindowText(GetDlgItem(hwndDlg, IDC_DISABLED), PhaFormatString(L"Disabled Plugins (%lu)", PhpDisabledPluginsCount())->Buffer);
}
break;
|
Fix bug in "dotnet" module. Use "counter" instead of "i" where required. | @@ -1002,7 +1002,7 @@ void dotnet_parse_tilde_2(
if (name != NULL)
{
- set_string(name, pe->object, "modulerefs[%i]", i);
+ set_string(name, pe->object, "modulerefs[%i]", counter);
counter++;
}
@@ -1276,17 +1276,17 @@ void dotnet_parse_tilde_2(
// Add 4 to skip the size.
set_integer(resource_base + resource_offset + 4,
- pe->object, "resources[%i].offset", i);
+ pe->object, "resources[%i].offset", counter);
set_integer(resource_size,
- pe->object, "resources[%i].length", i);
+ pe->object, "resources[%i].length", counter);
name = pe_get_dotnet_string(pe,
string_offset,
DOTNET_STRING_INDEX(manifestresource_table->Name));
if (name != NULL)
- set_string(name, pe->object, "resources[%i].name", i);
+ set_string(name, pe->object, "resources[%i].name", counter);
row_ptr += row_size;
counter++;
|
Travis: Do not install `shfmt` twice
The Travis image of Ubuntu [Bionic Beaver][] already contains `shfmt`.
[Bionic Beaver]: | @@ -239,9 +239,6 @@ before_install:
sudo apt-get install libxerces-c-dev
sudo apt-get install moreutils # contains `sponge` required by `reformat-cmake`
sudo pip install cmake-format[yaml]==0.5.4
- mkdir -p "$HOME/bin" && cd "$HOME/bin" && \
- curl -L "https://github.com/mvdan/sh/releases/download/v2.6.3/shfmt_v2.6.3_linux_amd64" -o shfmt && \
- chmod u+x shfmt && export PATH=$PATH:"$HOME/bin"
fi
#
|
test/inductive_charging.c: Format with clang-format
BRANCH=none
TEST=none | #define START_CHARGE_DELAY 5000 /* ms */
#define MONITOR_CHARGE_DONE_DELAY 1000 /* ms */
-#define TEST_CHECK_CHARGE_DELAY (START_CHARGE_DELAY + \
- MONITOR_CHARGE_DONE_DELAY + 500) /* ms */
+#define TEST_CHECK_CHARGE_DELAY \
+ (START_CHARGE_DELAY + MONITOR_CHARGE_DONE_DELAY + 500) /* ms */
static void wait_for_lid_debounce(void)
{
|
Improve emit | @@ -64,6 +64,9 @@ typedef struct lookup_table_s {
int instance;
lookup_table_entry_info_t entry;
+#ifdef T4P4S_DEBUG
+ int init_entry_count;
+#endif
} lookup_table_t;
typedef struct field_reference_s {
@@ -117,7 +120,10 @@ typedef struct header_descriptor_s {
void * pointer;
uint32_t length;
int var_width_field_bitwidth;
+ bool was_enabled_at_initial_parse;
+#ifdef T4P4S_DEBUG
char* name;
+#endif
} header_descriptor_t;
typedef struct packet_descriptor_s {
@@ -134,7 +140,6 @@ typedef struct packet_descriptor_s {
// note: it is possible to emit a header more than once; +8 is a reasonable upper limit for emits
int header_reorder[HEADER_INSTANCE_COUNT+8];
uint8_t header_tmp_storage[HEADER_INSTANCE_TOTAL_LENGTH];
- uint8_t header_emit_storage[HEADER_INSTANCE_TOTAL_LENGTH];
void * control_locals;
} packet_descriptor_t;
|
Fix/tweak to the previous commit. The change should also improve handling of Torque layers | @@ -288,7 +288,10 @@ namespace carto {
}
for (std::pair<MapTile, int> childTileCount : childTileCountMap) {
if (childTileCount.second >= 2) {
- fetchTileList.push_back({ childTileCount.first, false, PARENT_PRIORITY_OFFSET + childTileCount.second - 2 });
+ long long tileId = getTileId(childTileCount.first);
+ if (!tileExists(tileId, false) && !tileExists(tileId, true)) {
+ fetchTileList.push_back({ childTileCount.first, false, PARENT_PRIORITY_OFFSET });
+ }
}
}
|
missing identity operator | @@ -359,6 +359,7 @@ void opt_reg_configure(unsigned int N, const long img_dims[N], struct opt_reg_s*
unsigned int K = (md_calc_size(N, thresh_dims) / 100) * regs[nr].k;
debug_printf(DP_INFO, "k = %d%%, actual K = %d\n", regs[nr].k, K);
+ trafos[nr] = linop_identity_create(DIMS, img_dims);
prox_ops[nr] = prox_niht_thresh_create(N, img_dims, K, regs[nr].jflags);
debug_printf(DP_INFO, "NIHTIM initialization complete\n");
break;
@@ -500,6 +501,5 @@ void opt_reg_free(struct opt_reg_s* ropts, const struct operator_p_s* prox_ops[N
operator_p_free(prox_ops[nr]);
linop_free(trafos[nr]);
-
}
}
|
Force JAVA reindexing to switch to new yndex proto | @@ -44,6 +44,7 @@ def just_do_it(java, kythe, kythe_to_proto, out_name, binding_only, kindexes):
print >> sys.stderr, '[INFO] Preprocessing execution time:', (datetime.datetime.now() - preprocess_start).total_seconds(), 'seconds'
print >> sys.stderr, '[INFO] Total execution time:', (datetime.datetime.now() - start).total_seconds(), 'seconds'
+
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("--java", help="java path")
|
Prototype check_range(). | @@ -2857,7 +2857,7 @@ entity *check_block_obstacle(entity *entity);
int check_block_wall(entity *entity);
int colorset_timed_expire(entity *ent);
int check_lost();
-
+int check_range(entity *ent, entity *target, e_animations animation_id);
void generate_basemap(int map_index, float rx, float rz, float x_size, float z_size, float min_a, float max_a, int x_cont);
int testmove(entity *, float, float, float, float);
|
docs: ignore duplicate def warning in BT docs | @@ -28,7 +28,9 @@ README.rst:line: WARNING: Duplicate declaration, esp_err_t ulp_run(uint32_t entr
# This seems like a bug, as the field are ::model_id and ::vnd::model_id
esp_ble_mesh_defs.inc:line: WARNING: Duplicate declaration, uint16_t esp_ble_mesh_model::model_id
-
+WARNING:esp_bt_defs, use :noindex: for one of them
+WARNING:esp_blufi, use :noindex: for one of them
+esp_bt_defs.inc:line: WARNING: Duplicate declaration, uint8_t esp_bd_addr_t[ESP_BD_ADDR_LEN]
#
# Issue present only when building on msys2 / mingw32 START >>>
|
bmi270: revert hack odr | @@ -131,8 +131,7 @@ uint8_t bmi270_configure() {
bmi270_write(BMI270_REG_ACC_RANGE, BMI270_ACC_RANGE_16G);
time_delay_ms(1);
- // HACK: this ODR is marked "reserved" in the datasheet, no idea if it will really go this fast
- bmi270_write(BMI270_REG_GYRO_CONF, (BMI270_GYRO_CONF_FILTER_PERF << 7) | (BMI270_GYRO_CONF_NOISE_PERF << 6) | (BMI270_GYRO_CONF_BWP << 4) | BMI270_GYRO_CONF_ODR12800);
+ bmi270_write(BMI270_REG_GYRO_CONF, (BMI270_GYRO_CONF_FILTER_PERF << 7) | (BMI270_GYRO_CONF_NOISE_PERF << 6) | (BMI270_GYRO_CONF_BWP << 4) | BMI270_GYRO_CONF_ODR3200);
time_delay_ms(1);
bmi270_write(BMI270_REG_GYRO_RANGE, BMI270_GYRO_RANGE_2000DPS);
|
[CI] Enable builds for Rust branch | @@ -4,9 +4,9 @@ name: axle CI
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
- branches: [ master, uefi-bootloader, build-in-ci ]
+ branches: [ master, uefi-bootloader, build-in-ci, rust-support ]
pull_request:
- branches: [ master, uefi-bootloader, build-in-ci ]
+ branches: [ master, uefi-bootloader, build-in-ci, rust-support ]
# Allows running the workflow manually from the Actions tab
workflow_dispatch:
@@ -37,8 +37,7 @@ jobs:
path: |
x86_64-toolchain
axle-sysroot
- # TODO(PT): Change the cache key once the old cache is evicted
- key: libc-and-toolchain-2
+ key: libc-and-toolchain
- name: Build libc and toolchain
shell: bash
|
test: fix resource exists check | @@ -440,11 +440,9 @@ func (e *e2e) exists(args ...string) bool {
output, err := command.New(
e.kubectlPath, append([]string{"get"}, args...)...,
).RunSilent()
- if err != nil {
+ e.Nil(err)
return !strings.Contains(output.Error(), "not found")
}
- return true
-}
func (e *e2e) getSeccompPolicyID(profile string) string {
ns := e.getCurrentContextNamespace(defaultNamespace)
|
doc: design: fix image flags
Copy up to date image flags from image.h. Fixes for:
Wrong comment for IMAGE_F_ECDSA224_SHA256
Missing definition for IMAGE_F_PKCS1_PSS_RSA2048_SHA256 | @@ -79,12 +79,13 @@ struct image_tlv {
/*
* Image header flags.
*/
-#define IMAGE_F_PIC 0x00000001 /* Not currently supported. */
-#define IMAGE_F_SHA256 0x00000002 /* Image contains hash TLV */
+#define IMAGE_F_PIC 0x00000001 /* Not supported. */
+#define IMAGE_F_SHA256 0x00000002 /* Hash TLV is present */
#define IMAGE_F_PKCS15_RSA2048_SHA256 0x00000004 /* PKCS15 w/RSA and SHA */
-#define IMAGE_F_ECDSA224_SHA256 0x00000008 /* ECDSA256 over SHA256 */
+#define IMAGE_F_ECDSA224_SHA256 0x00000008 /* ECDSA224 over SHA256 */
#define IMAGE_F_NON_BOOTABLE 0x00000010 /* Split image app. */
#define IMAGE_F_ECDSA256_SHA256 0x00000020 /* ECDSA256 over SHA256 */
+#define IMAGE_F_PKCS1_PSS_RSA2048_SHA256 0x00000040 /* PKCS1 PSS */
/*
* Image trailer TLV types.
|
keyword/api should have space before | @@ -2119,7 +2119,7 @@ void parseCode(const tic_script_config* config, const char* start, u8* color, co
ptr += strlen(config->singleComment);
continue;
}
- else if(isalpha_(c))
+ else if(isalpha_(c) && isspace(ptr[-1]))
{
wordStart = ptr;
ptr++;
|
nrf/modules/music: Remove init of softpwm/ticker upon music module load.
Also update microbit_music_init0 to register low priority ticker callback
for the music module. | @@ -77,10 +77,7 @@ extern volatile uint32_t ticks;
STATIC uint32_t start_note(const char *note_str, size_t note_len, const pin_obj_t *pin);
void microbit_music_init0(void) {
- softpwm_init();
- ticker_init(microbit_music_tick);
- ticker_start();
- pwm_start();
+ ticker_register_low_pri_callback(microbit_music_tick);
}
void microbit_music_tick(void) {
@@ -460,8 +457,6 @@ MP_DEFINE_CONST_FUN_OBJ_KW(microbit_music_set_tempo_obj, 0, microbit_music_set_t
static mp_obj_t music_init(void) {
- microbit_music_init0();
-
music_data = m_new_obj(music_data_t);
music_data->bpm = DEFAULT_BPM;
music_data->ticks = DEFAULT_TICKS;
|
u-boot: drop backported patches
U-boot has been updated to 2017.01 in poky/oe-core which contains these
patches. | -FILESEXTRAPATHS_prepend_rpi := "${THISDIR}/files:"
RDEPENDS_${PN}_append_rpi = " rpi-u-boot-scr"
-SRC_URI_append_rpi = " \
- file://0001-arm-add-save_boot_params-for-ARM1176.patch \
- file://0002-rpi-passthrough-of-the-firmware-provided-FDT-blob.patch \
- "
|
mINI: Remove unnecessary macro | @@ -142,7 +142,7 @@ static inline int closeFileRead (FILE * file, int errorNumber, Key * parentKey)
return ELEKTRA_PLUGIN_STATUS_SUCCESS;
}
-static int parseFile (KeySet * returned ELEKTRA_UNUSED, Key * parentKey)
+static int parseFile (KeySet * returned, Key * parentKey)
{
ELEKTRA_LOG ("Read configuration data");
int errorNumber = errno;
|
ST7789: Fix 240x240 display rotations. | @@ -119,18 +119,45 @@ namespace pimoroni {
// 240x240 Square and Round LCD Breakouts
if(width == 240 && height == 240) {
- caset[0] = 0;
- caset[1] = 239;
- if(round) {
- raset[0] = 40;
- raset[1] = 279;
- } else {
- raset[0] = rotate180 ? 80 : 0;
- raset[1] = rotate180 ? 329 : 239;
+ int row_offset = round ? 40 : 80;
+ int col_offset = 0;
+
+ switch(rotate) {
+ case ROTATE_0:
+ if (!round) row_offset = 0;
+ caset[0] = col_offset;
+ caset[1] = width + col_offset - 1;
+ raset[0] = row_offset;
+ raset[1] = width + row_offset - 1;
+
+ madctl = MADCTL::HORIZ_ORDER;
+ break;
+ case ROTATE_90:
+ if (!round) row_offset = 0;
+ caset[0] = row_offset;
+ caset[1] = width + row_offset - 1;
+ raset[0] = col_offset;
+ raset[1] = width + col_offset - 1;
+
+ madctl = MADCTL::HORIZ_ORDER | MADCTL::COL_ORDER | MADCTL::SWAP_XY;
+ break;
+ case ROTATE_180:
+ caset[0] = col_offset;
+ caset[1] = width + col_offset - 1;
+ raset[0] = row_offset;
+ raset[1] = width + row_offset - 1;
+
+ madctl = MADCTL::HORIZ_ORDER | MADCTL::COL_ORDER | MADCTL::ROW_ORDER;
+ break;
+ case ROTATE_270:
+ caset[0] = row_offset;
+ caset[1] = width + row_offset - 1;
+ raset[0] = col_offset;
+ raset[1] = width + col_offset - 1;
+
+ madctl = MADCTL::ROW_ORDER | MADCTL::SWAP_XY;
+ break;
}
- madctl = rotate180 ? (MADCTL::COL_ORDER | MADCTL::ROW_ORDER) : 0;
- if (rotate == ROTATE_90) madctl |= MADCTL::SWAP_XY;
- madctl |= MADCTL::HORIZ_ORDER;
}
// Pico Display
|
swaybar: properly draw urgent block right border
introduced via
uncovered via | @@ -307,7 +307,7 @@ static uint32_t render_status_block(struct render_context *ctx,
render_text(cairo, config->font, 1, block->markup, "%s", text);
x_pos += width;
- if (block->border && block->border_right > 0) {
+ if (border_color && block->border_right > 0) {
x_pos += margin;
render_sharp_line(cairo, border_color, x_pos, y_pos,
block->border_right, render_height);
|
kiln: fil and dir not ~ | (clap a b furl)
|- ^- (list (unit toro))
=+ b=.^(arch %cy a)
- ?^ fil.b (snoc c `(fray a))
+ ?: ?=([^ ~] b) (snoc c `(fray a))
+ =? c ?=(^ fil.b) (snoc c `(fray a))
%- zing
%+ turn ~(tap by dir.b)
|= [kid=@ta ~]
|
add NULL check in _mi_segment_of | @@ -285,8 +285,9 @@ void _mi_segment_map_freed_at(const mi_segment_t* segment) {
// Determine the segment belonging to a pointer or NULL if it is not in a valid segment.
static mi_segment_t* _mi_segment_of(const void* p) {
+ if (p == NULL) return NULL;
mi_segment_t* segment = _mi_ptr_segment(p);
- if (segment == NULL) return NULL;
+ mi_assert_internal(segment != NULL);
size_t bitidx;
size_t index = mi_segment_map_index_of(segment, &bitidx);
// fast path: for any pointer to valid small/medium/large object or first MI_SEGMENT_SIZE in huge
|
script: remove commented out JAVA_HOME code | @@ -11,16 +11,6 @@ if [ -d "$1" ]; then
SOURCE=$(readlink -f "$1")
fi
-# set JAVA_HOME if you want to use a non-default Java.
-#cd /opt
-#JAVA_IN_OPT=$(readlink -f $(find . -maxdepth 1 -name 'jdk*' -print -quit))
-#
-#if [ "x$JAVA_HOME" = "x" -a "x$JAVA_IN_OPT" != "x" ]
-#then
-# export JAVA_HOME="$JAVA_IN_OPT"
-#fi
-#echo "Using java home: $JAVA_HOME"
-
if [ "$SOURCE" = "$BUILD" ]; then
if echo $* | grep FORCE_IN_SOURCE_BUILD=ON; then
echo "Warning: in-source build!"
|
Fix possible memory leak
fixes | @@ -855,6 +855,7 @@ stlink_t *stlink_open_usb(enum ugly_loglevel verbose, bool reset, char serial[16
if (ret != 0) {
WLOG("Error %d (%s) opening ST-Link/V2 device %03d:%03d\n",
ret, strerror (errno), libusb_get_bus_number(list[cnt]), libusb_get_device_address(list[cnt]));
+ libusb_free_device_list(list, 1);
goto on_error;
}
}
|
README.md: Use version 2.04.79 | @@ -20,11 +20,11 @@ Packages for Qt4 and Raspbian Wheezy are available but not described here.
##### Install deCONZ and development package
1. Download deCONZ package
- wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.04.78-qt5.deb
+ wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.04.79-qt5.deb
2. Install deCONZ package
- sudo dpkg -i deconz-2.04.78-qt5.deb
+ sudo dpkg -i deconz-2.04.79-qt5.deb
3. Install missing dependencies
@@ -32,11 +32,11 @@ Packages for Qt4 and Raspbian Wheezy are available but not described here.
4. Download deCONZ development package
- wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.04.78.deb
+ wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.04.79.deb
5. Install deCONZ development package
- sudo dpkg -i deconz-dev-2.04.78.deb
+ sudo dpkg -i deconz-dev-2.04.79.deb
##### Get and compile the plugin
1. Checkout the repository
@@ -46,7 +46,7 @@ Packages for Qt4 and Raspbian Wheezy are available but not described here.
2. Checkout related version tag
cd deconz-rest-plugin
- git checkout -b mybranch V2_04_78
+ git checkout -b mybranch V2_04_79
3. Compile the plugin
|
Fix a Travis failure
Declare a variable as static to silence the warning | @@ -753,7 +753,7 @@ typedef struct sigalg_lookup_st {
int sig;
} SIGALG_LOOKUP;
-SIGALG_LOOKUP sigalg_lookup_tbl[] = {
+static SIGALG_LOOKUP sigalg_lookup_tbl[] = {
{TLSEXT_SIGALG_ecdsa_secp256r1_sha256, NID_sha256, EVP_PKEY_EC},
{TLSEXT_SIGALG_ecdsa_secp384r1_sha384, NID_sha384, EVP_PKEY_EC},
{TLSEXT_SIGALG_ecdsa_secp521r1_sha512, NID_sha512, EVP_PKEY_EC},
|
tool: elektra - fix webui dockerfile | FROM ubuntu:16.04
# elektra deps
+RUN apt-get update
+RUN apt-get install -y software-properties-common
+RUN add-apt-repository ppa:longsleep/golang-backports
RUN apt-get update -y && apt-get install -y cmake git build-essential libyajl-dev curl nodejs-legacy npm
+ENV GO111MODULE=on
+ENV LD_LIBRARY_PATH=/usr/local/lib
+
# elektra web deps
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
-RUN apt-get install -y nodejs golang
+RUN apt-get install -y nodejs golang-go
# Google Test
ENV GTEST_ROOT=/opt/gtest
|
Fix for double free on fclose due to GC not knowing it failed | @@ -279,7 +279,10 @@ static Janet cfun_io_fclose(int32_t argc, Janet *argv) {
return janet_wrap_integer(WEXITSTATUS(status));
#endif
} else {
- if (fclose(iof->file)) janet_panic("could not close file");
+ if (fclose(iof->file)) {
+ iof->flags |= JANET_FILE_NOT_CLOSEABLE;
+ janet_panic("could not close file");
+ }
iof->flags |= JANET_FILE_CLOSED;
return janet_wrap_nil();
}
|
Can't deprecate alias libraries | @@ -23,11 +23,8 @@ target_include_directories(clap INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
-# Older versions of the CLAP interfaces only defined a `clap-core` library.
-# Exposing the main library with the same name as the project makes it much
-# simpler for build systems to find the CLAP package.
+# `clap-core` is deprecated, please `clap` instead.
add_library(clap-core ALIAS clap)
-set_target_properties(clap-core PROPERTIES DEPRECATION "Link against clap instead of clap-core")
include(GNUInstallDirs)
install(DIRECTORY "include/clap" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
|
Add Zen thermostat after resolving merge conflicts | @@ -1101,7 +1101,8 @@ int DeRestPluginPrivate::changeSensorConfig(const ApiRequest &req, ApiResponse &
rspItem["success"] = rspItemState;
}
else if (sensor->modelId() == QLatin1String("SLR2") || //Hive
- sensor->modelId().startsWith(QLatin1String("TH112")) ) // Sinope
+ sensor->modelId().startsWith(QLatin1String("TH112")) || // Sinope
+ sensor->modelId().startsWith(QLatin1String("Zen-01"))) // Zen
{
QString mode_set = map[pi.key()].toString();
|
Improve compiler check for Wimplicit-fallthrough | @@ -126,8 +126,8 @@ int CLR_RT_UnicodeHelper::CountNumberOfBytes( int max )
// the switch cases to improve the algorithm
#ifdef __GNUC__
#pragma GCC diagnostic push
-// the GCC compiler for ESP32 doesn't know the -Wimplicit-fallthrough option
-#ifndef PLATFORM_ESP32
+// -Wimplicit-fallthrough option was added in GCC 7
+#if (__GNUC__ >= 7)
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
#endif
|
[catboost/java] add copyRowMajorPredictions() as requested by glebwin@ | @@ -101,6 +101,17 @@ public class CatBoostPredictions {
return predictions;
}
+ /**
+ * Return row-major copy of prediction matrix. Prediction for object with index `i` in dimension `j` will be at
+ * `i*getPredictionDimension() + j`.
+ *
+ * @return Row-major copy of prediction matrix.
+ */
+ @NotNull
+ public double[] copyRowMajorPredictions() {
+ return data;
+ }
+
@NotNull
double[] getRawData() {
return data;
|
cmd/kubectl-gadget: Export GetTraceListFromOptions().
This function was privated but it can be useful to have it as public. | @@ -96,6 +96,9 @@ type TraceConfig struct {
// Parameters is used to pass specific gadget configurations.
Parameters map[string]string
+
+ // AdditionalLabels is used to pass specific labels to traces.
+ AdditionalLabels map[string]string
}
func init() {
@@ -384,6 +387,15 @@ func CreateTrace(config *TraceConfig) (string, error) {
},
}
+ for key, value := range config.AdditionalLabels {
+ v, ok := trace.ObjectMeta.Labels[key]
+ if ok {
+ return "", fmt.Errorf("label %q is already present with value %q", key, v)
+ }
+
+ trace.ObjectMeta.Labels[key] = value
+ }
+
err := createTraces(trace)
if err != nil {
return "", err
@@ -407,9 +419,9 @@ func CreateTrace(config *TraceConfig) (string, error) {
return traceID, nil
}
-// getTraceListFromOptions returns a list of traces corresponding to the given
+// GetTraceListFromOptions returns a list of traces corresponding to the given
// options.
-func getTraceListFromOptions(listTracesOptions metav1.ListOptions) (*gadgetv1alpha1.TraceList, error) {
+func GetTraceListFromOptions(listTracesOptions metav1.ListOptions) (*gadgetv1alpha1.TraceList, error) {
traceClient, err := getTraceClient()
if err != nil {
return nil, err
@@ -428,7 +440,7 @@ func getTraceListFromID(traceID string) (*gadgetv1alpha1.TraceList, error) {
LabelSelector: fmt.Sprintf("%s=%s", GlobalTraceID, traceID),
}
- traces, err := getTraceListFromOptions(listTracesOptions)
+ traces, err := GetTraceListFromOptions(listTracesOptions)
if err != nil {
return traces, fmt.Errorf("failed to get traces from traceID %q: %w", traceID, err)
}
@@ -824,7 +836,7 @@ func getTraceListFromParameters(config *TraceConfig) ([]gadgetv1alpha1.Trace, er
LabelSelector: labelsFromFilter(filter),
}
- traces, err := getTraceListFromOptions(listTracesOptions)
+ traces, err := GetTraceListFromOptions(listTracesOptions)
if err != nil {
return []gadgetv1alpha1.Trace{}, err
}
@@ -1068,7 +1080,7 @@ func ListTracesByGadgetName(gadget string) ([]gadgetv1alpha1.Trace, error) {
LabelSelector: fmt.Sprintf("gadgetName=%s", gadget),
}
- traces, err := getTraceListFromOptions(listTracesOptions)
+ traces, err := GetTraceListFromOptions(listTracesOptions)
if err != nil {
return nil, fmt.Errorf("failed to get traces by gadget name: %w", err)
}
|
mangle: mangle_Bytes - limit size to 2 bytes | @@ -115,15 +115,15 @@ static void mangle_MemMove(run_t* run, bool printable HF_ATTR_UNUSED) {
static void mangle_Bytes(run_t* run, bool printable) {
size_t off = mangle_getOffSet(run);
- uint64_t buf;
+ uint16_t buf;
if (printable) {
util_rndBufPrintable((uint8_t*)&buf, sizeof(buf));
} else {
buf = util_rnd64();
}
- /* Overwrite with random 1-8-byte values */
- size_t toCopy = util_rndGet(1, 8);
+ /* Overwrite with random 1-2-byte values */
+ size_t toCopy = util_rndGet(1, 2);
mangle_Overwrite(run, (uint8_t*)&buf, off, toCopy);
}
|
wrap mouse result in tuple_n | @@ -750,7 +750,7 @@ static Janet janet_mouse(int32_t argc, Janet* argv)
result[5] = janet_wrap_number(mouse->scrollx);
result[6] = janet_wrap_number(mouse->scrolly);
- return janet_wrap_tuple(&result);
+ return janet_wrap_tuple(janet_tuple_n(result, 7));
}
static Janet janet_circ(int32_t argc, Janet* argv)
|
added weak cindidate based on wpa-sec analysis | @@ -276,28 +276,28 @@ static const char *wordlist[] =
"orange", "owl", "oxygen",
"palm", "panda", "pant", "parade", "park", "pastel", "patron", "pear",
"pencil", "perfect", "phobic", "phoenix", "phone", "piano", "pink", "plain",
-"planet", "pledge", "plum", "pocket", "polite", "pond", "poodle", "potato",
-"prairie", "praise", "prose", "proud", "puppy", "purple", "quail", "quaint",
-"quick", "quiet", "quote",
+"plane", "planet", "pledge", "plum", "pocket", "polite", "pond", "poodle",
+"potato", "prairie", "praise", "precious", "prose", "proud", "puppy", "purple",
+"quail", "quaint", "quick", "quiet", "quote",
"rabbit", "raccoon", "raft", "rain", "rapid", "raven", "reason", "red",
"remedy", "review", "reward", "river", "road", "robin", "rock", "rocket",
"rocky", "rosebud", "round", "royal", "runner", "rustic",
"safety", "salute", "scary", "sea", "seed", "shark", "sheep", "shelf",
"shiny", "ship", "shirt", "shoe", "short", "shrub", "silent", "silky",
-"silly", "skates", "sky", "sled", "slow", "small", "smart", "smiley",
-"smiling", "smooth", "snail", "snake", "soccer", "socks", "space", "spark",
-"sparrow", "spider", "spirit", "square", "squash", "squirrel", "stable", "star",
-"state", "statue", "stealth", "still", "stove", "straw", "street", "strong",
-"studio", "summit", "sun", "sunny", "super", "sweet", "swift",
+"silly", "silver", "skates", "sky", "sled", "slow", "small", "smart",
+"smiley", "smiling", "smooth", "snail", "snake", "soccer", "socks", "space",
+"spark", "sparrow", "spider", "spirit", "square", "squash", "squirrel", "stable",
+"star", "state", "statue", "stealth", "still", "stove", "straw", "street",
+"strong", "studio", "summit", "sun", "sunny", "super", "sweet", "swift",
"table", "tablet", "tall", "teal", "teapot", "tent", "terrific", "theory",
"thirsty", "tiger", "timber", "tiny", "tomato", "town", "trail", "train",
"tree", "truck", "trumpet", "tuba", "tulip", "turkey", "turtle",
"uneven", "unicorn", "union", "unit", "unusual", "urban", "useful",
"valley", "vanilla", "vase", "vast", "verse", "violet", "violin",
-"wagon", "warm", "watch", "water", "watery", "wealth", "west", "whale",
-"wide", "wind", "window", "windy", "witty", "wolf", "wonderful", "wooden",
-"writer",
-"yard", "yellow", "young",
+"wagon", "walnut", "warm", "watch", "water", "watery", "wealth", "west",
+"whale", "wide", "wind", "window", "windy", "witty", "wolf", "wonderful",
+"wooden", "writer",
+"yacht", "yard", "year", "yellow", "young",
"zany", "zeal", "zebra", "zoo"
};
|
test: fix `find_cmake.sh` path in node's environment setup | @@ -27,8 +27,8 @@ if [ "$OS" == "Windows_NT" ]; then
CMAKE=/cygdrive/c/cmake/bin/cmake
ADDITIONAL_CMAKE_FLAGS="-Thost=x64 -A x64"
else
- chmod u+x ./.evergreen/find-cmake.sh
- . ./.evergreen/find-cmake.sh
+ chmod u+x ./.evergreen/find_cmake.sh
+ . ./.evergreen/find_cmake.sh
fi
# this needs to be explicitly exported for the nvm install below
|
pbio: don't call motorcontrol_poll too frequently | @@ -44,6 +44,7 @@ void pbio_poll(void) {
if (now - prev_fast_poll_time >= 2) {
_pbdrv_adc_poll(now);
_pbdrv_ioport_poll(now);
+ _pbio_motorcontrol_poll();
prev_fast_poll_time = now;
}
if (now - prev_slow_poll_time >= 32) {
@@ -51,7 +52,6 @@ void pbio_poll(void) {
_pbsys_poll(now);
prev_slow_poll_time = now;
}
- _pbio_motorcontrol_poll();
}
#ifdef PBIO_CONFIG_ENABLE_DEINIT
|
Fix column chooser window font | @@ -668,6 +668,7 @@ INT_PTR CALLBACK PhpColumnsDlgProc(
HDC bufferDc;
HBITMAP bufferBitmap;
HBITMAP oldBufferBitmap;
+ HFONT oldFontHandle;
PPH_STRING string;
RECT bufferRect =
{
@@ -691,6 +692,7 @@ INT_PTR CALLBACK PhpColumnsDlgProc(
bufferDc = CreateCompatibleDC(drawInfo->hDC);
bufferBitmap = CreateCompatibleBitmap(drawInfo->hDC, bufferRect.right, bufferRect.bottom);
+ oldFontHandle = SelectFont(bufferDc, PhTreeWindowFont);
oldBufferBitmap = SelectBitmap(bufferDc, bufferBitmap);
SelectFont(bufferDc, context->ControlFont);
@@ -731,6 +733,7 @@ INT_PTR CALLBACK PhpColumnsDlgProc(
SRCCOPY
);
+ SelectFont(bufferDc, oldFontHandle);
SelectBitmap(bufferDc, oldBufferBitmap);
DeleteBitmap(bufferBitmap);
DeleteDC(bufferDc);
|
Add AppVeyor badge. | @@ -6,6 +6,7 @@ substantial changes to the ippproxy and ippserver implementations to make them
more general-purpose and configurable.
[](https://travis-ci.org/istopwg/ippsample)
+[](https://ci.appveyor.com/project/michaelrsweet/ippsample)
[](https://build.snapcraft.io/user/istopwg/ippsample)
|
Changed sceDisplayGetProcFrameBufInternal header | @@ -115,7 +115,7 @@ int ksceDisplayGetFrameBuf(SceDisplayFrameBuf *pParam, int sync);
*
* @return 0 on success, < 0 on error.
*/
-int ksceDisplayGetFrameBufInfoForPid(SceUID pid, int head, int index, SceDisplayFrameBufInfo *info);
+int ksceDisplayGetProcFrameBufInternal(SceUID pid, int head, int index, SceDisplayFrameBufInfo *info);
/**
* Get maximum framebuffer resolution
|
munin plugin: always exit 0 in autoconf
The autoconf operation should always exit 0, also in case the answer in "no",
see | @@ -174,11 +174,11 @@ get_state ( ) {
if test "$1" = "autoconf" ; then
if test ! -f $conf; then
echo no "($conf does not exist)"
- exit 1
+ exit 0
fi
if test ! -d `dirname $state`; then
echo no "(`dirname $state` directory does not exist)"
- exit 1
+ exit 0
fi
echo yes
exit 0
|
dm: mei: check for state before link reset callback
Prevent intercepting reset callback if reset state
transition is already in progress.
Acked-by: Acked-by: Yu Wang | @@ -1984,6 +1984,9 @@ vmei_reset_callback(int fd, enum ev_type type, void *param)
char buf[MEI_DEV_STATE_LEN] = {0};
int sz;
+ if (vmei->status != VMEI_STS_READY)
+ return;
+
lseek(fd, 0, SEEK_SET);
sz = read(fd, buf, 12);
if (first_time) {
|
Remove duplicate service notification check | @@ -1262,7 +1262,7 @@ NTSTATUS PhpServiceNonPollThreadStart(
{
if (notifyContext->NotifyRegistration)
{
- if (UnsubscribeServiceChangeNotifications_I && notifyContext->NotifyRegistration)
+ if (UnsubscribeServiceChangeNotifications_I)
UnsubscribeServiceChangeNotifications_I(notifyContext->NotifyRegistration);
notifyContext->JustAddedNotifyRegistration = FALSE;
|
v2.0.17 landed | -ejdb2 (2.0.17) UNRELEASED; urgency=medium
+ejdb2 (2.0.17) testing; urgency=medium
* Added `inverse` JQL query option.
- -- Anton Adamansky <[email protected]> Wed, 05 Jun 2019 23:08:38 +0700
+ -- Anton Adamansky <[email protected]> Wed, 05 Jun 2019 23:15:09 +0700
ejdb2 (2.0.16) testing; urgency=medium
|
fix freertos port tick to time issue | @@ -119,7 +119,7 @@ lwesp_sys_sem_delete(lwesp_sys_sem_t* p) {
uint32_t
lwesp_sys_sem_wait(lwesp_sys_sem_t* p, uint32_t timeout) {
uint32_t t = xTaskGetTickCount();
- return xSemaphoreTake(*p, !timeout ? portMAX_DELAY : timeout) == pdPASS ? (xTaskGetTickCount() - t) : LWESP_SYS_TIMEOUT;
+ return xSemaphoreTake(*p, !timeout ? portMAX_DELAY : pdMS_TO_TICKS(timeout)) == pdPASS ? ((xTaskGetTickCount() - t) * portTICK_PERIOD_MS): LWESP_SYS_TIMEOUT;
}
uint8_t
@@ -168,9 +168,9 @@ lwesp_sys_mbox_get(lwesp_sys_mbox_t* b, void** m, uint32_t timeout) {
freertos_mbox mb;
uint32_t t = xTaskGetTickCount();
- if (xQueueReceive(*b, &mb, !timeout ? portMAX_DELAY : timeout)) {
+ if (xQueueReceive(*b, &mb, !timeout ? portMAX_DELAY : pdMS_TO_TICKS(timeout))) {
*m = mb.d;
- return xTaskGetTickCount() - t;
+ return (xTaskGetTickCount() - t) * portTICK_PERIOD_MS;
}
return LWESP_SYS_TIMEOUT;
}
|
CommentItem: prevent actions until confirmed | @@ -110,6 +110,7 @@ return false;
group={group}
isRelativeTime
></Author>
+ {!post.pending &&
<Box opacity={hovering ? '100%' : '0%'}>
<Dropdown
alignX="right"
@@ -154,6 +155,7 @@ return false;
<Icon icon="Ellipsis" />
</Dropdown>
</Box>
+ }
</Row>
<GraphContent
borderRadius={1}
|
Add fallbacks to RaptorLake entry | @@ -1549,6 +1549,10 @@ int get_cpuname(void){
case 7: // Raptor Lake
if(support_avx2())
return CPUTYPE_HASWELL;
+ if(support_avx())
+ return CPUTYPE_SANDYBRIDGE;
+ else
+ return CPUTYPE_NEHALEM;
}
break;
}
@@ -2344,8 +2348,14 @@ int get_coretype(void){
case 11:
switch (model) {
case 7: // Raptor Lake
+#ifndef NO_AVX2
if(support_avx2())
return CORE_HASWELL;
+#endif
+ if(support_avx())
+ return CORE_SANDYBRIDGE;
+ else
+ return CORE_NEHALEM;
}
case 15:
if (model <= 0x2) return CORE_NORTHWOOD;
|
sim: pad images to alignment
Adjust the image sizes up to a multiple of 8. With the strict checking
in the flash driver, we aren't allowed to write partial lines. | @@ -121,10 +121,12 @@ fn main() {
// println!("Areas: {:#?}", areadesc.get_c());
// Install the boot trailer signature, so that the code will start an upgrade.
- let primary = install_image(&mut flash, 0x020000, 32779);
+ // TODO: This must be a multiple of flash alignment, add support for an image that is smaller,
+ // and just gets padded.
+ let primary = install_image(&mut flash, 0x020000, 32784);
// Install an upgrade image.
- let upgrade = install_image(&mut flash, 0x040000, 41922);
+ let upgrade = install_image(&mut flash, 0x040000, 41928);
// Set an alignment, and position the magic value.
c::set_sim_flash_align(align);
|
CCode: Test plugin using `%` as escape character | @@ -27,15 +27,22 @@ using ckdb::ksDel;
using ckdb::Plugin;
-void testRoundTrip (string const decodedString, string const encodedString = "")
-#ifdef __llvm__
- __attribute__ ((annotate ("oclint:suppress[empty if statement]"), annotate ("oclint:suppress[high cyclomatic complexity]"),
- annotate ("oclint:suppress[high ncss method]"), annotate ("oclint:suppress[too few branches in switch statement]")))
-#endif
+CppKeySet defaultConfig ()
{
- CppKeySet modules{ 0, KS_END };
- elektraModulesInit (modules.getKeySet (), NULL);
+ CppKeySet config{ 20,
+ keyNew ("user/chars", KEY_END),
+ keyNew ("user/chars/0A", KEY_VALUE, "6E", KEY_END), // new line -> n
+ keyNew ("user/chars/20", KEY_VALUE, "77", KEY_END), // space -> w
+ keyNew ("user/chars/23", KEY_VALUE, "72", KEY_END), // # -> r
+ keyNew ("user/chars/5C", KEY_VALUE, "62", KEY_END), // \\ (backslash) -> b
+ keyNew ("user/chars/3D", KEY_VALUE, "65", KEY_END), // = -> e
+ keyNew ("user/chars/3B", KEY_VALUE, "73", KEY_END), // ; -> s
+ KS_END };
+ return config;
+}
+CppKeySet percentConfig ()
+{
CppKeySet config{ 20,
keyNew ("user/chars", KEY_END),
keyNew ("user/chars/0A", KEY_VALUE, "6E", KEY_END), // new line -> n
@@ -44,7 +51,20 @@ void testRoundTrip (string const decodedString, string const encodedString = "")
keyNew ("user/chars/5C", KEY_VALUE, "62", KEY_END), // \\ (backslash) -> b
keyNew ("user/chars/3D", KEY_VALUE, "65", KEY_END), // = -> e
keyNew ("user/chars/3B", KEY_VALUE, "73", KEY_END), // ; -> s
+ keyNew ("user/escape", KEY_VALUE, "25", KEY_END), // use % as escape character
KS_END };
+ return config;
+}
+
+void testRoundTrip (string const decodedString, string const encodedString = "", CppKeySet config = defaultConfig ())
+#ifdef __llvm__
+ __attribute__ ((annotate ("oclint:suppress[empty if statement]"), annotate ("oclint:suppress[high cyclomatic complexity]"),
+ annotate ("oclint:suppress[high ncss method]"), annotate ("oclint:suppress[too few branches in switch statement]")))
+#endif
+{
+ CppKeySet modules{ 0, KS_END };
+ elektraModulesInit (modules.getKeySet (), NULL);
+
CppKey parent{ "system/elektra/modules/type", KEY_END };
Plugin * plugin = elektraPluginOpen ("ccode", modules.getKeySet (), config.getKeySet (), *parent);
exit_if_fail (plugin != NULL, "Could not open ccode plugin");
@@ -85,4 +105,5 @@ TEST (type, roundtrip)
testRoundTrip (" =;#");
testRoundTrip ("\n\\");
testRoundTrip ("");
+ testRoundTrip ("a value\nwith=;# and \\ itself", "a%wvalue%nwith%e%s%r%wand%w%b%witself", percentConfig ());
}
|
Add Arabic & Persian letters in the RTL range | @@ -156,6 +156,11 @@ bool lv_bidi_letter_is_rtl(uint32_t letter)
if(letter >= 0x5d0 && letter <= 0x5ea) return true;
if(letter == 0x202E) return true; /*Unicode of LV_BIDI_RLO*/
+ /* Check for Persian and Arabic characters [https://en.wikipedia.org/wiki/Arabic_script_in_Unicode]*/
+ if(letter >= 0x600 && letter <= 0x6FF) return true;
+ if(letter >= 0xFB50 && letter <= 0xFDFF) return true;
+ if(letter >= 0xFE70 && letter <= 0xFEFF) return true;
+
return false;
}
|
Changes rule activation threshold on mainnet to 90%. | @@ -128,7 +128,7 @@ public:
consensus.nPowTargetSpacing = 1 * 60;
consensus.fPowAllowMinDifficultyBlocks = false;
consensus.fPowNoRetargeting = false;
- consensus.nRuleChangeActivationThreshold = 1632; // Approx 80% of 2018
+ consensus.nRuleChangeActivationThreshold = 1814; // Approx 90% of 2016
consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008
|
remove irc from readme | @@ -25,4 +25,4 @@ Please check the Getting Involved section of our wiki for more information on co
### Contact
-If you wish to contact me, please use the details on my Github profile. I can also usually be found idling on the FreeNode IRC network as ``alexandervdm``.
+If you wish to contact me, please use the details on my Github profile.
|
minimal exit() implementation | @@ -32,15 +32,17 @@ int lseek(int UNUSED(fd), int UNUSED(offset), int UNUSED(whence)) {
return 0;
}
-extern task_t* current_task;
+//extern task_t* current_task;
int exit(int code) {
- current_task->exit_code = code;
- _kill();
+ task_small_t* current = tasking_get_current_task();
+ printf("[%s [%d]] EXIT status code %d\n", current->name, current->id, code);
+ while (1) {sys_yield(RUNNABLE);}
return code;
}
int sysfork() {
- return fork(current_task->name);
+ Deprecated();
+ //return fork(current_task->name);
}
char* shmem_create(uint32_t size) {
|
machinarium: add some words about timeouts | @@ -11,7 +11,7 @@ Machinarium is based on combination of `pthreads(7)` and custom made implementat
multi-tasking primitives (coroutines).
Each coroutine executed using own stack context and transparently scheduled by `epoll(7)` event-loop logic.
-Each working machinarium thread can handle thousands of executing coroutines.
+Each working Machinarium thread can handle thousands of executing coroutines.
#### Messaging and Channels
@@ -42,11 +42,13 @@ consistent with coroutine design.
#### Full-feature SSL/TLS support
Machinarium has easy-to-use Transport Layer Security (TLS) API on board, which also support work
-with multiple threads. Create and configure machinarium TLS object, associate it with any existing
+with multiple threads. Create and configure Machinarium TLS object, associate it with any existing
IO context and it will be automatically upgraded.
-#### Timeouts everywhere
+#### Timeouts and Cancellation
-#### Cancellation
+All blocking Machinarium API methods are designed with timeout flag. If operation does not
+complete during requested time interval, then method will return with appropriate `errno` status set.
-#### Signal handling
+Additionally, a coroutine can `Cancel` any on-going blocking call of some other coroutine. And as in
+timeout handling, cancelled coroutine method will return with appropriate status.
|
powerpc: use full 64 bit structure size instead of pt_regs | @@ -157,7 +157,7 @@ struct user_regs_struct_64 {
#endif /* defined(__arm__) || defined(__aarch64__) */
#if defined(__powerpc64__) || defined(__powerpc__)
-#define HEADERS_STRUCT struct pt_regs
+#define HEADERS_STRUCT struct user_regs_struct_64
struct user_regs_struct_32 {
uint32_t gpr[32];
uint32_t nip;
|
Build: Try to fix analysis | @@ -94,6 +94,7 @@ matrix:
- os: osx
name: "Analyze Scripts"
+ osx_image: xcode11.6
script:
- HOMEBREW_NO_INSTALL_CLEANUP=1 brew install shellcheck
@@ -105,7 +106,7 @@ matrix:
- os: osx
name: "Analyze Coverity"
- osx_image: xcode11.3
+ osx_image: xcode11.6
compiler: clang
before_install:
|
Docs: removing stray pivotal reference | <div class="nav-content">
<ul>
<li>
- <a href="/docs/600/common/gpdb-features.html">Pivotal Greenplum® 6.0.0 Documentation</a>
+ <a href="/docs/600/common/gpdb-features.html">Greenplum Database 6.0.0 Documentation</a>
</li>
<li>
<a href="/docs/600/admin_guide/admin_guide.html">Administrator Guide</a>
|
interface: simplify edit reducer | @@ -59,18 +59,16 @@ const edit = (json: ContactUpdate, state: S) => {
if (!field) {
return;
}
- const contact = state.contacts?.[ship];
+
const value = data['edit-field'][field];
- if(!contact) {
- return;
- }
if(field === 'add-group') {
- contact.groups.push(value);
+ state.contacts[ship].groups.push(value);
} else if (field === 'remove-group') {
- contact.groups = contact.groups.filter(g => g !== value);
+ state.contacts[ship].groups =
+ state.contacts[ship].groups.filter(g => g !== value);
} else {
- contact[field] = value;
+ state.contacts[ship][field] = value;
}
}
};
|
Add latest guid types | @@ -325,6 +325,9 @@ PhFindIntegerSiKeyValuePairsStringRef(
#define GUID_VERSION_MD5 3
#define GUID_VERSION_RANDOM 4
#define GUID_VERSION_SHA1 5
+#define GUID_VERSION_TIME 6
+#define GUID_VERSION_EPOCH 7
+#define GUID_VERSION_VENDOR 8
#define GUID_VARIANT_NCS_MASK 0x80
#define GUID_VARIANT_NCS 0x00
|
hitresult a bit smaller | @@ -4,7 +4,7 @@ from ImageProcess.imageproc import change_size
hitprefix = "hit"
default_size = 128
-hitresult_size = 2
+hitresult_size = 1.7
def prepare_hitresults(scale, beatmap):
|
[core] const buffer * in config_check_cond_nocache
use (const buffer *) in config_check_cond_nocache() | @@ -510,7 +510,7 @@ static cond_result_t config_check_cond_nocache(request_st * const r, const data_
/* pass the rules */
- buffer *l;
+ const buffer *l;
switch (dc->comp) {
case COMP_HTTP_HOST:
@@ -591,28 +591,24 @@ static cond_result_t config_check_cond_nocache(request_st * const r, const data_
break;
case COMP_HTTP_REQUEST_HEADER:
- *((const buffer **)&l) =
- http_header_request_get(r, dc->ext, BUF_PTR_LEN(&dc->comp_tag));
+ l = http_header_request_get(r, dc->ext, BUF_PTR_LEN(&dc->comp_tag));
if (NULL == l) l = (buffer *)&empty_string;
break;
case COMP_HTTP_REQUEST_METHOD:
- l = r->tmp_buf;
- buffer_clear(l);
- http_method_append(l, r->http_method);
+ {
+ buffer * const tb = r->tmp_buf;
+ l = tb;
+ buffer_clear(tb);
+ http_method_append(tb, r->http_method);
+ }
break;
default:
return COND_RESULT_FALSE;
}
- if (NULL == l) { /*(should not happen)*/
- log_error(r->conf.errh, __FILE__, __LINE__,
- "%s compare to NULL", dc->comp_key);
- return COND_RESULT_FALSE;
- }
- else if (debug_cond) {
+ if (debug_cond)
log_error(r->conf.errh, __FILE__, __LINE__,
"%s compare to %s", dc->comp_key, l->ptr);
- }
switch(dc->cond) {
case CONFIG_COND_NE:
|
RHBZ#2075862: VirtIO-FS: prevent Stop from accessing already deleted FileSystem
FileSystem in Stop() may be deleted already if the device is removed. | @@ -279,13 +279,14 @@ static DWORD VirtFsRegDevHandleNotification(VIRTFS *VirtFs)
VOID VIRTFS::Stop()
{
- FspFileSystemStopDispatcher(FileSystem);
-
- if (FileSystem != NULL)
+ if (FileSystem == NULL)
{
+ return;
+ }
+
+ FspFileSystemStopDispatcher(FileSystem);
FspFileSystemDelete(FileSystem);
FileSystem = NULL;
- }
LookupMap.clear();
|
Update copyrights/licenses on the rest of the ippserver files. | @@ -32,12 +32,6 @@ main(int argc, /* I - Number of command-line args */
*confdir = NULL, /* Configuration directory */
*name = NULL; /* Printer name */
server_pinfo_t pinfo; /* Printer information */
-#if 0
- int duplex = 0, /* Duplex mode */
- ppm = 0, /* Pages per minute for mono */
- ppm_color = 0, /* Pages per minute for color */
- pin = 0; /* PIN printing mode? */
-#endif // 0
server_printer_t *printer; /* Printer object */
|
DM: samples: Correct parameter of intel_pstate
The parameter of intel_pstate should be 'disable' instead of 'disabled'.
This patch fixes it. | @@ -65,7 +65,7 @@ pm_by_vuart="--pm_by_vuart tty,/dev/ttyS1"
#root=/dev/nvme0n1p3 rw rootwait nohpet console=hvc0 console=ttyS0 \
#no_timer_check ignore_loglevel log_buf_len=16M consoleblank=0 \
#clocksource=tsc tsc=reliable x2apic_phys processor.max_cstate=0 \
-#intel_idle.max_cstate=0 intel_pstate=disabled mce=ignore_ce audit=0 \
+#intel_idle.max_cstate=0 intel_pstate=disable mce=ignore_ce audit=0 \
#isolcpus=nohz,domain,1 nohz_full=1 rcu_nocbs=1 nosoftlockup idle=poll \
#irqaffinity=0
|
Add safety to dummy_random in case of NULL context | @@ -60,8 +60,11 @@ int dummy_random( void *p_rng, unsigned char *output, size_t output_len )
size_t i;
#if defined(MBEDTLS_CTR_DRBG_C)
+ //mbedtls_ctr_drbg_random requires a valid mbedtls_ctr_drbg_context in p_rng
+ if( p_rng != NULL ) {
//use mbedtls_ctr_drbg_random to find bugs in it
ret = mbedtls_ctr_drbg_random(p_rng, output, output_len);
+ }
#else
(void) p_rng;
ret = 0;
|
lpd: remove spurious error message when ipv6 or ipv4 is disabled | @@ -109,7 +109,7 @@ static int create_send_socket( int af, const char ifname[] ) {
int sock;
if( (sock = net_socket( "LPD", ifname, IPPROTO_IP, af ) ) < 0 ) {
- goto fail;
+ return -1;
}
if( af == AF_INET ) {
@@ -157,7 +157,7 @@ static int create_receive_socket( const IP *addr, const char ifname[] ) {
int sock;
if( (sock = net_socket( "LPD", ifname, IPPROTO_IP, af ) ) < 0 ) {
- goto fail;
+ return -1;
}
addrlen = addr_len( addr );
|
Update NEWS file for new release
Updated the NEWS file with the most significant items from CHANGES | o Allow GNU style "make variables" to be used with Configure.
o Add a STORE module (OSSL_STORE)
o Claim the namespaces OSSL and OPENSSL, represented as symbol prefixes
+ o Add multi-prime RSA (RFC 8017) support
+ o Add SM3 implemented according to GB/T 32905-2016
+ o Add SM4 implemented according to GB/T 32907-2016.
+ o Add 'Maximum Fragment Length' TLS extension negotiation and support
+ o Add ARIA support
+ o Add SHA3
+ o Rewrite of devcrypto engine
+ o Add support for SipHash
Major changes between OpenSSL 1.1.0g and OpenSSL 1.1.0h [under development]
|
added more EAP Method Types | @@ -801,6 +801,7 @@ anecflag = FALSE;
int c;
int llctype;
+uint8_t eap3flag = FALSE;
uint8_t eap4flag = FALSE;
uint8_t eap9flag = FALSE;
uint8_t eap13flag = FALSE;
@@ -1087,6 +1088,11 @@ while((pcapstatus = pcap_next_ex(pcapin, &pkh, &packet)) != -2)
if(eapext->eapcode == EAP_CODE_RESP)
addresponseidentity(eapext);
+ if(eapext->eaptype == EAP_TYPE_NAK)
+ {
+ addeapmd5(macf->addr1.addr, macf->addr2.addr, eapext);
+ eap3flag = TRUE;
+ }
if(eapext->eaptype == EAP_TYPE_MD5)
{
@@ -1151,7 +1157,7 @@ while((pcapstatus = pcap_next_ex(pcapin, &pkh, &packet)) != -2)
if(eapext->eaptype == EAP_TYPE_AW)
eap35flag = TRUE;
- if(eapext->eaptype == EAP_TYPE_MSTLV)
+ if(eapext->eaptype == EAP_TYPE_CSBA)
eap36flag = TRUE;
if(eapext->eaptype == EAP_TYPE_HTTPD)
@@ -1169,7 +1175,7 @@ while((pcapstatus = pcap_next_ex(pcapin, &pkh, &packet)) != -2)
if(eapext->eaptype == EAP_TYPE_ZLXEAP)
eap44flag = TRUE;
- if(eapext->eaptype == EAP_TYPE_CSBA)
+ if(eapext->eaptype == EAP_TYPE_EXPAND)
eap254flag = TRUE;
continue;
@@ -1295,6 +1301,9 @@ if(ancflag == TRUE)
}
}
+if(eap3flag == TRUE)
+ printf("\x1B[36mfound Legacy Nak\x1B[0m\n");
+
if(eap4flag == TRUE)
printf("\x1B[36mfound MD5-Challenge (hashcat -m 4800)\x1B[0m\n");
|
make the README looks shorter by removing new lines | @@ -63,10 +63,7 @@ Close the Terminal that echo-bot is running or type "Ctrl-C" to kill it.
## Usage example
```c
-void on_message(
- discord_t *client,
- discord_user_t *self,
- discord_message_t *message)
+void on_message(discord_t *client, discord_user_t *self, discord_message_t *message)
{
// make sure it doesn't echoes itself
if (strcmp(self->username, message->author->username)){
|
SensorAPI: Send sensor data over OIC
Use COAP_MAX_URI constant instead of calloc | @@ -460,9 +460,7 @@ sensor_oic_get_data(oc_request_t *request, oc_interface_mask_t interface)
char *typename;
sensor_type_t type;
const char s[2] = "/";
- char *tmpstr;
-
- tmpstr = calloc(request->resource->uri.os_sz, request->resource->uri.os_sz);
+ char tmpstr[COAP_MAX_URI];
memcpy(tmpstr, (char *)&(request->resource->uri.os_str[1]),
request->resource->uri.os_sz - 1);
@@ -517,13 +515,11 @@ sensor_oic_get_data(oc_request_t *request, oc_interface_mask_t interface)
break;
}
- free(tmpstr);
sensor_unregister_listener(sensor, &listener);
oc_rep_end_root_object();
oc_send_response(request, OC_STATUS_OK);
return;
err:
- free(tmpstr);
sensor_unregister_listener(sensor, &listener);
oc_send_response(request, OC_STATUS_NOT_FOUND);
}
@@ -533,8 +529,7 @@ sensor_oic_init(void)
{
oc_resource_t *res;
struct sensor *sensor;
- char *tmpstr;
- size_t bufsize;
+ char tmpstr[COAP_MAX_URI];
char *typename;
int i;
int rc;
@@ -564,25 +559,24 @@ sensor_oic_init(void)
if (rc) {
break;
}
- bufsize = strlen(sensor->s_dev->od_name) + 1;
- tmpstr = (char *)calloc(bufsize, bufsize);
- sprintf(tmpstr, "/%s/%s", sensor->s_dev->od_name, typename);
+
+ memset(tmpstr, 0, sizeof(tmpstr));
+ snprintf(tmpstr, sizeof(tmpstr), "/%s/%s",
+ sensor->s_dev->od_name, typename);
res = oc_new_resource(tmpstr, 1, 0);
- free(tmpstr);
- bufsize = strlen(sensor->s_dev->od_name) + sizeof("sensors.r.");
- tmpstr = (char *)calloc(bufsize, bufsize);
- sprintf(tmpstr, "sensors.r.%s", sensor->s_dev->od_name);
+ memset(tmpstr, 0, sizeof(tmpstr));
+ snprintf(tmpstr, sizeof(tmpstr), "sensors.r.%s", sensor->s_dev->od_name);
oc_resource_bind_resource_type(res, tmpstr);
- free(tmpstr);
oc_resource_bind_resource_interface(res, OC_IF_R);
oc_resource_set_default_interface(res, OC_IF_R);
oc_resource_set_discoverable(res);
oc_resource_set_periodic_observable(res, 1);
- oc_resource_set_request_handler(res, OC_GET, sensor_oic_get_data);
+ oc_resource_set_request_handler(res, OC_GET,
+ sensor_oic_get_data);
oc_add_resource(res);
}
i++;
|
Update tests/abi/testabi_ks.c | @@ -2781,7 +2781,6 @@ static void test_simpleLookup (void)
succeed_if_same_string (keyString (returnedKey), keyString (dup));
succeed_if (ksGetSize (ks) == 1, "key deleted from keyset");
- keyDel (searchKey);
ksDel (ks);
}
|
fix merge conflict on daeSetByUser; fix | @@ -643,9 +643,8 @@ cJSON* mergeJSONObjects(const cJSON* j1, const cJSON* j2) {
cJSON_ArrayForEach(el, j2) {
char* key = el->string;
if (jsonHasKey(j1, key)) {
- if (!cJSON_Compare(cJSON_GetObjectItemCaseSensitive(j1, key), el,
- cJSON_True)) {
- cJSON* el1 = cJSON_GetObjectItemCaseSensitive(j1, key);
+ cJSON* el1 = cJSON_GetObjectItemCaseSensitive(json, key);
+ if (!cJSON_Compare(el1, el, cJSON_True)) {
if ((el->type == cJSON_String && !strValid(el->valuestring)) ||
((el->type == cJSON_Array || el->type == cJSON_Object) &&
cJSON_GetArraySize(el) == 0)) {
@@ -664,6 +663,15 @@ cJSON* mergeJSONObjects(const cJSON* j1, const cJSON* j2) {
// The acquired scopes might be different from the requested
// scopes, but that's fine. Also the ordering might change
pass;
+ } else if (strequal("daeSetByUser", key) && el->type == cJSON_Number &&
+ el1->type == cJSON_Number) {
+ // if one has daeSetByUser set this is dominant
+ if (el1->valuedouble == 0) { // if daeSetByUser that is already in
+ // the merged object is 0, overwrite it
+ // cJSON* cpy = cJSON_Duplicate(el, cJSON_True);
+ // cJSON_ReplaceItemViaPointer(json, el1, cpy);
+ el1->valuedouble = el->valuedouble;
+ }
} else {
oidc_errno = OIDC_EJSONMERGE;
char* val1 = jsonToString(el1);
|
install-config-file: Use less options for mktemp | @@ -7,7 +7,7 @@ First of all, we create a small example configuration file.
To do so, we first create a temporary file and store its location in Elektra.
```sh
-kdb set user/tests/tempfiles/firstFile $(mktemp --tmpdir file-XXXXX)
+kdb set user/tests/tempfiles/firstFile $(mktemp)
echo -e "keyA=a\nkeyB=b\nkeyC=c" > `kdb get user/tests/tempfiles/firstFile`
```
@@ -33,7 +33,8 @@ You have to enter the paths accordingly.
Read the tutorials on mounting and namespaces if you are not sure what this means.
```sh
-kdb set user/tests/tempfiles/secondFile $(echo $(mktemp -d --tmpdir dir-for-file-XXXXX)/$(basename $(kdb get user/tests/tempfiles/firstFile)))
+kdb set user/tests/tempfiles/
+kdb set user/tests/tempfiles/secondFile $(echo $(mktemp -d)/$(basename $(kdb get user/tests/tempfiles/firstFile)))
echo -e "keyA=a\nkeyB=b\nkeyC=Y" > `kdb get user/tests/tempfiles/secondFile`
kdb install-config-file system/tests/installing $(kdb get user/tests/tempfiles/secondFile) ini
```
|
Fail test if test-script loading fails | @@ -49,7 +49,9 @@ testsFromFile fp = do
then do
results <- Lua.peekList Lua.stackTop
return $ Tasty.testGroup fp $ map testTree results
- else Lua.throwTopMessage
+ else do
+ errMsg <- toString <$> Lua.tostring' Lua.stackTop
+ return $ Tasty.singleTest fp (Failure errMsg)
testTree :: Tree -> Tasty.TestTree
testTree (Tree name tree) =
@@ -98,5 +100,9 @@ instance Peekable Outcome where
b <- Lua.peek idx
return $ if b then Success else Failure "???"
_ -> do
- s <- Text.unpack . Text.Encoding.decodeUtf8 <$> Lua.tostring' idx
+ s <- toString <$> Lua.tostring' idx
Lua.throwException ("not a test result: " ++ s)
+
+-- | Convert UTF8-encoded @'ByteString'@ to a @'String'@.
+toString :: ByteString -> String
+toString = Text.unpack . Text.Encoding.decodeUtf8
|
session: fix session_main_get_worker_if_valid
Type: fix | @@ -598,7 +598,7 @@ session_main_get_worker (u32 thread_index)
static inline session_worker_t *
session_main_get_worker_if_valid (u32 thread_index)
{
- if (pool_is_free_index (session_main.wrk, thread_index))
+ if (thread_index > vec_len (session_main.wrk))
return 0;
return &session_main.wrk[thread_index];
}
|
ESP-NETIF: add unit test for get/set hostname API | @@ -225,3 +225,31 @@ TEST_CASE("esp_netif: create custom wifi interfaces", "[esp_netif][leaks=0]")
esp_netif_destroy(sta);
}
+
+TEST_CASE("esp_netif: get/set hostname", "[esp_netif]")
+{
+ const char *hostname;
+ esp_netif_config_t cfg = ESP_NETIF_DEFAULT_WIFI_STA();
+
+ test_case_uses_tcpip();
+ esp_netif_t *esp_netif = esp_netif_new(&cfg);
+
+ // specific hostname not set yet, get_hostname should fail
+ TEST_ASSERT_NOT_EQUAL(ESP_OK, esp_netif_get_hostname(esp_netif, &hostname));
+
+ TEST_ASSERT_NOT_NULL(esp_netif);
+ esp_netif_attach_wifi_station(esp_netif);
+
+ esp_netif_action_start(esp_netif, NULL, 0, NULL);
+
+ // specific hostname not set yet, but if started, get_hostname to return default config value
+ TEST_ASSERT_EQUAL(ESP_OK, esp_netif_get_hostname(esp_netif, &hostname));
+ TEST_ASSERT_EQUAL_STRING(hostname, CONFIG_LWIP_LOCAL_HOSTNAME);
+
+ // specific hostname set and get
+ TEST_ASSERT_EQUAL(ESP_OK, esp_netif_set_hostname(esp_netif, "new_name"));
+ TEST_ASSERT_EQUAL(ESP_OK, esp_netif_get_hostname(esp_netif, &hostname));
+ TEST_ASSERT_EQUAL_STRING(hostname, "new_name");
+
+ esp_netif_destroy(esp_netif);
+}
|
Lua: Use all characters to calculate string hash
For a lot of long strings which have same prefix which extends beyond
hashing limit, there will be many hash collisions which result in
performance degradation using commands like KEYS | @@ -75,7 +75,7 @@ static TString *newlstr (lua_State *L, const char *str, size_t l,
TString *luaS_newlstr (lua_State *L, const char *str, size_t l) {
GCObject *o;
unsigned int h = cast(unsigned int, l); /* seed */
- size_t step = (l>>5)+1; /* if string is too long, don't hash all its chars */
+ size_t step = 1;
size_t l1;
for (l1=l; l1>=step; l1-=step) /* compute hash */
h = h ^ ((h<<5)+(h>>2)+cast(unsigned char, str[l1-1]));
|
fix typo channel frequency docs | @@ -441,7 +441,7 @@ void CHANNEL(_add_awgn)(CHANNEL() _q, \
\
/* apply carrier offset impairment */ \
/* _q : channel object */ \
-/* _frequency : carrier frequency offse [radians/sample */ \
+/* _frequency : carrier frequency offset [radians/sample] */ \
/* _phase : carrier phase offset [radians] */ \
void CHANNEL(_add_carrier_offset)(CHANNEL() _q, \
float _frequency, \
|
1. force updating libdiscord.a and cleaning up libdiscord.a; 2. add settings.o | @@ -2,7 +2,7 @@ CC ?= gcc
OBJDIR := obj
LIBDIR := lib
-SRC := $(wildcard discord-*.c curl-websocket.c)
+SRC := $(wildcard discord-*.c curl-websocket.c settings.c)
_OBJS := $(patsubst %.c, %.o, $(SRC))
OBJS := $(addprefix $(OBJDIR)/, $(_OBJS))
@@ -15,10 +15,9 @@ LIBDISCORD_LDFLAGS := -L./$(LIBDIR) -ldiscord -lcurl -lbearssl -static
LIBS_CFLAGS := $(LIBJSCON_CFLAGS) $(LIBCURL_CFLAGS) $(LIBDISCORD_CFLAGS)
LIBS_LDFLAGS := $(LIBCURL_LDFLAGS) $(LIBDISCORD_LDFLAGS) $(LIBJSCON_LDFLAGS)
-LIBDISCORD_DLIB := $(LIBDIR)/libdiscord.so
LIBDISCORD_SLIB := $(LIBDIR)/libdiscord.a
-CFLAGS := -Wall -Wextra -pedantic -fPIC -std=c11 -O0 -g \
+CFLAGS := -Wall -Wextra -pedantic -std=c11 -O0 -g \
-DLIBDISCORD_DEBUG -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700
@@ -39,25 +38,22 @@ $(OBJDIR)/discord-%.o : discord-%.c
$(CC) $(CFLAGS) $(LIBS_CFLAGS) \
-c -o $@ $<
+$(OBJDIR)/settings.o : settings.c
+ $(CC) $(CFLAGS) $(LIBS_CFLAGS) -c -o $@ $<
+
$(OBJDIR)/curl-websocket.o : curl-websocket.c
$(CC) $(CFLAGS) $(LIBS_CFLAGS) \
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -c -o $@ $<
-$(LIBDISCORD_DLIB) :
- $(CC) $(LIBS_CFLAGS) \
- $(OBJS) -shared -o $@ $(LIBS_LDFLAGS)
-
-$(LIBDISCORD_SLIB) :
+$(LIBDISCORD_SLIB) : $(OBJS)
$(AR) -cvq $@ $(OBJS)
# @todo better install solution
install : all
- cp $(INCLUDE) /usr/local/include && \
- cp $(LIBDISCORD_DLIB) /usr/local/lib && \
- ldconfig
+ cp $(INCLUDE) /usr/local/include
clean :
- rm -rf $(OBJDIR) test-api test-ws
+ rm -rf $(OBJDIR) test-api test-ws lib/*
purge : clean
rm -rf $(LIBDIR)
|
vppinfra: missing __clib_export for clib_pmalloc_alloc_aligned
Type: improvement | @@ -476,7 +476,7 @@ clib_pmalloc_alloc_aligned_on_numa (clib_pmalloc_main_t * pm, uword size,
return clib_pmalloc_alloc_inline (pm, 0, size, align, numa_node);
}
-void *
+__clib_export void *
clib_pmalloc_alloc_aligned (clib_pmalloc_main_t *pm, uword size, uword align)
{
return clib_pmalloc_alloc_inline (pm, 0, size, align,
|
Add Ability to run a subset of Fuzz Tests | @@ -26,10 +26,14 @@ ifndef FUZZ_TIMEOUT_SEC
export FUZZ_TIMEOUT_SEC=120
endif
+ifndef FUZZ_TESTS
+ export FUZZ_TESTS=${TESTS}
+endif
+
.PHONY : all
all : ld-preload
-all : $(TESTS)
+all : run_tests
include ../../s2n.mk
@@ -47,11 +51,13 @@ ld-preload :
$(TESTS)::
@${CC} ${CFLAGS} [email protected] -o $@ ${LDFLAGS} > /dev/null
- @( \
+
+run_tests: $(TESTS)
+ @( for test_name in ${FUZZ_TESTS} ; do \
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}; \
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}; \
export LIBCRYPTO_ROOT=${LIBCRYPTO_ROOT}; \
- ./runFuzzTest.sh $@ ${FUZZ_TIMEOUT_SEC}; \
+ ./runFuzzTest.sh $${test_name} ${FUZZ_TIMEOUT_SEC}; done\
)
.PHONY : clean
|
Use highest priority MPU region for DMA buffers. | @@ -54,7 +54,7 @@ void HAL_MspInit(void)
MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;
- MPU_InitStruct.Number = MPU_REGION_NUMBER0;
+ MPU_InitStruct.Number = MPU_REGION_NUMBER15;
MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1;
MPU_InitStruct.SubRegionDisable = 0x00;
MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE;
|
VERSION bump to version 1.4.74 | @@ -37,7 +37,7 @@ endif()
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(SYSREPO_MAJOR_VERSION 1)
set(SYSREPO_MINOR_VERSION 4)
-set(SYSREPO_MICRO_VERSION 73)
+set(SYSREPO_MICRO_VERSION 74)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
options/glibc: Add missing network defines and members to struct res_state | #ifndef _RESOLV_H
#define _RESOLV_H
+#include <netinet/in.h>
+
#define RES_INIT 0x00000001
#define RES_DEBUG 0x00000002
#define RES_USEVC 0x00000008
#define RES_STAYOPEN 0x00000100
#define RES_DNSRCH 0x00000200
+#define MAXNS 3
+#define MAXDNSRCH 6
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -25,6 +30,10 @@ int res_init(void);
* To avoid an massive struct, only add the items requested. */
typedef struct __res_state {
unsigned long options;
+ int nscount;
+ struct sockaddr_in nsaddr_list[MAXNS];
+ char *dnsrch[MAXDNSRCH + 1];
+ char defdname[256];
} *res_state;
struct __res_state *__res_state(void);
#define _res (*__res_state())
|
OcBootManagementLib: Fix comment for CustomEntryContext | @@ -477,7 +477,7 @@ struct OC_PICKER_CONTEXT_ {
//
OC_CUSTOM_DESCRIBE CustomDescribe;
//
- // Context to pass to CustomRead, optional.
+ // Context to pass to CustomRead and CustomDescribe, optional.
//
VOID *CustomEntryContext;
//
|
Increment version to 4.5.13. | #define MOD_WSGI_MAJORVERSION_NUMBER 4
#define MOD_WSGI_MINORVERSION_NUMBER 5
-#define MOD_WSGI_MICROVERSION_NUMBER 12
-#define MOD_WSGI_VERSION_STRING "4.5.12"
+#define MOD_WSGI_MICROVERSION_NUMBER 13
+#define MOD_WSGI_VERSION_STRING "4.5.13"
/* ------------------------------------------------------------------------- */
|
cmake FEATURE full-featured cmake find file | #
# LIBYANG_FOUND - system has LibYANG
# LIBYANG_INCLUDE_DIRS - the LibYANG include directory
-# LIBYANG_LIBRARIES - Link these to use LibSSH
+# LIBYANG_LIBRARIES - Link these to use LibYANG
+# LIBYANG_VERSION - SO version of the found libyang library
#
-# Author Radek Krejci <[email protected]>
-# Copyright (c) 2015 CESNET, z.s.p.o.
+# Author Michal Vasko <[email protected]>
+# Copyright (c) 2021 CESNET, z.s.p.o.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
+include(FindPackageHandleStandardArgs)
if(LIBYANG_LIBRARIES AND LIBYANG_INCLUDE_DIRS)
# in cache already
set(LIBYANG_FOUND TRUE)
-else (LIBYANG_LIBRARIES AND LIBYANG_INCLUDE_DIRS)
-
+else()
find_path(LIBYANG_INCLUDE_DIR
NAMES
libyang/libyang.h
@@ -64,17 +65,25 @@ else (LIBYANG_LIBRARIES AND LIBYANG_INCLUDE_DIRS)
${CMAKE_INSTALL_PREFIX}/lib
)
- if (LIBYANG_INCLUDE_DIR AND LIBYANG_LIBRARY)
- set(LIBYANG_FOUND TRUE)
- else (LIBYANG_INCLUDE_DIR AND LIBYANG_LIBRARY)
- set(LIBYANG_FOUND FALSE)
- endif (LIBYANG_INCLUDE_DIR AND LIBYANG_LIBRARY)
+ if(LIBYANG_INCLUDE_DIR)
+ find_path(LY_VERSION_PATH "libyang/version.h" HINTS ${LIBYANG_INCLUDE_DIR})
+ if(LY_VERSION_PATH)
+ file(READ "${LY_VERSION_PATH}/libyang/version.h" LY_VERSION_FILE)
+ else()
+ find_path(LY_HEADER_PATH "libyang/libyang.h" HINTS ${LIBYANG_INCLUDE_DIR})
+ file(READ "${LY_HEADER_PATH}/libyang/libyang.h" LY_VERSION_FILE)
+ endif()
+ string(REGEX MATCH "#define LY_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\"" LY_VERSION_MACRO "${LY_VERSION_FILE}")
+ string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" LIBYANG_VERSION "${LY_VERSION_MACRO}")
+ endif()
set(LIBYANG_INCLUDE_DIRS ${LIBYANG_INCLUDE_DIR})
set(LIBYANG_LIBRARIES ${LIBYANG_LIBRARY})
-
- # show the LIBYANG_INCLUDE_DIRS and LIBYANG_LIBRARIES variables only in the advanced view
mark_as_advanced(LIBYANG_INCLUDE_DIRS LIBYANG_LIBRARIES)
-endif (LIBYANG_LIBRARIES AND LIBYANG_INCLUDE_DIRS)
-
+ # handle the QUIETLY and REQUIRED arguments and set LIBYANG_FOUND to TRUE
+ # if all listed variables are TRUE
+ find_package_handle_standard_args(LibYANG FOUND_VAR LIBYANG_FOUND
+ REQUIRED_VARS LIBYANG_LIBRARY LIBYANG_INCLUDE_DIR
+ VERSION_VAR LIBYANG_VERSION)
+endif()
|
netkvm: fix false error on RSS disable | @@ -446,9 +446,10 @@ NDIS_STATUS ParaNdis6_RSSSetParameters( PARANDIS_ADAPTER *pContext,
return NDIS_STATUS_NOT_SUPPORTED;
}
- if (!(Params->Flags & NDIS_RSS_PARAM_FLAG_HASH_INFO_UNCHANGED) &&
+ if (!(Params->Flags & (NDIS_RSS_PARAM_FLAG_HASH_INFO_UNCHANGED | NDIS_RSS_PARAM_FLAG_DISABLE_RSS)) &&
!IsValidHashInfo(Params->HashInformation))
{
+ DPrintf(0, "[%s] invalid: flags %X, hash info %X!\n", __FUNCTION__, Params->Flags, Params->HashInformation);
return NDIS_STATUS_INVALID_PARAMETER;
}
|
Update x64emu.c
Added some adapations for Android as there is no __builtin_aarch64_get_fpcr and __builtin_aarch64_set_fpcr in Bionic. | @@ -518,10 +518,19 @@ void applyFlushTo0(x64emu_t* emu)
#ifdef __x86_64__
_mm_setcsr(_mm_getcsr() | (emu->mxcsr.x32&0x8040));
#elif defined(__aarch64__)
+ #ifdef __ANDROID__
+ uint64_t fpcr;
+ __asm__ __volatile__ ("mrs %0, fpcr":"=r"(fpcr));
+ #else
uint64_t fpcr = __builtin_aarch64_get_fpcr();
+ #endif
fpcr &= ~((1<<24) | (1<<1)); // clear bit FZ (24) and AH (1)
fpcr |= (emu->mxcsr.f.MXCSR_FZ)<<24; // set FZ as mxcsr FZ
fpcr |= ((emu->mxcsr.f.MXCSR_DAZ)^(emu->mxcsr.f.MXCSR_FZ))<<1; // set AH if DAZ different from FZ
+ #ifdef __ANDROID__
+ __asm__ __volatile__ ("msr fpcr, %0"::"r"(fpcr));
+ #else
__builtin_aarch64_set_fpcr(fpcr);
#endif
+ #endif
}
|
h2olog: there's no reason to use pointers for bpf::BPF | @@ -394,7 +394,7 @@ int main(int argc, char **argv)
cflags.push_back(generate_header_filter_cflag(response_header_filters));
}
- std::unique_ptr<ebpf::BPF> bpf(new ebpf::BPF());
+ ebpf::BPF bpf;
std::vector<ebpf::USDT> probes;
bool selective_tracing = false;
@@ -495,23 +495,23 @@ int main(int argc, char **argv)
fprintf(stderr, "<BPF>\n%s\n</BPF>\n", tracer->bpf_text().c_str());
}
- ebpf::StatusTuple ret = bpf->init(tracer->bpf_text(), cflags, probes);
+ ebpf::StatusTuple ret = bpf.init(tracer->bpf_text(), cflags, probes);
if (ret.code() != 0) {
fprintf(stderr, "Error: init: %s\n", ret.msg().c_str());
return EXIT_FAILURE;
}
- bpf->attach_tracepoint("sched:sched_process_exit", "trace_sched_process_exit");
+ bpf.attach_tracepoint("sched:sched_process_exit", "trace_sched_process_exit");
for (auto &probe : probes) {
- ret = bpf->attach_usdt(probe);
+ ret = bpf.attach_usdt(probe);
if (ret.code() != 0) {
fprintf(stderr, "Error: attach_usdt: %s\n", ret.msg().c_str());
return EXIT_FAILURE;
}
}
- ret = bpf->open_perf_buffer("events", event_cb, lost_cb, tracer.get(), PERF_BUFFER_PAGE_COUNT);
+ ret = bpf.open_perf_buffer("events", event_cb, lost_cb, tracer.get(), PERF_BUFFER_PAGE_COUNT);
if (ret.code() != 0) {
fprintf(stderr, "Error: open_perf_buffer: %s\n", ret.msg().c_str());
return EXIT_FAILURE;
@@ -524,7 +524,7 @@ int main(int argc, char **argv)
drop_root_privilege();
}
- ebpf::BPFPerfBuffer *perf_buffer = bpf->get_perf_buffer("events");
+ ebpf::BPFPerfBuffer *perf_buffer = bpf.get_perf_buffer("events");
if (perf_buffer) {
time_t t0 = time(NULL);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.