message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Makefile: forward pythontest target to 2nd stage | @@ -269,7 +269,7 @@ endif
ifeq ($(MAKESTAGE),1)
.PHONY: doc/commands.txt $(TARGETS)
-default all clean allclean distclean doc/commands.txt doxygen test utest utest_gpu gputest $(TARGETS):
+default all clean allclean distclean doc/commands.txt doxygen test utest utest_gpu gputest pythontest $(TARGETS):
make MAKESTAGE=2 $(MAKECMDGOALS)
tests/test-%: force
|
KDB Mount: Fix warning reported by `ronn` | - Where `path` is the path to the file the user wants to mount.
See `kdb info resolver` for details what an absolute and relative path means.
See also IMPORTANT below.
+
- `mountpoint` is where in the key database the new backend should be mounted.
For a cascading mount point, `mountpoint` should start with `/`.
See also IMPORTANT below.
+
- A list of such plugins with a configuration for each of them can be given:
- `plugin` should be an Elektra plugin.
- Plugins may be followed by a `,` separated list of `keys=values` pairs which will be used as plugin configuration.
|
http_client_debug: add missing type cast | @@ -42,7 +42,7 @@ static void debug_cb_request_payload(char *name, void *p1, void *p2)
struct flb_http_client *c = p1;
if (c->body_len > 3) {
- ptr = c->body_buf;
+ ptr = (unsigned char *) c->body_buf;
if (ptr[0] == 0x1F && ptr[1] == 0x8B && ptr[2] == 0x08) {
flb_idebug("[http] request payload (%lu bytes)\n[GZIP binary content...]",
c->body_len);
|
Tidy up velocity mode captilisation | @@ -451,13 +451,13 @@ definitions:
desc: Status flags
fields:
- 3-7:
- desc: reserved
+ desc: Reserved
- 0-2:
- desc: velocity mode
+ desc: Velocity mode
values:
- 0: Invalid
- - 1: Measured Doppler Derived
- - 2: Computed Doppler Derived
+ - 1: Measured Doppler derived
+ - 2: Computed Doppler derived
- MSG_VEL_NED:
id: 0x020E
@@ -504,13 +504,13 @@ definitions:
desc: Status flags
fields:
- 3-7:
- desc: reserved
+ desc: Reserved
- 0-2:
- desc: velocity mode
+ desc: Velocity mode
values:
- 0: Invalid
- - 1: Measured Doppler Derived
- - 2: Computed Doppler Derived
+ - 1: Measured Doppler derived
+ - 2: Computed Doppler derived
- MSG_BASELINE_HEADING:
id: 0x020F
|
Add GetSize() for TMaybeOwningArrayHolder. | @@ -79,6 +79,10 @@ namespace NCB {
return ResourceHolder;
}
+ size_t GetSize() const {
+ return ArrayRef.size();
+ }
+
private:
TMaybeOwningArrayHolder(
TArrayRef<T> arrayRef,
|
tls13:server:Add base framework for serverhello | @@ -727,6 +727,15 @@ cleanup:
return( ret );
}
+/*
+ * StateHanler: MBEDTLS_SSL_SERVER_HELLO
+ */
+static int ssl_tls13_write_server_hello( mbedtls_ssl_context *ssl )
+{
+ ((void) ssl);
+ return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE );
+}
+
/*
* TLS 1.3 State Machine -- server side
*/
@@ -758,6 +767,10 @@ int mbedtls_ssl_tls13_handshake_server_step( mbedtls_ssl_context *ssl )
break;
+ case MBEDTLS_SSL_SERVER_HELLO:
+ ret = ssl_tls13_write_server_hello( ssl );
+ break;
+
default:
MBEDTLS_SSL_DEBUG_MSG( 1, ( "invalid state %d", ssl->state ) );
return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE );
|
fix: set request timestamps for http3 | @@ -430,6 +430,7 @@ static void set_state(struct st_h2o_http3_server_stream_t *stream, enum h2o_http
assert(conn->delayed_streams.recv_body_blocked.prev == &stream->link || !"stream is not registered to the recv_body list?");
break;
case H2O_HTTP3_SERVER_STREAM_STATE_CLOSE_WAIT: {
+ stream->req.timestamps.response_end_at = h2o_gettimeofday(conn->super.ctx->loop);
if (h2o_linklist_is_linked(&stream->link))
h2o_linklist_unlink(&stream->link);
pre_dispose_request(stream);
@@ -1114,6 +1115,9 @@ int handle_input_expect_data(struct st_h2o_http3_server_stream_t *stream, const
/* got a DATA frame */
if (frame.length != 0) {
+ if (h2o_timeval_is_null(&stream->req.timestamps.request_body_begin_at)) {
+ stream->req.timestamps.request_body_begin_at = h2o_gettimeofday(get_conn(stream)->super.ctx->loop);
+ }
stream->recvbuf.handle_input = handle_input_expect_data_payload;
stream->recvbuf.bytes_left_in_data_frame = frame.length;
}
@@ -1199,6 +1203,11 @@ static int handle_input_expect_headers(struct st_h2o_http3_server_stream_t *stre
}
return 0;
}
+
+ if (h2o_timeval_is_null(&stream->req.timestamps.request_begin_at)) {
+ stream->req.timestamps.request_begin_at = h2o_gettimeofday(conn->super.ctx->loop);
+ }
+
stream->recvbuf.handle_input = handle_input_expect_data;
/* parse the headers, and ack */
@@ -1358,6 +1367,7 @@ static void do_send(h2o_ostream_t *_ostr, h2o_req_t *_req, h2o_sendvec_t *bufs,
switch (stream->state) {
case H2O_HTTP3_SERVER_STREAM_STATE_SEND_HEADERS:
+ stream->req.timestamps.response_start_at = h2o_gettimeofday(get_conn(stream)->super.ctx->loop);
write_response(stream, finalize_do_send_setup_udp_tunnel(stream));
h2o_probe_log_response(&stream->req, stream->quic->stream_id);
set_state(stream, H2O_HTTP3_SERVER_STREAM_STATE_SEND_BODY, 1);
@@ -1403,6 +1413,8 @@ static void do_send(h2o_ostream_t *_ostr, h2o_req_t *_req, h2o_sendvec_t *bufs,
case H2O_SEND_STATE_IN_PROGRESS:
break;
case H2O_SEND_STATE_FINAL:
+ stream->req.timestamps.response_end_at = h2o_gettimeofday(get_conn(stream)->super.ctx->loop);
+ /* fall through */
case H2O_SEND_STATE_ERROR:
/* TODO consider how to forward error, pending resolution of https://github.com/quicwg/base-drafts/issues/3300 */
shutdown_by_generator(stream);
|
[tb] Align Verilator's reset to vsim/vcs | @@ -44,8 +44,8 @@ int main(int argc, char **argv) {
simctrl.RegisterExtension(&memutil);
#endif
- simctrl.SetInitialResetDelay(5);
- simctrl.SetResetDuration(5);
+ simctrl.SetInitialResetDelay(1);
+ simctrl.SetResetDuration(4);
bool exit_app = false;
int ret_code = simctrl.ParseCommandArgs(argc, argv, exit_app);
|
Implement changes requested by | #include "system/nth_alloc.h"
// TODO(#863): Sound_samples is not implemented
-// TODO: Volume control?
+// TODO: Sound_samples does not implement volume control.
struct Sound_samples
{
@@ -26,8 +26,7 @@ static
int init_buffer_and_device(Sound_samples *sound_samples,
const char *sample_files[])
{
- // TODO: Select audio specification from a menu
- // TODO: Use a seperate callback function
+ // TODO: init_buffer_and_device uses hard-coded audio specification
SDL_AudioSpec destination_spec = { // stereo float32 44100Hz
.format = AUDIO_F32,
.channels = 2,
@@ -75,8 +74,7 @@ int init_buffer_and_device(Sound_samples *sound_samples,
return -1;
}
memcpy(cvt.buf, wav_buf, (size_t)cvt.len);
- SDL_FreeWAV(wav_buf);
- RELEASE_LT(sound_samples->lt, wav_buf);
+ SDL_FreeWAV(RELEASE_LT(sound_samples->lt, wav_buf));
if (SDL_ConvertAudio(&cvt) < 0) {
log_fail("SDL_ConvertAudio failed: %s\n", SDL_GetError());
return -1;
@@ -124,11 +122,10 @@ Sound_samples *create_sound_samples(const char *sample_files[],
void destroy_sound_samples(Sound_samples *sound_samples)
{
- // TODO: Use a seperate callback function for processing audio
+ // TODO: Use a seperate callback function for audio handling and pass that
+ // into SDL_OpenAudioDevice
trace_assert(sound_samples);
trace_assert(sound_samples->dev);
- SDL_PauseAudioDevice(sound_samples->dev, 1);
- SDL_ClearQueuedAudio(sound_samples->dev);
SDL_CloseAudioDevice(sound_samples->dev);
RETURN_LT0(sound_samples->lt);
}
|
Fixes contiki-ng/contiki-ng#774 Won't compile asm files | @@ -10,6 +10,7 @@ CC = arm-none-eabi-gcc
CPP = arm-none-eabi-cpp
LD = arm-none-eabi-gcc
AR = arm-none-eabi-ar
+AS = arm-none-eabi-gcc
OBJCOPY = arm-none-eabi-objcopy
OBJDUMP = arm-none-eabi-objdump
NM = arm-none-eabi-nm
@@ -25,6 +26,11 @@ ifeq ($(WERROR),1)
CFLAGS += -Werror
endif
+### Pass CFLAGS along to assembly files in the build
+ASFLAGS += $(CFLAGS)
+### Specify '-c' option to assemble only and not link
+ASFLAGS += -c
+
LDFLAGS += -mthumb -mlittle-endian
OBJDUMP_FLAGS += --disassemble --source --disassembler-options=force-thumb
|
SOVERSION bump to version 5.5.5 | @@ -45,7 +45,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_
# with backward compatible change and micro version is connected with any internal change of the library.
set(SYSREPO_MAJOR_SOVERSION 5)
set(SYSREPO_MINOR_SOVERSION 5)
-set(SYSREPO_MICRO_SOVERSION 4)
+set(SYSREPO_MICRO_SOVERSION 5)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
[examples] some cleaning in occ_slider_crank | @@ -4,7 +4,6 @@ from siconos.mechanics.collision.tools import Volume, Contactor, Shape
from siconos.io.mechanics_io import Hdf5
import siconos.io.mechanics_io
-#siconos.io.mechanics_io.set_implementation('original')
siconos.io.mechanics_io.set_backend('occ')
l1 = 0.153 # crank length
@@ -45,9 +44,9 @@ with Hdf5() as io:
io.addShapeDataFromFile('Artefact',
'../Mechanisms/SliderCrank/CAD/artefact2.step')
-# io.addObject('Artefact', [Shape(shape_data='Artefact',
-# instance_name='artefact')],
-# translation=[0., 0., 0.])
+ io.addObject('Artefact', [Shape(shape_name='Artefact',
+ instance_name='artefact')],
+ translation=[0., 0., 0.])
io.addObject('part1', [Volume(shape_name='body1',
instance_name='Body1',
@@ -271,6 +270,6 @@ with Hdf5(mode='r+') as io:
io.run(with_timer=True,
t0=0,
- T=10,
+ T=1,
h=0.0005,
Newton_max_iter=5)
|
+ fix demo_file_sanitize_test | @@ -211,10 +211,13 @@ int demo_server_is_path_sane(const uint8_t* path, size_t path_length)
if ((c >= 'a' && c <= 'z') ||
(c >= 'A' && c <= 'Z') ||
(c >= '0' && c <= '9') ||
- c == '-' || c == '_' || c == '/') {
+ c == '-' || c == '_') {
nb_good++;
past_is_dot = 0;
}
+ else if (c == '/' && i < path_length - 1 && nb_good > 0) {
+ nb_good++;
+ }
else if (c == '.' && !past_is_dot && nb_good > 0){
past_is_dot = 1;
}
|
OcAppleImg4Lib: Add additional matched logic to fall back to NVRAM value
Updates | @@ -858,6 +858,7 @@ OcGetLegacySecureBootECID (
EFI_STATUS Status;
OC_SMBIOS_TABLE SmbiosTable;
EFI_GUID Uuid;
+ UINTN ReadSize;
ASSERT (Config != NULL);
ASSERT (ApECID != NULL);
@@ -897,7 +898,7 @@ OcGetLegacySecureBootECID (
}
DEBUG ((DEBUG_INFO, "OC: Grabbed SB uuid %g from auto config - %r\n", &Uuid, Status));
}
- } else {
+ } else if (Config->PlatformInfo.UpdateNvram) {
Status = OcAsciiStrToRawGuid (OC_BLOB_GET (&Config->PlatformInfo.Nvram.SystemUuid), &Uuid);
if (EFI_ERROR (Status)) {
ZeroMem (&Uuid, sizeof (Uuid));
@@ -905,6 +906,21 @@ OcGetLegacySecureBootECID (
DEBUG ((DEBUG_INFO, "OC: Grabbed SB uuid %g from manual config - %r\n", &Uuid, Status));
}
+ if (IsZeroGuid (&Uuid)) {
+ ReadSize = sizeof (Uuid);
+ Status = gRT->GetVariable (
+ L"system-id",
+ &gAppleVendorVariableGuid,
+ NULL,
+ &ReadSize,
+ &Uuid
+ );
+ if (EFI_ERROR (Status)) {
+ ZeroMem (&Uuid, sizeof (Uuid));
+ }
+ DEBUG ((DEBUG_INFO, "OC: Grabbed SB uuid %g direct from NVRAM - %r\n", &Uuid, Status));
+ }
+
if (IsZeroGuid (&Uuid)) {
DEBUG ((DEBUG_ERROR, "OC: Grabbed zero system-id for SB, this is not allowed\n"));
CpuDeadLoop ();
|
Fix typos in comments/help | @@ -20,7 +20,7 @@ message TPoolQuantizationSchema {
map<uint32, TFeatureQuantizationSchema> FeatureIndexToSchema = 1;
// List of class names; see {--class-names} for `catboost fit`;
- // Makes sence only for multiclassification.
+ // Makes sense only for multiclassification.
//
// NOTE: order is important
repeated string ClassNames = 2;
|
Change calculation of warp id and thread master based on new workgroup size calculation in generic mode | @@ -336,7 +336,7 @@ int main()
recordError(&errors, "DEVICE NUMBER", i, default_dev, NULL);
//check warp #
- if (warp_id[i] != (MAX_THREADS_PER_TEAM - WARP_SIZE) / WARP_SIZE)
+ if (warp_id[i] != (MAX_THREADS_PER_TEAM - WARP_SIZE) / WARP_SIZE +1)
recordError(&errors, "WARP NUMBER", i, warp_id, NULL);
//check lane #
@@ -344,7 +344,7 @@ int main()
recordError(&errors, "LANE NUMBER", i, lane_id, NULL);
//check master thread #
- if (master_thread_id[i] != MAX_THREADS_PER_TEAM - WARP_SIZE)
+ if (master_thread_id[i] != MAX_THREADS_PER_TEAM)
recordError(&errors, "MASTER THREAD NUMBER", i, master_thread_id, NULL);
//check SPMD mode #
|
Sanity check the drbg cap lengths | @@ -1801,6 +1801,42 @@ ACVP_RESULT acvp_enable_drbg_length_cap (ACVP_CTX *ctx,
cap_list->cap.drbg_cap->drbg_cap_mode_list = drbg_cap_mode_list;
}
+ switch (param) {
+ case ACVP_DRBG_ENTROPY_LEN:
+ if (max > ACVP_DRBG_ENTPY_IN_BIT_MAX) {
+ ACVP_LOG_ERR("Parameter 'max'(%d) > ACVP_DRBG_ENTPY_IN_BIT_MAX(%d). "
+ "Please reduce the integer.",
+ max, ACVP_DRBG_ENTPY_IN_BIT_MAX);
+ return ACVP_INVALID_ARG;
+ }
+ break;
+ case ACVP_DRBG_NONCE_LEN:
+ if (max > ACVP_DRBG_NONCE_BIT_MAX) {
+ ACVP_LOG_ERR("Parameter 'max'(%d) > ACVP_DRBG_NONCE_BIT_MAX(%d). "
+ "Please reduce the integer.",
+ max, ACVP_DRBG_NONCE_BIT_MAX);
+ return ACVP_INVALID_ARG;
+ }
+ break;
+ case ACVP_DRBG_PERSO_LEN:
+ if (max > ACVP_DRBG_PER_SO_BIT_MAX) {
+ ACVP_LOG_ERR("Parameter 'max'(%d) > ACVP_DRBG_PER_SO_BIT_MAX(%d). "
+ "Please reduce the integer.",
+ max, ACVP_DRBG_PER_SO_BIT_MAX);
+ return ACVP_INVALID_ARG;
+ }
+ break;
+ case ACVP_DRBG_ADD_IN_LEN:
+ if (max > ACVP_DRBG_ADDI_IN_BIT_MAX) {
+ ACVP_LOG_ERR("Parameter 'max'(%d) > ACVP_DRBG_ADDI_IN_BIT_MAX(%d). "
+ "Please reduce the integer.",
+ max, ACVP_DRBG_ADDI_IN_BIT_MAX);
+ return ACVP_INVALID_ARG;
+ }
+ default:
+ break;
+ }
+
/*
* Add the length range to the cap
*/
|
Add new ID's | @@ -233,10 +233,12 @@ static void snap_decode(uint64_t reg)
(int)(reg >> 32ll), atype);
switch (atype) {
case 0x10140000: VERBOSE1("IBM Sample Code\n"); break;
- case 0x10141000: VERBOSE1("HLS Demo Memcopy\n"); break;
- case 0x10141001: VERBOSE1("HLS sponge\n"); break;
- case 0x10141002: VERBOSE1("HLS XXXX\n"); break;
- case 0x10141003: VERBOSE1("HLS test search\n"); break;
+ case 0x10141000: VERBOSE1("HLS Memcopy\n"); break;
+ case 0x10141001: VERBOSE1("HLS Checksum\n"); break;
+ case 0x10141002: VERBOSE1("HLS Hash Join\n"); break;
+ case 0x10141003: VERBOSE1("HLS Text Search\n"); break;
+ case 0x10141004: VERBOSE1("HLS Breadth first search (BFS)\n"); break;
+ case 0x10141005: VERBOSE1("HLS Intersect\n"); break;
default:
VERBOSE1("UNKNOWN Code.....\n");
break;
|
refine the state setting in tls13_handshake_wrapup | @@ -2568,21 +2568,20 @@ static int ssl_tls13_handshake_wrapup(mbedtls_ssl_context *ssl)
mbedtls_ssl_tls13_handshake_wrapup(ssl);
-#if defined(MBEDTLS_SSL_SESSION_TICKETS)
+#if defined(MBEDTLS_SSL_SESSION_TICKETS) && \
+ defined(MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_SOME_PSK_ENABLED)
/* TODO: Remove the check of SOME_PSK_ENABLED since SESSION_TICKETS requires
* SOME_PSK_ENABLED to be enabled. Here is just to make CI happy. It is
* expected to be resolved with issue#6395.
*/
-#if defined(MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_SOME_PSK_ENABLED)
/* Sent NewSessionTicket message only when client supports PSK */
- if (!mbedtls_ssl_tls13_some_psk_enabled(ssl)) {
- mbedtls_ssl_handshake_set_state(ssl, MBEDTLS_SSL_HANDSHAKE_OVER);
+ if (mbedtls_ssl_tls13_some_psk_enabled(ssl)) {
+ mbedtls_ssl_handshake_set_state(ssl, MBEDTLS_SSL_TLS1_3_NEW_SESSION_TICKET);
} else
#endif
- mbedtls_ssl_handshake_set_state(ssl, MBEDTLS_SSL_TLS1_3_NEW_SESSION_TICKET);
-#else
+ {
mbedtls_ssl_handshake_set_state(ssl, MBEDTLS_SSL_HANDSHAKE_OVER);
-#endif
+ }
return 0;
}
|
Error out if version does not match | @@ -614,6 +614,10 @@ static int ngtcp2_conn_recv_cleartext(ngtcp2_conn *conn, uint8_t exptype,
return NGTCP2_ERR_PROTO;
}
+ if (conn->version != hd.version) {
+ return NGTCP2_ERR_PROTO;
+ }
+
for (; pktlen;) {
nread = ngtcp2_pkt_decode_frame(&fr, pkt, pktlen);
if (nread < 0) {
|
fix(png): fix possible file leaks | @@ -80,11 +80,15 @@ static lv_res_t decoder_info(struct _lv_img_decoder_t * decoder, const void * sr
lv_fs_file_t f;
lv_fs_res_t res = lv_fs_open(&f, fn, LV_FS_MODE_RD);
if(res != LV_FS_RES_OK) return LV_RES_INV;
+
lv_fs_seek(&f, 16, LV_FS_SEEK_SET);
+
uint32_t rn;
lv_fs_read(&f, &size, 8, &rn);
- if(rn != 8) return LV_RES_INV;
lv_fs_close(&f);
+
+ if(rn != 8) return LV_RES_INV;
+
/*Save the data in the header*/
header->always_zero = 0;
header->cf = LV_IMG_CF_RAW_ALPHA;
|
config-tools:refine memory allocation for vm
1.The memory allocation effect is tested under XML files on multiple platforms.
2.Modified the conversion of memory units during memory reading and processing (MB to Byte). | @@ -36,16 +36,18 @@ def get_memory_info(vm_node_info):
size_hpa = []
hpa_info = {}
- whole_node_list = vm_node_info.xpath("./memory/size")
- if len(whole_node_list) != 0:
- hpa_info[0] = int(whole_node_list[0].text, 16)
+ size_node = common.get_node("./memory/size", vm_node_info)
+ if size_node is not None:
+ size_byte = int(size_node.text) * 0x100000
+ hpa_info[0] = size_byte
hpa_node_list = check_hpa(vm_node_info)
if len(hpa_node_list) != 0:
for hpa_node in hpa_node_list:
if hpa_node.tag == "start_hpa":
start_hpa.append(int(hpa_node.text, 16))
elif hpa_node.tag == "size_hpa":
- size_hpa.append(int(hpa_node.text))
+ size_byte = int(hpa_node.text) * 0x100000
+ size_hpa.append(size_byte)
if len(start_hpa) != 0 and len(start_hpa) == len(start_hpa):
for i in range(len(start_hpa)):
hpa_info[start_hpa[i]] = size_hpa[i]
@@ -58,7 +60,7 @@ def alloc_memory(scenario_etree, ram_range_info):
vm_node_index_list = []
dic_key = sorted(ram_range_info)
for key in dic_key:
- if key <= 0x100000000:
+ if key < 0x100000000:
ram_range_info.pop(key)
for vm_node in vm_node_list:
@@ -72,9 +74,9 @@ def alloc_memory(scenario_etree, ram_range_info):
return ram_range_info, mem_info_list, vm_node_index_list
def alloc_hpa_region(ram_range_info, mem_info_list, vm_node_index_list):
- mem_key = sorted(ram_range_info)
for vm_index in range(len(vm_node_index_list)):
hpa_key = sorted(mem_info_list[vm_index])
+ mem_key = sorted(ram_range_info)
for mem_start in mem_key:
mem_size = ram_range_info[mem_start]
for hpa_start in hpa_key:
@@ -143,7 +145,7 @@ def write_hpa_info(allocation_etree, mem_info_list, vm_node_index_list):
size_hpa_node = common.get_node("./size_hpa", hpa_region_node)
if size_hpa_node is None:
- common.append_node("./size_hpa", hex(hpa_info[start_hpa] * 0x100000), hpa_region_node)
+ common.append_node("./size_hpa", hex(hpa_info[start_hpa]), hpa_region_node)
region_index = region_index + 1
def alloc_vm_memory(board_etree, scenario_etree, allocation_etree):
|
Prevent consumption sensor to expose power for certain devices | @@ -3160,7 +3160,9 @@ static int sqliteLoadAllSensorsCallback(void *user, int ncols, char **colval , c
{
clusterId = clusterId ? clusterId : METERING_CLUSTER_ID;
if ((sensor.modelId() != QLatin1String("SP 120")) &&
- (sensor.modelId() != QLatin1String("ZB-ONOFFPlug-D0005")))
+ (sensor.modelId() != QLatin1String("ZB-ONOFFPlug-D0005")) &&
+ (sensor.modelId() != QLatin1String("TS0121")) &&
+ (sensor.modelId() != QLatin1String("Plug-230V-ZB3.0")))
{
item = sensor.addItem(DataTypeInt16, RStatePower);
item->setValue(0);
|
Make GUID_t members public, normalize tabs to spaces | @@ -77,7 +77,6 @@ namespace Microsoft {
/// Customers need to provide their own converter from RPC GUID type to ARIA portable GUID type.
/// </remarks>
struct ARIASDK_LIBABI GUID_t {
- private:
/// <summary>Specifies the first 8 hexadecimal digits of the GUID.</summary>
uint32_t Data1;
@@ -91,7 +90,6 @@ namespace Microsoft {
/// The remaining 6 bytes contain the final 12 hexadecimal digits.</summary>
uint8_t Data4[8];
- public:
/// <summary>
/// Create an empty Nil instance of GUID_t object (initialized to all 0)
/// {00000000-0000-0000-0000-000000000000}
|
king: fix typo in UDP.hs comment | 1. Opens a UDP socket and makes sure that it stays open.
- If can't open the port, wait and try again repeatedly.
- - If there is an error reading or writting from the open socket,
+ - If there is an error reading to or writing from the open socket,
close it and open another, making sure, however, to reuse the
same port
NOTE: It's not clear what, if anything, closing and reopening
|
doc: base name decision | @@ -20,17 +20,19 @@ For example:
## Considered Alternatives
-- restrict what `keySetBaseName` can accept has the downside that:
- - applications would suddenly fail when trying to set some key base names
- -
+- restrict what `keyAddBaseName/keySetBaseName` can accept: has the downside that
+ applications would suddenly fail when trying to set some key base names
+- have additional `keySetBaseName*` functions that make strings safe to be accepted
+ in `keyAddBaseName/keySetBaseName`: seems to be a too big change in the storage plugins
## Decision
-`keySetBaseName` must be able to encode any string as base name.
+`keyAddBaseName/keySetBaseName` never fail with any argument.
## Rationale
-- hard to use it wrong API: having only a single function `keySetBaseName`
+- hard to use it wrong API: having only the functions `keyAddBaseName/keySetBaseName`
+- applications and storage plugins can pass any name to `keyAddBaseName/keySetBaseName` without any further consideration
## Implications
|
"Fixed" weird %ap-lame errors in new talk. | =. +>.$
(so-hear | src %config src %full loc.cos)
=. +>.$
- %- ~(rep in loc.pes)
- |= {{w/ship s/status} _+>.$}
- (so-hear | src %status src w %full s)
+ =+ los=~(tap by loc.pes)
+ |-
+ ?~ los +>.^$
+ =. +>.^$
+ (so-hear | src %status src p.i.los %full q.i.los)
+ $(los t.los)
+ ::TODO ideally you'd just do this, but that runtime errors...
+ ::%- ~(rep in loc.pes)
+ ::|= {{w/ship s/status} _+>.$}
+ ::(so-hear | src %status src w %full s)
(so-unpack src nes)
::
++ so-hear ::< accept circle rumor
::
|= des/(list delta)
^- (quip move _+>)
- %+ roll des
- |= {d/delta m/(list move) _+>.$}
- =^ mos +>.^$ (bake d)
- [(welp m mos) +>.^$]
+ =| moz/(list move)
+ |- ^- (quip move _+>.^$)
+ ?~ des [moz +>.^$]
+ =^ mos +>.^$ (bake i.des)
+ $(moz (welp moz mos), des t.des)
+ ::TODO ideally you'd just do this, but that runtime errors on "bake"...
+ ::%+ roll des
+ ::|= {d/delta m/(list move) _+>.$}
+ ::=^ mos +>.^$ (bake d)
+ ::[(welp m mos) +>.^$]
::
++ peek ::< query on state
::> find the result (if any) for a given query.
|
perf(non-NULL check):
"output_ptr->field_ptr" should check non-null in hlfabricPayloadPacked() | @@ -589,6 +589,11 @@ __BOATSTATIC BOAT_RESULT hlfabricPayloadPacked(BoatHlfabricTx *tx_ptr,
packedLength = common__payload__get_packed_size( &payload );
output_ptr->field_len = packedLength;
output_ptr->field_ptr = BoatMalloc(packedLength);
+ if( NULL == output_ptr->field_ptr )
+ {
+ BoatLog(BOAT_LOG_CRITICAL, "Fail to allocate output_ptr->field_ptr.");
+ boat_throw(BOAT_ERROR_COMMON_OUT_OF_MEMORY, hlfabricPayloadPacked_exception);
+ }
common__payload__pack( &payload, output_ptr->field_ptr );
/* boat catch handle */
|
mbuf code samples use code-block | @@ -142,7 +142,7 @@ to denote the amount of payload that the application requires (aligned
on a 32-bit boundary in this case). All this leads to the total memory
block size required, denoted by the macro *MBUF\_MEMBLOCK\_OVERHEAD*.
-.. code:: c
+.. code-block:: c
#define MBUF_PKTHDR_OVERHEAD sizeof(struct os_mbuf_pkthdr) + sizeof(struct user_hdr)
@@ -226,7 +226,7 @@ packet to a networking interface. The code sample also provides an
example of copying data out of an mbuf as well as use of the "pullup"
api (another very common mbuf api).
-.. code:: c
+.. code-block:: c
void
@@ -290,7 +290,7 @@ data to/from mbufs and flat buffers!
A final note: these examples assume the same mbuf struture and
definitions used in the first example.
-.. code:: c
+.. code-block:: c
void
mbuf_usage_example2(struct mbuf *rxpkt)
@@ -352,7 +352,7 @@ example:
Not shown in the code example is a call ``my_task_rx_data_func``.
Presumably, some other code will call this API.
-.. code:: c
+.. code-block:: c
uint32_t pkts_rxd;
struct os_mqueue rxpkt_q;
|
Fixed store masking issue | @@ -257,7 +257,7 @@ void libxsmm_generator_cvtfp32bf16_avx512_microkernel( libxsmm_generated_code*
LIBXSMM_X86_GP_REG_UNDEF, 0,
im * 32 * i_micro_kernel_config->datatype_size_out,
i_micro_kernel_config->vector_name,
- reg_0, (im == (m_trips-1)) ? use_m_masking : 0, 2, 1 );
+ reg_0, (im == (m_trips-1)) ? use_m_masking * 2 : 0, 0, 1 );
}
if (n > 1) {
|
allocate spaces for the trailing NUL | @@ -869,7 +869,7 @@ if sys.argv[1] == "quic":
# provider h2o:
u.enable_probe(probe="send_response_header", fn_name="trace_h2o__send_response_header")
- cflags = ["-DMAX_EVENT_TYPE_LEN=%s" % max(map(lambda probe: len("%s__%s" % (probe.provider, probe.name)), u.enumerate_probes()))]
+ cflags = ["-DMAX_EVENT_TYPE_LEN=%s" % (1+max(map(lambda probe: len("%s__%s" % (probe.provider, probe.name)), u.enumerate_probes())))]
b = BPF(text=quic_bpf, usdt_contexts=[u], cflags=cflags)
else:
u.enable_probe(probe="receive_request", fn_name="trace_receive_req")
|
rm extra restrict qualifier;
Maybe this is confusing MSVC. Doesn't appear to impact codegen. | #include <math.h>
// Explicit curve evaluation, unroll simple cases to avoid pow overhead
-static void evaluate(float* restrict P, int n, float t, vec3 restrict p) {
+static void evaluate(float* restrict P, int n, float t, vec3 p) {
if (n == 2) {
p[0] = P[0] + (P[4] - P[0]) * t;
p[1] = P[1] + (P[5] - P[1]) * t;
|
Support list of keys for exists command | @@ -63,7 +63,6 @@ static bool
redis_arg0(struct msg *r)
{
switch (r->type) {
- case MSG_REQ_REDIS_EXISTS:
case MSG_REQ_REDIS_PERSIST:
case MSG_REQ_REDIS_PTTL:
case MSG_REQ_REDIS_TTL:
@@ -284,6 +283,7 @@ redis_argx(struct msg *r)
switch (r->type) {
case MSG_REQ_REDIS_MGET:
case MSG_REQ_REDIS_DEL:
+ case MSG_REQ_REDIS_EXISTS:
return true;
default:
@@ -2576,7 +2576,8 @@ redis_pre_coalesce(struct msg *rsp)
switch (rsp->type) {
case MSG_RSP_REDIS_INTEGER:
/* only redis 'del' fragmented request sends back integer reply */
- ASSERT(req->type == MSG_REQ_REDIS_DEL);
+ ASSERT((req->type == MSG_REQ_REDIS_DEL) ||
+ (req->type == MSG_REQ_REDIS_EXISTS));
mbuf = STAILQ_FIRST(&rsp->mhdr);
/*
@@ -2664,7 +2665,7 @@ redis_post_coalesce_mset(struct msg *request)
}
void
-redis_post_coalesce_del(struct msg *request)
+redis_post_coalesce_num(struct msg *request)
{
struct msg *response = request->selected_rsp;
rstatus_t status;
@@ -2738,7 +2739,8 @@ redis_post_coalesce(struct msg *req)
return redis_post_coalesce_mget(req);
case MSG_REQ_REDIS_DEL:
- return redis_post_coalesce_del(req);
+ case MSG_REQ_REDIS_EXISTS:
+ return redis_post_coalesce_num(req);
case MSG_REQ_REDIS_MSET:
return redis_post_coalesce_mset(req);
@@ -2950,6 +2952,9 @@ redis_fragment_argx(struct msg *r, struct server_pool *pool, struct rack *rack,
} else if (r->type == MSG_REQ_REDIS_DEL) {
status = msg_prepend_format(sub_msg, "*%d\r\n$3\r\ndel\r\n",
sub_msg->narg + 1);
+ } if (r->type == MSG_REQ_REDIS_EXISTS) {
+ status = msg_prepend_format(sub_msg, "*%d\r\n$6\r\nexists\r\n",
+ sub_msg->narg + 1);
} else if (r->type == MSG_REQ_REDIS_MSET) {
status = msg_prepend_format(sub_msg, "*%d\r\n$4\r\nmset\r\n",
sub_msg->narg + 1);
@@ -2984,6 +2989,7 @@ redis_fragment(struct msg *r, struct server_pool *pool, struct rack *rack, struc
switch (r->type) {
case MSG_REQ_REDIS_MGET:
case MSG_REQ_REDIS_DEL:
+ case MSG_REQ_REDIS_EXISTS:
return redis_fragment_argx(r, pool, rack, frag_msgq, 1);
case MSG_REQ_REDIS_MSET:
@@ -3026,6 +3032,7 @@ redis_is_multikey_request(struct msg *req)
switch (req->type) {
case MSG_REQ_REDIS_MGET:
case MSG_REQ_REDIS_DEL:
+ case MSG_REQ_REDIS_EXISTS:
case MSG_REQ_REDIS_MSET:
return true;
default:
|
Send invites to %i instead of %inbox | =- (sh-act %phrase - [%inv inv [self nom]]~)
%- ~(rep in sis)
|= {s/ship a/audience}
- (~(put in a) [s %inbox])
+ (~(put in a) [s %i])
::
++ filter
|= {nom/name cus/? utf/?}
|
Change the default value of TCP_MSS to 1440 and TCP_MSS Range : [576 1460] | @@ -294,12 +294,14 @@ menu "LWIP"
config TCP_MSS
int "Maximum Segment Size (MSS)"
- default 1436
- range 1220 1436
+ default 1440
+ range 576 1460
help
Set maximum segment size for TCP transmission.
- Can be set lower to save RAM, the default value 1436 will give best throughput.
+ Can be set lower to save RAM, the default value 1460(ipv4)/1440(ipv6) will give best throughput.
+ IPv4 TCP_MSS Range: 576 <= TCP_MSS <= 1460
+ IPv6 TCP_MSS Range: 1220<= TCP_mSS <= 1440
config TCP_MSL
int "Maximum segment lifetime (MSL)"
|
apps/graphics/pdcurs34: Fix missing ; typo in last commit | @@ -504,7 +504,7 @@ int PDC_color_content(short color, short *red, short *green, short *blue)
fbstate = &fbscreen->fbstate;
#ifdef PDCURSES_MONOCHROME
- greylevel = DIVROUND(fbstate->greylevel[color] * 1000, 255)
+ greylevel = DIVROUND(fbstate->greylevel[color] * 1000, 255);
*red = greylevel;
*green = greylevel;
*blue = greylevel;
|
correct test for HLS_CLOCK_PERIOD_CONSTRAINT in CAPI1.0 case | @@ -263,7 +263,7 @@ while [ -z "$SETUP_DONE" ]; do
fi
else
RESP=`grep '#export HLS_CLOCK_PERIOD_CONSTRAINT' $snap_env_sh`
- if [ -z "$RESP" ]; then
+ if [ -z "$RESP" ] && [ "$CAPI20" == "y" ]; then
sed -i 's/export HLS_CLOCK_PERIOD_CONSTRAINT/#export HLS_CLOCK_PERIOD_CONSTRAINT/g' $snap_env_sh
SETUP_INFO="$SETUP_INFO\n### INFO ### HLS_CLOCK_PERIOD_CONSTRAINT has been commented in snap_env.sh file"
fi
|
Extends the CCT app options about publish/unpublish resource
Allows user to publish/unpublish the swich resource from a cloud
and user can configure the cloud resource from commandline. | @@ -53,6 +53,12 @@ static int quit;
#define USER_ID_KEY "uid"
#define EXPIRESIN_KEY "expiresin"
+static const char *cis;
+static const char *auth_code;
+static const char *sid;
+static const char *apn;
+static const char *deviceid;
+
static void
display_menu(void)
{
@@ -68,9 +74,11 @@ display_menu(void)
PRINT("[5] Cloud Refresh Token\n");
PRINT("[6] Publish Resources\n");
PRINT("[7] Send Ping\n");
+ PRINT("[8] Unpublish switch resource\n");
+ PRINT("[9] Publish switch resource\n");
PRINT("-----------------------------------------------\n");
PRINT("-----------------------------------------------\n");
- PRINT("[8] Exit\n");
+ PRINT("[10] Exit\n");
PRINT("################################################\n");
PRINT("\nSelect option: \n");
}
@@ -86,8 +94,15 @@ static int
app_init(void)
{
int ret = oc_init_platform(manufacturer, NULL, NULL);
- ret |= oc_add_device("/oic/d", device_rt, device_name, spec_version,
+ oc_device_info_t* d = oc_core_add_new_device("/oic/d", device_rt, device_name, spec_version,
data_model_version, NULL, NULL);
+ if (!d) {
+ return 1;
+ }
+ if (deviceid == NULL) {
+ return 0;
+ }
+ oc_str_to_uuid(deviceid, &d->di);
return ret;
}
@@ -304,6 +319,7 @@ cloud_register(void)
return;
}
pthread_mutex_lock(&app_sync_lock);
+ oc_cloud_provision_conf_resource(ctx, cis, auth_code, sid, apn);
int ret = oc_cloud_register(ctx, cloud_register_cb, NULL);
pthread_mutex_unlock(&app_sync_lock);
if (ret < 0) {
@@ -605,8 +621,33 @@ ocf_event_thread(void *data)
}
int
-main(void)
+main(int argc, char *argv[])
{
+ if (argc > 1) {
+ device_name = argv[1];
+ PRINT("device_name: %s\n", argv[1]);
+ }
+ if (argc > 2) {
+ auth_code = argv[2];
+ PRINT("auth_code: %s\n", argv[2]);
+ }
+ if (argc > 3) {
+ cis = argv[3];
+ PRINT("cis : %s\n", argv[3]);
+ }
+ if (argc > 4) {
+ sid = argv[4];
+ PRINT("sid: %s\n", argv[4]);
+ }
+ if (argc > 5) {
+ apn = argv[5];
+ PRINT("apn: %s\n", argv[5]);
+ }
+ if (argc > 6) {
+ deviceid = argv[6];
+ PRINT("deviceID: %s\n", argv[6]);
+ }
+
struct sigaction sa;
sigfillset(&sa.sa_mask);
sa.sa_flags = 0;
@@ -646,6 +687,12 @@ main(void)
cloud_send_ping();
break;
case 8:
+ oc_cloud_delete_resource(res1);
+ break;
+ case 9:
+ oc_cloud_add_resource(res1);
+ break;
+ case 10:
handle_signal(0);
break;
default:
|
Removed useless vld1q_f32 from arm_correlate_f32 | @@ -390,8 +390,6 @@ void arm_correlate_f32(
x1v = x2v;
px+=4;
- x2v = vld1q_f32(px);
-
} while (--k);
/* If the srcBLen is not a multiple of 4, compute any remaining MACs here.
|
Update the tools/README
Updated the README file so it was a little more
explicit with example commands. | -Both tools, pre-commit and check-style, use clang-format to fix the code style.
+The `pre-commit` and `check-style` tools use `clang-format` to fix the code style.
-In order to use the tools one should copy the file "_clang-format" to the
-project's root dir. This file contains the description of the iotivity-constrained code
-style and will be used by clang-format.
+For Linux clang-format is part of clang and can be installed using your package manager
+For Windows clang-format can be downloaded from http://llvm.org/builds/
-The check-style tool can fix the code style of the project's file or only print
-the changes. If no parameter is given the files are automatically fixed, to only
-print the changes the option "-p" should be given.
+In order to use the tools copy the file "_clang-format" to the project's root directory.
+This file contains the description of the IoTivity-lite code style and will be used by
+clang-format.
+
+ # from project root directory run
+ cp tools/_clang-format _clang-format
+
+The clang-format tool can invoked directly for individual files.
+
+ # from project root directory run
+ clang-format -style=file -i <*.c or *.h file>
+
+The check-style tool can fix the code style of all the project's *.c and *.h files
+or only print the changes. If no parameter is given the files are automatically fixed,
+to only print the changes the option "-p" should be given.
+
+ # to print the changes run
+ python tools/check-style -p
+ # to automatically fix the the files run
+ python tools/check-style
The pre-commit tool is a git hook that fix the code style of the commmit
-automatically. To use this tool one have to copy this file to
-<project-root-dir>/.git/hooks/
+automatically. To use this tool copy this file to <project-root-dir>/.git/hooks/
+
+ # from project root directory
+ cp tools/pre-commit .git/hooks/pre-commit
Invoke doxygen doygen.ini to create the Doxygen API documentation.
Afterwards you find the start page by loading html/index.html.
+
+ # from project root directory
+ cd tools & doxygen doxygen.ini
\ No newline at end of file
|
burnet: add case EC_LED_ID_POWER_LED to led_set_color
BRANCH=firmware-kukui-12573.B
TEST=make sure power led can be controlled by ectool.
Tested-by: Devin Lu | @@ -81,6 +81,9 @@ static int led_set_color(enum ec_led_id led_id, enum led_color color)
case EC_LED_ID_BATTERY_LED:
rv = led_set_color_battery(color);
break;
+ case EC_LED_ID_POWER_LED:
+ rv = led_set_color_power(color);
+ break;
default:
return EC_ERROR_UNKNOWN;
}
|
Make sure after installing homebridge homebridge variable is set to managed | @@ -399,9 +399,8 @@ function checkHomebridge {
process=$(ps -ax | grep " homebridge$")
if [ -z "$process" ]; then
[[ $LOG_INFO ]] && echo "${LOG_INFO}starting homebridge"
- if [[ "$HOMEBRIDGE" != "managed" ]]; then
putHomebridgeUpdated "homebridge" "managed"
- fi
+
homebridge -U /home/$MAINUSER/.homebridge &
fi
|
Ragger Python regex warnings fix | @@ -21,7 +21,7 @@ sig_ctx = {}
# Output = ('uint8', [2, None, 4]) | ('bool', [])
def get_array_levels(typename):
array_lvls = list()
- regex = re.compile("(.*)\[([0-9]*)\]$")
+ regex = re.compile(r"(.*)\[([0-9]*)\]$")
while True:
result = regex.search(typename)
@@ -42,7 +42,7 @@ def get_array_levels(typename):
# Input = "uint64" | "string"
# Output = ('uint', 64) | ('string', None)
def get_typesize(typename):
- regex = re.compile("^(\w+?)(\d*)$")
+ regex = re.compile(r"^(\w+?)(\d*)$")
result = regex.search(typename)
typename = result.group(1)
typesize = result.group(2)
|
odissey: properly include client_pool changes | #include "od_config.h"
#include "od_server.h"
#include "od_server_pool.h"
+#include "od_client.h"
+#include "od_client_list.h"
+#include "od_client_pool.h"
#include "od_route_id.h"
#include "od_route.h"
#include "od_route_pool.h"
-#include "od_client.h"
-#include "od_client_list.h"
#include "od.h"
#include "od_io.h"
#include "od_pooler.h"
|
horadric update (468334185) | },
"horadric":{
"formula": {
- "sandbox_id": 415739617,
+ "sandbox_id": 468334185,
"match": "horadric"
},
"executable": {
|
mangohudctl: expand help message | #include <string.h>
-#include "mangoapp.h"
#include <stdio.h>
+#include "mangoapp.h"
void help_and_quit() {
// TODO! document attributes and values
fprintf(stderr, "Usage: mangohudctl [set|toggle] attribute [value]\n");
+ fprintf(stderr, "Attributes:\n");
+ fprintf(stderr, " no_display hides or shows hud\n");
+ fprintf(stderr, " log_session handles logging status\n");
+ fprintf(stderr, "Accepted values:\n");
+ fprintf(stderr, " true\n");
+ fprintf(stderr, " false\n");
+ fprintf(stderr, " 1\n");
+ fprintf(stderr, " 0\n");
exit(1);
}
@@ -20,7 +28,6 @@ bool str_to_bool(const char *value)
exit(1);
}
-
bool set_attribute(struct mangoapp_ctrl_msgid1_v1 *ctrl_msg,
const char *attribute, const char* value)
{
@@ -35,7 +42,6 @@ bool set_attribute(struct mangoapp_ctrl_msgid1_v1 *ctrl_msg,
return false;
}
-
bool toggle_attribute(struct mangoapp_ctrl_msgid1_v1 *ctrl_msg,
const char *attribute)
{
|
Fix warning for uninitialized variable | @@ -123,7 +123,7 @@ http_ssi_cb(http_state_t* hs, const char* tag_name, size_t tag_len) {
} else if (!strncmp(tag_name, "led_status", tag_len)) {
esp_http_server_write_string(hs, "Led is on");
} else if (!strncmp(tag_name, "wifi_list", tag_len)) {
- size_t i;
+ size_t i = 0;
ESP_UNUSED(i);
esp_http_server_write_string(hs, "<table class=\"table\">");
|
Fix possible memory leak. | @@ -314,8 +314,15 @@ int yr_object_from_external_variable(
break;
}
+ if (result == ERROR_SUCCESS)
+ {
*object = obj;
}
+ else
+ {
+ yr_object_destroy(obj);
+ }
+ }
return result;
}
|
Fixing a file name typo (plug.c)
In [Example of component requirements] it shows "plug.c" while in the rest of the explanation it refer to "spark_plug.c", same thing with "plug.h". | @@ -527,8 +527,8 @@ Imagine there is a ``car`` component, which uses the ``engine`` component, which
- engine.c
- include/ - engine.h
- spark_plug/ - CMakeLists.txt
- - plug.c
- - plug.h
+ - spark_plug.c
+ - spark_plug.h
Car component
^^^^^^^^^^^^^
|
get-gcp-jwt: correct scope, clean up call
It turns out 'devstorage.read_write' also gives us an access token
instead of a JWT, and is probably more the thing that we want.
Took the opportunity to make scope a macro to clean up the make-jwt call
site. | ;< =key:rsa bind:m read-private-key
;< kid=@t bind:m (read-setting %private-key-id)
;< aud=@t bind:m (read-setting %token-uri)
+=* scope 'https://www.googleapis.com/auth/devstorage.read_write'
=/ jot=@t
- %: make-jwt
- key kid iss
- 'https://www.googleapis.com/auth/cloud-platform'
- aud now.bowl
- ==
+ (make-jwt key kid iss scope aud now.bowl)
;< p=[access-token=@t expires-at=@da] bind:m
(get-access-token jot aud now.bowl)
(pure:m !>(p))
|
protocol update
set BIP31 to this new version only | @@ -30,7 +30,7 @@ static const int DATABASE_VERSION = 21212;
// network protocol versioning
//
-static const int PROTOCOL_VERSION = 31005; //Protocol is now 31005 as of D v3.3
+static const int PROTOCOL_VERSION = 33500; //Protocol is now 33500 as of D v3.3.5
// intial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 21212;
@@ -43,14 +43,14 @@ extern int MIN_MN_PROTO_VERSION;
// nTime field added to CAddress, starting with this version;
// if possible, avoid requesting addresses nodes older than this
-static const int CADDR_TIME_VERSION = 31402;
+static const int CADDR_TIME_VERSION = 31005;
// only request blocks from nodes outside this range of versions
static const int NOBLKS_VERSION_START = 70002;
static const int NOBLKS_VERSION_END = 70006;
// BIP 0031, pong message, is enabled for all versions AFTER this one
-static const int BIP0031_VERSION = 21212;
+static const int BIP0031_VERSION = 31005;
// "mempool" command, enhanced "getdata" behavior starts with this version:
static const int MEMPOOL_GD_VERSION = 60002;
|
cirrus: fix PATH before tests | @@ -144,7 +144,6 @@ mac_task:
brew install glib
brew install go
brew install [email protected]
- export PATH="/usr/local/opt/[email protected]/bin:$PATH"
brew install gpgme
brew install gradle
brew install graphviz
@@ -224,7 +223,8 @@ mac_task:
tests_script:
# Remove files produced by `ronn`, since `testscr_check_formatting` only checks the formatting, if the stating area is clean
- git checkout .
- - export PATH=$PATH:"$CIRRUS_WORKING_DIR/$INSTALL_DIR/bin:/usr/local/opt/llvm/bin"
+ - export PATH=$PATH:"$CIRRUS_WORKING_DIR/$INSTALL_DIR/bin"
+ - export PATH="/usr/local/opt/[email protected]/bin:/usr/local/opt/llvm/bin:$PATH"
- *run_tests
- | # Uninstall Elektra
output="$(cmake --build "$BUILD_DIR" --target uninstall 2>&1)" || printf '%s' "$output"
|
add logf() utility | #include <vector>
#include <unistd.h>
+#include <stdarg.h>
#include "h2olog.h"
@@ -44,6 +45,32 @@ Other options:
return;
}
+static void make_timestamp(char *buf, size_t buf_len)
+{
+ time_t t = time(NULL);
+ struct tm tms;
+ localtime_r(&t, &tms);
+ const char *iso8601format = "%FT%TZ";
+ strftime(buf, buf_len, iso8601format, &tms);
+}
+
+static void logf(const char* fmt, ...)
+ __attribute__((format (printf, 1, 2)));
+
+static void logf(const char* fmt, ...)
+ {
+ char buf[1024];
+ va_list args;
+ va_start(args, fmt);
+ vsnprintf(buf, sizeof(buf), fmt, args);
+ va_end(args);
+
+ char timestamp[128];
+ make_timestamp(timestamp, sizeof(timestamp));
+
+ fprintf(stderr, "%s %s\n", timestamp, buf);
+}
+
static void show_event_per_sec(h2o_tracer_t *tracer, time_t *t0)
{
time_t t1 = time(NULL);
@@ -51,17 +78,11 @@ static void show_event_per_sec(h2o_tracer_t *tracer, time_t *t0)
if (d > 10) {
uint64_t c = tracer->count / d;
if (c > 0) {
- struct tm t;
- localtime_r(&t1, &t);
- char s[100];
- const char *iso8601format = "%FT%TZ";
- strftime(s, sizeof(s), iso8601format, &t);
-
if (tracer->lost_count > 0) {
- fprintf(stderr, "%s %20" PRIu64 " events/s (possibly lost %" PRIu64 " events)\n", s, c, tracer->lost_count);
+ logf("%20" PRIu64 " events/s (possibly lost %" PRIu64 " events)", c, tracer->lost_count);
tracer->lost_count = 0;
} else {
- fprintf(stderr, "%s %20" PRIu64 " events/s\n", s, c);
+ logf("%20" PRIu64 " events/s", c);
}
tracer->count = 0;
}
@@ -86,7 +107,7 @@ static void show_process(pid_t pid)
cmdline[i] = ' ';
}
}
- fprintf(stderr, "Attaching pid=%d (%s)\n", pid, cmdline);
+ logf("Attaching pid=%d (%s)", pid, cmdline);
}
static std::string join_str(const std::string &sep, const std::vector<std::string> &strs)
|
Added sceKernelPowerLock sceKernelPowerUnlock | @@ -56,6 +56,24 @@ int sceKernelExitProcess(int res);
*/
int sceKernelPowerTick(int type);
+/***
+ * Locks certain timers from triggering.
+ *
+ * @param[in] type - One of ::KernelPowerTickType
+ *
+ * @return 0
+*/
+int sceKernelPowerLock(int type);
+
+/***
+ * Unlocks certain timers.
+ *
+ * @param[in] type - One of ::KernelPowerTickType
+ *
+ * @return 0
+*/
+int sceKernelPowerUnlock(int type);
+
/***
* Get the process time of the current process.
*
|
apps/import/Makefile: Eliminate a MAKE sytax error that occurs in some (but not environments) when symtab.c has not been generated. | SUBDIRS = arch build include libs startup tmp
FILES = .config System.map User.map
-
-define MKSYMTAB
ifeq (,$(wildcard ./symtab.c))
+define MKSYMTAB
$(Q) $(MAKE) -f Makefile.symtab $1
-endif
endef
+else
+define MKSYMTAB
+endef
+endif
all: symtab
.PHONY: context depend clean distclean
|
libhfuzz: improve _memcmp | @@ -128,7 +128,7 @@ __attribute__((constructor)) void hfuzzInstrumentInit(void) {
static int _memcmp(const uint8_t* m1, const uint8_t* m2, size_t n) {
for (size_t i = 0; i < n; i++) {
if (m1[i] != m2[i]) {
- return (m1[i] - m2[i]);
+ return ((int)m1[i] - (int)m2[i]);
}
}
return 0;
|
Finalizing updates for changelog | -Version 1.2.1 (09 January 2017)
+Version 1.2.1 (23 January 2017)
[General]
* 1.2.1 is the first micro update release against 1.2
@@ -8,9 +8,12 @@ Version 1.2.1 (09 January 2017)
* removal of hard-coded paths in Makefiles installed with TAU (https://github.com/openhpc/ohpc/issues/355)
* document need for resolvable SMS hostname (https://github.com/openhpc/ohpc/pull/250)
* updated Requires stanza for mpiP packaging (https://github.com/openhpc/ohpc/issues/344)
+ * added 'make_repo.sh' utility for inclusion with stand-alone tarballs (https://github.com/openhpc/ohpc/issues/363)
+ * updated patches for mpiP to enable usage on aarch64 (https://github.com/openhpc/ohpc/pull/358)
* updated modulefile compatibility packaging for Intel Parallel Studio toolchain
- support "2017 Update 1" version string (https://github.com/openhpc/ohpc/pull/342)
- support installation target that is a soft link (https://github.com/openhpc/ohpc/issues/347)
+ - reenable detection of multiply installed versions (https://github.com/openhpc/ohpc/issues/361)
[Component Version Changes]
* docs-ohpc (v1.2 -> v1.2.1)
|
Add several headers to libtcod.h. | #include "console_init.h"
#include "console_printing.h"
#include "console_rexpaint.h"
+#include "context.h"
#include "error.h"
#include "fov.h"
#include "globals.h"
#include "path.h"
#include "pathfinder.h"
#include "parser.h"
+#include "renderer_gl.h"
+#include "renderer_gl1.h"
+#include "renderer_gl2.h"
+#include "renderer_sdl2.h"
#include "sys.h"
#include "tileset.h"
+#include "tileset_fallback.h"
#include "tileset_render.h"
+#include "tileset_truetype.h"
#include "tree.h"
#include "txtfield.h"
#include "zip.h"
|
crypto: fixed another compatibility issue | @@ -175,6 +175,8 @@ int flb_hmac_init(struct flb_hmac *context,
if (context->backend_context == NULL) {
return FLB_CRYPTO_ALLOCATION_ERROR;
}
+
+ HMAC_CTX_init(context->backend_context);
#else
context->backend_context = HMAC_CTX_new();
@@ -185,8 +187,6 @@ int flb_hmac_init(struct flb_hmac *context,
}
#endif
- HMAC_CTX_init(context->backend_context);
-
result = HMAC_Init_ex(context->backend_context,
key, key_length,
digest_algorithm_instance,
@@ -306,11 +306,13 @@ int flb_hmac_cleanup(struct flb_hmac *context)
}
#else
if (context->backend_context != NULL) {
+#if FLB_CRYPTO_OPENSSL_COMPAT_MODE == 0
HMAC_CTX_cleanup(context->backend_context);
-#if FLB_CRYPTO_OPENSSL_COMPAT_MODE == 0
flb_free(context->backend_context);
#else
+ HMAC_CTX_reset(context->backend_context);
+
HMAC_CTX_free(context->backend_context);
#endif
|
No big empty whitespace blocks in generated code | @@ -148,7 +148,7 @@ def generate_code(file, genfile, localvars={}):
print("Error: cannot compile file {}".format(genfile), file=sys.stderr)
raise
- return localvars['generated_code']
+ return re.sub(r'\n{3,}', '\n\n', localvars['generated_code'])
def generate_desugared(hlir, hlir16, filename, file_with_path):
|
note RFC. | - Can set tls authentication with forward-addr: IP#tls.auth.name
And put the public cert bundle in tls-cert-bundle: "ca-bundle.pem".
such as forward-addr: 9.9.9.9@853#dns.quad9.net or
- 1.1.1.1@853#cloudflare-dns.com
+ 1.1.1.1@853#cloudflare-dns.com (RFC 8310).
18 April 2018: Wouter
- Fix auth-zone retry timer to be on schedule with retry timeout,
|
tests/pup/motors/busy: Fix argument being tested.
The argument being tested no longer exists, so it was not
giving the right exception. | @@ -19,7 +19,7 @@ motor.run_target(500, 0)
# Try to change a setting. This should raise an error because the motor is busy.
try:
- motor.control.limits(duty=50)
+ motor.control.limits(torque=500)
except Exception as e:
exception = e
pass
|
mod multiplier for nomod | @@ -101,7 +101,7 @@ def diffmod(replay_info, diff):
def getmultiplier(mods):
multiplier = {Mod.Easy: 0.5, Mod.NoFail: 0.5, Mod.HalfTime: 0.3,
Mod.HardRock: 1.06, Mod.SuddenDeath: 1, Mod.Perfect: 1, Mod.DoubleTime: 1.12, Mod.Nightcore: 1.12, Mod.Hidden: 1.06, Mod.Flashlight: 1.12,
- Mod.Relax: 0, Mod.Autopilot: 0, Mod.SpunOut: 0.9, Mod.Autoplay: 1}
+ Mod.Relax: 0, Mod.Autopilot: 0, Mod.SpunOut: 0.9, Mod.Autoplay: 1, Mod.NoMod: 1}
result = 1
for m in mods:
result *= multiplier[m]
|
Try some directory tweaks | @@ -9,33 +9,39 @@ jobs:
# you must check out the repository
- name: Checkout
uses: actions/checkout@v2
+ - name: Move files into workspace subdirectory
+ run: |
+ mkdir -p workspace/zmk
+ mv * workspace/zmk || true
- name: West Init
uses: ./.github/actions/zephyr-west # Uses an action in the root directory
id: west-init
with:
command: 'init'
- command-args: '-l .'
- - name: list files
- run: 'ls ../'
+ command-args: '-l workspace/zmk'
- name: West Update
uses: ./.github/actions/zephyr-west # Uses an action in the root directory
id: west-update
+ working-directory: 'workspace/zmk'
with:
command: 'update'
- name: West Config Zephyr Base
uses: ./.github/actions/zephyr-west # Uses an action in the root directory
id: west-config
+ working-directory: 'workspace/zmk'
with:
command: 'config'
command-args: '--global zephyr.base-prefer configfile'
- name: West Zephyr Export
uses: ./.github/actions/zephyr-west # Uses an action in the root directory
id: west-zephyr-export
+ working-directory: 'workspace/zmk'
with:
command: 'zephyr-export'
- name: West Build
uses: ./.github/actions/zephyr-west # Uses an action in the root directory
id: west-build
+ working-directory: 'workspace/zmk'
with:
command: 'build'
command-args: '-b nucleo_wb55rg -- -DSHIELD=petejohanson_handwire'
|
Change mpfit covariance scale | @@ -1033,11 +1033,16 @@ int survive_optimizer_run(survive_optimizer *optimizer, struct mp_result_struct
}
}
}
+ gemm_ABAt_add_scaled(&R_q, &G, &R_aa, 0, 1, 1, 0);
- gemm_ABAt_add_scaled(&R_q, &G, &R_aa, 0, 1,
- result->bestnorm / (optimizer->measurementsCnt - totalFreePoseCount * pose_size), 0);
+ // gemm_ABAt_add_scaled(&R_q, &G, &R_aa, 0, 1,
+ // result->bestnorm / (optimizer->measurementsCnt - totalFreePoseCount * pose_size), 0);
assert(sane_covariance(&R_q));
}
+
+ // https://lmfit.github.io/lmfit-py/fitting.html#uncertainties-in-variable-parameters-and-their-correlations
+ FLT rchisqr = result->bestnorm / result->nfree;
+ cn_multiply_scalar(&R_q, &R_q, rchisqr);
}
if(!optimizer->settings->use_quat_model) {
|
burn masternode pos rewardshare if masternodes are not found | @@ -3646,7 +3646,13 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int
payee =GetScriptForDestination(vecMasternodes[winningNode].pubkey.GetID());
} else {
if(fDebug) { printf("CreateCoinStake() : Failed to detect masternode to pay\n"); }
- hasPayment = false;
+ // masternodes are in-eligible for payment, burn the coins in-stead
+ std::string burnAddress;
+ if (fTestNet) burnAddress = "8TestXXXXXXXXXXXXXXXXXXXXXXXXbCvpq";
+ else burnAddress = "DNRXXXXXXXXXXXXXXXXXXXXXXXXXZeeDTw";
+ CBitcoinAddress burnDestination;
+ burnDestination.SetString(burnAddress);
+ payee = GetScriptForDestination(burnDestination.Get());
}
}
}
|
Add more debug printfs. | @@ -1088,6 +1088,9 @@ _httpTLSStart(http_t *http) // I - Connection to server
_cupsMutexUnlock(&tls_mutex);
+ DEBUG_printf(("4_httpTLSStart: Using private key file '%s'.", keyfile));
+ DEBUG_printf(("4_httpTLSStart: Using certificate file '%s'.", crtfile));
+
if (!SSL_CTX_use_PrivateKey_file(context, keyfile, SSL_FILETYPE_PEM) || !SSL_CTX_use_certificate_chain_file(context, crtfile))
{
// Unable to load private key or certificate...
@@ -1099,7 +1102,6 @@ _httpTLSStart(http_t *http) // I - Connection to server
http->error = EIO;
SSL_CTX_free(context);
- _cupsMutexUnlock(&tls_mutex);
return (-1);
}
@@ -1115,6 +1117,8 @@ _httpTLSStart(http_t *http) // I - Connection to server
strlcat(cipherlist, ":!SHA1:!SHA256:!SHA384", sizeof(cipherlist));
strlcat(cipherlist, ":@STRENGTH", sizeof(cipherlist));
+ DEBUG_printf(("4_httpTLSStart: cipherlist='%s', tls_min_version=%d, tls_max_version=%d", cipherlist, tls_min_version, tls_max_version));
+
SSL_CTX_set_min_proto_version(context, versions[tls_min_version]);
SSL_CTX_set_max_proto_version(context, versions[tls_max_version]);
SSL_CTX_set_cipher_list(context, cipherlist);
@@ -1141,7 +1145,8 @@ _httpTLSStart(http_t *http) // I - Connection to server
if (http->mode == _HTTP_MODE_CLIENT)
{
- // Negotiate as a server...
+ // Negotiate as a client...
+ DEBUG_puts("4_httpTLSStart: Calling SSL_connect...");
if (SSL_connect(http->tls) < 1)
{
// Failed
@@ -1156,12 +1161,15 @@ _httpTLSStart(http_t *http) // I - Connection to server
SSL_free(http->tls);
http->tls = NULL;
+ DEBUG_printf(("4_httpTLSStart: Returning -1 (%s)", ERR_error_string(error, NULL)));
+
return (-1);
}
}
else
{
// Negotiate as a server...
+ DEBUG_puts("4_httpTLSStart: Calling SSL_accept...");
if (SSL_accept(http->tls) < 1)
{
// Failed
@@ -1176,10 +1184,14 @@ _httpTLSStart(http_t *http) // I - Connection to server
SSL_free(http->tls);
http->tls = NULL;
+ DEBUG_printf(("4_httpTLSStart: Returning -1 (%s)", ERR_error_string(error, NULL)));
+
return (-1);
}
}
+ DEBUG_puts("4_httpTLSStart: Returning 0.");
+
return (0);
}
|
Update the description to reflect Python3 as the default interpreter | @@ -35,7 +35,7 @@ With some Linux distributions you may get the ``Failed to open port /dev/ttyUSB0
Setting up Python 3 as default for Ubuntu and Debian
----------------------------------------------------
-Ubuntu and Debian are still providing Python 2.7 as the default interpreter but some required packages may be missing for newer distributions. Python 3 is recommended and can be installed as follows::
+Ubuntu (distributions before v20.04) and Debian (distributions before v7) are still providing Python 2.7 as the default interpreter. Python 3 is recommended instead and can be installed in old distributions as follows, or please consult the documentation of your operating system for other recommended ways to achieve this::
sudo apt-get install python3 python3-pip python3-setuptools
|
Fix documentation mistake about standalone problem
I guess author meant "standalone program" not "standalone problem" ?
Related: | ****************************************************************************/
/* Configuration ************************************************************/
/* CONFIG_NSH_BUILTIN_APPS - Build the I2SCHAR test as an NSH built-in
- * function. Default: Built as a standalone problem
+ * function. Default: Built as a standalone program
* CONFIG_EXAMPLES_I2SCHAR_DEVPATH - The default path to the I2S character
* device. Default: /dev/i2schar0
*/
|
Add DbgDumpWithIndices for TVector to allow automatic T type deduction when passing TVector (current implementation for TConstArrayRef cannot deduce T in this case). | @@ -57,4 +57,11 @@ namespace NCB {
return NPrivate::TDbgDumpWithIndices<T>(v, onSeparateLines);
}
+ template <class T>
+ static inline NPrivate::TDbgDumpWithIndices<T> DbgDumpWithIndices(
+ const TVector<T>& v,
+ bool onSeparateLines = false
+ ) {
+ return NPrivate::TDbgDumpWithIndices<T>(v, onSeparateLines);
+ }
}
|
gpcloud: check returned body before parsing
Compatible S3 services don't always return error with XML body, check it
before parsing. | @@ -548,6 +548,14 @@ bool S3InterfaceService::abortUpload(const S3Url &s3Url, const string &uploadId)
}
S3MessageParser::S3MessageParser(const Response &resp) {
+ // Compatible S3 services don't always return XML
+ if (resp.getRawData().data() == NULL) {
+ message = "Unknown error";
+ code = "Unknown error code";
+
+ return;
+ }
+
xmlptr = xmlCreatePushParserCtxt(NULL, NULL, (const char *)(resp.getRawData().data()),
resp.getRawData().size(), "resp.xml");
if (xmlptr != NULL) {
|
BugID:19014385:[build] improve autobuild.sh script | @@ -33,9 +33,9 @@ function do_build()
build_board=$2
build_option=$3
- app_dir="app/example/$(sed 's/\./\//g' <<< ${build_app})"
- if [ ! -d ${app_dir} ]; then
- echo "warning: ${app_dir} none exist, build ${build_app}@${build_board} ${build_option} skipped"
+ app_mkfile="app/example/$(sed 's/\./\//g' <<< ${build_app})/aos.mk"
+ if [ ! -f ${app_mkfile} ]; then
+ echo "warning: ${app_mkfile} none exist, build ${build_app}@${build_board} ${build_option} skipped"
return 0
fi
|
Always execute h3 cleanup path when evloop is in use
This is an alternative approach to fix h3 detection | @@ -715,16 +715,16 @@ int main(int argc, char **argv)
#endif
}
+#if H2O_USE_LIBUV
+ /* libuv path currently does not support http3 */
+#else
if (ctx.protocol_selector.ratio.http3 > 0) {
h2o_quic_close_all_connections(&ctx.http3->h3);
while (h2o_quic_num_connections(&ctx.http3->h3) != 0) {
-#if H2O_USE_LIBUV
- uv_run(ctx.loop, UV_RUN_ONCE);
-#else
h2o_evloop_run(ctx.loop, INT32_MAX);
-#endif
}
}
+#endif
return 0;
}
|
Short note on use of mkauthlist | @@ -10,7 +10,7 @@ An overview of the core cosmology library, providing routines for cosmological p
## Editing this Paper
Fork and/or clone the project repo, and then
-edit the primary file. The name of this file will vary according to its format, but it should be one of either `main.rst` (if it's a [`reStructuredText`](http://docutils.sourceforge.net/rst.html) Note), `main.md` (if it's a [`Markdown`](https://github.com/adam-p/Markdown-here/wiki/Markdown-Cheatsheet) Note), `main.ipynb` (if it's an [`IPython Notebook`](https://ipython.org/notebook.html)) or `main.tex` (if it's a latex Note or paper).
+edit the primary file, `main.tex`.
Please use the `figures` folder for your images.
## Building this Paper
@@ -22,7 +22,10 @@ You can compile latex papers locally with
```
make [apj|apjl|prd|prl|mnras]
```
-(`make` with no arguments compiles latex in LSST DESC Note style.)
+(`make` with no arguments compiles latex in LSST DESC Note style, and uses Alex
+Drlica-Wagner's `mkauthlist` program to compile the author list from the
+information stored in `authors.csv`.)
+
## Updating the Styles and Templates
@@ -58,4 +61,3 @@ To enable this service, you need to follow these steps:
4. Copy the `.travis.yml` file in this folder to the top level of your repo (or merge its contents with your existing `.travis.yml` file).
Edit the final `git push` command with your GitHub username.
Commit and push to trigger your travis build, but note that the PDF will only be deployed if the master branch is updated.
-
|
simd: optimize some mat4 operations with neon | @@ -118,6 +118,11 @@ glm_mat4_copy(mat4 mat, mat4 dest) {
glmm_store(dest[1], glmm_load(mat[1]));
glmm_store(dest[2], glmm_load(mat[2]));
glmm_store(dest[3], glmm_load(mat[3]));
+#elif defined(CGLM_NEON_FP)
+ vst1q_f32(dest[0], vld1q_f32(mat[0]));
+ vst1q_f32(dest[1], vld1q_f32(mat[1]));
+ vst1q_f32(dest[2], vld1q_f32(mat[2]));
+ vst1q_f32(dest[3], vld1q_f32(mat[3]));
#else
glm_mat4_ucopy(mat, dest);
#endif
@@ -252,7 +257,7 @@ glm_mat4_mul(mat4 m1, mat4 m2, mat4 dest) {
glm_mat4_mul_avx(m1, m2, dest);
#elif defined( __SSE__ ) || defined( __SSE2__ )
glm_mat4_mul_sse2(m1, m2, dest);
-#elif defined( __ARM_NEON_FP )
+#elif defined(CGLM_NEON_FP)
glm_mat4_mul_neon(m1, m2, dest);
#else
float a00 = m1[0][0], a01 = m1[0][1], a02 = m1[0][2], a03 = m1[0][3],
@@ -506,6 +511,13 @@ void
glm_mat4_scale(mat4 m, float s) {
#if defined( __SSE__ ) || defined( __SSE2__ )
glm_mat4_scale_sse2(m, s);
+#elif defined(CGLM_NEON_FP)
+ float32x4_t v0;
+ v0 = vdupq_n_f32(s);
+ vst1q_f32(m[0], vmulq_f32(vld1q_f32(m[0]), v0));
+ vst1q_f32(m[1], vmulq_f32(vld1q_f32(m[1]), v0));
+ vst1q_f32(m[2], vmulq_f32(vld1q_f32(m[2]), v0));
+ vst1q_f32(m[3], vmulq_f32(vld1q_f32(m[3]), v0));
#else
glm_mat4_scale_p(m, s);
#endif
|
openjdk 11.0.4 | @@ -7,9 +7,9 @@ SET(JDK12_DARWIN sbr:1128561457)
SET(JDK12_LINUX sbr:1128737735)
SET(JDK12_WINDOWS sbr:1128743394)
# JDK 11
-SET(JDK11_DARWIN sbr:1033682443)
-SET(JDK11_LINUX sbr:1033690755)
-SET(JDK11_WINDOWS sbr:1033707515)
+SET(JDK11_DARWIN sbr:1128537472)
+SET(JDK11_LINUX sbr:1130039048)
+SET(JDK11_WINDOWS sbr:1128549905)
SET(JDK11_LINUX_ASAN sbr:893693905)
# JDK 10
|
Add pip install coveralls to Travis file | @@ -13,6 +13,7 @@ before_install:
- sudo apt-get install fftw3 fftw3-dev pkg-config
# - sudo apt-get install latexmk
- pip install numpy
+ - pip install coveralls
- ./install-gsl.sh
- python class_install.py
#addons:
|
[BSP] Remove module fature in mini2440 | #define RT_LWIP_MSKADDR "255.255.255.0"
// </section>
-// <section name="RT_USING_MODULE" description="Application module" default="true" >
-#define RT_USING_MODULE
-// <bool name="RT_USING_LIBDL" description="Using dynamic library" default="true" />
-#define RT_USING_LIBDL
-// </section>
-
-// <section name="RT_USING_RTGUI" description="RTGUI, a graphic user interface" default="true" >
-// #define RT_USING_RTGUI
-// <integer name="RTGUI_NAME_MAX" description="Maximal size of RTGUI object name length" default="16" />
-#define RTGUI_NAME_MAX 16
-// <bool name="RTGUI_USING_FONT16" description="Support 16 weight font" default="true" />
-#define RTGUI_USING_FONT16
-// <bool name="RTGUI_USING_FONT12" description="Support 12 weight font" default="true" />
-#define RTGUI_USING_FONT12
-// <bool name="RTGUI_USING_FONTHZ" description="Support Chinese font" default="true" />
-#define RTGUI_USING_FONTHZ
-// <bool name="RTGUI_USING_DFS_FILERW" description="Using DFS as file interface " default="true" />
-#define RTGUI_USING_DFS_FILERW
-// <bool name="RTGUI_USING_HZ_FILE" description="Using font file as Chinese font" default="false" />
-// #define RTGUI_USING_HZ_FILE
-// <bool name="RTGUI_USING_HZ_BMP" description="Using Chinese bitmap font" default="true" />
-#define RTGUI_USING_HZ_BMP
-// <bool name="RTGUI_USING_SMALL_SIZE" description="Using small size in RTGUI" default="false" />
-// #define RTGUI_USING_SMALL_SIZE
-// <bool name="RTGUI_USING_MOUSE_CURSOR" description="Using mouse cursor in RTGUI" default="false" />
-// #define RTGUI_USING_MOUSE_CURSOR
-// <bool name="RTGUI_IMAGE_XPM" description="Using xpm image in RTGUI" default="true" />
-#define RTGUI_IMAGE_XPM
-// <bool name="RTGUI_IMAGE_JPEG" description="Using jpeg image in RTGUI" default="true" />
-#define RTGUI_IMAGE_JPEG
-// <bool name="RTGUI_IMAGE_PNG" description="Using png image in RTGUI" default="true" />
-//#define RTGUI_IMAGE_PNG
-// <bool name="RTGUI_IMAGE_BMP" description="Using bmp image in RTGUI" default="true" />
-#define RTGUI_IMAGE_BMP
-// </section>
-
// </RDTConfigurator>
-/* SECTION: FTK support */
-/* using FTK support */
-/* #define RT_USING_FTK */
-
-/*
- * Note on FTK:
- *
- * FTK depends :
- * #define RT_USING_NEWLIB
- * #define DFS_USING_WORKDIR
- *
- * And the maximal length must great than 64
- * #define RT_DFS_ELM_MAX_LFN 128
- */
-
#endif
|
porting/linux: Fix missing MYNEWT_VAL define
Fixes a regression introduced in Nimble PR | #define MYNEWT_VAL_BLE_L2CAP_COC_MAX_NUM (1)
#endif
+#ifndef MYNEWT_VAL_BLE_L2CAP_COC_MTU
+#define MYNEWT_VAL_BLE_L2CAP_COC_MTU (MYNEWT_VAL_MSYS_1_BLOCK_SIZE - 8)
+#endif
+
#ifndef MYNEWT_VAL_BLE_L2CAP_JOIN_RX_FRAGS
#define MYNEWT_VAL_BLE_L2CAP_JOIN_RX_FRAGS (1)
#endif
|
apps/testcase/messaging : Add ommitted NULL initialization and NULL testcase
1. After free, its pointer will not be NULL, just deallocate the memory.
For testing NULL case, pointer should be set to NULL.
2. For testing coverage, add testcase for NULL check in messaging_send API | @@ -306,10 +306,12 @@ static void utc_messaging_send_sync_n(void)
TC_ASSERT_EQ_CLEANUP("messaging_send_sync", ret, ERROR, free(send_data.msg); free(reply.buf));
free(reply.buf);
+ reply.buf = NULL;
ret = messaging_send_sync(TC_SYNC_PORT, &send_data, &reply);
TC_ASSERT_EQ_CLEANUP("messaging_send_sync", ret, ERROR, free(send_data.msg));
free(send_data.msg);
+ send_data.msg = NULL;
ret = messaging_send_sync(TC_SYNC_PORT, &send_data, &reply);
TC_ASSERT_EQ("messaging_send_sync", ret, ERROR);
@@ -360,10 +362,12 @@ static void utc_messaging_send_async_n(void)
TC_ASSERT_EQ_CLEANUP("messaging_send_async", ret, ERROR, free(send_data.msg); free(reply.buf));
free(reply.buf);
+ reply.buf = NULL;
ret = messaging_send_async(TC_ASYNC_PORT, &send_data, &reply, &cb_info);
TC_ASSERT_EQ_CLEANUP("messaging_send_async", ret, ERROR, free(send_data.msg));
free(send_data.msg);
+ send_data.msg = NULL;
ret = messaging_send_async(TC_ASYNC_PORT, &send_data, &reply, &cb_info);
TC_ASSERT_EQ("messaging_send_async", ret, ERROR);
@@ -410,6 +414,9 @@ static void utc_messaging_send_n(void)
ret = messaging_send(NULL, &send_data);
TC_ASSERT_EQ_CLEANUP("messaging_send", ret, ERROR, free(send_data.msg));
+ ret = messaging_send("temp_port", NULL);
+ TC_ASSERT_EQ_CLEANUP("messaging_send", ret, ERROR, free(send_data.msg));
+
free(send_data.msg);
TC_SUCCESS_RESULT();
}
|
build: new FLB_STATIC_CONF parameter
this new option helps to set an absolute path to look for configuration
files that ends in .conf, for each one found the static conf generator
will create a new C array definition with it content. | @@ -48,6 +48,7 @@ option(FLB_SQLDB "Enable SQL embedded DB" No)
option(FLB_HTTP_SERVER "Enable HTTP Server" No)
option(FLB_BACKTRACE "Enable stacktrace support" Yes)
option(FLB_LUAJIT "Enable Lua Scripting support" Yes)
+option(FLB_STATIC_CONF "Build binary using static configuration")
# Metrics: Experimental Feature, disabled by default on 0.12 series
# but enabled in the upcoming 0.13 release. Note that development
@@ -353,6 +354,15 @@ if(FLB_HAVE_TIMESPEC_GET)
FLB_DEFINITION(FLB_HAVE_TIMESPEC_GET)
endif()
+# Build tools/xxd-c
+add_subdirectory(tools/xxd-c)
+
+# Static configuration generator (using xxd-c)
+if(FLB_STATIC_CONF)
+ add_subdirectory(gen_static_conf)
+endif()
+
+# TD Agent options
if(FLB_TD)
FLB_DEFINITION(FLB_IS_TD_AGENT)
FLB_OPTION(FLB_JEMALLOC ON)
|
tls: openssl: move tls session destroy on pending destroy | @@ -244,13 +244,6 @@ static int destroy_conn(struct flb_upstream_conn *u_conn)
if (u->flags & FLB_IO_ASYNC) {
mk_event_del(u_conn->evl, &u_conn->event);
}
-
-#ifdef FLB_HAVE_TLS
- if (u_conn->tls_session) {
- flb_tls_session_destroy(u_conn->tls, u_conn);
- }
-#endif
-
if (u_conn->fd > 0) {
flb_socket_close(u_conn->fd);
}
@@ -639,6 +632,11 @@ int flb_upstream_conn_pending_destroy(struct flb_upstream *u)
mk_list_foreach_safe(head, tmp, &u->destroy_queue) {
u_conn = mk_list_entry(head, struct flb_upstream_conn, _head);
mk_list_del(&u_conn->_head);
+#ifdef FLB_HAVE_TLS
+ if (u_conn->tls_session) {
+ flb_tls_session_destroy(u_conn->tls, u_conn);
+ }
+#endif
flb_free(u_conn);
}
|
upgrade selftest for testing IT | @@ -106,13 +106,28 @@ result_t selftest_com(void)
******************************************************************************/
result_t selftest_ptp(void)
{
+ uint32_t start_tick = LuosHAL_GetSystick();
+
+ LuosHAL_SetPTPDefaultState(0);
+ LuosHAL_SetPTPDefaultState(1);
+ LuosHAL_PushPTP(0);
+ while (LuosHAL_GetSystick() - start_tick < 2);
+ // release the ptp line
LuosHAL_SetPTPDefaultState(0);
- if (LuosHAL_GetPTPState(1))
+ if (!LuosHAL_GetPTPState(0))
+ {
return KO;
+ }
- LuosHAL_PushPTP(0);
+ LuosHAL_SetPTPDefaultState(0);
+ LuosHAL_SetPTPDefaultState(1);
+ LuosHAL_PushPTP(1);
+ while (LuosHAL_GetSystick() - start_tick < 3);
+ LuosHAL_SetPTPDefaultState(1);
if (!LuosHAL_GetPTPState(1))
+ {
return KO;
+ }
if (!ptp_flag)
{
|
Retrieve information about process UID and GID
Fix case when `foo_user` started process
and `bar_user` with `sudo` trying to
attach and than detach the unlink will be
missed in this case | @@ -134,25 +134,15 @@ attachCmd(pid_t pid, const char *on_off)
* as root. The original process can't remove the file. Ugh.
*/
if (scope_getuid() == 0) {
- char *sauid, *sagid, *eptr;
- uid_t auid, agid;
-
- if (((sauid = getenv("SUDO_UID"))) &&
- ((sagid = getenv("SUDO_GID")))) {
- auid = scope_strtol(sauid, &eptr, 10);
- if (scope_errno || auid <= 0 || auid > INT_MAX) {
- scope_perror("strtol on UID");
- return EXIT_FAILURE;
- }
+ uid_t euid = -1;
+ gid_t egid = -1;
- agid = scope_strtol(sagid, &eptr, 10);
- if (scope_errno || agid <= 0 || agid > INT_MAX) {
- scope_perror("strtol on GID");
+ if (osGetProcUidGid(pid, &euid, &egid) == -1) {
+ scope_fprintf(scope_stderr, "error: osGetProcUidGid() failed\n");
return EXIT_FAILURE;
}
- }
- if (scope_chown(path, auid, agid) == -1) {
+ if (scope_chown(path, euid, egid) == -1) {
scope_perror("chown");
return EXIT_FAILURE;
}
|
Puff: Add setup_thermal for setting thermal config
Use FW_CONFIG to set correct thermal config for different sku.
BRANCH=master
TEST=Thermal team verified thermal policy is expected. | @@ -397,6 +397,19 @@ const static struct ec_thermal_config thermal_a = {
.temp_fan_max = C_TO_K(55),
};
+const static struct ec_thermal_config thermal_b = {
+ .temp_host = {
+ [EC_TEMP_THRESH_WARN] = 0,
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(78),
+ [EC_TEMP_THRESH_HALT] = C_TO_K(85),
+ },
+ .temp_host_release = {
+ [EC_TEMP_THRESH_WARN] = 0,
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(70),
+ [EC_TEMP_THRESH_HALT] = 0,
+ },
+};
+
struct ec_thermal_config thermal_params[] = {
[TEMP_SENSOR_CORE] = thermal_a,
};
@@ -468,7 +481,6 @@ static void board_init(void)
*/
if (board_version < 2)
button_disable_gpio(GPIO_EC_RECOVERY_BTN_ODL);
-
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
@@ -672,6 +684,26 @@ unsigned int ec_config_get_thermal_solution(void)
return (fw_config & EC_CFG_THERMAL_MASK) >> EC_CFG_THERMAL_L;
}
+static void setup_thermal(void)
+{
+ unsigned int table = ec_config_get_thermal_solution();
+ /* Configure Fan */
+ switch (table) {
+ /* Default and table0 use single fan */
+ case 0:
+ default:
+ thermal_params[TEMP_SENSOR_CORE] = thermal_a;
+ break;
+ /* Table1 is fanless */
+ case 1:
+ fan_set_count(0);
+ thermal_params[TEMP_SENSOR_CORE] = thermal_b;
+ break;
+ }
+}
+/* fan_set_count should be called before HOOK_INIT/HOOK_PRIO_DEFAULT */
+DECLARE_HOOK(HOOK_INIT, setup_thermal, HOOK_PRIO_DEFAULT - 1);
+
/*
* Power monitoring and management.
*
|
started to add detection EAP types (not complete, yet) | @@ -315,12 +315,69 @@ struct exteap_frame
uint8_t code;
#define EAP_CODE_REQ 1
#define EAP_CODE_RESP 2
-#define EAP_CODE_FAIL 4
+#define EAP_CODE_SUCCESS 3
+#define EAP_CODE_FAILURE 4
+#define EAP_CODE_INITIATE 5
+#define EAP_CODE_FINISH 6
uint8_t id;
#define EAP_TYPE_ID 1
uint16_t extlen;
uint8_t exttype;
+#define EAP_TYPE_EAP 0
+#define EAP_TYPE_ID 1
+#define EAP_TYPE_NOTIFY 2
+#define EAP_TYPE_NAK 3
+#define EAP_TYPE_MD5 4
+#define EAP_TYPE_OTP 5
+#define EAP_TYPE_GTC 6
+#define EAP_TYPE_RSA 9
+#define EAP_TYPE_DSS 10
+#define EAP_TYPE_KEA 11
+#define EAP_TYPE_KEA_VALIDATE 12
+#define EAP_TYPE_TLS 13
+#define EAP_TYPE_AXENT 14
+#define EAP_TYPE_RSA_SSID 15
+#define EAP_TYPE_RSA_ARCOT 16
+#define EAP_TYPE_LEAP 17
+#define EAP_TYPE_SIM 18
+#define EAP_TYPE_SRP_SHA1 19
+#define EAP_TYPE_TTLS 21
+#define EAP_TYPE_RAS 22
+#define EAP_TYPE_AKA 23
+#define EAP_TYPE_3COMEAP 24
+#define EAP_TYPE_PEAP 25
+#define EAP_TYPE_MSEAP 26
+#define EAP_TYPE_MAKE 27
+#define EAP_TYPE_CRYPTOCARD 28
+#define EAP_TYPE_MSCHAPV2 29
+#define EAP_TYPE_DYNAMICID 30
+#define EAP_TYPE_ROB 31
+#define EAP_TYPE_POTP 32
+#define EAP_TYPE_MSTLV 33
+#define EAP_TYPE_SENTRI 34
+#define EAP_TYPE_AW 35
+#define EAP_TYPE_CSBA 36
+#define EAP_TYPE_AIRFORT 37
+#define EAP_TYPE_HTTPD 38
+#define EAP_TYPE_SS 39
+#define EAP_TYPE_DC 40
+#define EAP_TYPE_SPEKE 41
+#define EAP_TYPE_MOBAC 42
+#define EAP_TYPE_FAST 43
+#define EAP_TYPE_ZLXEAP 44
+#define EAP_TYPE_LINK 45
+#define EAP_TYPE_PAX 46
+#define EAP_TYPE_PSK 47
+#define EAP_TYPE_SAKE 48
+#define EAP_TYPE_IKEV2 49
+#define EAP_TYPE_AKA1 50
+#define EAP_TYPE_GPSK 51
+#define EAP_TYPE_PWD 52
+#define EAP_TYPE_EKE1 53
+#define EAP_TYPE_PTEAP 54
+#define EAP_TYPE_TEAP 55
#define EAP_TYPE_EXPAND 254
+#define EAP_TYPE_EXPERIMENTAL 255
uint8_t data[1];
} __attribute__((__packed__));
typedef struct exteap_frame exteap_t;
|
YAMBi: Add basic MSR test | @@ -21,11 +21,38 @@ Currently this plugin requires that you install [Bison](https://www.gnu.org/soft
## Examples
+### Mappings
+
```sh
# Mount plugin
sudo kdb mount config.yaml user/tests/yambi yambi
-# Umount plugin
+kdb set user/tests/yambi/bambi 'Mule Deer'
+kdb get user/tests/yambi/bambi
+#> Mule Deer
+
+kdb set user/tests/yambi/thumper 'Rabbit'
+kdb get user/tests/yambi/thumper
+#> Rabbit
+
+kdb set user/tests/yambi/bambi/baby 'Bobby Stewart'
+kdb set user/tests/yambi/bambi/young 'Donnie Dunagan'
+kdb set user/tests/yambi/bambi/adolescent 'Hardie Albright'
+kdb set user/tests/yambi/bambi/adult 'John Sutherland'
+
+kdb get user/tests/yambi/bambi/baby
+#> Bobby Stewart
+
+kdb ls user/tests/yambi
+#> user/tests/yambi/bambi
+#> user/tests/yambi/bambi/adolescent
+#> user/tests/yambi/bambi/adult
+#> user/tests/yambi/bambi/baby
+#> user/tests/yambi/bambi/young
+#> user/tests/yambi/thumper
+
+# Undo modifications
+kdb rm -r user/tests/yambi
sudo kdb umount user/tests/yambi
```
|
docs: jtag debugging: add macOS 10.15 FTDI details
Merges | @@ -112,10 +112,21 @@ Manually unloading the driver
sudo kextunload -b com.FTDI.driver.FTDIUSBSerialDriver
- In some cases you may need to unload Apple's FTDI driver as well::
+ In some cases you may need to unload Apple's FTDI driver as well:
+
+ * macOS < 10.15::
sudo kextunload -b com.apple.driver.AppleUSBFTDI
+ * macOS 10.15::
+
+ sudo kextunload -b com.apple.DriverKit-AppleUSBFTDI
+
+ .. warning::
+
+ Attempting to use serial over the wrong channel with the FTDI driver will cause a kernel panic. The ESP-WROVER-KIT uses channel A for JTAG and channel B for serial.
+
+
4. Run OpenOCD:
.. include:: {IDF_TARGET_PATH_NAME}.inc
|
redrix: enable usb_mux idle
Use the new API to put the mux in idle mode on suspend
BRANCH=none
TEST=BBR USB3_Connection bit is correct in S0ix/S0 | @@ -99,6 +99,13 @@ const struct usb_mux_chain usb_muxes[] = {
[USBC_PORT_C0] = {
.mux = &(const struct usb_mux) {
.usb_port = USBC_PORT_C0,
+ /*
+ * A USB-A adapter plugged into Type-C port
+ * would increase BBR power consumption, so
+ * clear USB3_Connection bit in S0ix and
+ * re-enable in S0
+ */
+ .flags = USB_MUX_FLAG_CAN_IDLE,
.driver = &bb_usb_retimer,
.hpd_update = bb_retimer_hpd_update,
.i2c_port = I2C_PORT_USB_C0_MUX,
@@ -109,6 +116,7 @@ const struct usb_mux_chain usb_muxes[] = {
[USBC_PORT_C1] = {
.mux = &(const struct usb_mux) {
.usb_port = USBC_PORT_C1,
+ .flags = USB_MUX_FLAG_CAN_IDLE,
.driver = &bb_usb_retimer,
.hpd_update = bb_retimer_hpd_update,
.i2c_port = I2C_PORT_USB_C1_MUX,
|
SMP: User header should get copied while allocating a response | @@ -65,6 +65,7 @@ static void *
smp_alloc_rsp(const void *req, void *arg)
{
struct os_mbuf *m;
+ struct os_mbuf *rsp;
if (!req) {
return NULL;
@@ -72,7 +73,14 @@ smp_alloc_rsp(const void *req, void *arg)
m = (struct os_mbuf *)req;
- return os_msys_get_pkthdr(0, OS_MBUF_USRHDR_LEN(m));
+ rsp = os_msys_get_pkthdr(0, OS_MBUF_USRHDR_LEN(m));
+ if (!rsp) {
+ return NULL;
+ }
+
+ memcpy(OS_MBUF_USRHDR(rsp), OS_MBUF_USRHDR(m), OS_MBUF_USRHDR_LEN(m));
+
+ return rsp;
}
static void
|
lib/utils/pyexec: Update to work with new MICROPY_HW_ENABLE_USB option. | #include "py/gc.h"
#include "py/frozenmod.h"
#include "py/mphal.h"
-#if defined(USE_DEVICE_MODE)
+#if MICROPY_HW_ENABLE_USB
#include "irq.h"
#include "usb.h"
#endif
@@ -406,7 +406,7 @@ friendly_repl_reset:
for (;;) {
input_restart:
- #if defined(USE_DEVICE_MODE)
+ #if MICROPY_HW_ENABLE_USB
if (usb_vcp_is_enabled()) {
// If the user gets to here and interrupts are disabled then
// they'll never see the prompt, traceback etc. The USB REPL needs
|
add function to map a page to a frame, so the logic can be reused | @@ -442,6 +442,10 @@ page_t* vmm_get_page_for_virtual_address(page_directory_t* dir, uint32_t virt_ad
return page;
}
+void vmm_map_page_to_frame(page_t* page, uint32_t frame_addr) {
+ page->frame = frame_addr / PAGING_FRAME_SIZE;
+}
+
page_t* vmm_page_alloc_for_phys_addr(page_directory_t* dir, uint32_t phys_addr) {
page_t* page = vmm_get_page_for_virtual_address(dir, phys_addr);
@@ -450,7 +454,7 @@ page_t* vmm_page_alloc_for_phys_addr(page_directory_t* dir, uint32_t phys_addr)
page->user = false;
pmm_alloc_address(phys_addr);
- page->frame = phys_addr / PAGING_FRAME_SIZE;
+ vmm_map_page_to_frame(page, phys_addr);
return page;
}
|
IPSEC: rename default backend | @@ -263,7 +263,7 @@ ipsec_init (vlib_main_t * vm)
ASSERT (node);
im->error_drop_node_index = node->index;
- u32 idx = ipsec_register_ah_backend (vm, im, "default openssl backend",
+ u32 idx = ipsec_register_ah_backend (vm, im, "crypto engine backend",
"ah4-encrypt",
"ah4-decrypt",
"ah6-encrypt",
@@ -276,7 +276,7 @@ ipsec_init (vlib_main_t * vm)
ASSERT (0 == rv);
(void) (rv); // avoid warning
- idx = ipsec_register_esp_backend (vm, im, "default openssl backend",
+ idx = ipsec_register_esp_backend (vm, im, "crypto engine backend",
"esp4-encrypt",
"esp4-encrypt-tun",
"esp4-decrypt",
|
cpeng: check for hugepages
* cpeng: check for hugepages
Add try/catch around allocate call and if an exception is caught, then
compare the byte size requested to the syttem page size. If the amount
is bigger than system page size, print more info about maybe requiring
hugepages reserved. | #include <chrono>
#include <fstream>
#include <thread>
+#include <unistd.h>
#include "afu_test.h"
#include "ofs_cpeng.h"
const char *cpeng_guid = "44bfc10d-b42a-44e5-bd42-57dc93ea7f91";
using opae::fpga::types::shared_buffer;
+using opae_exception = opae::fpga::types::exception;
using usec = std::chrono::microseconds;
+const size_t pg_size = sysconf(_SC_PAGESIZE);
+constexpr size_t MB(uint32_t count) {
+ return count * 1024 * 1024;
+}
+
class cpeng : public opae::afu_test::command
{
public:
@@ -44,7 +51,7 @@ public:
: filename_("hps.img")
, destination_offset_(0)
, timeout_usec_(60000000)
- , chunk_(4096)
+ , chunk_(pg_size)
, soft_reset_(false)
{
}
@@ -106,7 +113,17 @@ public:
// if chunk_ CLI arg is 0, use the file size
// otherwise, use the smaller of chunk_ and file size
size_t chunk = chunk_ ? std::min(static_cast<size_t>(chunk_), sz) : sz;
- auto buffer = shared_buffer::allocate(afu->handle(), chunk);
+ shared_buffer::ptr_t buffer(0);
+ try {
+ buffer = shared_buffer::allocate(afu->handle(), chunk);
+ } catch (opae_exception &ex) {
+ log_->error("could not allocate {} bytes of memory", chunk);
+ if (chunk > pg_size) {
+ auto hugepage_sz = chunk <= MB(2) ? "2MB" : "1GB";
+ log_->error("might need {} hugepages reserved", hugepage_sz);
+ }
+ return 1;
+ }
auto ptr = reinterpret_cast<char*>(const_cast<uint8_t*>(buffer->c_type()));
// get a char* of the buffer so we can read into it every chunk iteration
size_t written = 0;
@@ -116,7 +133,7 @@ public:
&cpeng, buffer->io_address(),
destination_offset_ + written, chunk, timeout_usec_)) {
log_->error("could not copy chunk");
- return 1;
+ return 2;
}
written += chunk;
chunk = std::min(chunk, sz-written);
@@ -132,7 +149,7 @@ public:
&cpeng, buffer->io_address(),
destination_offset_ + written, padding, timeout_usec_)) {
log_->error("could not copy padding");
- return 2;
+ return 3;
}
}
ofs_cpeng_image_complete(&cpeng);
|
[mod_proxy] pass Content-Length to backend if > 0
pass Content-Length to backend if > 0, even if GET or HEAD method
(and pass Content-Length: 0 for other methods if no request body) | @@ -752,9 +752,10 @@ static handler_t proxy_create_env(server *srv, gw_handler_ctx *gwhctx) {
/* "Forwarded" and legacy X- headers */
proxy_set_Forwarded(con, hctx->conf.forwarded);
- if (HTTP_METHOD_GET != con->request.http_method
- && HTTP_METHOD_HEAD != con->request.http_method
- && con->request.content_length >= 0) {
+ if (con->request.content_length > 0
+ || (0 == con->request.content_length
+ && HTTP_METHOD_GET != con->request.http_method
+ && HTTP_METHOD_HEAD != con->request.http_method)) {
/* set Content-Length if client sent Transfer-Encoding: chunked
* and not streaming to backend (request body has been fully received) */
buffer *vb = http_header_request_get(con, HTTP_HEADER_CONTENT_LENGTH, CONST_STR_LEN("Content-Length"));
|
chip/mt_scp/rv32i_common/hrtimer.c: Format with clang-format
BRANCH=none
TEST=none | @@ -65,8 +65,8 @@ static void timer_set_reset_value(int n, uint32_t reset_value)
static void timer_set_clock(int n, uint32_t clock_source)
{
- SCP_CORE0_TIMER_EN(n) =
- (SCP_CORE0_TIMER_EN(n) & ~TIMER_CLK_SRC_MASK) | clock_source;
+ SCP_CORE0_TIMER_EN(n) = (SCP_CORE0_TIMER_EN(n) & ~TIMER_CLK_SRC_MASK) |
+ clock_source;
}
static void timer_reset(int n)
@@ -88,8 +88,8 @@ static uint64_t timer_read_raw_system(void)
* sys_high value.
*/
if (timer_ctrl & TIMER_IRQ_STATUS)
- sys_high_adj = sys_high ? (sys_high - 1)
- : (TIMER_CLOCK_MHZ - 1);
+ sys_high_adj = sys_high ? (sys_high - 1) :
+ (TIMER_CLOCK_MHZ - 1);
return OVERFLOW_TICKS - (((uint64_t)sys_high_adj << 32) |
SCP_CORE0_TIMER_CUR_VAL(TIMER_SYSTEM));
@@ -159,8 +159,8 @@ uint32_t __hw_clock_source_read(void)
uint32_t __hw_clock_event_get(void)
{
- return (timer_read_raw_event() + timer_read_raw_system())
- / TIMER_CLOCK_MHZ;
+ return (timer_read_raw_event() + timer_read_raw_system()) /
+ TIMER_CLOCK_MHZ;
}
void __hw_clock_event_clear(void)
|
fix 50 on slider and slider arrow miss doesnt break combo | @@ -103,7 +103,7 @@ class Check:
if osr[3] > osu_d["end time"]:
if slider_d["score"] == 0:
hitresult = 0
- elif slider_d["score"] < int(slider_d["max score"]/2):
+ elif slider_d["score"] < slider_d["max score"]/2:
hitresult = 50
elif slider_d["score"] < slider_d["max score"]:
hitresult = 100
@@ -186,7 +186,6 @@ class Check:
if touchtick == touchend and touchend:
print("true fuck")
-
slider_d["max score"] += hastick or hasendtick or hasreversetick
slider_d["done"] = hasendtick
@@ -200,7 +199,7 @@ class Check:
slider_d["score"] += touchtick or touchend or touchreverse
return in_ball, hitvalue, int(touchend or touchtick or touchreverse)
- return in_ball, 0, -((hastick and not touchtick) or (hasreversetick and touchreverse))
+ return in_ball, 0, -((hastick and not touchtick) or (hasreversetick and not touchreverse))
def tickover(self, t, osu_d, slider_d, reverse):
goingforward = slider_d["repeat checked"] % 2 == 0
|
tail: fix wrong packaging when packing a line_map (time) | @@ -115,6 +115,9 @@ static inline int pack_line_map(msgpack_sbuffer *mp_sbuf, msgpack_packer *mp_pck
file->config->path_key_len,
file->name, file->name_len);
}
+
+ msgpack_pack_array(mp_pck, 2);
+ msgpack_pack_uint64(mp_pck, time);
msgpack_sbuffer_write(mp_sbuf, *data, *data_size);
return 0;
|
Make string2ll static to avoid conflict with redis
See discussion on This should also make it easier for redis to
update the vendored/bundled hiredis (though not by much). | @@ -154,7 +154,7 @@ static char *seekNewline(char *s, size_t len) {
* Because of its strictness, it is safe to use this function to check if
* you can convert a string into a long long, and obtain back the string
* from the number without any loss in the string representation. */
-int string2ll(const char *s, size_t slen, long long *value) {
+static int string2ll(const char *s, size_t slen, long long *value) {
const char *p = s;
size_t plen = 0;
int negative = 0;
|
Add a minimal mode build to CI | @@ -15,6 +15,10 @@ jobs:
- image_name: ubuntu-20.04
no_libc: -DCMAKE_BUILD_TYPE=Release
dev_mode: -DZYAN_DEV_MODE=ON
+ - image_name: ubuntu-20.04
+ no_libc: ""
+ dev_mode: ""
+ minimal_mode: "-DZYDIS_MINIMAL_MODE=ON -DZYDIS_FEATURE_ENCODER=OFF"
steps:
- name: Checkout
@@ -24,7 +28,7 @@ jobs:
run: |
mkdir build
cd build
- cmake ${{ matrix.dev_mode }} ${{ matrix.no_libc }} ..
+ cmake ${{ matrix.dev_mode }} ${{ matrix.no_libc }} ${{ matrix.minimal_mode }} ..
- name: Building
run: |
cmake --build build --config Release
@@ -32,17 +36,17 @@ jobs:
run: |
cd tests
python3 regression.py test ../build/ZydisInfo
- if: "!matrix.no_libc && matrix.image_name != 'windows-2019'"
+ if: "!matrix.no_libc && matrix.image_name != 'windows-2019' && !matrix.minimal_mode"
- name: Running regression tests (encoder)
run: |
cd tests
python3 regression_encoder.py ../build/ZydisFuzzReEncoding ../build/ZydisFuzzEncoder
- if: "!matrix.no_libc && matrix.image_name != 'windows-2019'"
+ if: "!matrix.no_libc && matrix.image_name != 'windows-2019' && !matrix.minimal_mode"
- name: Running regression tests
run: |
cd tests
python regression.py test ..\\build\\Release\\ZydisInfo.exe
- if: "!matrix.no_libc && matrix.image_name == 'windows-2019'"
+ if: "!matrix.no_libc && matrix.image_name == 'windows-2019' && !matrix.minimal_mode"
msbuild-build:
name: MSBuild build (windows-2019)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.