message
stringlengths
6
474
diff
stringlengths
8
5.22k
[core] detect and reject TLS connect to cleartext detect and reject TLS connection to cleartext listening port (alternative to failing to receive HTTP header and waiting to time out)
@@ -832,10 +832,22 @@ static int connection_handle_read_state(connection * const con) { "oversized request-header -> sending Status 431"); r->http_status = 431; /* Request Header Fields Too Large */ r->keep_alive = 0; + connection_set_state(r, CON_STATE_REQUEST_END); return 1; } if (0 != header_len) break; + if (((unsigned char *)c->mem->ptr)[c->offset] < 32) { + /* expecting ASCII method beginning with alpha char + * or HTTP/2 pseudo-header beginning with ':' */ + /*(TLS handshake begins with SYN 0x16 (decimal 22))*/ + log_error(r->conf.errh, __FILE__, __LINE__, "%s", + "invalid request-line -> sending Status 400"); + r->http_status = 400; /* Bad Request */ + r->keep_alive = 0; + connection_set_state(r, CON_STATE_REQUEST_END); + return 1; + } } while ((c = connection_read_header_more(con, cq, c, clen))); if (keepalive_request_start) {
azure pipeline: try to add centos. Third attempt.
@@ -17,7 +17,7 @@ jobs: # imageName: 'ubuntu-16.04' pool: vmImage: $(imageName) - container: $[ variables['containerImage'] ] + container: OpenLogic:CentOS:7.5:latest steps: - task: ShellScript@2 displayName: Install dependencies
system-prefs: shouldn't see two settings sections for system
@@ -46,6 +46,7 @@ export const SystemPreferences = (props: RouteComponentProps<{ submenu: string } `${match.url}/:submenu/:desk?` ); const charges = useCharges(); + const filteredCharges = Object.values(charges).filter((charge) => charge.desk !== window.desk); const isMobile = useMedia('(max-width: 639px)'); const settingsPath = isMobile ? `${match.url}/:submenu` : '/'; @@ -104,7 +105,7 @@ export const SystemPreferences = (props: RouteComponentProps<{ submenu: string } <hr className="my-4 border-t-2 border-gray-50" /> <nav className="px-2 sm:px-6"> <ul className="space-y-1"> - {Object.values(charges).map((charge) => ( + {filteredCharges.map((charge) => ( <SystemPreferencesSection key={charge.desk} url={subUrl(`apps/${charge.desk}`)}
pass text metadata through verbatim
elm:(static:cram (ream mud)) ++ front :: XX performance, types ^- (map term knot) - (~(run by inf:(static:cram (ream mud))) scot) + %- ~(run by inf:(static:cram (ream mud))) + |= a=dime ^- cord + ?+ (end 3 1 a) (scot a) + %t q.a + == -- ++ grab |%
announce common names from certificates by default
@@ -296,6 +296,21 @@ int tls_server_add_sni( const char crt_file[], const char key_file[] ) { return 0; } +static void tls_announce_all_cnames( void ) { + struct sni_entry *cur; + char name[QUERY_MAX_SIZE]; + + // Announce cnames + cur = g_sni_entries; + while( cur ) { + // Won't announce wildcard domains + if( query_sanitize( name, sizeof(name), cur->name ) == 0 ) { + kad_announce( name, gconf->dht_port, LONG_MAX ); + } + cur = cur->next; + } +} + void tls_server_setup( void ) { const char *pers = "kadnode"; int ret; @@ -315,6 +330,9 @@ void tls_server_setup( void ) { mbedtls_ssl_config_init( &g_conf ); mbedtls_ctr_drbg_init( &g_drbg ); + // Announce all common names from certificates + tls_announce_all_cnames(); + //mbedtls_debug_set_threshold( 0 ); mbedtls_entropy_init( &g_entropy );
arm: fix define in scsi_sense.h
#define SCSI_ASC_BLOCK_SEQUENCE_ERROR 0x1404 #define SCSI_ASC_RANDOM_POSITIONING_ERROR 0x1500 #define SCSI_ASC_MECHANICAL_POSITIONING_ERROR 0x1501 -#define SCSI_ASC_POSITIONING_ERROR_DETECTED_BY_READ OF_MEDIUM 0x1502 +#define SCSI_ASC_POSITIONING_ERROR_DETECTED_BY_READ_OF_MEDIUM 0x1502 #define SCSI_ASC_RECOVERED_DATA_WITH_NO_ERROR_CORRECTION_APPLIED 0x1700 #define SCSI_ASC_RECOVERED_DATA_WITH_RETRIES 0x1701 #define SCSI_ASC_RECOVERED_DATA_WITH_POSITIVE_HEAD_OFFSET 0x1702
fix one way using tile | tile and optimize math Before 3F6 - 3DA Optimized 3C8 - 3C0 Now constant 3D2
@@ -22,20 +22,17 @@ UBYTE TileAt(UINT16 tx, UINT16 ty) { } UBYTE TileAt2x1(UINT16 tx, UINT16 ty) { - UWORD y_offset; + UBYTE* collision_ptr_tmp; UBYTE tile; // Check tile outside of bounds if (tx == MAX_UINT16 || tx == image_tile_width || ty == image_tile_height || ty == MAX_UINT16) { return OUT_OF_BOUNDS; } - y_offset = ty * (UINT16)image_tile_width; + collision_ptr_tmp = ty * (UINT16)image_tile_width + tx + collision_ptr; PUSH_BANK(collision_bank); - tile = (UBYTE) * (collision_ptr + y_offset + tx); - if (!tile) { - tile = (UBYTE) * (collision_ptr + y_offset + (tx + 1U)); - } + tile = (UBYTE) * collision_ptr_tmp | (UBYTE) *(collision_ptr_tmp + 1U); POP_BANK; return tile; }
Update README to refer to janet-lang/janet repository.
-[![Build Status](https://travis-ci.org/bakpakin/janet.svg?branch=master)](https://travis-ci.org/bakpakin/janet) -[![Appveyor Status](https://ci.appveyor.com/api/projects/status/32r7s2skrgm9ubva?svg=true)](https://ci.appveyor.com/project/bakpakin/janet) +[![Build Status](https://travis-ci.org/janet-lang/janet.svg?branch=master)](https://travis-ci.org/janet-lang/janet) +[![Appveyor Status](https://ci.appveyor.com/api/projects/status/32r7s2skrgm9ubva?svg=true)](https://ci.appveyor.com/project/janet-lang/janet) <img src="https://raw.githubusercontent.com/honix/janet/master/assets/janet-w200.png" alt="Janet logo" width=200 align="left"> @@ -19,7 +19,7 @@ Implemented in mostly standard C99, janet runs on Windows, Linux and macOS. The few features that are not standard C (dynamic library loading, compiler specific optimizations), are fairly straight forward. Janet can be easily ported to new platforms. -For syntax highlighting, there is some preliminary vim syntax highlighting in [janet.vim](https://github.com/bakpakin/janet.vim). +For syntax highlighting, there is some preliminary vim syntax highlighting in [janet.vim](https://github.com/janet-lang/janet.vim). Generic lisp syntax highlighting should, however, provide good results. There is also a janet.tmLanguage file that should provide good syntax highlighting for many editors. @@ -72,7 +72,7 @@ environment, use the `(all-symbols)` function. ## Installation -Install a stable version of janet from the [releases page](https://github.com/bakpakin/janet/releases). +Install a stable version of janet from the [releases page](https://github.com/janet-lang/janet/releases). Janet is prebuilt for a few systems, but if you want to develop janet, run janet on a non-x86 system, or get the latest, you must build janet from source.
Change variable to $(MSYSTEM) to make it better and compatible with Msys1.
@@ -295,14 +295,14 @@ README.pdf \ # It can be found in the MinGW directory (usually "C:\msys64\mingw64\bin" for 64bit builds # or "C:\msys64\mingw32\bin" for 32bit builds) directory and should be # copied to the current directory before installation or packaging. -# We use $(MINGW_CHOST) for compiler Arch detection. (not tested for cross-compiling). +# We use $(MSYSTEM) for compiler Arch detection. (not tested for cross-compiling). # # "pthreadGC-3.dll" and "libgcc_s_dw2-1.dll" need to be copied if compiling with Msys1. # They are copied just in case. # ifeq (MINGW,$(findstring MINGW,$(uname))) - ifeq ($(MINGW_CHOST), i686-w64-mingw32) + ifeq ($(MSYSTEM), MINGW32) datafiles += maintenance/windows_dll/msys2-32/libwinpthread-1.dll datafiles += maintenance/windows_dll/pthreadGC-3.dll datafiles += maintenance/windows_dll/libgcc_s_dw2-1.dll
Rename CMake library to clap with clap-core alias This makes consuming this library from a build system much simpler since the target name is now the same as the project name. Old uses of `clap-core` will continue to work.
@@ -7,8 +7,13 @@ option(CLAP_BUILD_TESTS "Should CLAP build tests and the like?" OFF) # If you use clap as a submodule of your plugin you need some interface projects # to allow you to link. clap-core gives you the include directory and clap-plugin-core # gives you the core + plugin-glue. -add_library(clap-core INTERFACE) -target_include_directories(clap-core INTERFACE include) +add_library(clap INTERFACE) +target_include_directories(clap INTERFACE include) + +# 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. +add_library(clap-core ALIAS clap) include(GNUInstallDirs) install(DIRECTORY "include/clap" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
[GB] CPU cal dispatch an interrupt handler
@@ -786,6 +786,21 @@ impl CpuState { self.set_pc(target); } + pub fn call_interrupt_vector(&mut self, interrupt_type: InterruptType) { + // TODO(PT): Unit test this + let interrupt_vector = match interrupt_type { + InterruptType::VBlank => 0x40, + InterruptType::LCDStat => 0x48, + InterruptType::Timer => 0x50, + InterruptType::Serial => 0x58, + InterruptType::Joypad => 0x60, + }; + + self.push_u16(self.get_pc()); + self.set_pc(interrupt_vector); + self.set_halted(false); + } + fn rr_reg8(&self, reg: &dyn VariableStorage, addressing_mode: AddressingMode) { if self.debug_enabled { println!("RR {reg}");
fixed small FCS bug on REALTEK chipset
@@ -1696,7 +1696,7 @@ while((pcapstatus = pcap_next_ex(pcapin, &pkh, &packet)) != -2) continue; rth = (const rth_t*)packet; fcsl = 0; - field = 12; + field = 8; if((rth->it_present & 0x01) == 0x01) field += 8; if((rth->it_present & 0x80000000) == 0x80000000)
Run global_action_callbacks in predictable order
@@ -674,7 +674,7 @@ def init_cli(verbose_output=None): if path not in extension_dirs: extension_dirs.append(path) - extensions = {} + extensions = [] for directory in extension_dirs: if directory and not os.path.exists(directory): print_warning('WARNING: Directory with idf.py extensions doesn\'t exist:\n %s' % directory) @@ -683,20 +683,20 @@ def init_cli(verbose_output=None): sys.path.append(directory) for _finder, name, _ispkg in sorted(iter_modules([directory])): if name.endswith('_ext'): - extensions[name] = import_module(name) + extensions.append((name, import_module(name))) # Load component manager if available and not explicitly disabled if os.getenv('IDF_COMPONENT_MANAGER', None) != '0': try: from idf_component_manager import idf_extensions - extensions['component_manager_ext'] = idf_extensions + extensions.append(('component_manager_ext', idf_extensions)) os.environ['IDF_COMPONENT_MANAGER'] = '1' except ImportError: pass - for name, extension in extensions.items(): + for name, extension in extensions: try: all_actions = merge_action_lists(all_actions, extension.action_extensions(all_actions, project_dir)) except AttributeError:
Touch fuzz/c/std/bzip2_fuzzer.c Updates
@@ -89,7 +89,13 @@ fuzz(wuffs_base__io_buffer* src, uint64_t hash) { wuffs_bzip2__decoder dec; wuffs_base__status status = wuffs_bzip2__decoder__initialize( &dec, sizeof dec, WUFFS_VERSION, - (hash & 1) ? WUFFS_INITIALIZE__LEAVE_INTERNAL_BUFFERS_UNINITIALIZED : 0); + // TODO: uncomment this code, after we figure out why + // https://github.com/google/wuffs/issues/79 wasn't automatically closed + // by commit 9256fe5e. + // + // ((hash & 1) ? + // WUFFS_INITIALIZE__LEAVE_INTERNAL_BUFFERS_UNINITIALIZED : 0); + 0); if (!wuffs_base__status__is_ok(&status)) { return wuffs_base__status__message(&status); }
Documentation: grib_filter
@@ -71,6 +71,7 @@ Running the same command again we obtain a different list of files.\n - print "string to print also with key values like in the file name" - transient keyname1 = keyname2; - comments beginning with # + - defined(keyname) to check if a key is defined in a message . A complex example of grib_filter rules is the following to change temperature in a grib edition 1 file. \verbatim
Send tcp_req_info->spool_buffer as dnstap CLIENT_RESPONSE When tcp_req_info exists. This fixes that dnstap CLIENT_RESPONSE messages did not contain the response message when answering on statful transport for uncached responses.
@@ -3153,18 +3153,21 @@ comm_point_send_reply(struct comm_reply *repinfo) &repinfo->addr, repinfo->c->type, repinfo->c->buffer); #endif } else { +#ifdef USE_DNSTAP + if(repinfo->c->tcp_parent->dtenv != NULL && + repinfo->c->tcp_parent->dtenv->log_client_response_messages) + dt_msg_send_client_response(repinfo->c->tcp_parent->dtenv, + &repinfo->addr, repinfo->c->type, + ( repinfo->c->tcp_req_info + ? repinfo->c->tcp_req_info->spool_buffer + : repinfo->c->buffer )); +#endif if(repinfo->c->tcp_req_info) { tcp_req_info_send_reply(repinfo->c->tcp_req_info); } else { comm_point_start_listening(repinfo->c, -1, repinfo->c->tcp_timeout_msec); } -#ifdef USE_DNSTAP - if(repinfo->c->tcp_parent->dtenv != NULL && - repinfo->c->tcp_parent->dtenv->log_client_response_messages) - dt_msg_send_client_response(repinfo->c->tcp_parent->dtenv, - &repinfo->addr, repinfo->c->type, repinfo->c->buffer); -#endif } }
Directory Value: Mark pointers as constant
@@ -174,7 +174,7 @@ static bool onlyArrayEntriesDirectlyBelow (Key * key, KeySet * keys) * @param arrays The function stores all array parents in this key set. * @param other The function stores all non-array keys in this parameter. */ -static void splitArrays (KeySet * input, KeySet * arrays, KeySet * other) +static void splitArrays (KeySet * const input, KeySet * arrays, KeySet * other) { ELEKTRA_NOT_NULL (input); ELEKTRA_NOT_NULL (arrays); @@ -234,7 +234,7 @@ static void splitDirectories (KeySet * input, KeySet * directories, KeySet * lea * @returns The function returns a new key set containing modified versions of the children of `array`, if everything went fine. If there * was an error, the function returns `NULL` instead. */ -static KeySet * childrenIncreaseIndex (Key * array, KeySet * const keys, Key * errorKey) +static KeySet * childrenIncreaseIndex (Key * const array, KeySet * const keys, Key * errorKey) { ELEKTRA_NOT_NULL (array); ELEKTRA_NOT_NULL (keys);
bn/asm/sparcv9-mont.pl: iron another glitch in squaring code path. This module is used only with odd input lengths, i.e. not used in normal PKI cases, on contemporary processors. The problem was "illuminated" by fuzzing tests.
@@ -493,6 +493,9 @@ $code.=<<___; mulx $npj,$mul1,$acc1 add $tpj,$car1,$car1 ld [$np+$j],$npj ! np[j] + srlx $car1,32,$tmp0 + and $car1,$mask,$car1 + add $tmp0,$sbit,$sbit add $acc0,$car1,$car1 ld [$tp+8],$tpj ! tp[j] add $acc1,$car1,$car1
interface: use font-display: swap;
font-family: 'Inter'; font-style: normal; font-weight: 400; + font-display: swap; src: url("/~landscape/fonts/inter-regular.woff2") format("woff2"), url("https://media.urbit.org/fonts/Inter-Regular.woff2") format("woff2"); } font-family: 'Inter'; font-style: normal; font-weight: 500; + font-display: swap; src: url("https://media.urbit.org/fonts/Inter-Medium.woff2") format("woff2"); } font-family: 'Inter'; font-style: normal; font-weight: 600; + font-display: swap; src: url("https://media.urbit.org/fonts/Inter-SemiBold.woff2") format("woff2"); } font-family: 'Inter'; font-style: italic; font-weight: 400; + font-display: swap; src: url("/~landscape/fonts/inter-italic.woff2") format("woff2"), url("https://media.urbit.org/fonts/Inter-Italic.woff2") format("woff2"); } font-family: 'Inter'; font-style: normal; font-weight: 700; + font-display: swap; src: url("/~landscape/fonts/inter-bold.woff2") format("woff2"), url("https://media.urbit.org/fonts/Inter-Bold.woff2") format("woff2"); } font-family: 'Inter'; font-style: italic; font-weight: 700; + font-display: swap; src: url("/~landscape/fonts/inter-bolditalic.woff2") format("woff2"), url("https://media.urbit.org/fonts/Inter-BoldItalic.woff2") format("woff2"); } src: url("/~landscape/fonts/sourcecodepro-extralight.woff2"), url("https://storage.googleapis.com/media.urbit.org/fonts/scp-extralight.woff"); font-weight: 200; + font-display: swap; } @font-face { src: url("/~landscape/fonts/sourcecodepro-light.woff2"), url("https://storage.googleapis.com/media.urbit.org/fonts/scp-light.woff"); font-weight: 300; + font-display: swap; } @font-face { src: url("/~landscape/fonts/sourcecodepro-regular.woff2"), url("https://storage.googleapis.com/media.urbit.org/fonts/scp-regular.woff"); font-weight: 400; + font-display: swap; } @font-face { src: url("(/~landscape/fonts/sourcecodepro-medium.woff2"), url("https://storage.googleapis.com/media.urbit.org/fonts/scp-medium.woff"); font-weight: 500; + font-display: swap; } @font-face { src: url("/~landscape/fonts/sourcecodepro-semibold.woff2"), url("https://storage.googleapis.com/media.urbit.org/fonts/scp-semibold.woff"); font-weight: 600; + font-display: swap; } @font-face { src: url("/~landscape/fonts/sourcecodepro-bold.woff2"), url("https://storage.googleapis.com/media.urbit.org/fonts/scp-bold.woff"); font-weight: 700; + font-display: swap; }
examples - bugfixes
@@ -158,8 +158,6 @@ on_connected(struct neat_flow_operations *opCB) uv_loop_t *loop = neat_get_event_loop(opCB->ctx); // now we can start writing fprintf(stderr, "%s - connection established\n", __func__); - - opCB->userData = calloc(1, sizeof(struct stat_flow)); stat = opCB->userData; gettimeofday(&(stat->begin), NULL); gettimeofday(&(stat->stat_last), NULL); @@ -180,7 +178,7 @@ on_close(struct neat_flow_operations *opCB) { struct stat_flow *stat = opCB->userData; fprintf(stderr, "%s - flow closed OK - bytes: %d - calls: %d\n", __func__, stat->rcv_bytes, stat->rcv_calls); - + free(opCB->userData); uv_close((uv_handle_t*)&(stat->timer), NULL); // cleanup @@ -294,6 +292,7 @@ main(int argc, char *argv[]) ops[i].on_connected = on_connected; ops[i].on_error = on_error; ops[i].on_close = on_close; + ops[i].userData = calloc(1, sizeof(struct stat_flow)); neat_set_operations(ctx, flows[i], &(ops[i])); // wait for on_connected or on_error to be invoked
Fix wording of several extended stats comments Reported-by: Thomas Munro Discussion:
@@ -993,7 +993,7 @@ statext_is_compatible_clause_internal(PlannerInfo *root, Node *clause, if (list_length(expr->args) != 2) return false; - /* Check if the expression the right shape (one Var, one Const) */ + /* Check if the expression has the right shape (one Var, one Const) */ if (!examine_clause_args(expr->args, &var, NULL, NULL)) return false; @@ -1049,7 +1049,7 @@ statext_is_compatible_clause_internal(PlannerInfo *root, Node *clause, if (list_length(expr->args) != 2) return false; - /* Check if the expression the right shape (one Var, one Const) */ + /* Check if the expression has the right shape (one Var, one Const) */ if (!examine_clause_args(expr->args, &var, NULL, NULL)) return false;
tests BUGFIX typo
@@ -665,7 +665,7 @@ test_instanceid(void **state) leaf = (struct lyd_node_term*)tree; assert_string_equal("/xdf:cont/xdf:leaftarget", leaf->value.canonized); lyd_free_all(tree); -#if +#if 0 /* TODO predicates support */ data = "<list xmlns=\"urn:tests:types\"><id>>a</id></list><list xmlns=\"urn:tests:types\"><id>>b</id></list>" "<xdf:inst xmlns:xdf=\"urn:tests:types\">/xdf:list[xdf:id='b']/xdf:id</xdf:inst>";
landscape: remove new group from group-view on leave This fixes "ghost groups" if you leave a group soon after joining
(raw-poke-our %contact-pull-hook pull-hook-act) ;< ~ bind:m (raw-poke-our %group-store remove) +;< ~ bind:m + (raw-poke-our %group-view group-view-action+!>([%done rid])) (pure:m !>(~))
.Net Core Bootstrap example - postponed
<ItemGroup> <PackageReference Include="Autofac" Version="4.6.2" /> - <PackageReference Include="AutoMapper" Version="6.2.1" /> + <PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.0" /> + <PackageReference Include="AutoMapper" Version="6.2.2" /> <PackageReference Include="Dapper" Version="1.50.4" /> - <PackageReference Include="FluentValidation" Version="7.2.1" /> + <PackageReference Include="FluentValidation" Version="7.3.4" /> <PackageReference Include="JetBrains.Annotations" Version="11.1.0" /> - <PackageReference Include="MailKit" Version="1.22.0" /> - <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.0.1" /> + <PackageReference Include="MailKit" Version="2.0.0" /> + <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" /> <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="2.0.0" /> <PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.1" /> <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.0.0" /> + <PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" /> <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.0.0" /> - <PackageReference Include="NBitcoin" Version="4.0.0.47" /> + <PackageReference Include="NBitcoin" Version="4.0.0.51" /> <PackageReference Include="NetMQ" Version="4.0.0.1" /> - <PackageReference Include="NetUV.Core" Version="0.1.125" /> + <PackageReference Include="NetUV.Core" Version="0.1.140" /> <PackageReference Include="Newtonsoft.Json" Version="10.0.3" /> <PackageReference Include="NLog" Version="5.0.0-beta09" /> - <PackageReference Include="Npgsql" Version="3.2.5" /> + <PackageReference Include="Npgsql" Version="3.2.6" /> <PackageReference Include="Polly" Version="5.6.1" /> <PackageReference Include="System.Diagnostics.Process" Version="4.3.0" /> <PackageReference Include="System.Reactive" Version="3.1.1" />
Update: Cycle: Cleanup, localInference procedure extra
@@ -126,21 +126,9 @@ void pushEvents(long currentTime) } } -void Cycle_Perform(long currentTime) -{ - eventsSelected = eventsDerived = 0; - popEvents(currentTime); - for(int i=0; i<eventsSelected; i++) - { - Event *e = &selectedEvents[i]; - Event_SetSDR(e, e->sdr); // TODO make sure that hash needs to be calculated once instead already - IN_DEBUG( printf("Event was selected:\n"); Event_Print(e); ) - //determine the concept it is related to - int closest_concept_i; - bool isContextOperation = false; - if(Memory_getClosestConcept(e, &closest_concept_i)) +//doing inference within the matched concept, returning whether e is a context operation (a,op) +bool localInference(Concept *c, int closest_concept_i, Event *e, long currentTime) { - Concept *c = concepts.items[closest_concept_i].address; //Matched event, see https://github.com/patham9/ANSNA/wiki/SDR:-SDRInheritance-for-matching,-and-its-truth-value Event eMatch = *e; eMatch.sdr = c->sdr; @@ -160,14 +148,35 @@ void Cycle_Perform(long currentTime) goal = revised.type == EVENT_TYPE_GOAL ? &revised : NULL; IN_OUTPUT( printf("REVISED EVENT: "); Event_Print(&revised); ) } - isContextOperation = Decision_Making(c, goal, currentTime); + bool isContextOperation = Decision_Making(c, goal, currentTime); //activate concepts attention with the event's attention, but penalize for mismatch to concept //eMatch.attention.priority *= Truth_Expectation(eMatch.truth); c->attention = Attention_activateConcept(&c->attention, &eMatch.attention); PriorityQueue_IncreasePriority(&concepts, closest_concept_i, c->attention.priority); //priority was increased + return isContextOperation; + } + return false; } + +void Cycle_Perform(long currentTime) +{ + eventsSelected = eventsDerived = 0; + popEvents(currentTime); + for(int i=0; i<eventsSelected; i++) + { + Event *e = &selectedEvents[i]; + Event_SetSDR(e, e->sdr); // TODO make sure that hash needs to be calculated once instead already + IN_DEBUG( printf("Event was selected:\n"); Event_Print(e); ) + //determine the concept it is related to + int closest_concept_i; + bool isContextOperation = false; + if(Memory_getClosestConcept(e, &closest_concept_i)) + { + Concept *c = concepts.items[closest_concept_i].address; + //perform concept-related inference + isContextOperation = localInference(c, closest_concept_i, e, currentTime); //send event to the highest prioriry concepts - temporalInference(c, e, currentTime); //c pointer should not be used after this position, as it involves push operation to concepts + temporalInference(c, e, currentTime); } else {
AVoid sending spurious Version negotiation packets
@@ -143,6 +143,11 @@ int picoquic_parse_long_packet_header( break; } } + else { + DBG_PRINTF("Version is not recognized: 0x%08x\n", ph->vn); + ph->ptype = picoquic_packet_error; + ph->pc = 0; + } if (ph->ptype == picoquic_packet_retry) { /* No segment length or sequence number in retry packets */ @@ -640,8 +645,6 @@ int picoquic_incoming_version_negotiation( { int ret = 0; #ifdef _WINDOWS - UNREFERENCED_PARAMETER(bytes); - UNREFERENCED_PARAMETER(length); UNREFERENCED_PARAMETER(addr_from); UNREFERENCED_PARAMETER(current_time); #endif @@ -709,6 +712,24 @@ int picoquic_prepare_version_negotiation( picoquic_packet_header* ph) { int ret = -1; + picoquic_cnx_t* cnx = NULL; + + /* Verify that this is not a spurious error by checking whether a connection context + * already exists */ + if (ph->dest_cnx_id.id_len == quic->local_cnxid_length) { + if (quic->local_cnxid_length == 0) { + cnx = picoquic_cnx_by_net(quic, addr_from); + } + else { + cnx = picoquic_cnx_by_id(quic, ph->dest_cnx_id); + } + } + if (cnx == NULL) { + cnx = picoquic_cnx_by_icid(quic, &ph->dest_cnx_id, addr_from); + } + + /* If no connection context exists, send back a version negotiation */ + if (cnx == NULL) { picoquic_stateless_packet_t* sp = picoquic_create_stateless_packet(quic); if (sp != NULL) { @@ -757,6 +778,7 @@ int picoquic_prepare_version_negotiation( picoquic_queue_stateless_packet(quic, sp); } + } return ret; }
tool: elektrad - improve documentation
-# elektra-web/elektrad +# Elektrad + +## Introduction A server that provides an [HTTP API](http://docs.elektrad.apiary.io) to access -Elektra remotely, built using [go](https://golang.org). +Elektra remotely, built using [Go](https://golang.org). + +## Compiling + +You can compile `elektrad` manually or via CMake. + +If [go-elektra](https://github.com/ElektraInitiative/go-elektra) fails to compile checkout the [README.md](https://github.com/ElektraInitiative/go-elektra/blob/master/README.md) for troubleshooting. -## Installation +### Manually - make sure you have go (>1.11) installed. - install [libelektra](https://libelektra.org/). -- now run `go build` in the elektrad folder with go module enabled (GO111MODULE=on). -- if [go-elektra](https://github.com/ElektraInitiative/go-elektra) fails to compile checkout the [README.md](https://github.com/ElektraInitiative/go-elektra/blob/master/README.md) for troubleshooting. - -## Running +- now run `go build` in the elektrad folder with Go modules enabled (GO111MODULE=on). The output of `go build` is a binary, you can simply run it with: -``` +```sh ./elektrad ``` -## Flags +### With CMake + +Compile Elektra as described in the [COMPILE document](/doc/COMPILE.md), make sure to include the `web` and `kdb` tool using the `-DTOOLS` flag, e.g. `-DTOOLS="kdb;web"`. + +The binary is located at `build-dir/src/tools/web/elektrad` and symlinked to `build-dir/bin/elektrad`. + +### Installing + +You can install Elektra as described in the [install documentation](/doc/INSTALL.md). + +## To Run + +To launch elektrad run the command + +```sh +kdb run-elektrad +``` + +### Flags `-port 33333` - change the port the server uses.
Xerces: Use non-cascading keys in MSR example This way Xerces handles all the metadata. If we use cascading keys, then the example would fail if we use INI as default storage. If you want to learn more, please check out issue
@@ -80,22 +80,22 @@ XSD transformations, schemas or DTDs are not supported yet. ### Mounting, setting a key and exporting ```sh -# Backup-and-Restore:/examples/xercesfile +# Backup-and-Restore:user/examples/xercesfile -sudo kdb mount xerces.xml /examples/xercesfile xerces +sudo kdb mount xerces.xml user/examples/xercesfile xerces -kdb set /examples/xercesfile foo -kdb setmeta /examples/xercesfile xerces/rootname xerces -kdb set /examples/xercesfile/bar bar -kdb setmeta /examples/xercesfile/bar meta "da_ta" +kdb set user/examples/xercesfile foo +kdb setmeta user/examples/xercesfile xerces/rootname xerces +kdb set user/examples/xercesfile/bar bar +kdb setmeta user/examples/xercesfile/bar meta "da_ta" -kdb getmeta /examples/xercesfile xerces/rootname +kdb getmeta user/examples/xercesfile xerces/rootname #> xerces -kdb get /examples/xercesfile/bar +kdb get user/examples/xercesfile/bar #> bar -kdb export /examples/xercesfile xerces +kdb export user/examples/xercesfile xerces #> <?xml version="1.0" encoding="UTF-8" standalone="no" ?> #> <xerces> #> @@ -103,6 +103,6 @@ kdb export /examples/xercesfile xerces #> #> </xerces> -sudo kdb rm -r /examples/xercesfile -sudo kdb umount /examples/xercesfile +sudo kdb rm -r user/examples/xercesfile +sudo kdb umount user/examples/xercesfile ```
removed unused CMAC cleanup
@@ -1715,7 +1715,6 @@ static size_t testptklen; static size_t testmiclen; static EVP_MD_CTX *mdctx; static EVP_PKEY *pkey; -static CMAC_CTX *ctx; static uint8_t pkedata[102]; static uint8_t testptk[EVP_MAX_MD_SIZE]; @@ -1991,7 +1990,6 @@ else if(keyver == 3) } EVP_PKEY_free(pkey); EVP_MD_CTX_free(mdctx); - CMAC_Final(ctx, testmic, &testmiclen); if(memcmp(&testmic, wpak->keymic, 16) == 0) return true; } return false;
doxygen: remove cygwin support Only doclatex and docroot are used by Doxyfile, remove the other variables. The generated html is identical before/after this commit.
-contiking := ../.. -empty := -space := $(empty) $(empty) -pwd := $(shell cd $(contiking); pwd) - # Doxyfile configuration variables -export docdir := . export doclatex := NO -export docroot := $(contiking) - -# Get appropriate root for doxygen path cutoff -ifeq ($(HOST_OS),Windows) - # on windows need to convert cygwin path to windows path for doxygen - ifneq (,$(findstring cygdrive,$(pwd))) - cygroot = $(subst /,$(space),$(patsubst /cygdrive/%,%,$(pwd))) - export docroot = $(firstword $(cygroot)):/$(subst $(space),/,$(wordlist 2,$(words $(cygroot)),$(cygroot))) - endif -endif +export docroot := ../.. .PHONY: clean html @@ -24,6 +9,4 @@ html: clean clean: @echo "> Cleaning Documentation" - @$(RM) -r "$(docdir)/html" - @$(RM) -r "doxygen.log" - @echo " done." + @$(RM) -r html doxygen.log
jets: jet +scot %uv and %uw.
@@ -15,6 +15,22 @@ c3_y to_digit(u3_atom tig) } } +static +c3_y to_w_digit(u3_atom tig) +{ + if (tig == 63) { + return '~'; + } else if (tig == 62) { + return '-'; + } else if (tig >= 36) { + return 29 + tig; + } else if (tig >= 10) { + return 87 + tig; + } else { + return '0' + tig; + } +} + // gives the characters for a four 'digit' small hex atom. static void @@ -229,7 +245,7 @@ _print_ud(u3_atom ud) between = 0; } - list = u3nc(u3ka_add(u3ka_mod(ud, 10), '0'), list); + list = u3nc(u3ka_add(u3qa_mod(ud, 10), '0'), list); between++; ud = u3ka_div(ud, 10); } while (c3n == u3r_sing(ud, 0)); @@ -237,6 +253,56 @@ _print_ud(u3_atom ud) return list; } +static +u3_noun +_print_uv(u3_atom uv) +{ + // number of characters printed "between" periods. + int between = 0; + u3_atom list = 0; + + u3k(uv); + + do { + if (between == 5) { + list = u3nc('.', list); + between = 0; + } + + u3_atom tig = u3qa_mod(uv, 32); + list = u3nc(to_digit(tig), list); + between++; + uv = u3ka_div(uv, 32); + } while (c3n == u3r_sing(uv, 0)); + + return u3nt('0', 'v', list); +} + +static +u3_noun +_print_uw(u3_atom uw) +{ + // number of characters printed "between" periods. + int between = 0; + u3_atom list = 0; + + u3k(uw); + + do { + if (between == 5) { + list = u3nc('.', list); + between = 0; + } + + u3_atom tig = u3qa_mod(uw, 64); + list = u3nc(to_w_digit(tig), list); + between++; + uw = u3ka_div(uw, 64); + } while (c3n == u3r_sing(uw, 0)); + + return u3nt('0', 'w', list); +} + u3_noun u3we_scow(u3_noun cor) { @@ -260,6 +326,12 @@ u3we_scow(u3_noun cor) case c3__ud: return _print_ud(atom); + case c3__uv: + return _print_uv(atom); + + case c3__uw: + return _print_uw(atom); + /* // %ta is used once in link.hoon. don't bother. */ /* case c3__tas: */ @@ -298,6 +370,14 @@ u3we_scot(u3_noun cor) tape = _print_ud(atom); break; + case c3__uv: + tape = _print_uv(atom); + break; + + case c3__uw: + tape = _print_uw(atom); + break; + default: return u3_none; }
Remove testType from kdf135_tls
@@ -77,7 +77,6 @@ ACVP_RESULT acvp_kdf135_tls_kat_handler (ACVP_CTX *ctx, JSON_Object *obj) { ACVP_CAPS_LIST *cap; ACVP_KDF135_TLS_TC stc; ACVP_TEST_CASE tc; - ACVP_HASH_TESTTYPE test_type; ACVP_RESULT rv; const char *alg_str = json_object_get_string(obj, "algorithm"); ACVP_CIPHER alg_id; @@ -249,12 +248,6 @@ ACVP_RESULT acvp_kdf135_tls_kat_handler (ACVP_CTX *ctx, JSON_Object *obj) { return ACVP_MISSING_ARG; } - test_type = (unsigned int) json_object_get_number(groupobj, "testType"); - if (!test_type) { - ACVP_LOG_ERR("testType incorrect, %d", test_type); - return ACVP_INVALID_ARG; - } - ACVP_LOG_INFO(" Test case: %d", j); ACVP_LOG_INFO(" tcId: %d", tc_id); ACVP_LOG_INFO(" pmSecret: %s", pm_secret); @@ -262,7 +255,6 @@ ACVP_RESULT acvp_kdf135_tls_kat_handler (ACVP_CTX *ctx, JSON_Object *obj) { ACVP_LOG_INFO(" chRND: %s", ch_rnd); ACVP_LOG_INFO(" sRND: %s", s_rnd); ACVP_LOG_INFO(" cRND: %s", c_rnd); - ACVP_LOG_INFO(" testtype: %s", test_type); /* * Create a new test case in the response
change argument placeholder for --tls-server-ca and adjust indent
@@ -117,7 +117,7 @@ static const char *kadnode_usage_str = "KadNode - A P2P name resolution daemon.\ #ifdef TLS " --tls-client-cert <path> Path to file or folder of CA root certificates.\n" " This option may occur multiple times.\n\n" -" --tls-server-cert <tuple> Add a comma separated tuple of server certificate file and key.\n" +" --tls-server-cert <path>,<path> Add a comma separated tuple of server certificate file and key.\n" " This option may occur multiple times.\n" " Example: kadnode.crt,kadnode.key\n\n" #endif
Router: restoring listening sockets of the previous configuration.
@@ -382,6 +382,7 @@ static void nxt_router_conf_error(nxt_task_t *task, nxt_router_temp_conf_t *tmcf) { nxt_socket_t s; + nxt_router_t *router; nxt_queue_link_t *qlk; nxt_socket_conf_t *skcf; @@ -399,6 +400,11 @@ nxt_router_conf_error(nxt_task_t *task, nxt_router_temp_conf_t *tmcf) nxt_free(skcf->socket); } + router = tmcf->conf->router; + + nxt_queue_add(&router->sockets, &tmcf->keeping); + nxt_queue_add(&router->sockets, &tmcf->deleting); + // TODO: new engines and threads nxt_mp_destroy(tmcf->conf->mem_pool);
Adjust VMA_MIN() and VMA_MAX() macros to work despite NOMINMAX being defined or not.
@@ -116,10 +116,6 @@ available through VmaAllocatorCreateInfo::pRecordSettings. #define VMA_RECORDING_ENABLED 0 #endif -#if !defined(NOMINMAX) && defined(VMA_IMPLEMENTATION) - #define NOMINMAX // For windows.h -#endif - #if defined(__ANDROID__) && defined(VK_NO_PROTOTYPES) && VMA_STATIC_VULKAN_FUNCTIONS extern PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr; extern PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr; @@ -2382,11 +2378,11 @@ static void vma_aligned_free(void* VMA_NULLABLE ptr) #endif #ifndef VMA_MIN - #define VMA_MIN(v1, v2) (std::min((v1), (v2))) + #define VMA_MIN(v1, v2) ((std::min)((v1), (v2))) #endif #ifndef VMA_MAX - #define VMA_MAX(v1, v2) (std::max((v1), (v2))) + #define VMA_MAX(v1, v2) ((std::max)((v1), (v2))) #endif #ifndef VMA_SWAP
improve closing procedure for usrsctp
@@ -1215,7 +1215,7 @@ handle_sctp_event(neat_flow *flow, union sctp_notification *notfn) neat_log(ctx, NEAT_LOG_DEBUG, "Got SCTP shutdown event"); flow->eofSeen = 1; flow->readBufferMsgComplete = 1; - neat_notify_close(flow); + //neat_notify_close(flow); return READ_WITH_ZERO; break; case SCTP_ADAPTATION_INDICATION: @@ -1571,8 +1571,10 @@ io_readable(neat_ctx *ctx, neat_flow *flow, struct neat_pollable_socket *socket, &infotype, &(msghdr.msg_flags)); if (n < 0) { - /* if (errno == EAGAIN) - return READ_OK;*/ + if (errno == EAGAIN) { + //return READ_OK; + neat_log(ctx, NEAT_LOG_WARNING, "%s - usrsctp_recvv error EAGAIN", __func__); + } neat_log(ctx, NEAT_LOG_WARNING, "%s - READ_WITH_ERROR 10 - usrsctp_recvv error", __func__); return READ_WITH_ERROR; } @@ -6488,14 +6490,15 @@ handle_upcall(struct socket *sock, void *arg, int flags) } - if (events & SCTP_EVENT_READ && flow->operations->on_readable) { + if (events & SCTP_EVENT_READ) { if (flow->state == NEAT_FLOW_OPEN) { do { code = io_readable(ctx, flow, pollable_socket, NEAT_OK); - } while (code == READ_OK && flow->state == NEAT_FLOW_OPEN); + } while (code == READ_OK); - if (code == READ_WITH_ZERO && flow->operations && flow->operations->on_readable && flow->state == NEAT_FLOW_OPEN) { - flow->operations->on_readable(flow->operations); + if (code == READ_WITH_ZERO) { + neat_notify_close(flow); + return; } } else { neat_log(ctx, NEAT_LOG_WARNING, "%s - io_readable and flow in wrong state");
UnjoinedResource: clean up design
import React, { useEffect, useMemo } from "react"; import { Association } from "~/types/metadata-update"; import { Box, Text, Button, Col, Center } from "@tlon/indigo-react"; -import RichText from '~/views/components/RichText'; +import RichText from "~/views/components/RichText"; import { Link, useHistory } from "react-router-dom"; import GlobalApi from "~/logic/api/global"; import { useWaitForProps } from "~/logic/lib/useWaitForProps"; @@ -80,14 +80,21 @@ export function UnjoinedResource(props: UnjoinedResourceProps) { return ( <Center p={6}> - <Col maxWidth="400px" p={4} border={1} borderColor="washedGray"> - <Box mb={4}> + <Col + maxWidth="400px" + p={4} + border={1} + borderColor="lightGray" + borderRadius="1" + gapY="3" + > + <Box> <Text>{title}</Text> </Box> - <Box mb={4}> + <Box> <RichText color="gray">{description}</RichText> </Box> - <StatelessAsyncButton onClick={onJoin} mx="auto" border> + <StatelessAsyncButton primary width="fit-content" onClick={onJoin}> Join Channel </StatelessAsyncButton> </Col>
moved parameter to sign context
@@ -818,7 +818,6 @@ static const char *listener_setup_ssl_picotls(struct listener_config_t *listener .require_client_authentication = 0, .omit_end_of_early_data = 0, .server_cipher_preference = server_cipher_preference, - .async_handshake = 1, .encrypt_ticket = NULL, /* initialized later */ .save_ticket = NULL, /* initialized later */ .log_event = NULL, @@ -844,6 +843,10 @@ static const char *listener_setup_ssl_picotls(struct listener_config_t *listener .cb = on_emit_certificate_ptls, }, }, + .sc = + { + .async = 1, + }, }; { /* obtain key and cert (via fake connection for libressl compatibility) */ SSL *fakeconn = SSL_new(identity->ossl); @@ -901,7 +904,7 @@ static const char *listener_setup_ssl_picotls(struct listener_config_t *listener } #endif // disable async handshaking in quic until it is supported in quicly - pctx->ctx.async_handshake = 0; + pctx->sc.async = 0; quicly_amend_ptls_context(&pctx->ctx); }
options/internal: Make sys_pread a weak function
@@ -63,7 +63,7 @@ int sys_read(int fd, void *buf, size_t count, ssize_t *bytes_read); #ifndef MLIBC_BUILDING_RTDL int sys_write(int fd, const void *buf, size_t count, ssize_t *bytes_written); - int sys_pread(int fd, void *buf, size_t n, off_t off, ssize_t *bytes_read); + [[gnu::weak]] int sys_pread(int fd, void *buf, size_t n, off_t off, ssize_t *bytes_read); #endif // !defined(MLIBC_BUILDING_RTDL) int sys_seek(int fd, off_t offset, int whence, off_t *new_offset);
Override angular_pred to generic in travis as well. Assuming false positive from valgrind.
@@ -19,7 +19,7 @@ matrix: include: - compiler: clang - env: KVZ_TEST_VALGRIND=1 + env: KVZ_TEST_VALGRIND=1 KVAZAAR_OVERRIDE_angular_pred=generic - compiler: clang env: CFLAGS='-fsanitize=thread'
Enabled multi-thread compiling on Windows builds
@@ -103,10 +103,10 @@ if defined GitRev ( <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Nightly|Win32'"> <ClCompile> <CallingConvention>FastCall</CallingConvention> - <MinimalRebuild>true</MinimalRebuild> <PreprocessorDefinitions>_NIGHTLYBUILD;_MTNETWORK;_WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <WarningLevel>Level2</WarningLevel> <ExceptionHandling>Async</ExceptionHandling> + <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>_NIGHTLYBUILD;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> @@ -132,7 +132,7 @@ if defined GitRev ( <ClCompile> <CallingConvention>FastCall</CallingConvention> <PreprocessorDefinitions>_MTNETWORK;_WIN32;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions> - <WarningLevel>Level4</WarningLevel> + <WarningLevel>Level2</WarningLevel> <ExceptionHandling>Async</ExceptionHandling> <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile>
dts: Zero struct to avoid using uninitialised value
@@ -239,7 +239,7 @@ static int dts_read_core_temp_p9(uint32_t pir, struct dts *dts) static void dts_async_read_temp(struct timer *t __unused, void *data, u64 now __unused) { - struct dts dts; + struct dts dts = {0}; int rc, swkup_rc; struct cpu_thread *cpu = data; @@ -367,7 +367,7 @@ int64_t dts_sensor_read(u32 sensor_hndl, int token, u64 *sensor_data) { uint8_t attr = sensor_get_attr(sensor_hndl); uint32_t rid = sensor_get_rid(sensor_hndl); - struct dts dts; + struct dts dts = {0}; int64_t rc; if (attr > SENSOR_DTS_ATTR_TEMP_TRIP)
Remove a pointless "#ifndef" from bf_enc.c
@@ -60,8 +60,6 @@ void BF_encrypt(BF_LONG *data, const BF_KEY *key) data[0] = r & 0xffffffffU; } -#ifndef BF_DEFAULT_OPTIONS - void BF_decrypt(BF_LONG *data, const BF_KEY *key) { register BF_LONG l, r; @@ -175,5 +173,3 @@ void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0; tin[0] = tin[1] = 0; } - -#endif
Fix missing ;. Add custom event last
@@ -82,7 +82,8 @@ enum { /** Custom events of rotary*/ enum { - LV_EVENT_ROTARY_TOGGLED = _LV_EVENT_LAST + LV_EVENT_ROTARY_TOGGLED = _LV_EVENT_LAST, + _LV_EVENT_ROTARY_LAST }; typedef uint8_t lv_rotary_event_t; @@ -197,7 +198,7 @@ static inline void lv_rotary_set_rotation(lv_obj_t * rotary, uint16_t rotation_a * @param rotary pointer to a rotary object * @param tgl true: enable toggled states, false: disable */ -void lv_rotary_set_checkable(lv_obj_t * rotary, bool tgl) +void lv_rotary_set_checkable(lv_obj_t * rotary, bool tgl); /** * Set the state of the rotary
added counter on AKM defined (not recoverable) PMKIDs (e.g. WPA3)
@@ -238,6 +238,7 @@ static long int pmkidcount; static long int pmkidbestcount; static long int pmkidroguecount; static long int pmkiduselesscount; +static long int pmkidakmcount; static long int pmkidwrittenhcount; static long int pmkidwrittenjcountdeprecated; static long int pmkidwrittencountdeprecated; @@ -548,6 +549,7 @@ pmkidcount = 0; pmkidbestcount = 0; pmkidroguecount = 0; pmkiduselesscount = 0; +pmkidakmcount = 0; pmkidwrittenhcount = 0; eapolwrittenjcountdeprecated = 0; pmkidwrittenjcountdeprecated = 0; @@ -791,6 +793,7 @@ if(pmkiduselesscount > 0) fprintf(stdout, "PMKID (useless)..................... if(pmkidcount > 0) fprintf(stdout, "PMKID (total)............................: %ld\n", pmkidcount); if(zeroedpmkidpskcount > 0) fprintf(stdout, "PMKID (from zeroed PSK)..................: %ld\n", zeroedpmkidpskcount); if(zeroedpmkidpmkcount > 0) fprintf(stdout, "PMKID (from zeroed PMK)..................: %ld\n", zeroedpmkidpmkcount); +if(pmkidakmcount > 0) fprintf(stdout, "PMKID (AKM defined - not recoverable)....: %ld\n", pmkidakmcount); if(donotcleanflag == false) { if(pmkidbestcount > 0) fprintf(stdout, "PMKID (best).............................: %ld\n", pmkidbestcount); @@ -3718,6 +3721,19 @@ keyver = ntohs(wpak->keyinfo) & WPA_KEY_INFO_TYPE_MASK; if((keyver == 0) || (keyver > 3)) { eapolm1kdv0count++; + if(authlen >= (int)(WPAKEY_SIZE +PMKID_SIZE)) + { + pmkid = (pmkid_t*)(wpakptr +WPAKEY_SIZE); + if(pmkid->id != TAG_VENDOR) return; + if((pmkid->len == 0x14) && (pmkid->type == 0x04)) + { + if(memcmp(&zeroed32, pmkid->pmkid, 16) == 0) + { + pmkiduselesscount++; + } + else pmkidakmcount++; + } + } return; } if(ntohs(wpak->wpadatalen) > (restlen -EAPAUTH_SIZE -WPAKEY_SIZE))
xive: Log the address of the boot time tables This can be handy when debugging
@@ -1692,6 +1692,7 @@ static bool xive_prealloc_tables(struct xive *x) } /* SBEs are initialized to 0b01 which corresponds to "ints off" */ memset(x->sbe_base, 0x55, SBE_SIZE); + xive_dbg(x, "SBE at %p size 0x%x\n", x->sbe_base, IVT_SIZE); /* EAS/IVT entries are 8 bytes */ x->ivt_base = local_alloc(x->chip_id, IVT_SIZE, IVT_SIZE); @@ -1703,6 +1704,7 @@ static bool xive_prealloc_tables(struct xive *x) * when actually used */ memset(x->ivt_base, 0, IVT_SIZE); + xive_dbg(x, "IVT at %p size 0x%x\n", x->ivt_base, IVT_SIZE); #ifdef USE_INDIRECT /* Indirect EQ table. (XXX Align to 64K until I figure out the @@ -1715,6 +1717,7 @@ static bool xive_prealloc_tables(struct xive *x) return false; } memset(x->eq_ind_base, 0, al); + xive_dbg(x, "EQi at %p size 0x%llx\n", x->eq_ind_base, al); x->eq_ind_count = IND_EQ_TABLE_SIZE / 8; /* Indirect VP table. (XXX Align to 64K until I figure out the @@ -1726,6 +1729,7 @@ static bool xive_prealloc_tables(struct xive *x) xive_err(x, "Failed to allocate VP indirect table\n"); return false; } + xive_dbg(x, "VPi at %p size 0x%llx\n", x->vp_ind_base, al); x->vp_ind_count = IND_VP_TABLE_SIZE / 8; memset(x->vp_ind_base, 0, al); @@ -1753,6 +1757,7 @@ static bool xive_prealloc_tables(struct xive *x) xive_err(x, "Failed to allocate VP page\n"); return false; } + xive_dbg(x, "VP%d at %p size 0x%x\n", i, page, 0x10000); memset(page, 0, 0x10000); x->vp_ind_base[i] = ((uint64_t)page) & VSD_ADDRESS_MASK;
Fix TMP007 sensor readings for platform Simplelink
#define SWAP16(v) ((LO_UINT16(v) << 8) | (HI_UINT16(v) << 0)) -#define LSB16(v) (LO_UINT16(v)), (HI_UINT16(v)) -#define MSB16(v) (HI_UINT16(v)), (LO_UINT16(v)) +#define LSB16(v) (HI_UINT16(v)), (LO_UINT16(v)) +#define MSB16(v) (LO_UINT16(v)), (HI_UINT16(v)) /*---------------------------------------------------------------------------*/ static const PIN_Config pin_table[] = { TMP_007_TMP_RDY | PIN_INPUT_EN | PIN_PULLUP | PIN_HYSTERESIS | PIN_IRQ_NEGEDGE,
Increase the size of VM group opcodes to 256 Currently there is almost 115 group opcodes so increasing the number of bits which reprent a group opcode has become actual. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik
* If VM_OC_GET_ARGS_INDEX(opcode) == VM_OC_GET_BRANCH, * this flag signals that the branch is a backward branch. */ -#define VM_OC_BACKWARD_BRANCH 0x4000 +#define VM_OC_BACKWARD_BRANCH (1 << 15) /** * Position of "get arguments" opcode. */ -#define VM_OC_GET_ARGS_SHIFT 7 +#define VM_OC_GET_ARGS_SHIFT 8 /** * Mask of "get arguments" opcode. @@ -91,7 +91,7 @@ typedef enum /** * Mask of "group" opcode. */ -#define VM_OC_GROUP_MASK 0x7f +#define VM_OC_GROUP_MASK 0xff /** * Extract the "group" opcode. @@ -319,7 +319,7 @@ typedef enum /** * Bit index shift for non-static property initializers. */ -#define VM_OC_NON_STATIC_SHIFT 14 +#define VM_OC_NON_STATIC_SHIFT 15 /** * This flag is set for static property initializers. @@ -329,7 +329,7 @@ typedef enum /** * Position of "put result" opcode. */ -#define VM_OC_PUT_RESULT_SHIFT 10 +#define VM_OC_PUT_RESULT_SHIFT 11 /** * Mask of "put result" opcode.
Update changelog for v0.1.0
`hslua-module-paths` uses [PVP Versioning][1]. The changelog is available [on GitHub][2]. +## 0.1.0 + +Released 2021-02-02. + +- Fixed `directory`. This was the same as normalize. +- Improved documentation. +- Added more tests. + ## 0.0.1 -* Initially created. +Released 2021-02-01. + +- Initially created. [1]: https://pvp.haskell.org [2]: https://github.com/hslua/hslua-module-path/releases
os/board/common/Kconfig : Fix typo typo : partiton -> partition
@@ -109,7 +109,7 @@ config AUTOMOUNT If enabled, mount userfs or romfs partition automatically at boot. config AUTOMOUNT_USERFS - bool "Automount userfs partiton" + bool "Automount userfs partition" default n depends on AUTOMOUNT depends on FS_SMARTFS @@ -121,7 +121,7 @@ config AUTOMOUNT_USERFS will be appended by "d1" (/dev/smart0pxd1). config AUTOMOUNT_ROMFS - bool "Automount romfs partiton" + bool "Automount romfs partition" default n depends on AUTOMOUNT depends on FS_ROMFS
fsplib: update to v14.0 [2019-08-16] only security fixes
@@ -423,8 +423,34 @@ FSP_SESSION * fsp_open_session(const char *host,unsigned short port,const char * else sprintf(port_s,"%hu",port); - if ( getaddrinfo(host,port_s,&hints,&res) ) + if ( (fd = getaddrinfo(host,port_s,&hints,&res)) != 0 ) { + if ( fd != EAI_SYSTEM ) + { + /* We need to set errno ourself */ + switch (fd) + { + case EAI_SOCKTYPE: + case EAI_SERVICE: + case EAI_FAMILY: + errno = EOPNOTSUPP; + break; + case EAI_AGAIN: + errno = EAGAIN; + break; + case EAI_FAIL: + errno = ECONNRESET; + break; + case EAI_BADFLAGS: + errno = EINVAL; + break; + case EAI_MEMORY: + errno = ENOMEM; + break; + default: + errno = EFAULT; + } + } return NULL; /* host not found */ } @@ -664,7 +690,7 @@ int fsp_readdir_native(FSP_DIR *dir,FSP_RDENTRY *entry, FSP_RDENTRY **result) unsigned char ftype; int namelen; - if (dir == NULL || entry == NULL || *result == NULL) + if (dir == NULL || entry == NULL || result == NULL) return -EINVAL; if (dir->dirpos<0 || dir->dirpos % 4) return -ESPIPE;
Fix mistaken time scalar
@@ -628,7 +628,7 @@ void send_output_events(Oosc_dev* oosc_dev, Midi_mode const* midi_mode, Usz bpm, Susnote_list* susnote_list, Oevent const* events, Usz count) { Midi_mode_type midi_mode_type = midi_mode->any.type; - double bar_secs = (double)bpm / 60.0 * 4.0; + double bar_secs = (double)bpm / 60.0; enum { Midi_on_capacity = 512 }; typedef struct {
asurada: do not disable AP_EC_WATCHDOG_L irq at boot To correctly capture the signal. TEST=ensure EC receiving AP_EC_WATCHDOG_L signal when reboot in AP BRANCH=main
@@ -129,9 +129,7 @@ __override void board_hibernate_late(void) const struct power_signal_info power_signal_list[] = { {GPIO_PMIC_EC_PWRGD, POWER_SIGNAL_ACTIVE_HIGH, "PMIC_PWR_GOOD"}, {GPIO_AP_IN_SLEEP_L, POWER_SIGNAL_ACTIVE_LOW, "AP_IN_S3_L"}, - {GPIO_AP_EC_WATCHDOG_L, - POWER_SIGNAL_ACTIVE_LOW | POWER_SIGNAL_DISABLE_AT_BOOT, - "AP_WDT_ASSERTED"}, + {GPIO_AP_EC_WATCHDOG_L, POWER_SIGNAL_ACTIVE_LOW, "AP_WDT_ASSERTED"}, }; BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
util/cbmem: const correctness
#include "os/mynewt.h" #include "cbmem/cbmem.h" -typedef void (copy_data_func_t) (void *dst, void *data, uint16_t len); +typedef void (copy_data_func_t) (void *dst, const void *data, uint16_t len); int cbmem_init(struct cbmem *cbmem, void *buf, uint32_t buf_len) @@ -75,7 +75,7 @@ err: static int -cbmem_append_internal(struct cbmem *cbmem, void *data, uint16_t len, +cbmem_append_internal(struct cbmem *cbmem, const void *data, uint16_t len, copy_data_func_t *copy_func) { struct cbmem_entry_hdr *dst; @@ -145,15 +145,15 @@ err: } static void -copy_data_from_flat(void *dst, void *data, uint16_t len) +copy_data_from_flat(void *dst, const void *data, uint16_t len) { memcpy(dst, data, len); } static void -copy_data_from_mbuf(void *dst, void *data, uint16_t len) +copy_data_from_mbuf(void *dst, const void *data, uint16_t len) { - struct os_mbuf *om = data; + const struct os_mbuf *om = data; os_mbuf_copydata(om, 0, len, dst); }
External: Improve description in ReadMe
-These are minimal examples how to applications -with elektra outside of elektra. +This folder contains examples on how to write applications +using Elektra outside of the Elektra source tree. [See how to build and run example](tests/shell/check_external.sh)
Web: Fix symbolic link creation Before this update CMake would print an error message in the configure step: > CMake Error: failed to create symbolic link > 'BUILD_DIRECTORY/bin/elektrad': no such file or directory .
@@ -50,14 +50,13 @@ else () COMMAND ${CMAKE_COMMAND} ARGS -E env GO111MODULE=on PKG_CONFIG_PATH=${CMAKE_CURRENT_BINARY_DIR}/elektrad ${GO_EXECUTABLE} build -o "${CMAKE_CURRENT_BINARY_DIR}/elektrad/elektrad" + COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_BINARY_DIR}/elektrad/elektrad" + "${CMAKE_BINARY_DIR}/bin/elektrad" VERBATIM WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/elektrad" DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/elektrad/main.go" ${ELEKTRA_LIBS_ELEKTRAD}) add_custom_target (elektrad ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/elektrad/elektrad") - execute_process (COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_BINARY_DIR}/elektrad/elektrad" - "${CMAKE_BINARY_DIR}/bin/elektrad") - # build elektra-web install (CODE "message (\"-- Installing: elektra-web > elektrad\")") install (PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/elektrad/elektrad" DESTINATION "${install_directory}")
Add missing error case when editing environment variables
@@ -304,16 +304,25 @@ INT_PTR CALLBACK PhpProcessEnvironmentDlgProc( for (i = 0; i < numberOfIndices; i++) { item = PhItemArray(&environmentContext->Items, PtrToUlong(indices[i]) - 1); - PhSetEnvironmentVariableRemote(processHandle, &item->Name->sr, NULL, &timeout); + status = PhSetEnvironmentVariableRemote(processHandle, &item->Name->sr, NULL, &timeout); } NtClose(processHandle); PhpRefreshEnvironment(hwndDlg, environmentContext, processItem); + + if (!NT_SUCCESS(status)) + { + PhShowStatus(hwndDlg, L"Unable to delete the environment variable.", status, 0); + } + else if (status == STATUS_TIMEOUT) + { + PhShowStatus(hwndDlg, L"Unable to delete the environment variable.", 0, WAIT_TIMEOUT); + } } else { - PhShowStatus(hwndDlg, L"Unable to open the process", status, 0); + PhShowStatus(hwndDlg, L"Unable to open the process.", status, 0); } } @@ -543,7 +552,12 @@ INT_PTR CALLBACK PhpEditEnvDlgProc( if (!NT_SUCCESS(status)) { - PhShowStatus(hwndDlg, L"Unable to set the environment variable", status, 0); + PhShowStatus(hwndDlg, L"Unable to set the environment variable.", status, 0); + break; + } + else if (status == STATUS_TIMEOUT) + { + PhShowStatus(hwndDlg, L"Unable to delete the environment variable.", 0, WAIT_TIMEOUT); break; }
gpconfig: update docs with valid options
@@ -12,7 +12,7 @@ gpconfig -c <param_name> -v <value> [-m <master_value> | --masteronly] | -l [--skipvalidation] [--verbose] [--debug] -gpconfig -s <param_name> [--flag] [--verbose] [--debug] +gpconfig -s <param_name> [--file | --file-compare] [--verbose] [--debug] gpconfig --help
[SMT] bug fix : when deleting a node, don't rewrite default node value in db (updatedNodes)
@@ -373,10 +373,13 @@ func (s *SMT) interiorHash(left, right []byte, height uint64, oldRoot []byte, sh s.db.liveMux.Unlock() } // store new node in db + if !bytes.Equal(s.defaultHashes[height+1], h) { + // When deleting, don't rewrite a default hash in db s.db.updatedMux.Lock() s.db.updatedNodes[node] = kv s.db.updatedMux.Unlock() } + } if !bytes.Equal(s.defaultHashes[height+1], oldRoot) && !bytes.Equal(h, oldRoot) { // Delete old liveCache node if it has been updated and is not default var node Hash
fix po files
@@ -231,9 +231,7 @@ msgstr "Peticiones Estaticas" #: ../src/labels.h:116 msgid "Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" -msgstr "" -"Peticiones estaticas top ordenadas por hits [, avgts, cumts, maxts, mthd, " -"proto]" +msgstr "Peticiones estaticas top ordenadas por hits [, avgts, cumts, maxts, mthd, proto]" #: ../src/labels.h:121 msgid "Time Distribution" @@ -269,9 +267,7 @@ msgstr "URLs no encontradas (404)" #: ../src/labels.h:144 msgid "Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]" -msgstr "" -"URLs no encontradas top ordenadas por hits [, avgts, cumts, maxts, mthd, " -"proto]" +msgstr "URLs no encontradas top ordenadas por hits [, avgts, cumts, maxts, mthd, proto]" #: ../src/labels.h:149 msgid "Visitor Hostnames and IPs" @@ -685,8 +681,7 @@ msgstr "204 - Sin Contenido: Peticion no retorno ningun contenido" #: ../src/labels.h:387 msgid "205 - Reset Content: Server asked the client to reset the document" -msgstr "" -"205 - Resetear Contenido: Servidor pidio al cliente resetear el documento" +msgstr "205 - Resetear Contenido: Servidor pidio al cliente resetear el documento" #: ../src/labels.h:389 msgid "206 - Partial Content: The partial GET has been successful" @@ -880,13 +875,11 @@ msgstr "502 - Entrada Erronea: Recibio respuesta invalida" #: ../src/labels.h:483 msgid "503 - Service Unavailable: The server is currently unavailable" -msgstr "" -"503 - Servicio no disponible: El servidor actualmente no esta disponible" +msgstr "503 - Servicio no disponible: El servidor actualmente no esta disponible" #: ../src/labels.h:485 msgid "504 - Gateway Timeout: The upstream server failed to send request" -msgstr "" -"504 - Timeout de Gateway: El servidor upstream fallo al enviar peticion" +msgstr "504 - Timeout de Gateway: El servidor upstream fallo al enviar peticion" #: ../src/labels.h:487 msgid "505 - HTTP Version Not Supported"
apps/system/termcurses/tcurses_vt100.c: Fix an issue where the first curses 'getch()' call sometimes (usually) hangs waiting for a keypress. This bug was introduced when I fixed the keyboard 'paste' overflow error.
@@ -847,9 +847,10 @@ static int tcurses_vt100_getkeycode(FAR struct termcurses_s *dev, FAR int *speci for (x = 0; x < priv->keycount && keycode == -1; x++) { ch = priv->keybuf[x]; - if (ch == 0) + if (ch == 0 && x + 1 == priv->keycount) { - continue; + priv->keycount = 0; + return -1; } /* Test for escape sequence */
allow has-time in eval feature
@@ -66,10 +66,6 @@ int mode_eval_feature(int argc, const char* argv[]) { NPar::LocalExecutor().RunAdditionalThreads(catBoostOptions.SystemOptions->NumThreads - 1); TVector<TString> classNames = catBoostOptions.DataProcessingOptions->ClassNames; - CB_ENSURE( - !catBoostOptions.DataProcessingOptions->HasTimeFlag.Get(), - "Feature evaluation does not support ordered datasets (--has-time)" - ); const auto objectsOrder = EObjectsOrder::Undefined; auto pools = NCB::ReadTrainDatasets( poolLoadParams,
doc: fix style for lists in note Fix CSS style for lists inside a note. Previously the first list item would overlap in the note heading box.
@@ -73,8 +73,8 @@ div.non-compliant-code div.highlight { color: rgba(255,255,255,1); } -/* squish the space between a paragraph before a list */ -div > p + ul, div > p + ol { +/* squish the space between a paragraph before a list but not in a note */ +div:not(.admonition) > p + ul, div:not(.admonition) > p + ol { margin-top: -20px; }
[bsp/hifive1]Fixed symbol error in interrupt.c Note that the symbol ';;' is wrong in 'return (rt_uint32_t)PLIC_claim_interrupt(&g_plic);;', so that ';;' should been replaced with ';'.
@@ -93,7 +93,7 @@ void rt_hw_interrupt_init(void) rt_uint32_t rt_hw_interrupt_get_active(rt_uint32_t fiq_irq) { - return (rt_uint32_t)PLIC_claim_interrupt(&g_plic);; + return (rt_uint32_t)PLIC_claim_interrupt(&g_plic); } void rt_hw_interrupt_ack(rt_uint32_t fiq_irq, rt_uint32_t id)
quic: Fix quic_echo event flags Type: fix
@@ -120,15 +120,15 @@ typedef enum STATE_DETACHED } connection_state_t; -typedef enum -{ - ECHO_EVT_START, /* app starts */ - ECHO_EVT_FIRST_QCONNECT, /* First connect Quic session sent */ - ECHO_EVT_LAST_QCONNECTED, /* All Quic session are connected */ - ECHO_EVT_FIRST_SCONNECT, /* First connect Stream session sent */ - ECHO_EVT_LAST_SCONNECTED, /* All Stream session are connected */ - ECHO_EVT_LAST_BYTE, /* Last byte received */ - ECHO_EVT_EXIT, /* app exits */ +typedef enum echo_test_evt_ +{ + ECHO_EVT_START = 1, /* app starts */ + ECHO_EVT_FIRST_QCONNECT = (1 << 1), /* First connect Quic session sent */ + ECHO_EVT_LAST_QCONNECTED = (1 << 2), /* All Quic session are connected */ + ECHO_EVT_FIRST_SCONNECT = (1 << 3), /* First connect Stream session sent */ + ECHO_EVT_LAST_SCONNECTED = (1 << 4), /* All Stream session are connected */ + ECHO_EVT_LAST_BYTE = (1 << 5), /* Last byte received */ + ECHO_EVT_EXIT = (1 << 6), /* app exits */ } echo_test_evt_t; typedef struct _quic_echo_cb_vft
Update ARMv81MML_DSP_DP_MVE_FP.h Added macros for: __PMU_PRESENT (set to 1 by default) __PMU_NUM_EVENTCNT (set to 31 by default - max for Armv8.1-M)
@@ -92,6 +92,8 @@ typedef enum IRQn #define __ARMv81MML_REV 0x0001U /* Core revision r0p1 */ #define __SAUREGION_PRESENT 1U /* SAU regions present */ #define __MPU_PRESENT 1U /* MPU present */ +#define __PMU_PRESENT 1U /* PMU present */ +#define __PMU_NUM_EVENTCNT 31U /* Number of PMU event counters */ #define __VTOR_PRESENT 1U /* VTOR present */ #define __NVIC_PRIO_BITS 3U /* Number of Bits used for Priority Levels */ #define __Vendor_SysTickConfig 0U /* Set to 1 if different SysTick Config is used */
lisp: fix dangling references to bihash tables gid_ip4_table_t's and gid_ip6_table_t's are allocated from pools. They MUST NOT be listed on the clib_all_bihash list to avoid dangling references. Switch to the clib_bihash_init2 API, which has the required knob. Type: fix Ticket:
@@ -555,6 +555,7 @@ add_del_ip4_key (gid_ip4_table_t * db, u32 vni, ip_prefix_t * pref, u32 val, static void ip4_lookup_init (gid_ip4_table_t * db) { + BVT (clib_bihash_init2_args) _a, *a = &_a; uword i; clib_memset (db->ip4_prefix_len_refcount, 0, @@ -579,9 +580,18 @@ ip4_lookup_init (gid_ip4_table_t * db) if (db->ip4_lookup_table_size == 0) db->ip4_lookup_table_size = IP4_LOOKUP_DEFAULT_HASH_MEMORY_SIZE; - BV (clib_bihash_init) (&db->ip4_lookup_table, "ip4 lookup table", - db->ip4_lookup_table_nbuckets, - db->ip4_lookup_table_size); + /* + * Danger Will Robinson, Danger! gid_ip4_table_t's are allocated from + * a pool. They MUST NOT be listed on the clib_all_bihashes list... + */ + memset (a, 0, sizeof (*a)); + a->h = &db->ip4_lookup_table; + a->name = "LISP ip4 lookup table"; + a->nbuckets = db->ip4_lookup_table_nbuckets; + a->memory_size = db->ip4_lookup_table_size; + a->dont_add_to_all_bihash_list = 1; /* See comment above */ + + BV (clib_bihash_init2) (a); } static u32 @@ -754,6 +764,7 @@ static void ip6_lookup_init (gid_ip6_table_t * db) { uword i; + BVT (clib_bihash_init2_args) _a, *a = &_a; clib_memset (db->ip6_prefix_len_refcount, 0, sizeof (db->ip6_prefix_len_refcount)); @@ -782,9 +793,18 @@ ip6_lookup_init (gid_ip6_table_t * db) if (db->ip6_lookup_table_size == 0) db->ip6_lookup_table_size = IP6_LOOKUP_DEFAULT_HASH_MEMORY_SIZE; - BV (clib_bihash_init) (&db->ip6_lookup_table, "ip6 lookup table", - db->ip6_lookup_table_nbuckets, - db->ip6_lookup_table_size); + /* + * Danger Will Robinson, Danger! gid_ip6_table_t's are allocated from + * a pool. They MUST NOT be listed on the clib_all_bihashes list... + */ + memset (a, 0, sizeof (*a)); + a->h = &db->ip6_lookup_table; + a->name = "LISP ip6 lookup table"; + a->nbuckets = db->ip6_lookup_table_nbuckets; + a->memory_size = db->ip6_lookup_table_size; + a->dont_add_to_all_bihash_list = 1; /* See comment above */ + + BV (clib_bihash_init2) (a); } static u32
Added bg arc get functions
@@ -340,6 +340,34 @@ uint16_t lv_arc_get_angle_end(lv_obj_t * arc) return ext->arc_angle_end; } +/** + * Get the start angle of an arc background. + * @param arc pointer to an arc object + * @return the start angle [0..360] + */ +uint16_t lv_arc_get_bg_angle_start(lv_obj_t * arc) +{ + LV_ASSERT_OBJ(arc, LV_OBJX_NAME); + + lv_arc_ext_t * ext = lv_obj_get_ext_attr(arc); + + return ext->bg_angle_start; +} + +/** + * Get the end angle of an arc background. + * @param arc pointer to an arc object + * @return the end angle [0..360] + */ +uint16_t lv_arc_get_bg_angle_end(lv_obj_t * arc) +{ + LV_ASSERT_OBJ(arc, LV_OBJX_NAME); + + lv_arc_ext_t * ext = lv_obj_get_ext_attr(arc); + + return ext->bg_angle_end; +} + /*===================== * Other functions *====================*/
c++ is not used
@@ -12,7 +12,7 @@ Follow the installation steps [here](https://www.cee.studio/get_sdk.html). After ``` 2. For Orca, use these commands inside the above `packages` folder to install the libraries instead: ``` - CC=sfc CXX=sfc++ make bearssl curl + CC=sfc make bearssl curl ./install.sh ``` 3. To build Orca:
VERSION bump to version 1.4.130
@@ -46,7 +46,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 129) +set(SYSREPO_MICRO_VERSION 130) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
[libc][time] solve the problem which the os tick can be calculated wrongly because the local variable was not initialized.
@@ -689,7 +689,7 @@ int rt_timespec_to_tick(const struct timespec *time) { int tick; int nsecond, second; - struct timespec tp; + struct timespec tp = {0}; RT_ASSERT(time != RT_NULL);
OcMachoLib: Fix codestyle
@@ -1316,11 +1316,11 @@ MACH_X (MachoGetSymbolTable) ( IN OUT OC_MACHO_CONTEXT *Context, OUT CONST MACH_NLIST_X **SymbolTable, OUT CONST CHAR8 **StringTable OPTIONAL, - OUT CONST MACH_NLIST_X **LocalSymbols, OPTIONAL - OUT UINT32 *NumLocalSymbols, OPTIONAL - OUT CONST MACH_NLIST_X **ExternalSymbols, OPTIONAL - OUT UINT32 *NumExternalSymbols, OPTIONAL - OUT CONST MACH_NLIST_X **UndefinedSymbols, OPTIONAL + OUT CONST MACH_NLIST_X **LocalSymbols OPTIONAL, + OUT UINT32 *NumLocalSymbols OPTIONAL, + OUT CONST MACH_NLIST_X **ExternalSymbols OPTIONAL, + OUT UINT32 *NumExternalSymbols OPTIONAL, + OUT CONST MACH_NLIST_X **UndefinedSymbols OPTIONAL, OUT UINT32 *NumUndefinedSymbols OPTIONAL ) {
perf-tools/dimemas: set C99 std for icc
@@ -58,7 +58,7 @@ module load autotools module load boost ./bootstrap -LDFLAGS="-lstdc++" ./configure --prefix=%{install_path} --with-boost=$BOOST_DIR +CFLAGS="-std=c99" LDFLAGS="-lstdc++" ./configure --prefix=%{install_path} --with-boost=$BOOST_DIR make %{?_smp_mflags}
Add a check so that if ANDROID_KEYSTORE_PASS is not given, apksigner can still be invoked. This is done by omitting the --ks-pass argument completely
@@ -653,6 +653,10 @@ elseif(ANDROID) set(ANDROID_MANIFEST "${CMAKE_CURRENT_SOURCE_DIR}/src/resources/AndroidManifest_${MANIFEST}.xml" CACHE STRING "The AndroidManifest.xml file to use") + if (ANDROID_KEYSTORE_PASS) # Trick so that --ks-pass is not passed if no password is given. + set(ANDROID_APKSIGNER_KEYSTORE_PASS --ks-pass) + endif() + # Make an apk add_custom_command( TARGET lovr @@ -678,7 +682,7 @@ elseif(ANDROID) COMMAND ${ANDROID_TOOLS}/apksigner sign --ks ${ANDROID_KEYSTORE} - --ks-pass ${ANDROID_KEYSTORE_PASS} + ${ANDROID_APKSIGNER_KEYSTORE_PASS} ${ANDROID_KEYSTORE_PASS} --in lovr.unsigned.apk --out lovr.apk COMMAND ${CMAKE_COMMAND} -E remove lovr.unaligned.apk lovr.unsigned.apk AndroidManifest.xml Activity.java classes.dex
OpenSSL detection...
@@ -38,7 +38,7 @@ unless ENV['NO_SSL'] else if have_library('crypto') && have_library('ssl') puts "Detected OpenSSL library, testing for version." - if try_compile("\#include <openssl/ssl.h>\r\#if OPENSSL_VERSION_AT_LEAST(1, 0)\r\#error \"OpenSSL version too small\"\r\#endif\rint main(void) { SSL_library_init(); }", "-lcrypto") + if try_compile("\#include <openssl/ssl.h>\r\#if OPENSSL_VERSION_AT_LEAST(1, 0)\r\#error \"OpenSSL version too small\"\r\#endif\rint main(void) { SSL_library_init(); }") $defs << "-DHAVE_OPENSSL" puts "Confirmed OpenSSL to be version 1.0.0 or above, compiling with HAVE_OPENSSL." else
peview: Add hex values for flags
@@ -35,6 +35,10 @@ PPH_STRING PvpGetPeGuardFlagsText( ) { PH_STRING_BUILDER stringBuilder; + WCHAR pointer[PH_PTR_STR_LEN_1]; + + if (GuardFlags == 0) + return PhCreateString(L"0x0"); PhInitializeStringBuilder(&stringBuilder, 10); @@ -62,6 +66,9 @@ PPH_STRING PvpGetPeGuardFlagsText( if (PhEndsWithString2(stringBuilder.String, L", ", FALSE)) PhRemoveEndStringBuilder(&stringBuilder, 2); + PhPrintPointer(pointer, UlongToPtr(GuardFlags)); + PhAppendFormatStringBuilder(&stringBuilder, L" (%s)", pointer); + return PhFinalStringBuilderString(&stringBuilder); } @@ -70,6 +77,7 @@ PPH_STRING PvpGetPeDependentLoadFlagsText( ) { PH_STRING_BUILDER stringBuilder; + WCHAR pointer[PH_PTR_STR_LEN_1]; if (DependentLoadFlags == 0) return PhCreateString(L"0x0"); @@ -112,6 +120,9 @@ PPH_STRING PvpGetPeDependentLoadFlagsText( if (PhEndsWithString2(stringBuilder.String, L", ", FALSE)) PhRemoveEndStringBuilder(&stringBuilder, 2); + PhPrintPointer(pointer, UlongToPtr(DependentLoadFlags)); + PhAppendFormatStringBuilder(&stringBuilder, L" (%s)", pointer); + return PhFinalStringBuilderString(&stringBuilder); } @@ -312,7 +323,7 @@ INT_PTR CALLBACK PvpPeLoadConfigDlgProc( \ if (RTL_CONTAINS_FIELD((Config), (Config)->Size, GuardCFCheckFunctionPointer)) \ { \ - ADD_VALUE(L"CFG GuardFlags", PhaFormatString(L"%s (0x%x)", PH_AUTO_T(PH_STRING, PvpGetPeGuardFlagsText((Config)->GuardFlags))->Buffer, (Config)->GuardFlags)->Buffer); \ + ADD_VALUE(L"CFG GuardFlags", PH_AUTO_T(PH_STRING, PvpGetPeGuardFlagsText((Config)->GuardFlags))->Buffer); \ ADD_VALUE(L"CFG Check Function pointer", PhaFormatString(L"0x%Ix", (Config)->GuardCFCheckFunctionPointer)->Buffer); \ ADD_VALUE(L"CFG Check Dispatch pointer", PhaFormatString(L"0x%Ix", (Config)->GuardCFDispatchFunctionPointer)->Buffer); \ ADD_VALUE(L"CFG Function table", PhaFormatString(L"0x%Ix", (Config)->GuardCFFunctionTable)->Buffer); \
Initialize struct field by field Initializing with braces initializes the other fields to 0, which is not necessary.
@@ -36,14 +36,11 @@ static SDL_bool is_ctrl_down(void) { static void send_keycode(struct controller *controller, enum android_keycode keycode, const char *name) { // send DOWN event - struct control_event control_event = { - .type = CONTROL_EVENT_TYPE_KEYCODE, - .keycode_event = { - .action = AKEY_EVENT_ACTION_DOWN, - .keycode = keycode, - .metastate = 0, - }, - }; + struct control_event control_event; + control_event.type = CONTROL_EVENT_TYPE_KEYCODE; + control_event.keycode_event.action = AKEY_EVENT_ACTION_DOWN; + control_event.keycode_event.keycode = keycode; + control_event.keycode_event.metastate = 0; if (!controller_push_event(controller, &control_event)) { LOGW("Cannot send %s (DOWN)", name); @@ -82,12 +79,10 @@ static inline void action_volume_down(struct controller *controller) { } static void turn_screen_on(struct controller *controller) { - struct control_event control_event = { - .type = CONTROL_EVENT_TYPE_COMMAND, - .command_event = { - .action = CONTROL_EVENT_COMMAND_SCREEN_ON, - }, - }; + struct control_event control_event; + control_event.type = CONTROL_EVENT_TYPE_COMMAND; + control_event.command_event.action = CONTROL_EVENT_COMMAND_SCREEN_ON; + if (!controller_push_event(controller, &control_event)) { LOGW("Cannot turn screen on"); }
Fix bug while clearing preexisting observer cbs Tested-by: IoTivity Jenkins
@@ -1239,10 +1239,9 @@ oc_ri_invoke_client_cb(void *response, oc_client_cb_t *cb, size_t uri_len = oc_string_len(cb->uri); while (dup_cb != NULL) { - if (dup_cb != cb && + if (dup_cb != cb && dup_cb->observe_seq != -1 && oc_string_len(dup_cb->uri) == uri_len && - strncmp(oc_string(dup_cb->uri), oc_string(cb->uri), - uri_len) == 0 && + strncmp(oc_string(dup_cb->uri), oc_string(cb->uri), uri_len) == 0 && oc_endpoint_compare(dup_cb->endpoint, endpoint) == 0) { OC_DBG("Freeing cb %s, token 0x%02X%02X", oc_string(dup_cb->uri), dup_cb->token[0], dup_cb->token[1]);
RichText: anchors display inline
@@ -37,7 +37,7 @@ const RichText = React.memo(({ disableRemoteContent, ...props }) => ( return <RemoteContent className="mw-100" url={linkProps.href} />; } - return <Anchor target='_blank' rel='noreferrer noopener' borderBottom='1px solid' remoteContentPolicy={remoteContentPolicy} {...linkProps}>{linkProps.children}</Anchor>; + return <Anchor display="inline" target='_blank' rel='noreferrer noopener' borderBottom='1px solid' remoteContentPolicy={remoteContentPolicy} {...linkProps}>{linkProps.children}</Anchor>; }, linkReference: (linkProps) => { const linkText = String(linkProps.children[0].props.children);
fix(snapshot): add missing ASSERT checks
*/ uint32_t lv_snapshot_buf_size_needed(lv_obj_t * obj, lv_img_cf_t cf) { + LV_ASSERT_NULL(obj); switch(cf) { case LV_IMG_CF_TRUE_COLOR_ALPHA: case LV_IMG_CF_ALPHA_1BIT: @@ -81,8 +82,9 @@ uint32_t lv_snapshot_buf_size_needed(lv_obj_t * obj, lv_img_cf_t cf) */ lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_img_cf_t cf, lv_img_dsc_t * dsc, void * buf, uint32_t buff_size) { - LV_ASSERT(dsc); - LV_ASSERT(buf); + LV_ASSERT_NULL(obj); + LV_ASSERT_NULL(dsc); + LV_ASSERT_NULL(buf); switch(cf) { case LV_IMG_CF_TRUE_COLOR_ALPHA: @@ -160,14 +162,17 @@ lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_img_cf_t cf, lv_img_dsc_t * */ lv_img_dsc_t * lv_snapshot_take(lv_obj_t * obj, lv_img_cf_t cf) { + LV_ASSERT_NULL(obj); uint32_t buff_size = lv_snapshot_buf_size_needed(obj, cf); void * buf = lv_mem_alloc(buff_size); + LV_ASSERT_MALLOC(buf); if(buf == NULL) { return NULL; } lv_img_dsc_t * dsc = lv_mem_alloc(sizeof(lv_img_dsc_t)); + LV_ASSERT_MALLOC(buf); if(dsc == NULL) { lv_mem_free(buf); return NULL;
[Kernel] Add thread detach for system thread
@@ -193,6 +193,8 @@ void rt_thread_idle_excute(void) /* if it's a system object, not delete it */ if (rt_object_is_systemobject((rt_object_t)thread) == RT_TRUE) { + /* detach this object */ + rt_object_detach((rt_object_t)thread); /* unlock scheduler */ rt_exit_critical();
Sockeye: Add check for self instantiation
@@ -21,7 +21,6 @@ module SockeyeChecker ( checkSockeye ) where import Data.List (nub) -import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set @@ -45,6 +44,7 @@ data FailedCheckType | NoSuchParameter String | NoSuchVariable String | ParamTypeMismatch String AST.ModuleParamType AST.ModuleParamType + | ModuleSelfInst | WrongNumberOfArgs Int Int | ArgTypeMismatch String AST.ModuleParamType AST.ModuleParamType @@ -55,6 +55,7 @@ instance Show FailedCheckType where show (NoSuchModule name) = concat ["No definition for module '", name, "'"] show (NoSuchParameter name) = concat ["Parameter '", name, "' not in scope"] show (NoSuchVariable name) = concat ["Variable '", name, "' not in scope"] + show (ModuleSelfInst) = "Module must not instantiate itself" show (WrongNumberOfArgs takes given) = let arg = if takes == 1 then "argument" @@ -234,6 +235,7 @@ instance Checkable ParseAST.ModuleInst AST.ModuleInst where paramNames = AST.paramNames mod instContext = context { instModule = name } + checkSelfInst instContext checkedArgs <- checkArgs instContext arguments checkedNameSpace <- check instContext nameSpace inPortMap <- check instContext $ filter isInMap portMaps @@ -252,6 +254,13 @@ instance Checkable ParseAST.ModuleInst AST.ModuleInst where isInMap (ParseAST.MultiPortMap for) = isInMap $ ParseAST.body for isInMap _ = False isOutMap = not . isInMap + checkSelfInst context = do + let + selfName = moduleName context + instName = instModule context + if instName == selfName + then Left $ checkFailure context [ModuleSelfInst] + else return () checkArgs context args = do mod <- getInstantiatedModule context let
Implement stat.Decl
@@ -408,7 +408,15 @@ generate_stat = function(stat) elseif tag == ast.Stat.Decl then - error("not implemented yet") + local exp_cstats, exp_cvalue = generate_exp(stat.exp) + return util.render([[ + ${STATS} + ${DECLARATION} = ${VALUE}; + ]], { + STATS = exp_cstats, + VALUE = exp_cvalue, + DECLARATION = c_declaration(ctype(stat.decl._type), local_name(stat.decl.name)) + }) elseif tag == ast.Stat.Call then error("not implemented yet")
ADDING FEC - better handling out of memory errors in rlc_fec_scheme
@@ -26,6 +26,7 @@ There are two options to do this in C. This program uses the first option. ********/ static __attribute__((always_inline)) void gaussElimination(picoquic_cnx_t *cnx, int m, int n, mpz_t **a, mpz_t x[m]){ + PROTOOP_PRINTF(cnx, "MALLOC FOR GAUSS\n"); mpz_t *tmps = my_malloc(cnx, 4*sizeof(mpz_t)); if (!tmps) { PROTOOP_PRINTF(cnx, "NOT ENOUGH MEMORY\n"); @@ -100,6 +101,7 @@ static __attribute__((always_inline)) void get_coefs(picoquic_cnx_t *cnx, tinymt int i; for (i = 0 ; i < n ; i++) { coefs[i] = (uint8_t) tinymt32_generate_uint32(prng); + PROTOOP_PRINTF(cnx, "COEF %d = %u\n", (protoop_arg_t) i, coefs[i]); } } @@ -115,7 +117,7 @@ protoop_arg_t fec_recover(picoquic_cnx_t *cnx) if (fec_block->total_repair_symbols == 0 || fec_block->current_source_symbols == fec_block->total_source_symbols || fec_block->current_source_symbols + fec_block->current_repair_symbols < fec_block->total_source_symbols) { PROTOOP_PRINTF(cnx, "NO RECOVERY TO DO\n"); - return 1; + return 0; } tinymt32_t *prng = my_malloc(cnx, sizeof(tinymt32_t)); prng->mat1 = 0x8f7011ee; @@ -133,6 +135,7 @@ protoop_arg_t fec_recover(picoquic_cnx_t *cnx) mpz_t **system = my_malloc(cnx, n_eq*sizeof(mpz_t *));;//[n_eq][n_unknowns + 1]; mpz_t *tmp = my_malloc(cnx, sizeof(mpz_t)); + if (!coefs || !knowns || !unknowns || !system || !tmp) { PROTOOP_PRINTF(cnx, "NOT ENOUGH MEM\n"); } @@ -193,6 +196,10 @@ protoop_arg_t fec_recover(picoquic_cnx_t *cnx) if (!fec_block->source_symbols[j] && mpz_cmp_ui(unknowns[current_unknown], 0) != 0) { // TODO: handle the case where source symbols could be 0 ss = malloc_source_symbol(cnx, (source_fpid_t) ((fec_block->fec_block_number << 8) + ((uint8_t)j)), fec_block->repair_symbols[0]->data_length); + if (!ss) { + mpz_clear(unknowns[current_unknown++]); + continue; + } uint64_t count; mpz_export(ss->data, &count, 1, 1, unknowns[current_unknown]); ss->data_length = (uint16_t) count;
I forgot to update libtcod_version.h
#ifndef LIBTCOD_VERSION_H #define LIBTCOD_VERSION_H -#define TCOD_HEXVERSION 0x010604 -#define TCOD_STRVERSION "1.6.4" -#define TCOD_TECHVERSION 0x01060400 +#define TCOD_HEXVERSION 0x010605 +#define TCOD_STRVERSION "1.6.5" +#define TCOD_TECHVERSION 0x01060500 #define TCOD_STRVERSIONNAME "libtcod "TCOD_STRVERSION
add 'L' after _OPENSSL_VERSION_PRE_RELEASE literals, fixes
@@ -126,9 +126,9 @@ const char *OPENSSL_version_build_metadata(void); # if !OPENSSL_API_4 /* Synthesize OPENSSL_VERSION_NUMBER with the layout 0xMNN00PPSL */ # ifdef OPENSSL_VERSION_PRE_RELEASE -# define _OPENSSL_VERSION_PRE_RELEASE 0x0 +# define _OPENSSL_VERSION_PRE_RELEASE 0x0L # else -# define _OPENSSL_VERSION_PRE_RELEASE 0xf +# define _OPENSSL_VERSION_PRE_RELEASE 0xfL # endif # define OPENSSL_VERSION_NUMBER \ ( (OPENSSL_VERSION_MAJOR<<28) \
Replace Uint32 by int to fix warnings in tinyxpm
@@ -40,15 +40,15 @@ SDL_Surface *read_xpm(char *xpm[]) { // *** No error handling, assume the XPM source is valid *** // (it's in our source repo) // Assertions are only checked in debug - Uint32 width = strtol(xpm[0], &endptr, 10); - Uint32 height = strtol(endptr + 1, &endptr, 10); - Uint32 colors = strtol(endptr + 1, &endptr, 10); - Uint32 chars = strtol(endptr + 1, &endptr, 10); + int width = strtol(xpm[0], &endptr, 10); + int height = strtol(endptr + 1, &endptr, 10); + int colors = strtol(endptr + 1, &endptr, 10); + int chars = strtol(endptr + 1, &endptr, 10); // sanity checks - SDL_assert(width < 256); - SDL_assert(height < 256); - SDL_assert(colors < 256); + SDL_assert(0 <= width && width < 256); + SDL_assert(0 <= height && height < 256); + SDL_assert(0 <= colors && colors < 256); SDL_assert(chars == 1); // this implementation does not support more // init index
test-drivers: Specify sources explicitly Do not use globs to avoid stale dependencies during incremental builds. TEST=zmake testall -c; no change in covered lines BRANCH=none
@@ -11,5 +11,48 @@ zephyr_include_directories("${CMAKE_CURRENT_SOURCE_DIR}") zephyr_include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") zephyr_include_directories("${PLATFORM_EC}/driver/ppc/") -FILE(GLOB_RECURSE test_sources src/*.c) -target_sources(app PRIVATE ${test_sources}) +target_sources(app PRIVATE + src/battery.c + src/bb_retimer.c + src/bc12.c + src/bma2x2.c + src/bmi160.c + src/bmi260.c + src/charge_manager.c + src/console_cmd/charge_manager.c + src/console_cmd/charge_state.c + src/cros_cbi.c + src/espi.c + src/gpio.c + src/integration/usbc/usb.c + src/integration/usbc/usb_20v_3a_pd_charger.c + src/integration/usbc/usb_5v_3a_pd_sink.c + src/integration/usbc/usb_5v_3a_pd_source.c + src/integration/usbc/usb_attach_src_snk.c + src/i2c_passthru.c + src/isl923x.c + src/keyboard_scan.c + src/lid_switch.c + src/lis2dw12.c + src/ln9310.c + src/main.c + src/panic.c + src/power_common.c + src/ppc_sn5s330.c + src/ppc_syv682c.c + src/ps8xxx.c + src/smart.c + src/stm_mems_common.c + src/stubs.c + src/tcpci.c + src/tcpci_test_common.c + src/tcs3400.c + src/temp_sensor.c + src/test_mocks.c + src/test_rules.c + src/thermistor.c + src/usb_mux.c + src/usb_pd_host_cmd.c + src/utils.c + src/watchdog.c +)
Prepare large enough string buffer Fixes Coverity CID
@@ -1259,7 +1259,8 @@ int h2o_configurator__do_parse_mapping(h2o_configurator_command_t *cmd, yoml_t * return -1; } if ((keys[j].type_mask & (1u << element->value->type)) == 0) { - char permitted_types[32] = ""; + char permitted_types[41] = ""; + assert(sizeof(permitted_types) >= strlen(" or a scalar or a sequence or a mapping") + 1); if ((keys[j].type_mask & (1u << YOML_TYPE_SCALAR)) != 0) strcat(permitted_types, " or a scalar"); if ((keys[j].type_mask & (1u << YOML_TYPE_SEQUENCE)) != 0)
set env variable FC to find flang
@@ -93,14 +93,23 @@ cd $BUILD_DIR/build/flang_runtime # Need llvm-config to come from previous LLVM build export PATH=$AOMP_INSTALL_DIR/bin:$PATH +# Old CMAKE uses FC env variable to find fortran compiler +export FC=$AOMP_INSTALL_DIR/bin/flang if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then echo echo " -----Running cmake ---- " if [ $COPYSOURCE ] ; then + cmake --version echo ${AOMP_CMAKE} $MYCMAKEOPTS $BUILD_DIR/$AOMP_FLANG_REPO_NAME ${AOMP_CMAKE} $MYCMAKEOPTS $BUILD_DIR/$AOMP_FLANG_REPO_NAME 2>&1 else + echo ls -l $AOMP_INSTALL_DIR/bin + ls -l $AOMP_INSTALL_DIR/bin + echo cmake --version + cmake --version + echo which gfortran + which gfortran echo ${AOMP_CMAKE} $MYCMAKEOPTS $AOMP_REPOS/$AOMP_FLANG_REPO_NAME ${AOMP_CMAKE} $MYCMAKEOPTS $AOMP_REPOS/$AOMP_FLANG_REPO_NAME 2>&1 fi
new app_host launcher binary
}, "app_host": { "formula": { - "sandbox_id": 601573276, + "sandbox_id": 603869687, "match": "app_host_launcher" }, "executable": {
CMSIS-Zone: Added first FreeMarker template example to Generator Data Model documentation.
@@ -10,9 +10,10 @@ template engine to generate arbitrary project files, see picture below.. \image html generator.png "FreeMarker Template Engine" -\section Data Model Structure +\section GenDataModel_Structure Data Model Structure -The class diagram below visualizes the overall structure of the <b>Generator Data Model</b>. +The class diagram below visualizes the overall structure of the <b>Generator Data Model</b>. The root element visible to +the templates is FmZone. \image html genmodel.png "Generator Data Model Class Diagram" @@ -24,8 +25,8 @@ The reference implementation documented in detail below make use of the default named like \em get<Attribute> or \em is<Attribute> to be visible just as <i><Attribute></i> to the template. Please take note about the multiplicities stated in the diagram: -- 0..1 indicates an optional scalar value which might be unavailable, consider using <a href="http://freemarker.org/docs/dgui_template_exp.html#dgui_template_exp_missing" target="_blank">missing value handler operators</a>. -- 1 indicates a mandatory scalar value which is guaranteed to be valid. +- 0..1 indicates an optional value which might be unavailable, consider using <a href="http://freemarker.org/docs/dgui_template_exp.html#dgui_template_exp_missing" target="_blank">missing value handler operators</a>. +- 1 indicates a mandatory value which is guaranteed to be valid. - 0..* indicates a collection or hash of values which might be empty. - 1..* indicates a collection or hash of values which is guaranteed to contain at least one element. @@ -37,6 +38,32 @@ For detailed descriptions of the data model elements please refere to the - <a href="../genmodel/com/arm/cmsis/zone/gen/data/FmProcesor.html" target="_blank">FmProcesor</a> - <a href="../genmodel/com/arm/cmsis/zone/gen/data/FmBlock.html" target="_blank">FmBlock</a> -\section Template Examples +\section GenDataModel_Examples Template Examples + +To get an impression of how template files might look like please refere to the simplyfied examples +in this section. + +\subsection GenDataModel_Examples_AssignedBlocks HTML table of all assigned memory blocks + +This examples demonstrates how to iterate over the collection of memory blocks assigned +to the project zone currently evaluated. The result of the template below is a HTML table +with three columns listing block name, start address and size, respectively. + +\code +<table> + <th> + <td>Name</td> + <td>Start</td> + <td>Size</td> + </th> +<#list blocks as block> + <tr> + <td>${block.name}</td> + <td>${block.start}</td> + <td>${block.size}</td> + </tr> +</#list> +</table> +\endcode */
fixes Undefined reference to nni_atomic_swap & nni_atomic_cas(Built by gcc 4.8.5 ).
@@ -284,6 +284,12 @@ nni_atomic_cas64(nni_atomic_u64 *v, uint64_t comp, uint64_t new) &v->v, &comp, new, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)); } +int +nni_atomic_swap(nni_atomic_int *v, int u) +{ + return (__atomic_exchange_n(&v->v, u, __ATOMIC_SEQ_CST)); +} + void nni_atomic_init(nni_atomic_int *v) { @@ -331,6 +337,13 @@ nni_atomic_dec_nv(nni_atomic_int *v) return (__atomic_sub_fetch(&v->v, 1, __ATOMIC_SEQ_CST)); } +bool +nni_atomic_cas(nni_atomic_int *v, int comp, int new) +{ + return (__atomic_compare_exchange_n( + &v->v, &comp, new, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)); +} + void * nni_atomic_get_ptr(nni_atomic_ptr *v) {
[stm32f4xx][stdperiph driver] fix a typo in a wait loop
@@ -750,8 +750,7 @@ static void SetSysClock(void) RCC->CFGR |= RCC_CFGR_SW_PLL; /* Wait till the main PLL is used as system clock source */ - while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); - { + while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL) { } } else
VERSION bump to version 1.4.127
@@ -46,7 +46,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 126) +set(SYSREPO_MICRO_VERSION 127) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
Clang warning: Value stored to 'v' during its initialization is never read
@@ -20,7 +20,7 @@ int main(int argc, char** argv) size_t i = 0, line_number = 0; char* str_key = NULL; char* str_units = NULL; - bufr_descriptor v = {0,}; + bufr_descriptor v; const size_t maxlen_keyName = sizeof(v.shortName); const size_t maxlen_units = sizeof(v.units);
Link Checker: Ignore version placeholder links
@@ -13,6 +13,8 @@ fi NUMTHREADS=10 check() { + # Ignore links that contain version placeholder + echo "$1" | grep -Eq 'doc/news/_preparation_next_release\.md.*<<VERSION>>' && return link=$(echo "$1" | grep -oE "(https|http|ftp):.*") if [ -z "$link" ]; then echo "check the link format of $1"
Added occupied heating setpoint default reporting for Bitron 902010/32
@@ -1183,6 +1183,23 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt) return sendConfigureReportingRequest(bt, {rq, rq2, rq3}) || // Use OR because of manuf. specific attributes sendConfigureReportingRequest(bt, {rq4, rq5}); } + else if (sensor && sensor->modelId() == QLatin1String("902010/32")) // Bitron thermostat + { + rq.dataType = deCONZ::Zcl16BitInt; + rq.attributeId = 0x0000; // local temperature + rq.minInterval = 0; + rq.maxInterval = 300; + rq.reportableChange16bit = 10; + + ConfigureReportingRequest rq2; + rq2.dataType = deCONZ::Zcl8BitUint; + rq2.attributeId = 0x0012; // Occupied heating setpoint + rq2.minInterval = 1; + rq2.maxInterval = 600; + rq2.reportableChange8bit = 1; + + return sendConfigureReportingRequest(bt, {rq, rq2}); + } else {
pkcs12: check for zero length digest to avoid division by zero Fixes
@@ -64,7 +64,7 @@ static int pkcs12kdf_derive(const unsigned char *pass, size_t passlen, } vi = EVP_MD_get_block_size(md_type); ui = EVP_MD_get_size(md_type); - if (ui < 0 || vi <= 0) { + if (ui <= 0 || vi <= 0) { ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_DIGEST_SIZE); goto end; }
Allocate vga buffer from kernel virtual address space The vga buffer physical was being mapped to the identity virtual address which is in the user virtual address area. This change allocates a new virtual address from kernel virtual addresses to map to the vga buffer.
@@ -171,8 +171,8 @@ static void vga_console_write(void *_d, const char *s, bytes count) vga_set_cursor(d, d->cur_x, d->cur_y); } -closure_function(2, 1, boolean, vga_pci_probe, - heap, general, console_attach, a, +closure_function(3, 1, boolean, vga_pci_probe, + heap, general, console_attach, a, heap, virtual, pci_dev, _d) { if (pci_get_class(_d) != PCIC_DISPLAY) @@ -184,7 +184,7 @@ closure_function(2, 1, boolean, vga_pci_probe, d->c.write = vga_console_write; d->c.name = "vga"; d->crtc_addr = 0x3d4; - d->buffer = pointer_from_u64(VGA_BUF_BASE); + d->buffer = allocate(bound(virtual), VGA_BUF_SIZE); d->buffer_size = VGA_BUF_SIZE / sizeof(*d->buffer); map(u64_from_pointer(d->buffer), VGA_BUF_BASE, VGA_BUF_SIZE, pageflags_writable(pageflags_device())); @@ -205,5 +205,5 @@ closure_function(2, 1, boolean, vga_pci_probe, void vga_pci_register(kernel_heaps kh, console_attach a) { heap h = heap_general(kh); - register_pci_driver(closure(h, vga_pci_probe, h, a), 0); + register_pci_driver(closure(h, vga_pci_probe, h, a, (heap)heap_virtual_page(kh)), 0); }