message
stringlengths
6
474
diff
stringlengths
8
5.22k
Take unicast Hellos into account when scheduling neighbours check.
@@ -248,6 +248,8 @@ check_neighbours() if(neigh->hello.interval > 0) msecs = MIN(msecs, neigh->hello.interval * 10); + if(neigh->uhello.interval > 0) + msecs = MIN(msecs, neigh->uhello.interval * 10); if(neigh->ihu_interval > 0) msecs = MIN(msecs, neigh->ihu_interval * 10); neigh = neigh->next;
resolver: fix snprintf call
@@ -73,13 +73,13 @@ static void elektraGenTempFilename (ElektraResolved * handle, ElektraResolveTemp { tmpFilenameSize = strlen (handle->fullPath) + POSTFIX_SIZE; tmpFile = elektraCalloc (tmpFilenameSize); - len = snprintf (tmpFile, tmpFilenameSize - POSTFIX_SIZE, "%s", handle->fullPath); + len = snprintf (tmpFile, strlen (handle->fullPath) + 1, "%s", handle->fullPath); } else if (tmpDir == ELEKTRA_RESOLVER_TEMPFILE_TMPDIR) { tmpFilenameSize = sizeof ("/tmp/") + strlen (handle->fullPath) + POSTFIX_SIZE; tmpFile = elektraCalloc (tmpFilenameSize); - len = snprintf (tmpFile, tmpFilenameSize - POSTFIX_SIZE, "/tmp/%s", handle->fullPath); + len = snprintf (tmpFile, strlen (handle->fullPath) + 1, "/tmp/%s", handle->fullPath); } struct timeval tv;
Fix bogus order of error checks in new channel_binding code. Coverity pointed out that it's pretty silly to check for a null pointer after we've already dereferenced the pointer. To fix, just swap the order of the two error checks. Oversight in commit
@@ -502,18 +502,18 @@ pg_SASL_init(PGconn *conn, int payloadlen) selected_mechanism = SCRAM_SHA_256_NAME; } - if (conn->channel_binding[0] == 'r' && /* require */ - strcmp(selected_mechanism, SCRAM_SHA_256_PLUS_NAME) != 0) + if (!selected_mechanism) { printfPQExpBuffer(&conn->errorMessage, - libpq_gettext("channel binding is required, but server did not offer an authentication method that supports channel binding\n")); + libpq_gettext("none of the server's SASL authentication mechanisms are supported\n")); goto error; } - if (!selected_mechanism) + if (conn->channel_binding[0] == 'r' && /* require */ + strcmp(selected_mechanism, SCRAM_SHA_256_PLUS_NAME) != 0) { printfPQExpBuffer(&conn->errorMessage, - libpq_gettext("none of the server's SASL authentication mechanisms are supported\n")); + libpq_gettext("channel binding is required, but server did not offer an authentication method that supports channel binding\n")); goto error; }
sdl: render: Rename GetRendererOutputSize() to GetOutputSize()
@@ -133,7 +133,7 @@ func (renderer *Renderer) GetInfo() (RendererInfo, error) { } // Renderer (https://wiki.libsdl.org/SDL_GetRendererOutputSize) -func (renderer *Renderer) GetRendererOutputSize() (w, h int, err error) { +func (renderer *Renderer) GetOutputSize() (w, h int, err error) { _w := (*C.int)(unsafe.Pointer(&w)) _h := (*C.int)(unsafe.Pointer(&h)) _ret := C.SDL_GetRendererOutputSize(renderer.cptr(), _w, _h)
system/libuv: Fix the undefined reference to `uv__strscpy'
@@ -69,7 +69,7 @@ CSRCS += posix-hrtime.c CSRCS += posix-poll.c CSRCS += uv-data-getter-setters.c CSRCS += version.c -ifneq ($(CONFIG_LIBUV_UTILS_TEST),) +ifeq ($(CONFIG_LIBUV_UTILS_TEST),) CSRCS += idna.c CSRCS += strscpy.c endif
Fix compilation when neither INET nor INET6 are defined. Thanks to Christian Wright for reporting the issue in
#ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 339221 2018-10-07 15:13:47Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 340179 2018-11-06 12:55:03Z tuexen $"); #endif #include <netinet/sctp_os.h> @@ -3839,6 +3839,7 @@ sctp_process_cmsgs_for_init(struct sctp_tcb *stcb, struct mbuf *control, int *er return (0); } +#if defined(INET) || defined(INET6) static struct sctp_tcb * sctp_findassociation_cmsgs(struct sctp_inpcb **inp_p, uint16_t port, @@ -3936,6 +3937,7 @@ sctp_findassociation_cmsgs(struct sctp_inpcb **inp_p, } return (NULL); } +#endif static struct mbuf * sctp_add_cookie(struct mbuf *init, int init_offset, @@ -13724,9 +13726,11 @@ sctp_lower_sosend(struct socket *so, SCTP_INP_WUNLOCK(inp); /* With the lock applied look again */ stcb = sctp_findassociation_ep_addr(&t_inp, addr, &net, NULL, NULL); +#if defined(INET) || defined(INET6) if ((stcb == NULL) && (control != NULL) && (port > 0)) { stcb = sctp_findassociation_cmsgs(&t_inp, port, control, &net, &error); } +#endif if (stcb == NULL) { SCTP_INP_WLOCK(inp); SCTP_INP_DECR_REF(inp);
Support SRCS(table.ssqls) with metrika/core/tools/ssqls.
@@ -3256,6 +3256,10 @@ macro _SRC("sc", SRC, SRCFLAGS...) { .CMD=${tool:"tools/domschemec"} --in ${input:SRC} --out ${output:SRC.h} ${output_include;hide:"util/generic/strbuf.h"} ${output_include;hide:"util/generic/string.h"} ${output_include;hide:"util/generic/vector.h"} ${output_include;hide:"util/string/cast.h"} ${SRCFLAGS} ${kv;hide:"p SC"} ${kv;hide:"pc yellow"} } +macro _SRC("ssqls", SRC, SRCFLAGS...) { + .CMD=${tool:"metrika/core/tools/ssqls"} ${input:SRC} -S $ARCADIA_ROOT -B $ARCADIA_BUILD_ROOT $SRCFLAGS ${output;noext;hide:SRC.cpp} ${output;noext;hide:SRC.h} ${kv;hide:"p SS"} ${kv;hide:"pc yellow"} +} + macro _SRC("external", SRC, SRCFLAGS...) { .CMD=$YMAKE_PYTHON ${input:"build/scripts/fetch_from_external.py"} ${input:SRC} ${output;nopath;noext:SRC} ${kv;hide:"p CC"} ${kv;hide:"pc light-green"} }
Fix bug introduced by merge a global container type was changed from map to vector and one of the merges was still using the map type. Tested-by: IoTivity Jenkins
@@ -513,7 +513,7 @@ void jni_rep_set_text_string(const char* key, const char* value) { user_data->env = jenv; user_data->obj = JCALL1(NewGlobalRef, jenv, $input); JCALL1(DeleteLocalRef, jenv, $input); - jni_callbacks_map.insert(std::pair<jobject, jni_callback_data*>(user_data->obj, user_data)); + jni_callbacks_vector.push_back(user_data); $1 = jni_oc_init_platform_callback; $2 = user_data; }
apps/speed: discard useless protoypes as these methods are defines before being used.
@@ -139,69 +139,6 @@ static volatile int run = 0; static int mr = 0; static int usertime = 1; -#ifndef OPENSSL_NO_MD2 -static int EVP_Digest_MD2_loop(void *args); -#endif - -#ifndef OPENSSL_NO_MDC2 -static int EVP_Digest_MDC2_loop(void *args); -#endif -#ifndef OPENSSL_NO_MD4 -static int EVP_Digest_MD4_loop(void *args); -#endif -#ifndef OPENSSL_NO_MD5 -static int MD5_loop(void *args); -static int HMAC_loop(void *args); -#endif -static int SHA1_loop(void *args); -static int SHA256_loop(void *args); -static int SHA512_loop(void *args); -#ifndef OPENSSL_NO_WHIRLPOOL -static int WHIRLPOOL_loop(void *args); -#endif -#ifndef OPENSSL_NO_RMD160 -static int EVP_Digest_RMD160_loop(void *args); -#endif -#ifndef OPENSSL_NO_RC4 -static int RC4_loop(void *args); -#endif -#ifndef OPENSSL_NO_DES -static int DES_ncbc_encrypt_loop(void *args); -static int DES_ede3_cbc_encrypt_loop(void *args); -#endif -static int AES_cbc_128_encrypt_loop(void *args); -static int AES_cbc_192_encrypt_loop(void *args); -static int AES_cbc_256_encrypt_loop(void *args); -#ifndef OPENSSL_NO_DEPRECATED_3_0 -static int AES_ige_128_encrypt_loop(void *args); -static int AES_ige_192_encrypt_loop(void *args); -static int AES_ige_256_encrypt_loop(void *args); -#endif -static int CRYPTO_gcm128_aad_loop(void *args); -static int RAND_bytes_loop(void *args); -static int EVP_Update_loop(void *args); -static int EVP_Update_loop_ccm(void *args); -static int EVP_Update_loop_aead(void *args); -static int EVP_Digest_loop(void *args); -#ifndef OPENSSL_NO_RSA -static int RSA_sign_loop(void *args); -static int RSA_verify_loop(void *args); -#endif -#ifndef OPENSSL_NO_DSA -static int DSA_sign_loop(void *args); -static int DSA_verify_loop(void *args); -#endif -#ifndef OPENSSL_NO_EC -static int ECDSA_sign_loop(void *args); -static int ECDSA_verify_loop(void *args); -static int EdDSA_sign_loop(void *args); -static int EdDSA_verify_loop(void *args); -# ifndef OPENSSL_NO_SM2 -static int SM2_sign_loop(void *args); -static int SM2_verify_loop(void *args); -# endif -#endif - static double Time_F(int s); static void print_message(const char *s, long num, int length, int tm); static void pkey_print_message(const char *str, const char *str2,
user app now sends advertisements for 50 seconds, turns them off for 10 seconds and repeats indefinitely
@@ -37,11 +37,15 @@ int main(void) //int ret = subscribe_tx(callback, NULL); //ret = tx_data(packet, BUF_SIZE); //int ch = 39; - delay_ms(5000); + for(;;){ + delay_ms(10000); printf("after delay \r\n"); printf("return from start_ble_advertisement %d\r\n",start_ble_advertisement(packet,BUF_SIZE)); - delay_ms(2000); + delay_ms(50000); + //for(int i = 0; i < 1000000; i++){} printf("return from stop_ble_advertisement %d\r\n",stop_ble_advertisement()); + printf("after everything\r\n"); + } /*for (;;) { //set_channel(ch);
refactor fenced-code postprocessing into ++parse
?: cont.a line ..$ :: - ++ parse-hoon :: hoon in markdown - ^+ . - =/ vex/(like marl:twig) (expr:parse loc txt) + ++ read-one :: read %one item + |= fel/$-(nail (like tarp)) ^+ +> + =/ vex/(like tarp) (fel loc txt) ?~ q.vex - ..$(err `p.vex) + +>.$(err `p.vex) =+ [res loc txt]=u.q.vex - %_ ..$ - loc loc - txt txt - q.cur (weld (flop `marl:twig`res) q.cur) :: prepend to the stack - == - :: - ++ parse-fens - ^+ . - =/ vex/(like wall) ((fenced-code:parse inr.ind) loc txt) - ?~ q.vex - ..$(err `p.vex) - =+ [wal loc txt]=u.q.vex - =/ txt/tape - %+ roll `wall`wal - |=({a/tape b/tape} "{a}\0a{b}") - =/ res/manx [[%pre ~] ;/(txt) ~] - %_ ..$ + %_ +>.$ loc loc txt txt - q.cur [res q.cur] + q.cur (weld (flop `tarp`res) q.cur) :: prepend to the stack == :: ++ open-item :: enter list/quote :: :: execute appropriate paragraph form ?: ?=($expr +.sty.saw) - line:parse-hoon + line:(read-one expr:parse) ?: ?=($fens +.sty.saw) - line:parse-fens + line:(read-one (fens:parse inr.ind)) =< line:abet:apex |% :: ++ tecs ;~(plug tec tec tec (just '\0a')) :: - ++ fenced-code + ++ fens |= col/@u ~+ =/ ind (stun [(dec col) (dec col)] ace) =/ ind-tecs ;~(plug ind tecs) + %+ cook |=(txt/tape `tarp`[[%pre ~] ;/(txt) ~]~) %+ ifix [ind-tecs ind-tecs] - %- star + %^ stir "" |=({a/tape b/tape} "{a}\0a{b}") ;~ pose %+ ifix [ind (just '\0a')] ;~(less tecs (star prn))
roller: parse cryptoSuite as cord
%- ot :~ ['encrypt' (cu to-hex so)] ['auth' (cu to-hex so)] - ['cryptoSuite' no] + ['cryptoSuite' so] ['breach' bo] == ::
Fix missing symbols in no-cms and no-ts build Fixes
LIBS=../../libcrypto -# compile ess_lib.c when cms or ts are enabled -IF[{- !$disabled{'cms'} or !$disabled{'ts'} -}] - SOURCE[../../libcrypto]= ess_lib.c -ENDIF - -SOURCE[../../libcrypto]= ess_asn1.c ess_err.c - +SOURCE[../../libcrypto]= ess_asn1.c ess_err.c ess_lib.c
Add optionally the paths to V8 and UV in find nodejs cmake script.
@@ -441,7 +441,15 @@ if(NOT NODEJS_LIBRARY) endif() endif() -set(NODEJS_INCLUDE_DIRS "${NODEJS_INCLUDE_DIR}" "${NODEJS_V8_INCLUDE_DIR}" "${NODEJS_UV_INCLUDE_DIR}") +set(NODEJS_INCLUDE_DIRS "${NODEJS_INCLUDE_DIR}") + +if(NODEJS_V8_INCLUDE_DIR) + set(NODEJS_INCLUDE_DIRS "${NODEJS_INCLUDE_DIRS}" "${NODEJS_V8_INCLUDE_DIR}") +endif() + +if(NODEJS_UV_INCLUDE_DIR) + set(NODEJS_INCLUDE_DIRS "${NODEJS_INCLUDE_DIRS}" "${NODEJS_UV_INCLUDE_DIR}") +endif() find_package_handle_standard_args(NODEJS REQUIRED_VARS NODEJS_EXECUTABLE NODEJS_INCLUDE_DIRS NODEJS_LIBRARY
doc: Update acrn edk2 download path Update acrn edk2 source code download path for WaaG secure boot feature
@@ -436,9 +436,12 @@ Compile OVMF with secure boot support :: - git clone -b ovmf-acrn-waag ssh://[email protected]:29418/projectacrn/edk2.git + git clone https://github.com/projectacrn/acrn-edk2.git + + cd acrn-edk2 + + git checkout -b ovmf b64fe247c434e2a4228b9804c522575804550f82 - cd edk2 git submodule update --init CryptoPkg/Library/OpensslLib/openssl source edksetup.sh
Destruct MyTmGxactLocal->waitGxids with list_free() instead of pfree(). MyTmGxactLocal->waitGxids is a List of gxids, but it's currently destructed with pfree(). This commit changes it to list_free().
@@ -1308,7 +1308,7 @@ doDispatchDtxProtocolCommand(DtxProtocolCommand dtxProtocolCommand, int lastRepeat = -1; if (MyTmGxactLocal->waitGxids) { - pfree(MyTmGxactLocal->waitGxids); + list_free(MyTmGxactLocal->waitGxids); MyTmGxactLocal->waitGxids = NULL; } @@ -1417,7 +1417,7 @@ resetGxact(void) MyTmGxactLocal->isOnePhaseCommit = false; if (MyTmGxactLocal->waitGxids != NULL) { - pfree(MyTmGxactLocal->waitGxids); + list_free(MyTmGxactLocal->waitGxids); MyTmGxactLocal->waitGxids = NULL; } setCurrentDtxState(DTX_STATE_NONE);
Fix QUIC Statistics Size Helpers
@@ -492,8 +492,8 @@ typedef struct QUIC_STATISTICS_V2 { #define QUIC_STRUCT_SIZE_THRU_FIELD(Struct, Field) \ (FIELD_OFFSET(Struct, Field) + sizeof(((Struct*)0)->Field)) -#define QUIC_STATISTICS_V2_SIZE_1 QUIC_STRUCT_SIZE_THRU_FIELD(QUIC_STATISTICS_V2, KeyUpdateCount) -#define QUIC_STATISTICS_V2_SIZE_2 QUIC_STRUCT_SIZE_THRU_FIELD(QUIC_STATISTICS_V2, SendCongestionWindow) +#define QUIC_STATISTICS_V2_SIZE_1 QUIC_STRUCT_SIZE_THRU_FIELD(QUIC_STATISTICS_V2, KeyUpdateCount) // v2.0 final size +#define QUIC_STATISTICS_V2_SIZE_2 QUIC_STRUCT_SIZE_THRU_FIELD(QUIC_STATISTICS_V2, DestCidUpdateCount) // v2.1 final size typedef struct QUIC_LISTENER_STATISTICS {
Update bug_report.md Improved template to be more OpenBOR specific.
@@ -6,25 +6,31 @@ about: Create a report to help us improve Please complete the following template to help us investigate your issue. Developer time is very limited - incomplete issue reports may be ignored and deleted. -**Describe the bug** -A clear and concise description of what the bug is. +Note: Legacy builds are not supported. Issue fixes are applied to the latest engine builds. -**To Reproduce** +## Description +Provide a clear and concise description of what the bug is here. + +## Debugging + +### Reproduce Provide step by step instructions to reproduce the behavior. Include any text files, scripts, etc: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error -**Expected behavior** +### Expected behavior A clear and concise description of what you expected to happen. -**Screenshots** +### Screenshots If applicable, add screenshots to help explain your problem. -**Version - Please find the SPECIFIC version the issue first appeared.** +### Version +Please provide the SPECIFIC version the issue first appeared. This is very important, it is nearly impossible for us to pour through t he entire codebase to find issues without having a starting point. Note again, any fixes will be applied to the latest engine build. + - Platform - Engine Build -**Additional context** +## Additional context Add any other context about the problem here.
build UPDATE abi-check revision updated
@@ -356,7 +356,7 @@ gen_doc("${DOXY_FILES}" ${SYSREPO_VERSION} ${SYSREPO_DESC} ${PROJECT_LOGO}) # generate API/ABI report if ("${BUILD_TYPE_UPPER}" STREQUAL "ABICHECK") - lib_abi_check(sysrepo "${LIB_HEADERS}" ${SYSREPO_SOVERSION_FULL} f1e4bbf581fc8f8c7daf1cdf31b80c6e682200cf) + lib_abi_check(sysrepo "${LIB_HEADERS}" ${SYSREPO_SOVERSION_FULL} c1022a19895cdc6f4f8510fb36c04dcf04dbbe21) endif() # phony target for clearing sysrepo SHM
Fix warnings. Remove debug code
@@ -1241,9 +1241,10 @@ int* get_common_parallel_dims_for_sccs(Scc scc1, Scc scc2, PlutoProg *prog) npar = prog->npar; stmt1 = -1; + stmt2 = -1; parallel_dims = NULL; - for (i=0; i<(scc1.size && stmt1 == -1); i++) { + for (i=0; (i<scc1.size) && (stmt1 == -1); i++) { for (j=0; j<scc2.size; j++) { if (is_adjecent(ddg, scc1.vertices[i], scc2.vertices[j])) { stmt1 = scc1.vertices[i]; @@ -1252,16 +1253,17 @@ int* get_common_parallel_dims_for_sccs(Scc scc1, Scc scc2, PlutoProg *prog) } } } - printf ("Parallel sol for scc %d\n", scc1.id); - for (i=0;i<nvar;i++) { - printf ("c_%d: %d ", i, npar+1+stmt1*(nvar+1)+i); - } - printf("\n"); - printf ("Parallel sol for scc %d\n", scc2.id); - for (i=0;i<nvar;i++) { - printf ("c_%d: %d ", i, npar+1+stmt2*(nvar+1)+i); - } - printf("\n"); + assert((stmt1 >= 0) && (stmt2 >= 0)); + /* printf ("Parallel sol for scc %d\n", scc1.id); */ + /* for (i=0;i<nvar;i++) { */ + /* printf ("c_%d: %d ", i, npar+1+stmt1*(nvar+1)+i); */ + /* } */ + /* printf("\n"); */ + /* printf ("Parallel sol for scc %d\n", scc2.id); */ + /* for (i=0;i<nvar;i++) { */ + /* printf ("c_%d: %d ", i, npar+1+stmt2*(nvar+1)+i); */ + /* } */ + /* printf("\n"); */ stmt_offset = npar+1; for (i=0; i<nvar ; i++) { if (stmts[stmt1]->is_orig_loop[i] && stmts[stmt2]->is_orig_loop[i]) { @@ -1933,6 +1935,7 @@ int* get_scc_colours_from_vertex_colours (PlutoProg *prog, int *stmt_colour, int bzero(scc_colour, nvertices*sizeof(int)); scc_offset = 0; + stmt_id = -1; for (i=0; i<num_sccs; i++) { sccs[i].is_scc_coloured = false; @@ -1940,7 +1943,7 @@ int* get_scc_colours_from_vertex_colours (PlutoProg *prog, int *stmt_colour, int stmt_id = sccs[i].vertices[j]; if (sccs[i].max_dim == stmts[stmt_id]->dim) break; } - + assert (stmt_id >= 0); for (j=0; j<sccs[i].max_dim; j++) { if (stmt_colour[(stmt_id*nvar)+j] == current_colour) { sccs[i].is_scc_coloured = true;
[WIP pimpl] Removed ambiguous declarations for setter and other fixes. ambiguous declarations make from parameter of setter function const replaced ///// with /* ----- */ for C89 compliance
@@ -398,7 +398,7 @@ tsError ts_bspline_get_ctrlp(tsBSpline spline, tsReal **ctrlp); * @param ctrlp * The values to deep copy. */ -void ts_bspline_set_ctrlp(tsBSpline spline, tsReal *ctrlp); +void ts_bspline_set_ctrlp(tsBSpline spline, const tsReal *ctrlp); /** * Returns the number of knots of \p spline. @@ -433,9 +433,9 @@ tsError ts_bspline_get_knots(tsBSpline spline, tsReal **knots); * @param knots * The values to deep copy. */ -void ts_bspline_set_knots(tsBSpline spline, tsReal *knots); +void ts_bspline_set_knots(tsBSpline spline, const tsReal *knots); -/////////////////////////////////////////////////////////////////////////////// +/* ------------------------------------------------------------------------- */ /** * Returns the knot value (sometimes also called 'u' or 't') that has been * evaluated and stored in \p net. @@ -898,55 +898,6 @@ tsError ts_bspline_evaluate(const tsBSpline *spline, tsReal u, */ tsError ts_bspline_derive(const tsBSpline *spline, tsBSpline *_derivative_); -/** - * Creates a deep copy of \p spline (only if \p spline != \p \_result\_) and - * copies the first \p spline->n_ctrlp * \p spline->dim values from \p ctrlp - * to \p \_result\_->ctrlp using memmove. The behaviour of this function is - * undefined, if the length of \p ctrlp is less than \p spline->n_ctrlp * - * \p spline->dim. - * - * On error, (and if \p spline != \p \_result\_) all values of \p \_result\_ - * are set to 0/NULL. - * - * @param spline - * The spline to deep copy (if \p spline != \p \_result\_) and whose - * control points are replaced with \p ctrlp. - * @param ctrlp - * The control points to copy to \p \_result\_->ctrlp. - * @param \_result\_ - * The output parameter storing the result of this function. - * @return TS_SUCCESS - * On success. - * @return TS_MALLOC - * If \p spline != \p \_result\_ and allocating memory failed. - */ -tsError ts_bspline_set_ctrlp(const tsBSpline *spline, const tsReal *ctrlp, - tsBSpline *_result_); - -/** - * Creates a deep copy of \p spline (only if \p spline != \p \_result\_) and - * copies the the first \p spline->n_knots from \p knots to \p \_result\_ - * using memmove. The behaviour of this function is undefined, if the length - * of \p knots is less than \p spline->n_knots. - * - * On error, (and if \p spline != \p \_result\_) all values of \p \_result\_ - * are set to 0/NULL. - * - * @param spline - * The spline to deep copy (if \p spline != \p \_result\_) and whose - * knots are replaced with \p knots. - * @param knots - * The knots to copy to \p \_result\_->knots. - * @param \_result\_ - * The output parameter storing the result of this function. - * @return TS_SUCCESS - * On success. - * @return TS_MALLOC - * If \p spline != \p \_result\_ and allocating memory failed. - */ -tsError ts_bspline_set_knots(const tsBSpline *spline, const tsReal *knots, - tsBSpline *_result_); - /** * Fills the knot vector of \p spline according to \p type with minimum knot * value \p min to maximum knot value \p max and stores the result in
pyocf: wait for pending I/O before cache stop
@@ -409,6 +409,7 @@ class Cache: [("cache", c_void_p), ("priv", c_void_p), ("error", c_int)] ) + self.owner.lib.ocf_cache_wait_for_io_finish(self.cache_handle) self.owner.lib.ocf_mngt_cache_stop(self.cache_handle, c, None) c.wait()
garg: Enable CONFIG_LTO Enable CONFIG_LTO (link time optimizations) to free up flash space. TEST=Build garg BRANCH=None
#ifndef __CROS_EC_BOARD_H #define __CROS_EC_BOARD_H +/* Free up flash space */ +#define CONFIG_LTO + /* Select Baseboard features */ #define VARIANT_OCTOPUS_EC_NPCX796FB #define VARIANT_OCTOPUS_CHARGER_ISL9238
u3: specially defines c3_assert for ASan compatiblity
**/ /* Assert. Good to capture. */ + +# if defined(ASAN_ENABLED) && defined(__clang__) +# define c3_assert(x) \ + do { \ + if (!(x)) { \ + c3_cooked(); \ + assert(x); \ + } \ + } while(0) +# else # define c3_assert(x) \ do { \ if (!(x)) { \ assert(x); \ } \ } while(0) +#endif /* Stub. */
Fix datafari-community/datafari#858 Keep only a single date for Solr date fields
@@ -23,6 +23,7 @@ import java.net.URLDecoder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.ArrayList; +import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -318,6 +319,26 @@ public class DatafariUpdateProcessor extends UpdateRequestProcessor { } doc.addField("mime", mime.toLowerCase()); + // remove useless dates to only keep one for last_modified and creation_date fields + String lastmodifiedField = "last_modified"; + String creationdateField = "creation_date"; + + if (doc.containsKey(lastmodifiedField) && doc.getFieldValue(lastmodifiedField) != null && !doc.getFieldValue(lastmodifiedField).toString().isEmpty()) { + Collection<Object> lastmodifiedCollection = doc.getFieldValues("last_modified"); + Object firsLastModified = lastmodifiedCollection.iterator().next(); + doc.remove(lastmodifiedField); + doc.addField(lastmodifiedField, firsLastModified); + } + + if (doc.containsKey(creationdateField) && doc.getFieldValue(creationdateField) != null && !doc.getFieldValue(creationdateField).toString().isEmpty()) { + Collection<Object> creationDateCollection = doc.getFieldValues("creation_date"); + Object firstCreationDate = creationDateCollection.iterator().next(); + doc.remove(creationdateField); + doc.addField(creationdateField, firstCreationDate); + } + + + super.processAdd(cmd); }
arvo: removes $curd, moves $card and $ovum to top level
+| %interface :: :: $ball: dynamic kernel action -:: $curd: tagged, untyped event +:: $card: tagged, untyped event :: $duct: causal history :: +hobo: %soft task builder :: $goof: crash label and trace XX fail/ruin/crud/flaw/lack/miss :: +wite: kernel action/error builder :: +$ ball (wite [vane=term task=maze] maze) -+$ curd (cask) ++$ card (cask) +$ duct (list wire) ++ hobo |$ [a] (pair cord (each * (list mass))) +$ monk (each ship (pair @tas @ta)) +$ move [=duct =ball] -+$ ovum (pair wire curd) ++$ ovum [=wire =card] :: +$ roof (room vase) :: namespace +$ rook (room meta) :: meta-namespace :: $hoof: hoon source :: $news: collated updates :: $oped: module updates + :: $seed: next kernel source :: - :: XX replace top-level structures - :: - +$ card (cask) - +$ ovum [=wire =card] +$ hoof @t +$ news $: :: sys: installs + replacements ?~ wire.ovum ~>(%mean.'pith: bad wire' !!) :: - ?. ?=(?(%crud %wack %wyrd) -.card.ovum) + ?. ?=(?(%crud %wack %wyrd) p.card.ovum) (emit $/~ [*duct (gest ovum)] ~) :: =/ buz ~> %mean.'pith: bad wasp' now.sol now == :: - ~| poke+-.q.ovo + ~| poke/p.card.ovo =/ zef=(each (pair (list ovum) soul) (trap ^)) loop:(~(poke le:part [pit vil] sol) ovo) ?- -.zef |= [now=@da ovo=ovum] ^- ^ =/ wip - ~| [p.ovo p.q.ovo] + ~| poke/p.card.ovo ~> %mean.'arvo: bad wisp' - ;;(wisp q.ovo) + ;;(wisp card.ovo) :: =. ..poke |- ^+ ..poke
additional notif center binding
@@ -233,6 +233,7 @@ static Button buttons[] = { { ClkStatusText, MODKEY, Button3, spawn, {.v = spoticli } }, { ClkStatusText, MODKEY, Button4, spawn, {.v = upbright } }, { ClkStatusText, MODKEY, Button5, spawn, {.v = downbright } }, + { ClkRootWin, MODKEY, Button3, spawn, {.v = notifycmd } }, { ClkRootWin, 0, Button1, spawn, {.v = panther } }, { ClkRootWin, MODKEY, Button1, setoverlay, {0} }, { ClkRootWin, 0, Button3, spawn, {.v = roficmd } },
gtpu: fix missing trace issue Type: fix
@@ -470,6 +470,22 @@ gtpu_encap_inline (vlib_main_t * vm, tr->teid = t1->teid; } + if (PREDICT_FALSE(b2->flags & VLIB_BUFFER_IS_TRACED)) + { + gtpu_encap_trace_t *tr = + vlib_add_trace (vm, node, b2, sizeof (*tr)); + tr->tunnel_index = t2 - gtm->tunnels; + tr->teid = t2->teid; + } + + if (PREDICT_FALSE(b3->flags & VLIB_BUFFER_IS_TRACED)) + { + gtpu_encap_trace_t *tr = + vlib_add_trace (vm, node, b3, sizeof (*tr)); + tr->tunnel_index = t3 - gtm->tunnels; + tr->teid = t3->teid; + } + vlib_validate_buffer_enqueue_x4 (vm, node, next_index, to_next, n_left_to_next, bi0, bi1, bi2, bi3,
Add missing range checks on number of multi primes in rsa_ossl_mod_exp
@@ -604,7 +604,7 @@ static int rsa_ossl_public_decrypt(int flen, const unsigned char *from, static int rsa_ossl_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) { - BIGNUM *r1, *m1, *vrfy, *r2, *m[RSA_MAX_PRIME_NUM]; + BIGNUM *r1, *m1, *vrfy, *r2, *m[RSA_MAX_PRIME_NUM - 2]; int ret = 0, i, ex_primes = 0; RSA_PRIME_INFO *pinfo; @@ -618,7 +618,8 @@ static int rsa_ossl_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) goto err; if (rsa->version == RSA_ASN1_VERSION_MULTI - && (ex_primes = sk_RSA_PRIME_INFO_num(rsa->prime_infos)) <= 0) + && ((ex_primes = sk_RSA_PRIME_INFO_num(rsa->prime_infos)) <= 0 + || ex_primes > RSA_MAX_PRIME_NUM - 2)) goto err; {
Replace hard-coded 1e-12 by macro SIN_DTHETA2_CUTOFF
#define NUM_ATOMS_CRITERION_FOR_OPENMP 1000 #define ANGLE_REDUCE_RATE 0.95 +#define SIN_DTHETA2_CUTOFF 1e-12 #define NUM_ATTEMPT 100 #define PI 3.14159265358979323846 /* Tolerance of angle between lattice vectors in degrees */ @@ -1049,7 +1050,7 @@ static int is_identity_metric(SPGCONST double metric_rotated[3][3], length_ave2 = ((length_orig[j] + length_rot[j]) * (length_orig[k] + length_rot[k])) / 4; - if (sin_dtheta2 > 1e-12) { + if (sin_dtheta2 > SIN_DTHETA2_CUTOFF) { if (sin_dtheta2 * length_ave2 > symprec * symprec) { goto fail; }
Fix gparray to see standby as different from mirrors The gparray object was taking the existence of a standby as evidence that the cluster had mirrors.
@@ -1036,8 +1036,8 @@ class GpArray: (dbid, content, role, preferred_role, mode, status, hostname, address, port, datadir) = row - # Check if mirrors exist - if preferred_role == ROLE_MIRROR: + # Check if segment mirrors exist + if preferred_role == ROLE_MIRROR and content != -1: hasMirrors = True # If we have segments which have recovered, record them.
[Rust] axle_rt exposes amc calls to allocate phys regions
@@ -6,6 +6,8 @@ use axle_rt_derive::ContainsEventField; const AMC_CORE_SERVICE_NAME: &str = "com.axle.core"; +/* Map physical range */ + #[repr(C)] #[derive(Debug, ContainsEventField)] pub struct AmcMapPhysicalRangeRequest { @@ -50,3 +52,60 @@ pub fn amc_map_physical_range(phys_base: usize, size: usize) -> usize { amc_message_await(Some(AMC_CORE_SERVICE_NAME)); resp.body().virt_base } + +/* Alloc virtual memory mapping */ + +#[repr(C)] +#[derive(Debug, ContainsEventField)] +pub struct AmcAllocPhysicalRangeRequest { + event: u32, + size: usize, +} + +impl AmcAllocPhysicalRangeRequest { + pub fn new(size: usize) -> Self { + Self { + event: Self::EXPECTED_EVENT, + size, + } + } +} + +impl ExpectsEventField for AmcAllocPhysicalRangeRequest { + const EXPECTED_EVENT: u32 = 213; +} + +#[repr(C)] +#[derive(Debug, ContainsEventField)] +pub struct AmcAllocPhysicalRangeResponse { + event: u32, + phys_base: usize, + virt_base: usize, +} + +// Never constructed directly, sent from amc +impl AmcAllocPhysicalRangeResponse {} + +impl ExpectsEventField for AmcAllocPhysicalRangeResponse { + const EXPECTED_EVENT: u32 = 213; +} + +pub struct PhysVirtPair { + pub phys: usize, + pub virt: usize, +} + +impl PhysVirtPair { + fn new(phys: usize, virt: usize) -> Self { + Self { phys, virt } + } +} + +#[cfg(target_os = "axle")] +pub fn amc_alloc_physical_range(size: usize) -> PhysVirtPair { + let req = AmcAllocPhysicalRangeRequest::new(size); + amc_message_send(AMC_CORE_SERVICE_NAME, req); + let resp: AmcMessage<AmcAllocPhysicalRangeResponse> = + amc_message_await(Some(AMC_CORE_SERVICE_NAME)); + PhysVirtPair::new(resp.body().phys_base, resp.body().virt_base) +}
Add macro TS_DEPRECATED to mark functions as deprecated. Refs:
+/*! @name Deprecation + * + * The macro \c TS_DEPRECATED can be used to mark functions as + * deprecated. + * + * @{ + */ +#if defined(__GNUC__) || defined(__clang__) +#define TS_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) +#define TS_DEPRECATED __declspec(deprecated) +#elif defined(SWIG) +#define TS_DEPRECATED +#else +#warning "WARNING: TS_DEPRECATED is not supported by compiler" +#define TS_DEPRECATED +#endif +/*! @} */ + + + /*! @name Library Export/Import * * If TinySpline is built for Windows, the macros \c TINYSPLINE_SHARED_EXPORT
Tests: added tests for the large header buffer settings. Added tests for the "large_header_buffer_size" and "large_header_buffers" configuration options.
@@ -10,6 +10,66 @@ from unit.utils import sysctl class TestSettings(TestApplicationPython): prerequisites = {'modules': {'python': 'any'}} + def test_settings_large_header_buffer_size(self): + self.load('empty') + + def set_buffer_size(size): + assert 'success' in self.conf( + {'http': {'large_header_buffer_size': size}}, + 'settings', + ) + + def header_value(size, expect=200): + headers = {'Host': 'a' * (size - 1), 'Connection': 'close'} + assert self.get(headers=headers)['status'] == expect + + set_buffer_size(4096) + header_value(4096) + header_value(4097, 431) + + set_buffer_size(16384) + header_value(16384) + header_value(16385, 431) + + def test_settings_large_header_buffers(self): + self.load('empty') + + def set_buffers(buffers): + assert 'success' in self.conf( + {'http': {'large_header_buffers': buffers}}, + 'settings', + ) + + def big_headers(headers_num, expect=200): + headers = {'Host': 'localhost', 'Connection': 'close'} + + for i in range(headers_num): + headers['Custom-header-' + str(i)] = 'a' * 8000 + + assert self.get(headers=headers)['status'] == expect + + set_buffers(1) + big_headers(1) + big_headers(2, 431) + + set_buffers(2) + big_headers(2) + big_headers(3, 431) + + set_buffers(8) + big_headers(8) + big_headers(9, 431) + + @pytest.mark.skip('not yet') + def test_settings_large_header_buffer_invalid(self): + def check_error(conf): + assert 'error' in self.conf({'http': conf}, 'settings') + + check_error({'large_header_buffer_size': -1}) + check_error({'large_header_buffer_size': 0}) + check_error({'large_header_buffers': -1}) + check_error({'large_header_buffers': 0}) + def test_settings_header_read_timeout(self): self.load('empty')
Makefile: enable -Wunused-const-variable The compilation tests pass so this might not be an issue any longer.
@@ -64,8 +64,6 @@ TARGET_UPPERCASE := ${strip ${shell echo $(TARGET) | sed y!$(LOWERCASE)!$(UPPERC CFLAGS += -DCONTIKI=1 -DCONTIKI_TARGET_$(TARGET_UPPERCASE)=1 CFLAGS += -DCONTIKI_TARGET_STRING=\"$(TARGET)\" -CFLAGS += -Wno-unused-const-variable - LDFLAGS_WERROR ?= -Wl,--fatal-warnings ifeq ($(WERROR),1)
[Changelog.md] axe OpenDuet usb improvment point
@@ -14,7 +14,6 @@ OpenCore Changelog - Fixed macserial issues when processing 2021 year serials - Added advanced error checking in ocvalidate utility - Added `SetupDelay` to configure audio setup delay -- Improved Duet USB legacy management for supported controllers #### v0.6.4 - Added `BlacklistAppleUpdate` to fix macOS 11 broken update optout
Fix bug with outdent (col -> top)
:: =/ eat-newline +>(txt t.txt, loc [+(p.loc) 1]) =/ saw look:eat-newline - =/ cont - ?| ?=($~ saw) - ?=($done sty.u.saw) - (gte col.u.saw col) + =/ cont :: continue? + ?| ?=($~ saw) :: line is blan + ?=($done sty.u.saw) :: end of input + (gte col.u.saw top) :: no outdent == ?: cont [[lin &] eat-newline]
ACRN: xHCI: Check the value of Ring Segment Size Flow Table 6-95 from xHCI spec, Ring Segment Size defines the number of TRBs supported by the ring segment, valid values for this field are 16 to 4096.
@@ -1836,6 +1836,11 @@ pci_xhci_insert_event(struct pci_xhci_vdev *xdev, erdp = rts->intrreg.erdp & ~0xF; erst = &rts->erstba_p[rts->er_enq_seg]; + if (erst->dwRingSegSize < 16 || erst->dwRingSegSize > 4096) { + UPRINTF(LDBG, "xHCI: ERSTSZ is not valiad: %u\n", + erst->dwRingSegSize); + return -EINVAL; + } erdp_idx = (erdp - erst->qwRingSegBase) / sizeof(struct xhci_trb); UPRINTF(LDBG, "insert event 0[%lx] 2[%x] 3[%x]\r\n"
interface: calc skeleton size for safari
@@ -7,7 +7,7 @@ export function Body( ) { const { children, ...boxProps } = props; return ( - <Box fontSize={0} px={[0, 3]} pb={[0, 3]} height="100%" width="100%"> + <Box fontSize={0} px={[0, 3]} pb={[0, 3]} height="calc(100vh - 64px)" width="100%"> <Box bg="white" height="100%"
[core] sock_addr_from_buffer_hints_numeric unused comment out sock_addr_from_buffer_hints_numeric(); currently unused
@@ -652,6 +652,7 @@ int sock_addr_from_str_numeric(sock_addr * const restrict saddr, const char * co } +#if 0 /* unused */ int sock_addr_from_buffer_hints_numeric(sock_addr * const restrict saddr, socklen_t * const restrict len, const buffer * const restrict b, int family, unsigned short port, log_error_st * const restrict errh) { /*(this routine originates from mod_fastcgi.c and mod_scgi.c)*/ @@ -711,3 +712,4 @@ int sock_addr_from_buffer_hints_numeric(sock_addr * const restrict saddr, sockle return 0; } +#endif
Jenkins: Add release promotion stage.
@Library("cmsis") +import com.arm.dsg.cmsis.jenkins.ArtifactoryHelper DOCKERINFO = [ 'staging': [ @@ -24,6 +25,7 @@ dockerinfo = DOCKERINFO['production'] isPrecommit = (JOB_BASE_NAME == 'pre_commit') isPostcommit = (JOB_BASE_NAME == 'post_commit') isNightly = (JOB_BASE_NAME == 'nightly') +isRelease = (JOB_BASE_NAME == 'release') patternGlobal = [ '^Jenkinsfile' @@ -82,7 +84,8 @@ CONFIGURATIONS = [ 'AC6LTM': ['low', 'mid', 'high', 'size', 'tiny'], 'GCC': ['low', 'mid', 'high', 'size', 'tiny'] ] - ] + ], + 'release': [] ] CONFIGURATION = CONFIGURATIONS[JOB_BASE_NAME] @@ -100,11 +103,13 @@ def fileSetMatches(fileset, patternset) { } FORCE_BUILD = false -DOCKER_BUILD = true -CORE_VALIDATION = true +DOCKER_BUILD = isPrecommit || isPostcommit || isNightly +CORE_VALIDATION = isPrecommit || isPostcommit || isNightly COMMIT = null VERSION = null +artifactory = new ArtifactoryHelper(this) + pipeline { agent { label 'master' } options { @@ -320,6 +325,7 @@ echo """Stage schedule: sh('./CMSIS/Utilities/gen_pack.sh') archiveArtifacts artifacts: 'output/ARM.CMSIS.*.pack', allowEmptyArchive: true + stash name: 'pack', includes: 'output/ARM.CMSIS.*.pack' recordIssues tools: [doxygen(id: 'DOXYGEN', name: 'Doxygen', pattern: 'doxygen.log')], qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]], @@ -471,5 +477,31 @@ echo """Stage schedule: } } } + + stage('Release Promote') { + when { + expression { return isRelease } + beforeOptions true + } + steps { + unstash name: 'pack' + dir('output') { + script { + artifactory.upload pattern: 'ARM.CMSIS.*.pack', + target: "mcu.promoted/CMSIS_5/${VERSION}/", + props: "GIT_COMMIT=${COMMIT['GIT_COMMIT']}" + } + withCredentials([string(credentialsId: 'grasci_github', variable: 'ghtoken')]) { + sh(""" + curl -XPOST \ + -H "Authorization:token ${ghtoken}" \ + -H "Content-Type:application/octet-stream" \ + --data-binary @ARM.CMSIS.${VERSION}.pack \ + https://uploads.github.com/repos/ARM-software/CMSIS_5/releases/${VERSION}/assets?name=ARM.CMSIS.${VERSION}.pack') + + } + } + } + } } }
Remove semicolon after do-while in _EL_CLEANUP
#define _EL_CLEANUP(ctx) do { \ if ((ctx)->ev.cleanup) (ctx)->ev.cleanup((ctx)->ev.data); \ ctx->ev.cleanup = NULL; \ - } while(0); + } while(0) static inline void refreshTimeout(redisAsyncContext *ctx) { #define REDIS_TIMER_ISSET(tvp) \
Adjust v12 release notes for reversion of log_statement_sample_rate. Necessary, not optional, because dangling link prevents relnotes from building.
@@ -1133,20 +1133,17 @@ Author: Thomas Munro <[email protected]> <listitem> <!-- Author: Alvaro Herrera <[email protected]> -2018-11-29 [88bdbd3f7] Add log_statement_sample_rate parameter -Author: Alvaro Herrera <[email protected]> 2019-04-03 [799e22034] Log all statements from a sample of transactions --> <para> - Allow logging of only a percentage of statements and transactions - meeting <xref linkend="guc-log-min-duration-statement"/> criteria + Allow logging of statements from only a percentage of transactions (Adrien Nayrat) </para> <para> - The parameters <xref linkend="guc-log-statement-sample-rate"/> - and <xref linkend="guc-log-transaction-sample-rate"/> control this. + The parameter <xref linkend="guc-log-transaction-sample-rate"/> + controls this. </para> </listitem>
added another link to rt2x00queue_flush_queue warning
@@ -14,6 +14,7 @@ or dmesg show this error: [67801.029527] ------------[ cut here ]------------ it seems to be a kernel issue that hcxdumptool isn't able to handle, automaticly: +https://bbs.archlinux.org/viewtopic.php?id=237028 https://bugs.openwrt.org/index.php?do=details&task_id=929&opened=169&status%5B0%5D= https://community.spiceworks.com/topic/2132263-ubuntu-16-04-wifi-disconnects-randomly https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1750226
Benchmark: Add basic tutorial
@@ -30,6 +30,7 @@ provides. - [Notifications](notifications.md) - [High Level API](/src/libs/highlevel/README.md) - [Command Line Options](command-line-options.md) +- [Benchmarking](benchmarking.md) ## System Administrators
clay: %limb instead of %wing
(with-faces old+old sam+sam ~) :+ %sgzp !,(*hoon old=old) :+ %sgzp !,(*hoon sam=sam) - :+ %tsld [%wing ~[b]] + :+ %tsld [%limb b] !, *hoon ~(grow old sam) :: try direct +grab =/ rab %- mule |. %+ slap new - :+ %tsld [%wing ~[a]] - [%wing ~[%grab]] + :+ %tsld [%limb a] + [%limb %grab] ?: &(?=(%& -.rab) ?=(^ q.p.rab)) :_(nub |=(sam=vase ~|([%grab a b] (slam p.rab sam)))) :: try +jump =/ jum %- mule |. %+ slap old - :+ %tsld [%wing ~[b]] - [%wing ~[%jump]] + :+ %tsld [%limb b] + [%limb %jump] ?: ?=(%& -.jum) (compose-casts a !<(mark p.jum) b) :: try indirect +grab
u3: moves _n_swap() next to other stack ops
@@ -1485,6 +1485,19 @@ _n_rewo(c3_y* buf, c3_w* ip_w) return one | (two << 8) | (tre << 16) | (qua << 24); } +/* _n_swap(): swap two items on the top of the stack, return pointer to top + */ +static inline u3_noun* +_n_swap(c3_ys mov, c3_ys off) +{ + u3_noun* top = _n_peek(off); + u3_noun* up = _n_peet(mov, off); + u3_noun tmp = *up; + *up = *top; + *top = tmp; + return top; +} + #ifdef VERBOSE_BYTECODE /* _n_print_byc(): print bytecode. used for debugging. */ @@ -1604,19 +1617,6 @@ u3n_find(u3_noun key, u3_noun fol) return pog_p; } -/* _n_swap(): swap two items on the top of the stack, return pointer to top - */ -static inline u3_noun* -_n_swap(c3_ys mov, c3_ys off) -{ - u3_noun* top = _n_peek(off); - u3_noun* up = _n_peet(mov, off); - u3_noun tmp = *up; - *up = *top; - *top = tmp; - return top; -} - /* _n_kick(): stop tracing noc and kick a u3j_site. */ static u3_weak
Updated Windows section on README.md.
@@ -177,9 +177,15 @@ alternative option below. #### Windows #### -GoAccess can be used in Windows through Cygwin. -See Cygwin's <a href="https://goaccess.io/faq#installation">packages</a>. Or -through the Linux Subsystem on Windows 10. +[CowAxess](https://goaccess.io/download#distro) is a GoAccess implementation +for Windows systems. It is a packaging of GoAccess, Cygwin and many other +related tools to make it a complete and ready-to-use solution for real-time web +log analysis, all in a 4 MB package. We have followed standard instructions +available at the GoAccess website. + +If you prefer to go the more tedious route, GoAccess can be used in Windows +through Cygwin. See Cygwin's <a href="https://goaccess.io/faq#installation">packages</a>. +Or through the Linux Subsystem on Windows 10. #### Distribution Packages ####
[mod_webdav] limit webdav_propfind_dir() recursion
@@ -2881,6 +2881,7 @@ typedef struct webdav_propfind_bufs { int propname; int lockdiscovery; int depth; + int recursed; struct stat st; } webdav_propfind_bufs; @@ -3273,6 +3274,10 @@ webdav_propfind_resource (const webdav_propfind_bufs * const restrict pb) static void webdav_propfind_dir (webdav_propfind_bufs * const restrict pb) { + /* arbitrary recursion limit to prevent infinite loops, + * e.g. due to symlink loops, or excessive resource usage */ + if (++pb->recursed > 100) return; + physical_st * const dst = pb->dst; const int dfd = fdevent_open_dirname(dst->path.ptr, 0); DIR * const dir = (dfd >= 0) ? fdopendir(dfd) : NULL; @@ -3793,6 +3798,7 @@ mod_webdav_propfind (request_st * const r, const plugin_config * const pconf) pb.allprop = 0; pb.propname = 0; pb.lockdiscovery= 0; + pb.recursed = 0; pb.depth = webdav_parse_Depth(r); /* future: might add config option to enable Depth: infinity
Fix Readme update for version 1.16.0
**Cyber Engine Tweaks** is a framework giving modders a way to script mods using [Lua](https://www.lua.org/) with access to all the internal scripting features. It also comes with a [Dear ImGui](https://github.com/ocornut/imgui/tree/v1.82) to provide GUI for different mods you are using, along with console and TweakDB editor for more advanced usage. It also adds some patches for quality of life, all of which can be enabled/disabled through the settings menu or config files (requires game restart to apply). -Current version works with 1.2 game version. +Current version works with 1.3 game version. ### Current patches
board/lindar/battery.c: Format with clang-format BRANCH=none TEST=none
@@ -129,7 +129,9 @@ __override bool board_battery_is_initialized(void) bool batt_initialization_state; int batt_status; - batt_initialization_state = (battery_status(&batt_status) ? false : + batt_initialization_state = + (battery_status(&batt_status) ? + false : !!(batt_status & STATUS_INITIALIZED)); return batt_initialization_state; }
pkg/gadgets: Remove io/iotuil from snapshot process tracer. This package is deprecated since golang 1.16 [0]. Its functions are now part of os and io. [0]
@@ -18,7 +18,6 @@ import ( "bufio" "errors" "fmt" - "io/ioutil" "os" "path/filepath" "strconv" @@ -171,7 +170,7 @@ func getPidEvents(config *Config, enricher gadgets.DataEnricher, pid int) ([]*pr } tid := int(tid64) - commBytes, _ := ioutil.ReadFile(filepath.Join(hostRoot, fmt.Sprintf("/proc/%d/comm", tid))) + commBytes, _ := os.ReadFile(filepath.Join(hostRoot, fmt.Sprintf("/proc/%d/comm", tid))) comm := strings.TrimRight(string(commBytes), "\n") mntnsid, err := containerutils.GetMntNs(tid) if err != nil {
Should use op_righttype in ExecIndexBuildScanKeys(). This removes a GPDB_91_MERGE_FIXME. The delivered value/argument is from the right-hand so type should be also right-hand.
@@ -979,8 +979,7 @@ ExecIndexBuildScanKeys(PlanState *planstate, Relation index, flags, varattno, /* attribute number */ op_strategy, /* op's strategy */ - /* GPDB_91_MERGE_FIXME: why do we use op_lefttype here, when upstream uses op_righttype? */ - op_lefttype, /* strategy subtype */ + op_righttype, /* strategy subtype */ inputcollation, /* collation */ opfuncid, /* reg proc to use */ scanvalue); /* constant */
made echo test more stable
@@ -14,9 +14,9 @@ def heartbeat_thread(p): while True: try: p.send_heartbeat() - time.sleep(1) + time.sleep(0.5) except Exception: - break + continue # Resend every CAN message that has been received on the same bus, but with the data reversed if __name__ == "__main__":
naive: subscribe to azimuth agent
=. contract naive:local-contracts:azimuth =. chain-id chain-id:local-contracts:azimuth :_ this - [%pass /azimuth %agent [our.bowl %azimuth] %watch /(scot %p our.bowl)]~ + [%pass /azimuth %agent [our.bowl %azimuth] %watch /aggregator]~ :: ++ on-save !>(state) ++ on-load :: %subs :_ state - [%pass /azimuth %agent [our.bowl %azimuth] %watch /(scot %p our.bowl)]~ + [%pass /azimuth %agent [our.bowl %azimuth] %watch /aggregator]~ :: %setkey ::TODO what about existing sending entries?
extmod/modbuiltins/Control: add target_tolerances
@@ -98,10 +98,42 @@ STATIC mp_obj_t builtins_Control_pid(size_t n_args, const mp_obj_t *pos_args, mp } STATIC MP_DEFINE_CONST_FUN_OBJ_KW(builtins_Control_pid_obj, 0, builtins_Control_pid); +// pybricks.builtins.Control.target_tolerances +STATIC mp_obj_t builtins_Control_target_tolerances(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + + PB_PARSE_ARGS_METHOD(n_args, pos_args, kw_args, + builtins_Control_obj_t, self, + PB_ARG_DEFAULT_NONE(speed), + PB_ARG_DEFAULT_NONE(position) + ); + + // Read current values + int32_t _speed, _position; + pbio_control_settings_get_target_tolerances(&self->control->settings, &_speed, &_position); + + // If all given values are none, return current values + if (speed == mp_const_none && position == mp_const_none) { + mp_obj_t ret[2]; + ret[0] = mp_obj_new_int(_speed); + ret[1] = mp_obj_new_int(_position); + return mp_obj_new_tuple(2, ret); + } + + // Set user settings + _speed = pb_obj_get_default_int(speed, _speed); + _position = pb_obj_get_default_int(position, _position); + + pbio_control_settings_set_target_tolerances(&self->control->settings, _speed, _position); + + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_KW(builtins_Control_target_tolerances_obj, 0, builtins_Control_target_tolerances); + // dir(pybricks.builtins.Control) STATIC const mp_rom_map_elem_t builtins_Control_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_limits ), MP_ROM_PTR(&builtins_Control_limits_obj ) }, { MP_ROM_QSTR(MP_QSTR_pid ), MP_ROM_PTR(&builtins_Control_pid_obj ) }, + { MP_ROM_QSTR(MP_QSTR_target_tolerances), MP_ROM_PTR(&builtins_Control_target_tolerances_obj) }, }; STATIC MP_DEFINE_CONST_DICT(builtins_Control_locals_dict, builtins_Control_locals_dict_table);
Build: Fix typo with DuetPkg branch
@@ -77,7 +77,7 @@ DEPURLS=( 'https://github.com/acidanthera/MacInfoPkg' 'https://github.com/acidanthera/DuetPkg' ) -DEPBRANCHES=('master' 'master') +DEPBRANCHES=('master' 'master' 'master') src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/efibuild.sh) && eval "$src" || exit 1 if [ "$BUILD_UTILITIES" = "1" ]; then
Update README.md Updated versions.
@@ -20,10 +20,10 @@ The Phoscon App is a browser based web application and supports lights, sensors deCONZ is having a beta release at the 15th day of the month in which the beta of last month becomes stable. Pull requests done before the 10th of the month, are getting included in the next beta (if there are no issues of course!). Stable release would be around the 1st - 5th of the month after latest beta. -Current Beta: **v2.9.3-beta** +Current Beta: **v2.10.1-beta** Current Stable: **v2.9.3** -Next Beta: [v2.10.0-beta](https://github.com/dresden-elektronik/deconz-rest-plugin/milestone/2). +Next Beta: [v2.10.2-beta](https://github.com/dresden-elektronik/deconz-rest-plugin/milestone/4). Next Stable: **v2.10.x** expected at the 10th of March. Installation
Update MSVS flags. Set up better optimization and remove flags which give warnings.
<IncludePath>$(SolutionDir)..\..\src\vendor\zlib;$(IncludePath)</IncludePath> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <LinkIncremental>true</LinkIncremental> <OutDir>$(SolutionDir)$(ProjectName)\$(Platform)\$(Configuration)\</OutDir> <IntDir>$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> <IncludePath>$(SolutionDir)..\..\src\vendor\zlib;$(IncludePath)</IncludePath> + <LinkIncremental>false</LinkIncremental> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <LinkIncremental>true</LinkIncremental> <OutDir>$(SolutionDir)$(ProjectName)\$(Platform)\$(Configuration)\</OutDir> <IntDir>$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> <IncludePath>$(SolutionDir)..\..\src\vendor\zlib;$(IncludePath)</IncludePath> + <LinkIncremental>false</LinkIncremental> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <TargetMachine>MachineX86</TargetMachine> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> - <MinimumRequiredVersion>5.01</MinimumRequiredVersion> <AdditionalDependencies>SDL2.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> </Link> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> - <MinimumRequiredVersion>5.02</MinimumRequiredVersion> <AdditionalDependencies>SDL2.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <ObjectFileName>$(IntDir)\_\_\%(RelativeDir)</ObjectFileName> + <WholeProgramOptimization>true</WholeProgramOptimization> </ClCompile> <Link> <TargetMachine>MachineX86</TargetMachine> <SubSystem>Console</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> - <MinimumRequiredVersion>5.01</MinimumRequiredVersion> <AdditionalDependencies>SDL2.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <LinkTimeCodeGeneration>UseFastLinkTimeCodeGeneration</LinkTimeCodeGeneration> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <ObjectFileName>$(IntDir)\_\_\%(RelativeDir)</ObjectFileName> + <WholeProgramOptimization>true</WholeProgramOptimization> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> - <MinimumRequiredVersion>5.02</MinimumRequiredVersion> <AdditionalDependencies>SDL2.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <LinkTimeCodeGeneration>UseFastLinkTimeCodeGeneration</LinkTimeCodeGeneration> </Link> </ItemDefinitionGroup> <ItemGroup>
Lowercase reference to iphlpapi.lib
#include <sys/timeb.h> #include <iphlpapi.h> #if !defined(__MINGW32__) -#pragma comment(lib, "IPHLPAPI.lib") +#pragma comment(lib, "iphlpapi.lib") #endif #endif #include <netinet/sctp_os_userspace.h>
morphius: update thermal protect point This CL update system shutdown CPU temp to 99C. BRANCH=zork TEST=make BOARD=morphius
@@ -465,7 +465,7 @@ BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); const static struct ec_thermal_config thermal_cpu = { .temp_host = { [EC_TEMP_THRESH_HIGH] = C_TO_K(90), - [EC_TEMP_THRESH_HALT] = C_TO_K(92), + [EC_TEMP_THRESH_HALT] = C_TO_K(99), }, .temp_host_release = { [EC_TEMP_THRESH_HIGH] = C_TO_K(80),
fix huf memory boundary checks Fixes OSS-Fuzz 49698
@@ -1757,6 +1757,7 @@ internal_huf_decompress ( const uint8_t* ptr; exr_result_t rv; const struct _internal_exr_context* pctxt = NULL; + const uint64_t hufInfoBlockSize = 5 * sizeof (uint32_t); if (decode) pctxt = EXR_CCTXT (decode->context); // @@ -1779,10 +1780,12 @@ internal_huf_decompress ( if (im >= HUF_ENCSIZE || iM >= HUF_ENCSIZE) return EXR_ERR_CORRUPT_CHUNK; - ptr = compressed + 20; + ptr = compressed + hufInfoBlockSize; nBytes = (((uint64_t) (nBits) + 7)) / 8; - if (ptr + nBytes > compressed + nCompressed) return EXR_ERR_OUT_OF_MEMORY; + + // must be nBytes remaining in buffer + if (hufInfoBlockSize + nBytes > nCompressed) return EXR_ERR_OUT_OF_MEMORY; // // Fast decoder needs at least 2x64-bits of compressed data, and @@ -1793,15 +1796,14 @@ internal_huf_decompress ( { FastHufDecoder* fhd = (FastHufDecoder*) spare; - // must be nBytes remaining in buffer - if (ptr - compressed + nBytes > (uint64_t) nCompressed) - return EXR_ERR_OUT_OF_MEMORY; - - rv = fasthuf_initialize ( - pctxt, fhd, &ptr, nCompressed - (ptr - compressed), im, iM, iM); + rv = fasthuf_initialize (pctxt, fhd, &ptr, nCompressed - hufInfoBlockSize, im, iM, iM); if (rv == EXR_ERR_SUCCESS) + { + if ( (uint64_t)(ptr - compressed) + nBytes > nCompressed ) + return EXR_ERR_OUT_OF_MEMORY; rv = fasthuf_decode (pctxt, fhd, ptr, nBits, raw, nRaw); } + } else { uint64_t* freq = (uint64_t*) spare;
runner: flush device before taking the lock Commands might have got stuck in the kernel qfull queue for longer than the initiator's failover timer. This has us completely flush the kernel and ring before failover/failback to make sure those old commands are not executed.
@@ -237,6 +237,9 @@ int tcmu_acquire_dev_lock(struct tcmu_device *dev) struct tcmur_device *rdev = tcmu_get_daemon_dev_private(dev); int ret, retries = 0, new_state = TCMUR_DEV_LOCK_UNLOCKED; + /* Block the kernel device */ + tcmu_block_device(dev); + tcmu_dev_dbg(dev, "Waiting for outstanding commands to complete\n"); if (aio_wait_for_empty_queue(rdev)) { tcmu_dev_err(dev, "Not able to flush queue before taking lock.\n"); @@ -244,6 +247,12 @@ int tcmu_acquire_dev_lock(struct tcmu_device *dev) goto done; } + /* + * Handle race where cmd could be in tcmur_generic_handle_cmd before + * the aio handler. + */ + tcmu_flush_device(dev); + retry: tcmu_dev_dbg(dev, "lock call state %d retries %d\n", rdev->lock_state, retries); @@ -284,5 +293,7 @@ done: tcmu_dev_dbg(dev, "lock call done. lock state %d\n", rdev->lock_state); pthread_mutex_unlock(&rdev->state_lock); + tcmu_unblock_device(dev); + return ret; }
show acpi: print length in decimal Reported-By: Robert Elliott
@@ -22,7 +22,7 @@ PrintAcpiHeader( } Print(L"Signature: %c%c%c%c\n" - L"Length: 0x%x\n" + L"Length: %d bytes\n" L"Revision: 0x%x\n" L"Checksum: 0x%x\n" L"OEMID: %c%c%c%c%c%c\n", @@ -83,7 +83,7 @@ PrintPcatTable( SOCKET_SKU_INFO_TABLE *pSocketSkuInfoTable = NULL; Print(L"Type: 0x%x\n" - L"Length: 0x%x\n", + L"Length: %d bytes\n", pTable->Type, pTable->Length); @@ -260,7 +260,7 @@ PrintFitTable( } Print(L"Type: 0x%x\n" - L"Length: 0x%x\n", + L"Length: %d bytes\n", pTable->Type, pTable->Length);
Update yfm for ya tool to 2.13.6
}, "yfm": { "formula": { - "sandbox_id": 652174899, + "sandbox_id": 656854292, "match": "yfm" }, "executable": {
[snitch] Make number of register write ports parameterizable Currently only either 1 or 2 write ports are supported.
@@ -1851,6 +1851,35 @@ module snitch #( endcase end + if (RegNrWritePorts == 1) begin + always_comb begin + gpr_we[0] = 1'b0; + gpr_waddr[0] = rd; + gpr_wdata[0] = alu_writeback; + // external interfaces + lsu_pready = 1'b0; + acc_pready_o = 1'b0; + retire_acc = 1'b0; + retire_load = 1'b0; + + if (retire_i) begin + gpr_we[0] = 1'b1; + // if we are not retiring another instruction retire the load now + end else if (lsu_pvalid) begin + retire_load = 1'b1; + gpr_we[0] = 1'b1; + gpr_waddr[0] = lsu_rd; + gpr_wdata[0] = ld_result[31:0]; + lsu_pready = 1'b1; + end else if (acc_pvalid_i) begin + retire_acc = 1'b1; + gpr_we[0] = 1'b1; + gpr_waddr[0] = acc_pid_i; + gpr_wdata[0] = acc_pdata_i[31:0]; + acc_pready_o = 1'b1; + end + end + end else if (RegNrWritePorts == 2) begin always_comb begin gpr_we[0] = 1'b0; gpr_waddr[0] = rd; @@ -1893,6 +1922,9 @@ module snitch #( end end end + end else begin + $fatal(1, "[snitch] Unsupported RegNrWritePorts."); + end // -------------------------- // RISC-V Formal Interface
docs/fingerprint: Add links to Nucleo boards BRANCH=none TEST=view in gitiles
@@ -28,10 +28,10 @@ The main source code for fingerprint sensor functionality lives in the The following "boards" (specified by the `BOARD` environment variable when building the EC code) are for fingerprint: -MCU | Sensor | Firmware (EC "board") | Dev Board ----------------------- | ---------- | ---------------------------------------------- | --------- -[STM32H743](Cortex-M7) | [FPC 1145] | `dartmonkey`<br>(aka `nocturne_fp`, `nami_fp`) | Icetower v0.2 <br>(Previously Dragontalon) -[STM32F412](Cortex-M4) | [FPC 1025] | `bloonchipper`<br>(aka `hatch_fp`) | Dragonclaw v0.2 +MCU | Sensor | Firmware (EC "board") | Dev Board | Nucleo Board +---------------------- | ---------- | ---------------------------------------------- | -------------------------------------------- | ------------ +[STM32H743](Cortex-M7) | [FPC 1145] | `dartmonkey`<br>(aka `nocturne_fp`, `nami_fp`) | [Icetower v0.2] <br>(Previously Dragontalon) | [Nucleo H743ZI2] +[STM32F412](Cortex-M4) | [FPC 1025] | `bloonchipper`<br>(aka `hatch_fp`) | [Dragonclaw v0.2] | [Nucleo F412ZG] ### Sensor Template Sizes @@ -507,3 +507,7 @@ detail. [FPC 1025]: ../../driver/fingerprint/fpc/bep/fpc1025_private.h [FPC 1145 Template Size]: https://chromium.googlesource.com/chromiumos/platform/ec/+/127521b109be8aac352e80e319e46ed123360408/driver/fingerprint/fpc/libfp/fpc1145_private.h#46 [FPC 1025 Template Size]: https://chromium.googlesource.com/chromiumos/platform/ec/+/127521b109be8aac352e80e319e46ed123360408/driver/fingerprint/fpc/bep/fpc1025_private.h#44 +[Dragonclaw v0.2]: ./fingerprint-dev-for-partners.md#fpmcu-dev-board +[Icetower v0.2]: ./fingerprint-dev-for-partners.md#fpmcu-dev-board +[Nucleo F412ZG]: https://www.digikey.com/en/products/detail/stmicroelectronics/NUCLEO-F412ZG/6137573 +[Nucleo H743ZI2]: https://www.digikey.com/en/products/detail/stmicroelectronics/NUCLEO-H743ZI2/10130892
don't use execinfo/backtrace on cygwin
#include <unistd.h> #include <sys/time.h> #include <time.h> +#ifndef __CYGWIN__ #include <execinfo.h> +#endif #include "num/multind.h" @@ -123,11 +125,16 @@ void debug_printf(int level, const char* fmt, ...) void debug_backtrace(size_t n) { +#ifndef __CYGWIN__ void* ptrs[n + 1]; size_t l = backtrace(ptrs, n + 1); if (l > 1) backtrace_symbols_fd(ptrs + 1, l - 1, STDERR_FILENO); +#else + UNUSED(n); + debug_printf(DP_WARN, "no backtrace on cygwin."); +#endif }
Fix pipeline failure commit access 'Relation' after it's closed.
@@ -3939,6 +3939,7 @@ ATController(Relation rel, List *cmds, bool recurse, LOCKMODE lockmode) List *wqueue = NIL; ListCell *lcmd; bool is_partition = false; + bool is_external = RelationIsExternal(rel); cdb_sync_oid_to_segments(); @@ -4043,7 +4044,7 @@ ATController(Relation rel, List *cmds, bool recurse, LOCKMODE lockmode) * ATRewriteTables() and ATAddToastIfNeeded(), we keep it that way to align * with upstream. */ - if (!RelationIsExternal(rel)) + if (!is_external) { ATRewriteTables(&wqueue, lockmode);
Make it stop
@@ -35,8 +35,6 @@ namespace Miningcore.Mining this.clock = clock; this.messageBus = messageBus; - - disposables.Add(cts); } private static readonly ILogger logger = LogManager.GetCurrentClassLogger(); @@ -72,6 +70,7 @@ namespace Miningcore.Mining Task.Run(() => { Thread.CurrentThread.Name = "ShareReceiver Socket Poller"; + var timeout = TimeSpan.FromMilliseconds(1000); while (!cts.IsCancellationRequested) { @@ -94,15 +93,14 @@ namespace Miningcore.Mining return subSocket; }).ToArray(); - // disposing the sockets in the Stop() method will cause polling to abort, terminating this thread - disposables.Add(new CompositeDisposable(sockets)); - + using (new CompositeDisposable(sockets)) + { // setup poll-items var pollItems = sockets.Select(_ => ZPollItem.CreateReceiver()).ToArray(); while (!cts.IsCancellationRequested) { - if (sockets.PollIn(pollItems, out var messages, out var error)) + if (sockets.PollIn(pollItems, out var messages, out var error, timeout)) { // emit received messages for (var i = 0; i < messages.Length; i++) @@ -123,10 +121,6 @@ namespace Miningcore.Mining } } } - - catch (ObjectDisposedException) - { - break; } catch (Exception ex)
Changelog: Fixed OcTimerLib for 300 series Intel PCHs
@@ -6,6 +6,7 @@ OpenCore Changelog - Added support for 0.25% clock slowdown on Xeon Scalable CPUs (thx @mrmiller) - Replaced `MatchKernel` with `MinKernel` and `MaxKernel` - Added `Arguments` to `Tools` and `Entries` sections +- Fixed broken timer for 300 series Intel chipsets #### v0.5.0 - Added builtin firmware versions for new models 2019
Pipeline before moving memory
@@ -48,8 +48,8 @@ static fio_cstr_s http1pr_status2str(uintptr_t status); /* cleanup an HTTP/1.1 handler object */ static inline void http1_after_finish(http_s *h) { - http_s_cleanup(h); http1pr_s *p = (http1pr_s *)h->private_data.owner; + http_s_cleanup(h); if (h != &p->request) free(h); if (p->close) @@ -164,8 +164,10 @@ static FIOBJ headers2str(http_s *h) { static int http1_send_body(http_s *h, void *data, uintptr_t length) { FIOBJ packet = headers2str(h); - if (!packet) + if (!packet) { + http1_after_finish(h); return -1; + } fiobj_str_write(packet, data, length); fiobj_send((((http_protocol_s *)h->private_data.owner)->uuid), packet); http1_after_finish(h); @@ -176,6 +178,8 @@ static int http1_sendfile(http_s *h, int fd, uintptr_t length, uintptr_t offset) { FIOBJ packet = headers2str(h); if (!packet) { + close(fd); + http1_after_finish(h); return -1; } if (length < HTTP1_READ_BUFFER) { @@ -481,8 +485,10 @@ static void http1_on_data(intptr_t uuid, protocol_s *protocol) { return; } p->buf_len += i; + size_t org_len = p->buf_len; do { - i = http1_fio_parser(.parser = &p->parser, .buffer = p->buf, + i = http1_fio_parser(.parser = &p->parser, + .buffer = p->buf + (org_len - p->buf_len), .length = p->buf_len, .on_request = http1_on_request, .on_response = http1_on_response, .on_method = http1_on_method, @@ -493,15 +499,22 @@ static void http1_on_data(intptr_t uuid, protocol_s *protocol) { .on_body_chunk = http1_on_body_chunk, .on_error = http1_on_error); p->buf_len -= i; + } while (i); + if (i && p->buf_len) { memmove(p->buf, p->buf + i, p->buf_len); } + if (p->buf_len == HTTP1_READ_BUFFER) { + /* no room to read... parser not consuming data */ + if (p->request.headers) + http_send_error(&p->request, 413); + else http_send_error2(413, uuid, p->p.settings); } - } while (i); // facil_force_event(uuid, FIO_EVENT_ON_DATA); } + /** called when the connection was closed, but will not run concurrently */ static void http1_on_close(intptr_t uuid, protocol_s *protocol) { http1_destroy(protocol);
test/cxx: Test for exception from libstdc++ with -fno-exceptions
#include <vector> -#include <algorithm> +#include <numeric> +#include <stdexcept> +#include <string> #include "unity.h" #include "esp_log.h" #include "freertos/FreeRTOS.h" @@ -271,6 +273,22 @@ TEST_CASE("c++ exceptions emergency pool", "[cxx] [ignore]") #endif } +#else // !CONFIG_CXX_EXCEPTIONS + +TEST_CASE("std::out_of_range exception when -fno-exceptions", "[cxx][reset=abort,SW_CPU_RESET]") +{ + std::vector<int> v(10); + v.at(20) = 42; + TEST_FAIL_MESSAGE("Unreachable because we are aborted on the line above"); +} + +TEST_CASE("std::bad_alloc exception when -fno-exceptions", "[cxx][reset=abort,SW_CPU_RESET]") +{ + std::string s = std::string(2000000000, 'a'); + (void)s; + TEST_FAIL_MESSAGE("Unreachable because we are aborted on the line above"); +} + #endif /* These test cases pull a lot of code from libstdc++ and are disabled for now
Fixes a stale stack reference in c0sk_test Updates:
@@ -439,7 +439,8 @@ MTF_DEFINE_UTEST_PREPOST(c0sk_test, throttling, no_fail_pre, no_fail_post) size_t c0sk_kvmultisets_sz_saved; atomic64_t seqno; int i; - struct throttle throttle; + /* static because kvdb_fini uses this to log dt */ + static struct throttle throttle; kvdb_rp = kvdb_rparams_defaults(); kvs_rp = kvs_rparams_defaults();
With these ignores, "mypy pysam/" passes
@@ -33,21 +33,21 @@ import pysam.config # export all the symbols from separate modules -__all__ = \ - libchtslib.__all__ +\ - libcutils.__all__ +\ - libctabix.__all__ +\ - libcvcf.__all__ +\ - libcbcf.__all__ +\ - libcbgzf.__all__ +\ - libcfaidx.__all__ +\ - libctabixproxies.__all__ +\ - libcalignmentfile.__all__ +\ - libcalignedsegment.__all__ +\ - libcsamfile.__all__ +\ - ["SamtoolsError"] +\ +__all__ = ( + libchtslib.__all__ + # type: ignore + libcutils.__all__ + # type: ignore + libctabix.__all__ + # type: ignore + libcvcf.__all__ + # type: ignore + libcbcf.__all__ + # type: ignore + libcbgzf.__all__ + # type: ignore + libcfaidx.__all__ + # type: ignore + libctabixproxies.__all__ + # type: ignore + libcalignmentfile.__all__ + # type: ignore + libcalignedsegment.__all__ + # type: ignore + libcsamfile.__all__ + # type: ignore + ["SamtoolsError"] + ["Pileup"] - +) from pysam.version import __version__, __samtools_version__
added additional information in help menu
@@ -3831,6 +3831,7 @@ printf("%s %s (C) %s ZeroBeat\n" "--all : convert all possible hashes instead of only the best one\n" " that can lead to much overhead hashes\n" " use hcxhashtool to filter hashes\n" + " need hashcat --nonce-error-corrections >= 8\n" "--eapoltimeout=<digit> : set EAPOL TIMEOUT (milliseconds)\n" " : default: %d ms\n" "--nonce-error-corrections=<digit> : set nonce error correction\n"
Now filters out all fields but the name in the EIP712Domain in the half-blind mode
@@ -56,6 +56,10 @@ bool field_hash(const uint8_t *data, { return false; } +#ifdef HAVE_EIP712_HALF_BLIND + uint8_t keylen; + const char *key = get_struct_field_keyname(field_ptr, &keylen); +#endif // HAVE_EIP712_HALF_BLIND field_type = struct_field_type(field_ptr); if (fh->state == FHS_IDLE) // first packet for this frame { @@ -69,10 +73,13 @@ bool field_hash(const uint8_t *data, #ifdef HAVE_EIP712_HALF_BLIND if (path_get_root_type() == ROOT_DOMAIN) { + if ((keylen == 4) && (strncmp(key, "name", keylen) == 0)) + { #endif // HAVE_EIP712_HALF_BLIND ui_712_new_field(field_ptr, data, data_length); #ifdef HAVE_EIP712_HALF_BLIND } + } #endif // HAVE_EIP712_HALF_BLIND } } @@ -133,10 +140,15 @@ bool field_hash(const uint8_t *data, #ifdef HAVE_EIP712_HALF_BLIND if (path_get_root_type() == ROOT_DOMAIN) { + uint8_t keylen; + const char *key = get_struct_field_keyname(field_ptr, &keylen); + if ((keylen == 4) && (strncmp(key, "name", keylen) == 0)) + { #endif // HAVE_EIP712_HALF_BLIND ui_712_new_field(field_ptr, data, data_length); #ifdef HAVE_EIP712_HALF_BLIND } + } #endif // HAVE_EIP712_HALF_BLIND } else @@ -174,7 +186,8 @@ bool field_hash(const uint8_t *data, path_advance(); fh->state = FHS_IDLE; #ifdef HAVE_EIP712_HALF_BLIND - if (path_get_root_type() == ROOT_MESSAGE) + if ((path_get_root_type() == ROOT_MESSAGE) || + ((keylen != 4) || (strncmp(key, "name", keylen) != 0))) { G_io_apdu_buffer[0] = 0x90; G_io_apdu_buffer[1] = 0x00;
Add LdrIsModuleSxsRedirected
@@ -937,6 +937,16 @@ LdrControlFlowGuardEnforced( VOID ); +#if (PHNT_VERSION >= PHNT_19H1) +// rev +NTSYSAPI +BOOLEAN +NTAPI +LdrIsModuleSxsRedirected( + _In_ PVOID DllHandle + ); +#endif + #endif // (PHNT_MODE != PHNT_MODE_KERNEL) #endif
Fix bad HTML formatting in EVP_KEYEXCH-DH.html because of missing newline in pod file
@@ -58,6 +58,7 @@ To convert the received peer's public key from DER format on the host: To derive a shared secret on the host using the host's key and the peer's public key: + /* It is assumed that the host_key and peer_pub_key are set up */ void derive_secret(EVP_KEY *host_key, EVP_PKEY *peer_pub_key) {
pyapi: CHANGE provide libyang Context from Session
#include <string.h> #include <libssh/libssh.h> #include <libyang/libyang.h> +#include <libyang/swigpyrun.h> #include "../src/config.h" #include "netconf.h" #include "session.h" #include "rpc.h" +extern PyObject *libnetconf2Error; + int auth_hostkey_check_pyclb(const char *hostname, ssh_session session, void *priv) { @@ -418,6 +421,40 @@ ncSessionGetVersion(ncSessionObject *self, void *closure) } } +static PyObject * +ncSessionGetContext(ncSessionObject *self, void *closure) +{ + PyObject *context, *result, *module; + + + /* process the received data */ + context = SWIG_NewPointerObj(self->ctx, SWIG_Python_TypeQuery("ly_ctx*"), 0); + if (!context) { + PyErr_SetString(libnetconf2Error, "Building Python object from context structure failed."); + goto error; + } + + module = PyImport_ImportModule("libyang"); + if (module == NULL) { + PyErr_SetString(libnetconf2Error, "Could not import libyang module"); + goto error; + } + + result = PyObject_CallMethod(module, "create_new_Context", "(O)", context, NULL); + Py_DECREF(module); + Py_DECREF(context); + if (!result) { + PyErr_SetString(libnetconf2Error, "Could not create Context object."); + goto error; + } + + return result; + +error: + Py_XDECREF(context); + return NULL; +} + /* * Callback structures */ @@ -430,6 +467,7 @@ static PyGetSetDef ncSessionGetSetters[] = { {"transport", (getter)ncSessionGetTransport, NULL, "Transport protocol used for the NETCONF Session.", NULL}, {"version", (getter)ncSessionGetVersion, NULL, "NETCONF Protocol version used for the NETCONF Session.", NULL}, {"capabilities", (getter)ncSessionGetCapabilities, NULL, "Capabilities of the NETCONF Session.", NULL}, + {"context", (getter)ncSessionGetContext, NULL, "libyang context of the NETCONF Session.", NULL}, {NULL} /* Sentinel */ };
[performance] use scatter/gather for htp__create_headers_
@@ -2017,12 +2017,21 @@ static int htp__create_headers_(evhtp_header_t * header, void * arg) { struct evbuffer * buf = arg; + struct evbuffer_iovec iov[4]; - evbuffer_expand(buf, header->klen + 2 + header->vlen + 2); - evbuffer_add(buf, header->key, header->klen); - evbuffer_add(buf, ": ", 2); - evbuffer_add(buf, header->val, header->vlen); - evbuffer_add(buf, "\r\n", 2); + iov[0].iov_base = header->key; + iov[0].iov_len = header->klen; + + iov[1].iov_base = ": "; + iov[1].iov_len = 2; + + iov[2].iov_base = header->val; + iov[2].iov_len = header->vlen; + + iov[3].iov_base = "\r\n"; + iov[3].iov_len = 2; + + evbuffer_add_iovec(buf, iov, 4); return 0; } @@ -2134,31 +2143,40 @@ check_proto: struct evbuffer_iovec iov[9]; const char * status_str = status_code_to_str(code); + /* data == "HTTP/" */ iov[0].iov_base = "HTTP/"; iov[0].iov_len = 5; + /* data == "HTTP/X" */ iov[1].iov_base = (void *)&major; iov[1].iov_len = 1; + /* data == "HTTP/X." */ iov[2].iov_base = "."; iov[2].iov_len = 1; + /* data == "HTTP/X.X" */ iov[3].iov_base = (void *)&minor; iov[3].iov_len = 1; + /* data == "HTTP/X.X " */ iov[4].iov_base = " "; iov[4].iov_len = 1; + /* data == "HTTP/X.X YYY" */ iov[5].iov_base = out_buf; iov[5].iov_len = strlen(out_buf); + /* data == "HTTP/X.X YYY " */ iov[6].iov_base = " "; iov[6].iov_len = 1; + /* data == "HTTP/X.X YYY ZZZ" */ iov[7].iov_base = (void *)status_str; iov[7].iov_len = strlen(status_str); + /* data == "HTTP/X.X YYY ZZZ\r\n" */ iov[8].iov_base = "\r\n"; iov[8].iov_len = 2;
SOVERSION bump to version 2.3.4
@@ -63,7 +63,7 @@ set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_ # set version of the library set(LIBYANG_MAJOR_SOVERSION 2) set(LIBYANG_MINOR_SOVERSION 3) -set(LIBYANG_MICRO_SOVERSION 3) +set(LIBYANG_MICRO_SOVERSION 4) set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION}) set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
PicoWireless: use strnlen for fwver and SSIDs Avoid going through std::string and instead uses strnlen to get string length. Prevents extra null chars leaking into the Python string.
@@ -370,8 +370,7 @@ mp_obj_t picowireless_get_ssid_networks(size_t n_args, const mp_obj_t *pos_args, uint8_t network_item = args[ARG_network_item].u_int; const char* ssid = wireless->get_ssid_networks(network_item); if(ssid != nullptr) { - std::string str_ssid(ssid, WL_SSID_MAX_LENGTH); - return mp_obj_new_str(str_ssid.c_str(), str_ssid.length()); + return mp_obj_new_str(ssid, strnlen(ssid, WL_SSID_MAX_LENGTH)); } } else @@ -516,8 +515,7 @@ mp_obj_t picowireless_get_host_by_name(size_t n_args, const mp_obj_t *pos_args, mp_obj_t picowireless_get_fw_version() { if(wireless != nullptr) { const char* fw_ver = wireless->get_fw_version(); - std::string str_fw_ver(fw_ver, WL_FW_VER_LENGTH); - return mp_obj_new_str(str_fw_ver.c_str(), str_fw_ver.length()); + return mp_obj_new_str(fw_ver, strnlen(fw_ver, WL_FW_VER_LENGTH)); } else mp_raise_msg(&mp_type_RuntimeError, NOT_INITIALISED_MSG);
Add new hash function to header file
@@ -55,6 +55,7 @@ void random_fun(uint32_t* out, int min, int max, SHORT_STDPARAMS); // v1model.p4: extern void hash<O, T, D, M>(out O result, in HashAlgorithm algo, in T base, in D data, in M max); void hash(uint16_t* result, enum_HashAlgorithm_t hash, uint16_t base, uint8_buffer_t data, uint32_t max, SHORT_STDPARAMS); +void hash__u32__u16__bufs__u32(uint16_t* result, enum_HashAlgorithm_t hash, uint16_t base, uint8_buffer_t data, uint32_t max, SHORT_STDPARAMS); void hash__u16__u16__u16s__u32(uint16_t* result, enum_HashAlgorithm_t hash, uint16_t base, uint8_buffer_t data, uint32_t max, SHORT_STDPARAMS); void hash__u16__u16__u32s__u32(uint16_t* result, enum_HashAlgorithm_t hash, uint16_t base, uint8_buffer_t data, uint32_t max, SHORT_STDPARAMS); void hash__u16__u16__bufs__u32(uint16_t* result, enum_HashAlgorithm_t hash, uint16_t base, uint8_buffer_t data, uint32_t max, SHORT_STDPARAMS);
expand and update file structure
@@ -170,18 +170,23 @@ build the ISMRM raw data import tool: matlab/ Matlab helper scripts python/ Python helper functions doc/ documentation + rules/ more built-related files + scripts/ various helper scripts and examples src/ source code src/calib source code for sensitivity calibration src/sense source code for SENSE or ESPIRiT reconstruction src/noir source code for nonlinear inversion src/sake source code for SAKE reconstruction - src/wavelet2 source code for wavelets - src/wavelet3 source code for new wavelets (experimental) + src/wavelet source code for wavelets src/num base library with numerical functions src/iter iterative algorithms src/linops library of linear operators src/misc miscellaneous (e.g. I/O) src/ismrm support for ISMRM raw data format + src/simu source code for simulation + src/noncart source code for non-uniform FFT + tests/ system tests + utests/ unit tests lib/ built software libraries
CPP Template: Fix variable name in comment
@@ -57,7 +57,7 @@ int elektraCppTemplateOpen (Plugin * handle, Key * key) try { - // After the call to `delegator::open` you can retrieve a pointer to the delegate via `coderDelegator::get (handle)` + // After the call to `delegator::open` you can retrieve a pointer to the delegate via `delegator::get (handle)` status = delegator::open (handle, key); } catch (exception const & error)
fixed crash when listing ip arp after removing interface
@@ -2608,6 +2608,30 @@ send_ip4_garp_w_addr (vlib_main_t * vm, } } +/* + * Remove any arp entries asociated with the specificed interface + */ +void +vnet_arp_delete_sw_interface (vnet_main_t * vnm, u32 sw_if_index, u32 is_add) +{ + if (!is_add && sw_if_index != ~0) + { + ethernet_arp_main_t *am = &ethernet_arp_main; + ethernet_arp_ip4_entry_t *e; + /* *INDENT-OFF* */ + pool_foreach (e, am->ip4_entry_pool, ({ + if (e->sw_if_index != sw_if_index) + continue; + vnet_arp_set_ip4_over_ethernet_rpc_args_t args = { .sw_if_index = sw_if_index, + .a.ip4 = e->ip4_address }; + vnet_arp_unset_ip4_over_ethernet_internal (vnm, &args); + })); + /* *INDENT-ON* */ + } +} + +VNET_SW_INTERFACE_ADD_DEL_FUNCTION (vnet_arp_delete_sw_interface); + /* * fd.io coding-style-patch-verification: ON *
include/vboot.h: Format with clang-format BRANCH=none TEST=none
@@ -31,7 +31,6 @@ int vb21_is_packed_key_valid(const struct vb21_packed_key *key); int vb21_is_signature_valid(const struct vb21_signature *sig, const struct vb21_packed_key *key); - /** * Returns the public key in RO that was used to sign RW. * @@ -58,8 +57,8 @@ int vboot_is_padding_valid(const uint8_t *data, uint32_t start, uint32_t end); * @param sig Signature of <data> * @return EC_SUCCESS or EC_ERROR_* */ -int vboot_verify(const uint8_t *data, int len, - const struct rsa_public_key *key, const uint8_t *sig); +int vboot_verify(const uint8_t *data, int len, const struct rsa_public_key *key, + const uint8_t *sig); /** * Entry point of EC EFS @@ -138,8 +137,8 @@ struct cr50_comm_response { uint16_t error; } __packed; -#define CR50_COMM_MAX_REQUEST_SIZE (sizeof(struct cr50_comm_request) \ - + UINT8_MAX) +#define CR50_COMM_MAX_REQUEST_SIZE \ + (sizeof(struct cr50_comm_request) + UINT8_MAX) #define CR50_UART_RX_BUFFER_SIZE 32 /* TODO: Get from Cr50 header */ /* commands */
Fixed typo that could cause multiparms to fail to initialize.
@@ -426,7 +426,7 @@ proc buildAttrTree(string $nodeName, string $attr, string $fullAttr) attrControlGrp -attribute ($fullAttrName + "." + $child) - -annotate $parmHelp + -annotation $parmHelp // Forcing evaluation here ensures the element attribute is // created before houdiniAssetAdjustMulti() is executed. This // prevents the UI from a completel rebuild when
data_flash: do not continue wrting if flash is full
@@ -78,6 +78,9 @@ void data_flash_update(uint32_t loop) { #endif #ifdef USE_M25P16 offset = FILES_SECTOR_OFFSET + current_file()->start_sector * bounds.sector_size + (current_file()->entries / ENTRIES_PER_BLOCK) * 256; + if (offset >= bounds.total_size) { + break; + } state = STATE_CONTINUE_WRITE; #endif break;
Squashed 'opae-libs/' changes from 3967d0d0..0f197b46 Fix OPAE_MODULE_SEARCH_PATHS definition. git-subtree-dir: opae-libs git-subtree-split:
#define OPAE_ASE_CFG_INST_PATH "@CMAKE_INSTALL_PREFIX@/share/opae/ase/opae_ase.cfg" #define OPAE_MODULE_SEARCH_PATHS \ - "@CMAKE_INSTALL_PREFIX@/lib64/opae", \ - "@CMAKE_INSTALL_PREFIX@/lib/opae", \ - "/usr/lib64/opae", \ - "/usr/lib/opae", \ + "@CMAKE_INSTALL_PREFIX@/lib64/opae/", \ + "@CMAKE_INSTALL_PREFIX@/lib/opae/", \ + "/usr/lib64/opae/", \ + "/usr/lib/opae/", \ "" #ifndef STATIC
runtime: compute checksums in net_rx_one if needed
@@ -148,6 +148,7 @@ static void net_rx_one(struct rx_net_hdr *hdr) struct mbuf *m; const struct eth_hdr *llhdr; const struct ip_hdr *iphdr; + struct ip_hdr iphdr_copy; uint16_t len; m = net_rx_alloc_mbuf(hdr); @@ -199,10 +200,12 @@ static void net_rx_one(struct rx_net_hdr *hdr) goto drop; /* Did HW checksum verification pass? */ - if (hdr->csum_type != CHECKSUM_TYPE_UNNECESSARY) + if (hdr->csum_type != CHECKSUM_TYPE_UNNECESSARY) { + iphdr_copy = *iphdr; + iphdr_copy.chksum = 0; + if (iphdr->chksum != chksum_internet((void *)&iphdr_copy, sizeof(iphdr_copy))) goto drop; - - /* The NIC has validated IP checksum for us. */ + } if (unlikely(!ip_hdr_supported(iphdr))) goto drop;
misc: change VFIO group ownership and permissions in vfctl script This is missing step to allow runing VPP unpriviledged with AVF driver. Type: improvement
@@ -96,12 +96,16 @@ function create () { mac_prefix=$(cat ${netdev_path}/address | cut -d: -f1,3,4,5,6 ) for vf_path in ${path}/virtfn*; do vf=$(basename $(readlink ${vf_path})) + iommu_group=$(basename $(readlink ${vf_path}/iommu_group)) vfid=$(basename ${vf_path//virtfn/}) mac="${mac_prefix}:$(printf "%02x" ${vfid})" sudo ip link set dev ${netdev} vf ${vfid} mac ${mac} sudo ip link set dev ${netdev} vf ${vfid} trust on sudo ip link set dev ${netdev} vf ${vfid} spoofchk off pci-bind ${vf} vfio-pci + sudo chmod g+rw /dev/vfio/${iommu_group} + sudo chgrp sudo /dev/vfio/${iommu_group} + echo "VFIO group ${iommu_group} group ownership changed to sudo, group permissions changed to rw" done [ $(cat ${path}/sriov_numvfs) -gt 0 ] && show_vfs ${path} ${netdev}
Update vtag when scanning for INIT or INIT-ACK
@@ -4837,7 +4837,7 @@ sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, * if there is return 1, else return 0. */ int -sctp_is_there_an_abort_here(struct mbuf *m, int iphlen, uint32_t * vtagfill) +sctp_is_there_an_abort_here(struct mbuf *m, int iphlen, uint32_t *vtag) { struct sctp_chunkhdr *ch; struct sctp_init_chunk *init_chk, chunk_buf; @@ -4858,12 +4858,13 @@ sctp_is_there_an_abort_here(struct mbuf *m, int iphlen, uint32_t * vtagfill) /* yep, tell them */ return (1); } - if (ch->chunk_type == SCTP_INITIATION) { + if ((ch->chunk_type == SCTP_INITIATION) || + (ch->chunk_type == SCTP_INITIATION_ACK)) { /* need to update the Vtag */ init_chk = (struct sctp_init_chunk *)sctp_m_getptr(m, - offset, sizeof(*init_chk), (uint8_t *) & chunk_buf); + offset, sizeof(struct sctp_init_chunk), (uint8_t *) & chunk_buf); if (init_chk != NULL) { - *vtagfill = ntohl(init_chk->init.initiate_tag); + *vtag = ntohl(init_chk->init.initiate_tag); } } /* Nope, move to the next chunk */
[core] check for built-in plugins before dlopen
@@ -180,6 +180,18 @@ int plugins_load(server *srv) { const buffer * const module = &((data_string *)srv->srvconf.modules->data[i])->value; void *lib = NULL; + /* check if module is built-in to main executable */ + buffer_clear(tb); + buffer_append_str2(tb, BUF_PTR_LEN(module), + CONST_STR_LEN("_plugin_init")); + #ifdef _WIN32 + init = (int(WINAPI *)(plugin *))(intptr_t) + GetProcAddress(GetModuleHandle(NULL), tb->ptr); + #else + init = (int (*)(plugin *))(intptr_t)dlsym(RTLD_DEFAULT, tb->ptr); + #endif + + if (NULL == init) { buffer_copy_string(tb, srv->srvconf.modules_dir); buffer_append_path_len(tb, BUF_PTR_LEN(module)); @@ -233,6 +245,7 @@ int plugins_load(server *srv) { return -1; } #endif + } plugin *p = plugin_init(); p->lib = lib;
Fix library.json
"name": "Luos", "keywords": "robus,network,microservice,luos,operating system,os,embedded,communication,module,ST", "description": "Luos turn your embedded system as modules like microservice do it in software.", - "version": "0.6.4", + "version": "0.6.5", "authors": { "name": "Luos", "url": "https://luos.io" }, - "licence": "MIT", "build" : { "flags": [ "-I Inc", { "name": "Robus" } - ] + ], + "repository": + { + "type": "git", + "url": "https://github.com/Luos-io/luos" + } }
rdma: rdma_log__ argument dev is a pointer Also apply style edits as proprosed by checkstyle. Ticket: Type: fix
@@ -46,11 +46,14 @@ static u8 rdma_rss_hash_key[] = { rdma_main_t rdma_main; +/* (dev) is of type (rdma_device_t *) */ #define rdma_log__(lvl, dev, f, ...) \ - do { \ - vlib_log((lvl), rdma_main.log_class, "%s: " f, \ - &(dev)->name, ##__VA_ARGS__); \ - } while (0) + do \ + { \ + vlib_log ((lvl), rdma_main.log_class, "%s: " f, (dev)->name, \ + ##__VA_ARGS__); \ + } \ + while (0) #define rdma_log(lvl, dev, f, ...) \ rdma_log__((lvl), (dev), "%s (%d): " f, strerror(errno), errno, ##__VA_ARGS__)
fixed IP64 so that it sets correct UDP length and calculates a correct checksum
@@ -861,6 +861,8 @@ ip64_4to6(const uint8_t *ipv4packet, const uint16_t ipv4packet_len, break; case IP_PROTO_UDP: udphdr->udpchksum = 0; + /* As the udplen might have changed (DNS) we need to update it also */ + udphdr->udplen = uip_htons(ipv6_packet_len); udphdr->udpchksum = ~(ipv6_transport_checksum(resultpacket, ipv6len, IP_PROTO_UDP));
jenkins: fix artifact upload
@@ -1059,8 +1059,6 @@ yanlr/YAML(((Base)?Listener|ImprovedSymbolNames)|.h)|\ } if(testMem || testNokdb || testAll) { xunitUpload("${buildDir}/Testing/**/*.xml") - // TODO: remove line below to save space - xunitUpload("${buildDir}/Testing/Temporary/MemoryChecker.*.log") } deleteDir() }
[core] cache rev DNS for localhost for dir redir
@@ -43,7 +43,28 @@ int http_response_buffer_append_authority(server *srv, connection *con, buffer * if (our_addr.plain.sa_family == AF_INET && our_addr.ipv4.sin_addr.s_addr == htonl(INADDR_LOOPBACK)) { - buffer_append_string_len(o, CONST_STR_LEN("localhost")); + static char lhost[32]; + static size_t lhost_len = 0; + if (0 != lhost_len) { + buffer_append_string_len(o, lhost, lhost_len); + } + else { + size_t olen = buffer_string_length(o); + if (0 == sock_addr_nameinfo_append_buffer(srv, o, &our_addr)) { + lhost_len = buffer_string_length(o) - olen; + if (lhost_len < sizeof(lhost)) { + memcpy(lhost, o->ptr+olen, lhost_len+1); /*(+1 for '\0')*/ + } + else { + lhost_len = 0; + } + } + else { + lhost_len = sizeof("localhost")-1; + memcpy(lhost, "localhost", lhost_len+1); /*(+1 for '\0')*/ + buffer_append_string_len(o, lhost, lhost_len); + } + } } else if (!buffer_string_is_empty(con->server_name)) { buffer_append_string_buffer(o, con->server_name); } else