message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Improve bootstrap install | @@ -10,6 +10,11 @@ echo Requesting root access...
sudo echo -n ""
echo Root access granted, starting...
+if [ ! `which curl` ] || [ ! `which git` ]; then
+ echo -e "Installing ${cc}curl$nn and ${cc}git$nn"
+ sudo apt-get -y install curl git
+fi
+
# Set sensible defaults
export PARALLEL_INSTALL=${PARALLEL_INSTALL-1}
export PROTOBUF_BRANCH=${PROTOBUF_BRANCH-`git ls-remote --tags https://github.com/google/protobuf | tail -1 | cut -f3 -d'/'`}
@@ -52,7 +57,7 @@ echo -e "Using DPDK version $cc${DPDK_VSN}$nn"
echo
# Download libraries
-sudo apt-get update && sudo apt-get -y install g++ git automake libtool libgc-dev bison flex libfl-dev libgmp-dev libboost-dev libboost-iostreams-dev pkg-config python python-scapy python-ipaddr tcpdump cmake python-setuptools libprotobuf-dev libnuma-dev curl &
+sudo apt-get update && sudo apt-get -y install g++ automake libtool libgc-dev bison flex libfl-dev libgmp-dev libboost-dev libboost-iostreams-dev pkg-config python python-scapy python-ipaddr tcpdump cmake python-setuptools libprotobuf-dev libnuma-dev &
WAITPROC_APTGET="$!"
[ $PARALLEL_INSTALL -ne 0 ] || wait "$WAITPROC_APTGET"
|
WEBP_DEP_LIBRARIES: use Threads::Threads | @@ -45,7 +45,7 @@ if(WEBP_USE_THREAD)
}
" FLAG_HAVE_PTHREAD_PRIO_INHERIT)
set(HAVE_PTHREAD_PRIO_INHERIT ${FLAG_HAVE_PTHREAD_PRIO_INHERIT})
- list(APPEND WEBP_DEP_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+ list(APPEND WEBP_DEP_LIBRARIES Threads::Threads)
endif()
set(WEBP_USE_THREAD ${Threads_FOUND})
endif()
|
arch/xtensa: Enble 10 bits slave address in I2C driver.
Enable 10 bits slave address in I2C driver. | ****************************************************************************/
#define I2C_NUM_MAX 2
+#define I2C_ADDRESS_TENBITS (10)
#define I2C_IO_INIT_LEVEL (1)
#define ESP32_DEFAULT_I2CXFER_CLOCK (100 * 1000) /* 100Khz */
#define ESP32_DEFAULT_I2C_TIMEOUT (500)
@@ -144,6 +145,7 @@ struct esp32_i2c_priv_s {
int xfer_speed;
uint32_t slave_addr;
+ uint8_t slave_addr_bits;
uint32_t timeout;
uint32_t initialized;
@@ -855,8 +857,8 @@ int esp32_i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits)
if (addr > 0) {
priv->slave_addr = addr;
}
- if (nbits > 0 && priv->config != NULL) {
- ;
+ if (nbits > 0) {
+ priv->slave_addr_bits = nbits;
}
sem_post(&priv->sem_excl);
return OK;
@@ -955,10 +957,7 @@ int esp32_i2c_read(FAR struct i2c_dev_s *dev, FAR uint8_t *buffer, int buflen)
{
struct esp32_i2c_priv_s *priv = (struct esp32_i2c_priv_s *)dev;
struct i2c_msg_s msg;
- unsigned int flags;
-
- flags = 0;
-
+ uint16_t flags = (priv->slave_addr_bits == I2C_ADDRESS_TENBITS) ? I2C_M_TEN : 0;
/* Setup for the transfer */
msg.addr = priv->slave_addr;
msg.flags = (flags | I2C_M_READ);
@@ -980,9 +979,10 @@ int esp32_i2c_write(FAR struct i2c_dev_s *dev, FAR const uint8_t *buffer, int bu
struct esp32_i2c_priv_s *priv = (struct esp32_i2c_priv_s *)dev;
struct i2c_msg_s msg;
+ uint16_t flags = (priv->slave_addr_bits == I2C_ADDRESS_TENBITS) ? I2C_M_TEN : 0;
/* Setup for the transfer */
msg.addr = priv->slave_addr;
- msg.flags = 0;
+ msg.flags = flags;
msg.buffer = (FAR uint8_t *)buffer; /* Override const */
msg.length = buflen;
|
update code for mode=2 | @@ -46,10 +46,8 @@ static void cancel_job(int sig);
static int
compare_service_uri(char *a, char *b)
{
- size_t size_a = strlen(a);
- size_t size_b = strlen(b);
- size_t size = (size_a>size_b ? size_b+1 :size_a +1);
- return (memcmp(a,b, size));
+
+ return (strcmp(a,b));
}
void
listPrintersInArray(int post_proc_pipe[], cups_array_t *service_uri_list_ipps, int reg_type_no, int mode){
@@ -335,7 +333,17 @@ listPrintersInArray(int post_proc_pipe[], cups_array_t *service_uri_list_ipps,
else{
/* Call without arguments and env variable "SOFTWARE" starting
with "CUPS" (Backend in discovery mode) */
- printf("network %s \"%s\" \"%s (%s)\" \"%s\" \"\"\n", copy_service_uri_ipps, make_and_model, make_and_model, driverless_info, device_id);
+ if(reg_type_no < 1){
+ if(cupsArrayFind(service_uri_list_ipps,copy_service_uri_ipps) == NULL){
+ /* IPPS version of IPP printer is not present */
+ printf("network %s \"%s\" \"%s (%s)\" \"%s\" \"\"\n", service_uri, make_and_model, make_and_model, driverless_info, device_id);
+ }
+ }
+ else{
+ cupsArrayAdd(service_uri_list_ipps , service_uri);
+ printf("network %s \"%s\" \"%s (%s)\" \"%s\" \"\"\n", service_uri, make_and_model, make_and_model, driverless_info, device_id);
+ }
+
}
read_error:
@@ -773,6 +781,7 @@ int main(int argc, char*argv[]) {
if ((val = getenv("SOFTWARE")) != NULL &&
strncasecmp(val, "CUPS", 4) == 0) {
/* CUPS backend in discovery mode */
+ debug = 1;
exit(list_printers(2,reg_type_no));
} else{
/* Manual call */
|
Remove glog exception for infra/nanny2 | @@ -324,9 +324,6 @@ ALLOW .* -> vendor/google.golang.org/api/option
# Temporary exceptions.
#
-# MIGRATION-289. responsible: nekto0n@. deadline: 30.06.2019
-ALLOW infra/nanny2 -> vendor/github.com/golang/glog
-
# CONTRIB-1244. resposible: gzuykov@
ALLOW cloud -> vendor/github.com/rcrowley/go-metrics
|
nibba all fixed i believe | @@ -54,7 +54,7 @@ rate, z = read('Tengaku.mp3')
rateM, m = read('miss1.wav')
ratesb, b = read('spinnerbonus.wav')
ratesc, c = read('spinnerspin.wav')
-rateS, s = read('slider.wav')
+#rateS, s = read('slider.wav')
spinSound = AudioSegment.from_wav("spinnerspin.wav")
slider12 = AudioSegment.from_wav("slider.wav")
@@ -82,18 +82,19 @@ for x in range(len(my_info)):
start_index = int(my_info[x].time/1000 * rate)
- if not type(my_info[x].more).__name__ == "Spinner":
+
if x < len(beatmap_info) and "slider" in beatmap_info[x]["type"]:
+ spinSpeedup = 6
arrow_time_list = []
- print(beatmap_info[x]["time"])
for a in range(beatmap_info[x]["repeated"]):
arrow_time_list.append(beatmap_info[x]["time"] + beatmap_info[x]["duration"] * a+1)
if my_info[x].time < beatmap_info[x]["time"] + beatmap_info[x]["duration"] * beatmap_info[x]["repeated"]:
for abc in arrow_time_list:
start_index2 = int(abc/1000 * rate)
- z[start_index2:start_index2 + len(s)] += s * 0.5
- else:
+ z[start_index2:start_index2 + len(y)] += y * 0.5
+
+ elif not type(my_info[x].more).__name__ == "Spinner":
spinSpeedup = 6
if my_info[x].hitresult == None:
continue
|
landscape/useS3: restore behaviour on ios | @@ -75,6 +75,7 @@ const useS3 = (s3: S3State, { accept = '*' } = { accept: '*' }): IuseS3 => {
const fileSelector = document.createElement('input');
fileSelector.setAttribute('type', 'file');
fileSelector.setAttribute('accept', accept);
+ fileSelector.style.visibility = 'hidden';
fileSelector.addEventListener('change', () => {
const files = fileSelector.files;
if (!files || files.length <= 0) {
@@ -82,7 +83,9 @@ const useS3 = (s3: S3State, { accept = '*' } = { accept: '*' }): IuseS3 => {
return;
}
uploadDefault(files[0]).then(resolve);
+ document.body.removeChild(fileSelector);
})
+ document.body.appendChild(fileSelector);
fileSelector.click();
})
|
nimble/ll: Fix for LE connection parameter request
If host mask out HCI Remote Connection Parameters Request event, LL
shall reject LL Connection Parameter request | @@ -325,11 +325,18 @@ conn_parm_req_do_indicate:
* need to know before we indicate to the host that they are acceptable.
*/
if (indicate) {
+ /* If Host masked out Remote Connection Parameter Request Event, we need to
+ * send Reject back to the remote device
+ */
+ if (!ble_ll_hci_is_le_event_enabled(BLE_HCI_LE_SUBEV_REM_CONN_PARM_REQ)){
+ ble_err = BLE_ERR_UNSUPP_REM_FEATURE;
+ goto conn_param_pdu_exit;
+ }
+
/*
* Send event to host. At this point we leave and wait to get
* an answer.
*/
- /* XXX: what about masked out event? */
ble_ll_hci_ev_rem_conn_parm_req(connsm, req);
connsm->host_reply_opcode = opcode;
connsm->csmflags.cfbit.awaiting_host_reply = 1;
|
fix proj syntax | <ClInclude Include="$(ProjectDir)..\common\SocketTools.hpp" />
<ClInclude Include="CheckForExceptionOrAbort.hpp" />
</ItemGroup>
- <ImportGroup Condition = "exists('$(ProjectDir)..\..\lib\modules\exp')">
+ <ItemGroup Condition = "exists('$(ProjectDir)..\..\lib\modules\exp')">
<ClInclude Include="$(ProjectDir)..\..\lib\modules\exp\tests\unittests\ECSConfigCacheTests.cpp" />
<ClInclude Include="$(ProjectDir)..\..\lib\modules\exp\tests\unittests\ECSClientTests.cpp" />
<ClInclude Include="$(ProjectDir)..\..\lib\modules\exp\tests\unittests\ECSClientUtilsTests.cpp" />
- </ImportGroup>
+ </ItemGroup>
<Import Project="$(SolutionDir)\build.props" Condition="Exists('$(SolutionDir)\build.props')" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>
|
YAy PEG: Remove byte position from error message | @@ -1136,7 +1136,12 @@ struct errors : public tao::TAO_PEGTL_NAMESPACE::normal<Rule>
template <typename Input, typename... States>
static void raise (const Input & input, States &&...)
{
- throw tao::TAO_PEGTL_NAMESPACE::parse_error (errorMessage, input);
+ tao::TAO_PEGTL_NAMESPACE::position pos = input.position ();
+ std::string location = pos.source + ":" + std::to_string (pos.line) + ":" + std::to_string (pos.byte_in_line) + ": ";
+
+ std::string message = location + errorMessage;
+
+ throw std::runtime_error (message);
}
};
|
system/gcov: add show usage | @@ -57,6 +57,11 @@ int main(int argc, FAR char *argv[])
{
int option;
+ if (argc < 2)
+ {
+ show_usage(argv[0]);
+ }
+
while ((option = getopt(argc, argv, "drh")) != ERROR)
{
switch (option)
|
Print element index too | @@ -711,7 +711,7 @@ static int encode_double_array(grib_context* c,grib_buffer* buff,long* pos, bufr
long localReference=0,localWidth=0,modifiedWidth,modifiedReference;
long reference,allone;
double localRange,modifiedFactor,inverseFactor;
- size_t ii;
+ size_t ii, index_of_min, index_of_max;
int nvals = 0;
double min=0,max=0,maxAllowed,minAllowed;
double* v=NULL;
@@ -822,23 +822,23 @@ static int encode_double_array(grib_context* c,grib_buffer* buff,long* pos, bufr
break;
}
}
- ii=0;
+ ii=0; index_of_min=index_of_max=0;
v=values;
while (ii<nvals) {
- if (*v<min && *v!=GRIB_MISSING_DOUBLE) min=*v;
- if (*v>max && *v!=GRIB_MISSING_DOUBLE) max=*v;
+ if (*v<min && *v!=GRIB_MISSING_DOUBLE) { min=*v; index_of_min=ii; }
+ if (*v>max && *v!=GRIB_MISSING_DOUBLE) { max=*v; index_of_max=ii; }
if (*v == GRIB_MISSING_DOUBLE) thereIsAMissing=1;
ii++;
v++;
}
if (max>maxAllowed && max!=GRIB_MISSING_DOUBLE) {
- grib_context_log(c, GRIB_LOG_ERROR, "encode_double_array: %s. Maximum value (%g) out of range (maxAllowed=%g).",
- bd->shortName, max, maxAllowed);
+ grib_context_log(c, GRIB_LOG_ERROR, "encode_double_array: %s. Maximum value (value[%lu]=%g) out of range (maxAllowed=%g).",
+ bd->shortName, index_of_max, max, maxAllowed, index_of_max);
return GRIB_OUT_OF_RANGE;
}
if (min<minAllowed && min!=GRIB_MISSING_DOUBLE) {
- grib_context_log(c, GRIB_LOG_ERROR, "encode_double_array: %s. Minimum value (%g) out of range (minAllowed=%g).",
- bd->shortName, min, minAllowed);
+ grib_context_log(c, GRIB_LOG_ERROR, "encode_double_array: %s. Minimum value (value[%lu]=%g) out of range (minAllowed=%g).",
+ bd->shortName, index_of_min, min, minAllowed);
return GRIB_OUT_OF_RANGE;
}
|
fix check topsize type | @@ -432,7 +432,7 @@ private:
class TQueryAverage : public TQuerywiseAdditiveMetric {
public:
- explicit TQueryAverage(int topSize) : TopSize(topSize) {
+ explicit TQueryAverage(float topSize) : TopSize(topSize) {
CB_ENSURE(topSize > 0, "top size for QueryAverage should be greater than 0");
CB_ENSURE(topSize == (int)topSize, "top size for QueryAverage should be an integer value");
}
|
skate: moving filename check to SkateChecker module | @@ -33,8 +33,8 @@ import qualified SkateBackendCode
import qualified SkateBackendHeader
import qualified SkateBackendLatex
import qualified SkateBackendWiki
-import qualified SkateTools
import qualified SkateSchema
+import qualified SkateChecker
@@ -167,15 +167,7 @@ parseFile fname = do
Left err -> ioError $ userError ("Parse error at: " ++ (show err))
Right x -> return x
-{- verifies that the filename matches with the query definition -}
-checkFilename :: SkateParser.Schema -> String -> IO ()
-checkFilename schema fname = do
- let
- SkateParser.Schema sname _ _ _ = schema
- if sname == takeBaseName fname
- then return ()
- else ioError $ userError (
- "Schema name '" ++ sname ++ "' has to equal filename in " ++ fname)
+
@@ -196,7 +188,7 @@ resolveImp dfl path =
case required of
[] -> return dfl
(t:_) -> do {
- i <- (findImport path (t ++ ".Skate"));
+ i <- (findImport path (t ++ ".skate"));
resolveImp (dfl ++ [i]) path }
@@ -210,23 +202,22 @@ main = do {
inFile = fromJust $ opt_infilename opts
outFile = fromJust $ opt_outfilename opts
target = opt_targets opts
+ dfl = []
in
do {
printf "Start parsing '%s'\n" inFile;
ast <- parseFile inFile;
dfl <- resolveImp [ast] (opt_includes opts);
-
- checkFilename ast inFile;
-
printf "output parsing '%s'\n" outFile;
let
- s = SkateSchema.make_schema_record ast (tail dfl)
+ st = SkateSchema.make_schema_record ast (tail dfl);
+ ast2 = SkateSchema.skateSchemaGetAst st;
in
do {
- -- _ <- run_checks inFile s;
+ _ <- SkateChecker.run_all_checks inFile st;
outFileD <- openFile outFile WriteMode;
- compile opts target ast inFile outFile outFileD;
+ compile opts target ast2 inFile outFile outFileD;
hClose outFileD
}
}
|
bugfix allways request with get method | @@ -139,7 +139,7 @@ namespace carto {
}
// Configure connection parameters
- jenv->CallVoidMethod(conn, _HttpURLConnectionClass->setRequestMethod, jenv->NewStringUTF("GET"));
+ jenv->CallVoidMethod(conn, _HttpURLConnectionClass->setRequestMethod, jenv->NewStringUTF(request.method.c_str())));
jenv->CallVoidMethod(conn, _HttpURLConnectionClass->setDoInput, (jboolean)true);
jenv->CallVoidMethod(conn, _HttpURLConnectionClass->setDoOutput, (jboolean)!request.contentType.empty());
jenv->CallVoidMethod(conn, _HttpURLConnectionClass->setUseCaches, (jboolean)false);
|
soc: fix unit tests not included in the build
Regression from | @@ -2,7 +2,7 @@ idf_build_get_property(soc_name IDF_TARGET)
get_filename_component(soc_test "${CMAKE_CURRENT_SOURCE_DIR}/../${soc_name}/test" ABSOLUTE)
if(EXISTS "${soc_test}")
- set(srcs "${soc_test}")
+ set(src_dirs "${soc_test}")
set(include_dirs "${soc_test}")
endif()
|
fix(bluetooth): Delete any previously stored name. | @@ -347,6 +347,8 @@ static int zmk_ble_init(struct device *_arg)
#endif
#if IS_ENABLED(CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START)
+ settings_delete("bt/name");
+
for (int i = 0; i < 10; i++) {
bt_unpair(i, NULL);
}
|
build: add cmake dependency from test plugin to api
Type: fix | @@ -78,6 +78,9 @@ macro(add_vpp_plugin name)
add_library(${test_plugin_name} SHARED ${PLUGIN_API_TEST_SOURCES}
${api_includes})
set_target_properties(${test_plugin_name} PROPERTIES NO_SONAME 1)
+ if(PLUGIN_API_FILES)
+ add_dependencies(${test_plugin_name} ${plugin_name}_api_headers)
+ endif()
if(NOT VPP_EXTERNAL_PROJECT)
add_dependencies(${test_plugin_name} api_headers)
endif()
|
Additional CullWorker fixes | @@ -160,13 +160,15 @@ namespace carto {
cglib::vec2<float> screenPos = screenPoses[i] + (screenPoses[j] - screenPoses[i]) * (static_cast<float>(n) / tesselationLevel);
cglib::vec3<double> pos0 = cglib::transform_point(cglib::vec3<double>(screenPos(0), screenPos(1), -1), invMVPMat);
cglib::vec3<double> pos1 = cglib::transform_point(cglib::vec3<double>(screenPos(0), screenPos(1), 1), invMVPMat);
- cglib::ray3<double> ray(pos0, pos1 - pos0);
+ cglib::ray3<double> ray(pos0, cglib::unit(pos1 - pos0));
double t = 0;
if (projectionSurface->calculateHitPoint(ray, 0, t)) {
- mapPoses.push_back(projectionSurface->calculateMapPos(ray(t > 0 ? t : _viewState.getFar())));
+ MapPos mapPos = projectionSurface->calculateMapPos(ray(t > 0 ? t : _viewState.getFar()));
+ mapPoses.emplace_back(mapPos.getX(), mapPos.getY());
} else {
- mapPoses.push_back(projectionSurface->calculateMapPos(projectionSurface->calculateNearestPoint(ray, 0, t)));
+ MapPos mapPos = projectionSurface->calculateMapPos(projectionSurface->calculateNearestPoint(ray, 0, t))
+ mapPoses.emplace_back(mapPos.getX(), mapPos.getY());
}
}
}
|
jenkins-release: extend paramter docu | @@ -19,7 +19,7 @@ properties([
),
booleanParam(
defaultValue: false,
- description: 'If activated, changes to repositories are bundled. Can be combined with git_publish.',
+ description: 'If activated, changes to the ftp and doc repositories are bundled and archived in the publish stages. Can be combined with git_publish.',
name: 'git_bundle'
),
string(
|
Remove unwanted stacktrace from gpstate warning
Since this is a warning, the stack trace is excessive. | @@ -902,10 +902,10 @@ class GpSystemStateProgram:
)
rewinding = result > 0
- except pgdb.InternalError as ie:
+ except pgdb.InternalError:
logger.warning('could not query segment {} ({}:{})'.format(
primary.dbid, primary.hostname, primary.port
- ), exc_info=ie)
+ ))
return
# Successfully queried pg_stat_replication. If there are any backup
|
Enable fallback to software implementation in psa_sign/verify_message driver | @@ -126,7 +126,7 @@ psa_status_t psa_driver_wrapper_sign_message(
default:
/* Key is declared with a lifetime not known to us */
(void)status;
- return( PSA_ERROR_INVALID_ARGUMENT );
+ break;
}
return( psa_sign_message_builtin( attributes,
@@ -198,7 +198,7 @@ psa_status_t psa_driver_wrapper_verify_message(
default:
/* Key is declared with a lifetime not known to us */
(void)status;
- return( PSA_ERROR_INVALID_ARGUMENT );
+ break;
}
return( psa_verify_message_builtin( attributes,
|
PHP: added "--lib-static" configure option.
The libraries returned by "php-config --libs" are required to link with
static libphp.a. Dynamic libphp.so contains the required libraries names. | @@ -17,6 +17,7 @@ for nxt_option; do
--config=*) NXT_PHP_CONFIG="$value" ;;
--module=*) NXT_PHP_MODULE="$value" ;;
--lib-path=*) NXT_PHP_LIB_PATH="$value" ;;
+ --lib-static) NXT_PHP_LIB_STATIC=yes ;;
--help)
cat << END
@@ -24,6 +25,7 @@ for nxt_option; do
--config=FILE set php-config filename
--module=NAME set unit php module name
--lib-path=DIRECTORY set directory path to libphp.so library
+ --lib-static enable linking with static libphp.a library
END
exit 0
@@ -55,6 +57,7 @@ NXT_PHP_CONFIG=${NXT_PHP_CONFIG=php-config}
NXT_PHP=${NXT_PHP_CONFIG%-config*}
NXT_PHP_MODULE=${NXT_PHP_MODULE=${NXT_PHP##*/}}
NXT_PHP_LIB_PATH=${NXT_PHP_LIB_PATH=}
+NXT_PHP_LIB_STATIC=${NXT_PHP_LIB_STATIC=no}
$echo "configuring PHP module"
@@ -76,6 +79,10 @@ if /bin/sh -c "${NXT_PHP_CONFIG} --version" >> $NXT_AUTOCONF_ERR 2>&1; then
NXT_PHP_INCLUDE="`${NXT_PHP_CONFIG} --includes`"
NXT_PHP_LIB="-lphp${NXT_PHP_VERSION%%.*}"
+ if [ $NXT_PHP_LIB_STATIC = yes ]; then
+ NXT_PHP_LIB="${NXT_PHP_LIB} `${NXT_PHP_CONFIG} --libs`"
+ fi
+
if [ "$NXT_PHP_LIB_PATH" != "" ]; then
# "php-config --ldflags" does not contain path to libphp.
NXT_PHP_LDFLAGS="-L${NXT_PHP_LIB_PATH} -Wl,-rpath ${NXT_PHP_LIB_PATH}"
|
Fix integer division and refactor if statement | @@ -189,6 +189,7 @@ get_wg_index_range (kernel_run_command *k, unsigned *start_index,
const unsigned scaled_max_wgs = POCL_PTHREAD_MAX_WGS * num_threads;
const unsigned scaled_min_wgs = POCL_PTHREAD_MIN_WGS * num_threads;
+ unsigned limit;
unsigned max_wgs;
POCL_FAST_LOCK (k->lock);
if (k->remaining_wgs == 0)
@@ -205,10 +206,13 @@ get_wg_index_range (kernel_run_command *k, unsigned *start_index,
* num_threads, otherwise fallback to smaller workgroups.
*/
if (k->remaining_wgs <= (scaled_max_wgs * num_threads))
- max_wgs = min (scaled_min_wgs, (1 + k->remaining_wgs / num_threads));
+ limit = scaled_min_wgs;
else
- max_wgs = min (scaled_max_wgs, (1 + k->remaining_wgs / num_threads));
+ limit = scaled_max_wgs;
+ // divide two integers rounding up, i.e. ceil(k->remaining_wgs/num_threads)
+ const unsigned wgs_per_thread = (1 + (k->remaining_wgs - 1) / num_threads);
+ max_wgs = min (limit, wgs_per_thread);
max_wgs = min (max_wgs, k->remaining_wgs);
assert (max_wgs > 0);
|
mangle: simplify mangle_ConstCmpFeedback | @@ -406,32 +406,32 @@ static void mangle_Magic(run_t* run, bool printable) {
}
static void mangle_ConstCmpFeedback(run_t* run, bool printable) {
- if (!run->global->feedback.cmpFeedback) {
+ cmpfeedback_t* cmpf = run->global->feedback.cmpFeedbackMap;
+ if (!cmpf) {
mangle_Magic(run, printable);
return;
}
- uint32_t len = ATOMIC_GET(run->global->feedback.cmpFeedbackMap->cnt);
- if (len == 0) {
+
+ uint32_t cnt = ATOMIC_GET(cmpf->cnt);
+ if (cnt == 0) {
mangle_Magic(run, printable);
return;
}
- if (len > ARRAYSIZE(run->global->feedback.cmpFeedbackMap->valArr)) {
- len = ARRAYSIZE(run->global->feedback.cmpFeedbackMap->valArr);
+ if (cnt > ARRAYSIZE(cmpf->valArr)) {
+ cnt = ARRAYSIZE(cmpf->valArr);
}
size_t off = util_rndGet(0, run->dynamicFileSz - 1);
- uint32_t choice = util_rndGet(0, len - 1);
- if (run->global->feedback.cmpFeedbackMap->valArr[choice].len == 0) {
+ uint32_t choice = util_rndGet(0, cnt - 1);
+ if (cmpf->valArr[choice].len == 0) {
mangle_Magic(run, printable);
return;
}
- mangle_Overwrite(run, run->global->feedback.cmpFeedbackMap->valArr[choice].val, off,
- run->global->feedback.cmpFeedbackMap->valArr[choice].len);
+ mangle_Overwrite(run, cmpf->valArr[choice].val, off, cmpf->valArr[choice].len);
if (printable) {
- util_turnToPrintable(
- &run->dynamicFile[off], run->global->feedback.cmpFeedbackMap->valArr[choice].len);
+ util_turnToPrintable(&run->dynamicFile[off], cmpf->valArr[choice].len);
}
}
|
Fix a crash from a non-embedded foreign library needing a loader.
Embedded libraries go through a different path, so their loader will
get registered. Dynamically-opened libraries weren't being checked for
a loader, so relying on one would result in a crash. | @@ -525,7 +525,7 @@ static lily_module_entry *load_file(lily_parse_state *parser, const char *path)
}
static lily_module_entry *load_library(lily_parse_state *parser,
- const char *path)
+ const char *path, const char *name)
{
lily_module_entry *result = NULL;
lily_library *library = lily_library_load(path);
@@ -533,6 +533,11 @@ static lily_module_entry *load_library(lily_parse_state *parser,
result = new_module(parser, path, library->dynaload_table);
result->handle = library->source;
+ lily_msgbuf *msgbuf = parser->msgbuf;
+ char *lib_name = lily_mb_sprintf(msgbuf, "lily_%s_loader", name);
+ /* This may be NULL, but that's okay because loaders are optional. */
+ result->loader = lily_library_get(library->source, lib_name);
+
lily_free(library);
}
@@ -641,7 +646,7 @@ static lily_module_entry *load_module(lily_parse_state *parser,
if (strcmp(suffix, ".lly") == 0)
module = load_file(parser, path);
else if (strcmp(suffix, LILY_LIB_SUFFIX) == 0)
- module = load_library(parser, path);
+ module = load_library(parser, path, name);
if (module)
break;
|
Update versioning.md
Fix spelling | @@ -85,7 +85,7 @@ Due to various arising practical needs it may be necessary to update `VER_MINOR`
## Release schedule for 2021H2
-A separate feature branch may be needed to accomodate the integration with
+A separate feature branch may be needed to accommodate the integration with
[OpenTelemetry C++ SDK](https://github.com/open-telemetry/opentelemetry-cpp).
Separate branch with addition of new major API changes should be labeled
`dev/r4` to mark the `Release 4.x` milestone. Next major release 4 may contain
|
Fix Issue OSS-Fuzz: Branch on uninitialized memory (in ccm code).
This would also happen for aes-ccm. There was one branch path where it just returned 1
without setting *padlen, It now branches so that the value is set to 0.
Fixes | @@ -349,7 +349,7 @@ static int ccm_cipher_internal(PROV_CCM_CTX *ctx, unsigned char *out,
/* EVP_*Final() doesn't return any data */
if (in == NULL && out != NULL)
- return 1;
+ goto finish;
if (!ctx->iv_set)
goto err;
@@ -388,6 +388,7 @@ static int ccm_cipher_internal(PROV_CCM_CTX *ctx, unsigned char *out,
}
}
olen = len;
+finish:
rv = 1;
err:
*padlen = olen;
|
Add receive timeout setting in default settings | * Author: Tilen MAJERLE <[email protected]>
*/
#ifndef __ESP_DEFAULT_CONFIG_H
-#define __ESP_DEFAULT_CONFIG_H 100
+#define __ESP_DEFAULT_CONFIG_H
/**
* \defgroup ESP_CONF Configuration
* to accept mbox only when first data packet arrives to device,
* otherwise it will be immediately written to receive mbox.
*/
-#ifndef ECP_CFG_NETCONN_ACCEPT_ON_CONNECT
-#define ECP_CFG_NETCONN_ACCEPT_ON_CONNECT 1
+#ifndef ESP_CFG_NETCONN_ACCEPT_ON_CONNECT
+#define ESP_CFG_NETCONN_ACCEPT_ON_CONNECT 1
+#endif
+
+/**
+ * \brief Enables (1) or disables (0) receive timeout feature
+ *
+ * When this option is enabled, user will get an option
+ * to set timeout value for receive data on netconn,
+ * before function returns timeout error.
+ *
+ * \note Even if this option is enabled, user must still manually set timeout,
+ * by default time will be set to 0 which means no timeout.
+ */
+#ifndef ESP_CFG_NETCONN_RECEIVE_TIMEOUT
+#define ESP_CFG_NETCONN_RECEIVE_TIMEOUT 0
#endif
/**
|
lot of places expect resolve_cstring to return a zero when the file is not found, but current code returns roor | @@ -81,7 +81,11 @@ static inline tuple resolve_cstring(tuple root, char *f)
push_character(a, y);
}
}
- if (buffer_length(a)) t = lookup(t, intern(a));
+
+ if (buffer_length(a)) {
+ t = lookup(t, intern(a));
return t;
}
+ return 0;
+}
|
fixes bad merge in %clay (+read-p sample) | :: we default to fully private (empty whitelist).
::
++ read-p
- |= {aeon pax/path}
+ |= pax/path
^- (unit (unit (each cage lobe)))
=- [~ ~ %& %noun !>(-)]
:- (read-p-in pax per.red)
|
Allow to load a map of tiles of any length, not only 32kb | @@ -1349,15 +1349,21 @@ static void onImportSprites(const char* name, const void* buffer, size_t size, v
commandDone(console);
}
+static void injectMap(Console* console, const void* buffer, s32 size)
+{
+ enum {Size = sizeof(tic_map)};
+
+ SDL_memset(&console->tic->cart.gfx.map, 0, Size);
+ SDL_memcpy(&console->tic->cart.gfx.map, buffer, SDL_min(size, Size));
+}
+
static void onImportMap(const char* name, const void* buffer, size_t size, void* data)
{
Console* console = (Console*)data;
- enum {Size = sizeof(tic_map)};
-
- if(name && buffer && size == Size)
+ if(name && buffer && size <= sizeof(tic_map))
{
- memcpy(&console->tic->cart.gfx.map, buffer, size);
+ injectMap(console, buffer, size);
printLine(console);
printBack(console, "map successfully imported");
@@ -2761,9 +2767,9 @@ static void cmdInjectMap(Console* console, const char* param, const char* name)
if(map)
{
- if(size == sizeof(tic_map))
+ if(size <= sizeof(tic_map))
{
- SDL_memcpy(embed.file.gfx.map.data, map, size);
+ injectMap(console, map, size);
embed.yes = true;
embed.fast = true;
|
framework/mqtt: add a missed description of doxygen in mqtt
add a brief section in mqtt for doxygen. | ****************************************************************************/
/**
* @defgroup MQTT MQTT Client
+ * @brief Provides APIs for MQTT Client
* @ingroup NETWORK
* @{
*/
|
LimeSuiteGUI: fix NCO phase readback in TxTSP tab | @@ -419,7 +419,7 @@ void lms7002_pnlTxTSP_view::UpdateNCOinputs()
{
float_type phase[16] = { 0 };
float_type fcw = 0;
- if (LMS_GetNCOPhase(lmsControl, LMS_CH_TX, ch - 1, phase, &fcw) != 0)
+ if (LMS_GetNCOPhase(lmsControl, LMS_CH_TX, ch, phase, &fcw) != 0)
return;
for (size_t i = 0; i < txtNCOinputs.size(); ++i)
{
|
simd128: fix portable fallback for wasm_i8x16_swizzle
I broke it in the previous commit; it didn't properly account for the
possibility of the index being negative.
This also adds another set of braces in the NEON implementation, as the
old version didn't work on GCC on armv8. | @@ -5389,7 +5389,7 @@ simde_wasm_i8x16_swizzle (simde_v128_t a, simde_v128_t b) {
r_;
#if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
- int8x8x2_t tmp = { vget_low_s8(a_.neon_i8), vget_high_s8(a_.neon_i8) };
+ int8x8x2_t tmp = { { vget_low_s8(a_.neon_i8), vget_high_s8(a_.neon_i8) } };
r_.neon_i8 = vcombine_s8(
vtbl2_s8(tmp, vget_low_s8(b_.neon_i8)),
vtbl2_s8(tmp, vget_high_s8(b_.neon_i8))
@@ -5412,7 +5412,7 @@ simde_wasm_i8x16_swizzle (simde_v128_t a, simde_v128_t b) {
#else
SIMDE_VECTORIZE
for (size_t i = 0 ; i < (sizeof(r_.i8) / sizeof(r_.i8[0])) ; i++) {
- r_.i8[i] = (b_.i8[i] > 15) ? INT8_C(0) : a_.i8[b_.i8[i]];
+ r_.i8[i] = (b_.u8[i] > 15) ? INT8_C(0) : a_.i8[b_.u8[i]];
}
#endif
|
os/board/rtl8721csm : Add rtc initialize | @@ -256,6 +256,19 @@ void board_initialize(void)
amebad_timer_initialize(path, i);
}
#endif
+
+#ifdef CONFIG_RTC_DRIVER
+ struct rtc_lowerhalf_s *rtclower;
+ int ret;
+
+ rtclower = amebad_rtc_lowerhalf();
+ if (rtclower) {
+ ret = rtc_initialize(0, rtclower);
+ if (ret < 0) {
+ lldbg("Failed to register the RTC driver: %d\n", ret);
+ }
+ }
+#endif
}
#else
#error "CONFIG_BOARD_INITIALIZE MUST ENABLE"
|
4way: bail for arm on read/write settings | @@ -422,6 +422,10 @@ serial_esc4way_ack_t serial_4way_read_settings(blheli_settings_t *settings, uint
quic_debugf("ERROR ESC4WAY_DEVICE_INIT_FLASH 0x%x", ack);
return ack;
}
+ if (device.mode == ESC4WAY_ARM_BLB) {
+ return ESC4WAY_ACK_D_GENERAL_ERROR;
+ }
+
time_delay_us(500); // give the device some time to wake up
uint8_t size = BLHELI_SETTINGS_SIZE;
@@ -467,6 +471,10 @@ serial_esc4way_ack_t serial_4way_write_settings(blheli_settings_t *settings, uin
quic_debugf("ERROR ESC4WAY_DEVICE_INIT_FLASH 0x%x", ack);
return ack;
}
+ if (device.mode == ESC4WAY_ARM_BLB) {
+ return ESC4WAY_ACK_D_GENERAL_ERROR;
+ }
+
time_delay_us(500); // give the device some time to wake up
uint8_t size = BLHELI_SETTINGS_SIZE;
|
Avoid core dump in pg_dump when dumping from pre-8.3 server.
Commit missed adding a tgisinternal output column
to getTriggers' query for pre-8.3 servers. Back-patch to v11,
like that commit. | @@ -7799,6 +7799,7 @@ getTriggers(Archive *fout, TableInfo tblinfo[], int numTables)
"SELECT tgname, "
"tgfoid::pg_catalog.regproc AS tgfname, "
"tgtype, tgnargs, tgargs, tgenabled, "
+ "false as tgisinternal, "
"tgisconstraint, tgconstrname, tgdeferrable, "
"tgconstrrelid, tginitdeferred, tableoid, oid, "
"tgconstrrelid::pg_catalog.regclass AS tgconstrrelname "
|
Fix test to fail if DNSSEC lookup fails! | @@ -58,7 +58,6 @@ PORT=`cat $TMPF1 | grep Listening | cut -d " " -f 4`
echo "../../drill/drill -p $PORT -k test2-key -S @localhost ok.ok.test.jelte.nlnetlabs.nl"
../../drill/drill -p $PORT -k test2-key -S @localhost ok.ok.test.jelte.nlnetlabs.nl> $TMPF2
-cat $TMPF2
if [[ $? -ne 0 ]]; then
cat $TMPF2
|
Cache the hash used for JSON serialization | @@ -25,6 +25,7 @@ static FIOBJ HTTP_HEADER_SERVER;
static FIOBJ HTTP_VALUE_SERVER;
static FIOBJ JSON_KEY;
static FIOBJ JSON_VALUE;
+static FIOBJ JSON_HASH;
/* *****************************************************************************
Routing
@@ -66,6 +67,8 @@ int main(int argc, char const *argv[]) {
/* JSON values to be serialized */
JSON_KEY = fiobj_str_new("message", 7);
JSON_VALUE = fiobj_str_new("Hello, World!", 13);
+ JSON_HASH = fiobj_hash_new();
+ fiobj_hash_set(JSON_HASH, JSON_KEY, fiobj_dup(JSON_VALUE));
/* Test for static file service */
const char *public_folder = fio_cli_get_str("www");
@@ -93,10 +96,17 @@ Request handlers
/* handles JSON requests */
static void on_request_json(http_s *h) {
http_set_header(h, HTTP_HEADER_CONTENT_TYPE, http_mimetype_find("json", 4));
+ FIOBJ json;
+ if (0) {
+ /* recreate the Hash to be serialized */
FIOBJ hash = fiobj_hash_new(); /* an object to serialise as JSON*/
fiobj_hash_set(hash, JSON_KEY, fiobj_dup(JSON_VALUE));
- FIOBJ json = fiobj_obj2json(hash, 0);
+ json = fiobj_obj2json(hash, 0);
fiobj_free(hash);
+ } else {
+ /* serialize cached hash */
+ json = fiobj_obj2json(JSON_HASH, 0);
+ }
fio_cstr_s tmp = fiobj_obj2cstr(json);
http_send_body(h, tmp.data, tmp.len);
fiobj_free(json);
@@ -193,5 +203,7 @@ static void cleanup(void) {
fiobj_free(HTTP_VALUE_SERVER);
fiobj_free(JSON_KEY);
fiobj_free(JSON_VALUE);
+ fiobj_free(JSON_HASH);
+
route_clear();
}
|
v2.0.47 landed | -ejdb2 (2.0.47) UNRELEASED; urgency=medium
+ejdb2 (2.0.47) testing; urgency=medium
* Added ability to specify constraints on internal primary key in query #281
* Added `jbn_copy_paths` (jbl.h)
- -- Anton Adamansky <[email protected]> Thu, 07 May 2020 01:28:14 +0700
+ -- Anton Adamansky <[email protected]> Fri, 08 May 2020 23:23:53 +0700
ejdb2 (2.0.46) testing; urgency=medium
|
Fix logging of retry packets in draft-17 | @@ -426,14 +426,14 @@ void picoquic_log_retry_packet(FILE* F, uint64_t log_cnxid64,
int token_length = 0;
uint8_t odcil;
uint8_t unused_cil;
- int payload_length = (int)(length - ph->offset);
-
- picoquic_parse_packet_header_cnxid_lengths(bytes[byte_index++], &unused_cil, &odcil);
+ int payload_length = (int)(ph->payload_length);
+ /* Decode ODCIL from bottom 4 bits of first byte */
+ picoquic_parse_packet_header_cnxid_lengths(bytes[0], &unused_cil, &odcil);
if ((int)odcil > payload_length) {
picoquic_log_prefix_initial_cid64(F, log_cnxid64);
fprintf(F, "packet too short, ODCIL: %x (%d), only %d bytes available.\n",
- bytes[byte_index - 1], odcil, payload_length);
+ bytes[0]&0x0F, odcil, payload_length);
} else {
/* Dump the old connection ID */
picoquic_log_prefix_initial_cid64(F, log_cnxid64);
@@ -442,7 +442,7 @@ void picoquic_log_retry_packet(FILE* F, uint64_t log_cnxid64,
fprintf(F, "%02x", bytes[byte_index++]);
}
- token_length = ((int)ph->offset) + payload_length - ((int)byte_index);
+ token_length = payload_length - odcil;
fprintf(F, ">, Token length: %d\n", token_length);
/* Print the token or an error */
if (token_length > 0) {
|
build.sh: fix copy/paste error, install mako too | @@ -50,7 +50,7 @@ dependencies() {
DEPS="{gcc,g++,gcc-multilib,g++-multilib,ninja-build,python3-pip,python3-setuptools,python3-wheel,pkg-config,mesa-common-dev,libx11-dev:i386}"
install
- if [[ $(sudo pip3 show meson; echo $?) == 1 || $(sudo pip3 show meson; echo $?) == 1 ]]; then
+ if [[ $(sudo pip3 show meson; echo $?) == 1 || $(sudo pip3 show mako; echo $?) == 1 ]]; then
sudo pip3 install meson mako
fi
if [[ ! -f /usr/local/bin/glslangValidator ]]; then
|
bash: fix pip install issue with jjb-sandbox-env function
In a new system (e.g. ubuntu 18.04 docker image), the pip3
installation of jenkins-job-builder fails unless pip3 wheel
is completed on a previous pip3 install command.
Type: fix | @@ -229,7 +229,8 @@ jjb-sandbox-env()
rm -rf $VENV_DIR \
&& python3 -m venv $VENV_DIR \
&& source $VENV_DIR/bin/activate \
- && pip3 install wheel jenkins-job-builder==3.0.2
+ && pip3 install wheel \
+ && pip3 install jenkins-job-builder==3.0.2
alias jjsb='jenkins-jobs --conf $JENKINS_INI'
function jjsb-test() {
|
update doc/build.info | @@ -4131,6 +4131,10 @@ DEPEND[html/man7/EVP_KDF-SSHKDF.html]=man7/EVP_KDF-SSHKDF.pod
GENERATE[html/man7/EVP_KDF-SSHKDF.html]=man7/EVP_KDF-SSHKDF.pod
DEPEND[man/man7/EVP_KDF-SSHKDF.7]=man7/EVP_KDF-SSHKDF.pod
GENERATE[man/man7/EVP_KDF-SSHKDF.7]=man7/EVP_KDF-SSHKDF.pod
+DEPEND[html/man7/EVP_KDF-TLS13_KDF.html]=man7/EVP_KDF-TLS13_KDF.pod
+GENERATE[html/man7/EVP_KDF-TLS13_KDF.html]=man7/EVP_KDF-TLS13_KDF.pod
+DEPEND[man/man7/EVP_KDF-TLS13_KDF.7]=man7/EVP_KDF-TLS13_KDF.pod
+GENERATE[man/man7/EVP_KDF-TLS13_KDF.7]=man7/EVP_KDF-TLS13_KDF.pod
DEPEND[html/man7/EVP_KDF-TLS1_PRF.html]=man7/EVP_KDF-TLS1_PRF.pod
GENERATE[html/man7/EVP_KDF-TLS1_PRF.html]=man7/EVP_KDF-TLS1_PRF.pod
DEPEND[man/man7/EVP_KDF-TLS1_PRF.7]=man7/EVP_KDF-TLS1_PRF.pod
@@ -4558,6 +4562,7 @@ html/man7/EVP_KDF-PKCS12KDF.html \
html/man7/EVP_KDF-SCRYPT.html \
html/man7/EVP_KDF-SS.html \
html/man7/EVP_KDF-SSHKDF.html \
+html/man7/EVP_KDF-TLS13_KDF.html \
html/man7/EVP_KDF-TLS1_PRF.html \
html/man7/EVP_KDF-X942-ASN1.html \
html/man7/EVP_KDF-X942-CONCAT.html \
@@ -4680,6 +4685,7 @@ man/man7/EVP_KDF-PKCS12KDF.7 \
man/man7/EVP_KDF-SCRYPT.7 \
man/man7/EVP_KDF-SS.7 \
man/man7/EVP_KDF-SSHKDF.7 \
+man/man7/EVP_KDF-TLS13_KDF.7 \
man/man7/EVP_KDF-TLS1_PRF.7 \
man/man7/EVP_KDF-X942-ASN1.7 \
man/man7/EVP_KDF-X942-CONCAT.7 \
|
Add cmake option -DOFFLOAD_ARCH_STR if not on an amdgpu | @@ -111,6 +111,20 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
-DROCCLR_PATH=$ROCclr_DIR \
-DROCM_PATH=$ROCM_PATH"
+ # If this machine does not have an actvie amd GPU, tell hipamd
+ # to use first in GFXLIST or gfx90a if no GFXLIST
+ if [ -f $AOMP/bin/amdgpu-arch ] ; then
+ $AOMP/bin/amdgpu-arch >/dev/null
+ if [ $? != 0 ] ; then
+ if [ ! -z "$GFXLIST" ] ; then
+ amdgpu=`echo $GFXLIST | cut -d" " -f1`
+ else
+ amdgpu=gfx90a
+ fi
+ MYCMAKEOPTS+=" -DOFFLOAD_ARCH_STR=$amdgpu"
+ fi
+ fi
+
echo mkdir -p $BUILD_DIR/build/hipamd
mkdir -p $BUILD_DIR/build/hipamd
echo cd $BUILD_DIR/build/hipamd
|
fixed crash in send_beaconclone | @@ -1495,7 +1495,7 @@ static const uint8_t broadcastbeacondata[] =
};
#define BROADCASTBEACON_SIZE sizeof(broadcastbeacondata)
-static uint8_t packetout[HDRRT_SIZE +MAC_SIZE_NORM +CAPABILITIESAP_SIZE +BROADCASTBEACON_SIZE +1];
+static uint8_t packetout[HDRRT_SIZE +MAC_SIZE_NORM +CAPABILITIESAP_SIZE +BROADCASTBEACON_SIZE +2 +ESSID_LEN_MAX +1];
if(aplist_beacon_ptr->essid_len == 0)
{
@@ -1576,7 +1576,7 @@ static const uint8_t broadcastbeacondata[] =
};
#define BROADCASTBEACON_SIZE sizeof(broadcastbeacondata)
-static uint8_t packetout[HDRRT_SIZE +MAC_SIZE_NORM +CAPABILITIESAP_SIZE +BROADCASTBEACON_SIZE +1];
+static uint8_t packetout[HDRRT_SIZE +MAC_SIZE_NORM +CAPABILITIESAP_SIZE +BROADCASTBEACON_SIZE +2 +ESSID_LEN_MAX +1];
if(myaplist_beacon_ptr->essid_len == 0)
{
@@ -1658,7 +1658,7 @@ static const uint8_t broadcastbeacondata[] =
};
#define BROADCASTBEACON_SIZE sizeof(broadcastbeacondata)
-static uint8_t packetout[HDRRT_SIZE +MAC_SIZE_NORM +CAPABILITIESAP_SIZE +BROADCASTBEACON_SIZE +1];
+static uint8_t packetout[HDRRT_SIZE +MAC_SIZE_NORM +CAPABILITIESAP_SIZE +BROADCASTBEACON_SIZE +2 +ESSID_LEN_MAX +1];
if(extaplist_beacon_ptr->essid_len == 0)
{
|
permalinks: uniform appearance for comments and posts (post + groupfeed)
fixes urbit/landscape#759 | @@ -68,13 +68,15 @@ function TranscludedComment(props: {
return (
<Col>
<Author
- p="2"
+ pt='12px'
+ pl='12px'
+ size='24'
showImage
ship={comment.post.author}
date={comment.post?.["time-sent"]}
group={group}
/>
- <Box p="2">
+ <Box pl="44px" pt='1'>
<GraphContentWide
api={api}
transcluded={transcluded}
@@ -103,16 +105,18 @@ function TranscludedPublishNode(props: {
return (
<Col color="black" gapY="2">
<Author
- px="2"
+ pl='12px'
+ pt='12px'
+ size='24'
showImage
ship={post.post.author}
date={post.post?.["time-sent"]}
group={group}
/>
- <Text px="2" fontSize="2" fontWeight="medium">
+ <Text pl='44px' fontSize="2" fontWeight="medium">
{post.post.contents[0]?.text}
</Text>
- <Box p="2">
+ <Box pl="44px" pr='3'>
<NotePreviewContent
snippet={getSnippet(post?.post.contents[1]?.text)}
/>
@@ -144,13 +148,15 @@ export function TranscludedPost(props: {
return (
<Col>
<Author
- p="2"
+ pt='12px'
+ pl='12px'
+ size='24'
showImage
ship={post.author}
date={post?.["time-sent"]}
group={group}
/>
- <Box p="2">
+ <Box pl='44px' pt='2' pr='3'>
<MentionText
api={api}
transcluded={transcluded}
|
mangoapp: hide hud by default | @@ -620,7 +620,9 @@ parse_overlay_config(struct overlay_params *params,
params->fps_value = { 30, 60 };
params->round_corners = 0;
params->battery_color =0xff9078;
+#ifdef MANGOAPP
params->no_display = 1;
+#endif
#ifdef HAVE_X11
params->toggle_hud = { XK_Shift_R, XK_F12 };
|
Fix former deleted lights won't be added again
Maybe related issues: | @@ -1124,6 +1124,14 @@ void DeRestPluginPrivate::addLightNode(const deCONZ::Node *node)
if (lightNode2)
{
+ if (lightNode2->state() == LightNode::StateDeleted)
+ {
+ if (permitJoinFlag)
+ {
+ lightNode2->setState(LightNode::StateNormal);
+ }
+ }
+
if (lightNode2->node() != node)
{
lightNode2->setNode(const_cast<deCONZ::Node*>(node));
@@ -1328,6 +1336,14 @@ void DeRestPluginPrivate::addLightNode(const deCONZ::Node *node)
loadLightNodeFromDb(&lightNode);
closeDb();
+ if (lightNode.state() == LightNode::StateDeleted)
+ {
+ if (permitJoinFlag)
+ {
+ lightNode.setState(LightNode::StateNormal);
+ }
+ }
+
if (lightNode.id().isEmpty())
{
openDb();
|
Remove OPENSSL_assert() from crypto/threads_none.c | @@ -25,19 +25,22 @@ CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(void)
int CRYPTO_THREAD_read_lock(CRYPTO_RWLOCK *lock)
{
- OPENSSL_assert(*(unsigned int *)lock == 1);
+ if (!ossl_assert(*(unsigned int *)lock == 1))
+ return 0;
return 1;
}
int CRYPTO_THREAD_write_lock(CRYPTO_RWLOCK *lock)
{
- OPENSSL_assert(*(unsigned int *)lock == 1);
+ if (!ossl_assert(*(unsigned int *)lock == 1))
+ return 0;
return 1;
}
int CRYPTO_THREAD_unlock(CRYPTO_RWLOCK *lock)
{
- OPENSSL_assert(*(unsigned int *)lock == 1);
+ if (!ossl_assert(*(unsigned int *)lock == 1))
+ return 0;
return 1;
}
|
renames list-addressing regression test cases | /+ *test
|%
::
-++ test-hang
+++ test-addr-no-hang
%- expect-fail
|. &33:~[[%leaf p="syntax error"] [%leaf p="\{1 11}"]]
::
-++ test-vere-bail
+++ test-addr-no-bail
%- expect-fail
|. &33:~
--
|
Disable DEBUG_TEST_TRACE when NDEBUG defined.
The underlying functions used by the FUNCTION_TEST*() macros will not be able when NDEBUG is defined so disable them.
It would be better to change #ifndef NDEBUG to #ifdef DEBUG_TEST_TRACE where needed to bring these into alignment but that will be a larger effort best undertaken separately. | @@ -293,10 +293,18 @@ Macros to return function results (or void)
/***********************************************************************************************************************************
Function Test Macros
-In debug builds these macros will update the stack trace with function names and parameters but not log. In production builds all
-test macros are compiled out (except for return statements).
+In debug builds these macros will update the stack trace with function names and parameters but will not log. In production builds
+all test macros are compiled out (except for return statements).
+
+Ignore DEBUG_TEST_TRACE_MACRO if NDEBUG is defined because the underlying functions that support the macros will not be present.
***********************************************************************************************************************************/
+#ifndef NDEBUG
#ifdef DEBUG_TEST_TRACE
+ #define DEBUG_TEST_TRACE_MACRO
+#endif // DEBUG_TEST_TRACE
+#endif // NDEBUG
+
+#ifdef DEBUG_TEST_TRACE_MACRO
#define FUNCTION_TEST_BEGIN() \
if (stackTraceTest()) \
{ \
@@ -341,6 +349,6 @@ test macros are compiled out (except for return statements).
#define FUNCTION_TEST_RETURN(result) \
return result
#define FUNCTION_TEST_RETURN_VOID()
-#endif
+#endif // DEBUG_TEST_TRACE_MACRO
#endif
|
Use MacOS 10.15 for x86_64 build.
This version is better supported by GitHub. | @@ -14,7 +14,7 @@ jobs:
include:
- os: 'macos-11.0'
scons-options: 'ARCH=universal2'
- - os: 'macos-11.0'
+ - os: 'macos-10.15'
scons-options: 'ARCH=x86_64'
steps:
|
mimxrt/machine_rtc: Maintain microsecond offset.
The supplied value for microseconds in datetime() will be treated as a
starting value for the reported microseconds. Due to internal processing
in setting the time, there is an offset about 1 ms. | @@ -37,6 +37,7 @@ typedef struct _machine_rtc_obj_t {
// Singleton RTC object.
STATIC const machine_rtc_obj_t machine_rtc_obj = {{&machine_rtc_type}};
+uint32_t us_offset = 0;
// Calculate the weekday from the date.
// The result is zero based with 0 = Monday.
@@ -70,7 +71,7 @@ STATIC mp_obj_t machine_rtc_datetime_helper(size_t n_args, const mp_obj_t *args)
mp_obj_new_int(srtc_date.hour),
mp_obj_new_int(srtc_date.minute),
mp_obj_new_int(srtc_date.second),
- mp_obj_new_int(ticks_us64() % 1000000),
+ mp_obj_new_int((ticks_us64() + us_offset) % 1000000),
};
return mp_obj_new_tuple(8, tuple);
} else {
@@ -91,6 +92,7 @@ STATIC mp_obj_t machine_rtc_datetime_helper(size_t n_args, const mp_obj_t *args)
if (SNVS_LP_SRTC_SetDatetime(SNVS, &srtc_date) != kStatus_Success) {
mp_raise_ValueError(NULL);
}
+ us_offset = (1000000 + mp_obj_get_int(items[7]) - ticks_us64() % 1000000) % 1000000;
return mp_const_none;
}
|
math: add special case for detecting libc++'s (from LLVM) broken math.h
Fixes | #if defined(HUGE_VAL)
/* Looks like <math.h> or <cmath> has already been included. */
- #if defined(isnan)
+
+ /* The math.h from libc++ (yes, the C header from the C++ standard
+ * library) will define an isnan function, but not an isnan macro
+ * like the C standard requires. So, we detect the header guards
+ * macro libc++ uses. */
+ #if defined(isnan) || (defined(_LIBCPP_MATH_H) && !defined(_LIBCPP_CMATH))
#define SIMDE_MATH_HAVE_MATH_H
#elif defined(__cplusplus)
#define SIMDE_MATH_HAVE_CMATH
|
ip: check if interface has link-local address
Type: fix | @@ -102,7 +102,12 @@ fib_sas6_get (u32 sw_if_index,
*/
if (ip6_address_is_link_local_unicast (dst))
{
- ip6_address_copy (src, ip6_get_link_local_address (sw_if_index));
+ const ip6_address_t *ll = ip6_get_link_local_address (sw_if_index);
+ if (NULL == ll)
+ {
+ return (false);
+ }
+ ip6_address_copy (src, ll);
return (true);
}
|
filter_parser: fix timestamp handling on failure scenario | @@ -262,11 +262,17 @@ static int cb_parser_filter(void *data, size_t bytes,
(void **) &out_buf, &out_size,
&parsed_time);
if (parse_ret >= 0) {
- if (flb_time_to_double(&parsed_time) == 0) {
- flb_time_get(&parsed_time);
- }
-
+ /*
+ * If the parser succeeded we need to check the
+ * status of the parsed time. If the time was
+ * parsed successfully 'parsed_time' will be
+ * different than zero, if so, override the time
+ * holder with the new value, otherwise keep the
+ * original.
+ */
+ if (flb_time_to_double(&parsed_time) != 0.0) {
flb_time_copy(&tm, &parsed_time);
+ }
if (ctx->reserve_data) {
if (!ctx->preserve_key) {
|
Add comments for some forbidden aliasing in bignum | @@ -758,11 +758,11 @@ int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A,
*
* \param Q The destination MPI for the quotient.
* This may be \c NULL if the value of the
- * quotient is not needed.
+ * quotient is not needed. This must not alias A or B.
* \param R The destination MPI for the remainder value.
* This may be \c NULL if the value of the
- * remainder is not needed.
- * \param A The dividend. This must point to an initialized MPi.
+ * remainder is not needed. This must not alias A or B.
+ * \param A The dividend. This must point to an initialized MPI.
* \param B The divisor. This must point to an initialized MPI.
*
* \return \c 0 if successful.
@@ -779,10 +779,10 @@ int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A,
*
* \param Q The destination MPI for the quotient.
* This may be \c NULL if the value of the
- * quotient is not needed.
+ * quotient is not needed. This must not alias A.
* \param R The destination MPI for the remainder value.
* This may be \c NULL if the value of the
- * remainder is not needed.
+ * remainder is not needed. This must not alias A.
* \param A The dividend. This must point to an initialized MPi.
* \param b The divisor.
*
@@ -837,6 +837,7 @@ int mbedtls_mpi_mod_int( mbedtls_mpi_uint *r, const mbedtls_mpi *A,
* \brief Perform a sliding-window exponentiation: X = A^E mod N
*
* \param X The destination MPI. This must point to an initialized MPI.
+ * This must not alias E or N.
* \param A The base of the exponentiation.
* This must point to an initialized MPI.
* \param E The exponent MPI. This must point to an initialized MPI.
|
Fixed logic so that the _expr_<varname> expression is updated instead of added when pre-existing. | @@ -1184,6 +1184,10 @@ CreateViewInfoFromViewAttributes(avtViewInfo &vi, const View3DAttributes &view)
// Kathleen Biagas, Thu Mar 20 14:58:49 PDT 2014
// Surround var with '<>' when used in expression. (Log and Skew scaling).
//
+// Kathleen Biagas, Fri Jun 23 08:29:29 PDT 2017
+// Modify how expressions are setup, to prevent multiple expressions
+// with the same name being added to the ExpressionList.
+//
// ****************************************************************************
avtContract_p
@@ -1261,28 +1265,20 @@ avtVolumeFilter::ModifyContract(avtContract_p contract)
if (setupExpr)
{
ExpressionList *elist = ParsingExprList::Instance()->GetList();
- Expression *e = NULL;
- for (int i = 0 ; i < elist->GetNumExpressions() ; i++)
- {
- if (elist->GetExpressions(i).GetName() == exprName)
+ int eidx = elist->IndexOf(exprName.c_str());
+ if (eidx == -1)
{
- e = &(elist->GetExpressions(i));
- break;
- }
+ Expression e;
+ e.SetName(exprName.c_str());
+ e.SetDefinition(exprDef);
+ e.SetType(Expression::ScalarMeshVar);
+ elist->AddExpressions(e);
}
- bool shouldDelete = false;
- if (e == NULL)
+ else
{
- e = new Expression();
- shouldDelete = true;
+ Expression &e = elist->GetExpressions(eidx);
+ e.SetDefinition(exprDef);
}
-
- e->SetName(exprName.c_str());
- e->SetDefinition(exprDef);
- e->SetType(Expression::ScalarMeshVar);
- elist->AddExpressions(*e);
- if (shouldDelete)
- delete e;
}
newcontract->NoStreaming();
|
Change 1 ip
145.239.232.52:13655 >> 14.152.81.132.13655 | 5.189.132.84:16775
+14.152.81.132.13655
24.234.35.55:31333
45.76.37.252:13654
47.100.202.206:56600
139.99.124.162:16775
142.44.143.234:888
144.202.120.160:13655
-145.239.232.52:13655
148.251.139.197:16800
148.251.189.108:13655
172.94.63.18:9797
195.201.168.17:16775
195.201.168.17:17775
195.201.169.202:16775
+
|
Make gradlew executable | @@ -249,6 +249,9 @@ class AndroidPlatform extends Platform
{
var assemble = (project.certificate != null) ? "assembleRelease" : "assembleDebug";
+ if(PlatformHelper.hostPlatform==Platform.MAC)
+ ProcessHelper.runCommand(outputDir, 'chmod', ['+x', './gradlew']);
+
var exe = PlatformHelper.hostPlatform==Platform.WINDOWS ? "./gradlew.bat" : "./gradlew";
ProcessHelper.runCommand(outputDir, exe, [ assemble ]);
}
|
fix(lv_flex): simplify mem alloc approach | @@ -349,19 +349,15 @@ static int32_t find_track_end(lv_obj_t * cont, flex_t * f, int32_t item_start_id
t->grow_item_cnt++;
t->track_fix_main_size += item_gap;
if(t->grow_dsc_calc) {
- grow_dsc_t * new_dsc = lv_malloc(sizeof(grow_dsc_t) * (t->grow_item_cnt));
+ grow_dsc_t * new_dsc = lv_realloc(t->grow_dsc, sizeof(grow_dsc_t) * (t->grow_item_cnt));
LV_ASSERT_MALLOC(new_dsc);
if(new_dsc == NULL) return item_id;
- if(t->grow_dsc) {
- lv_memcpy(new_dsc, t->grow_dsc, sizeof(grow_dsc_t) * (t->grow_item_cnt - 1));
- lv_free(t->grow_dsc);
- }
new_dsc[t->grow_item_cnt - 1].item = item;
- new_dsc[t->grow_item_cnt - 1].min_size = f->row ? lv_obj_get_style_min_width(item,
- LV_PART_MAIN) : lv_obj_get_style_min_height(item, LV_PART_MAIN);
- new_dsc[t->grow_item_cnt - 1].max_size = f->row ? lv_obj_get_style_max_width(item,
- LV_PART_MAIN) : lv_obj_get_style_max_height(item, LV_PART_MAIN);
+ new_dsc[t->grow_item_cnt - 1].min_size = f->row ? lv_obj_get_style_min_width(item, LV_PART_MAIN)
+ : lv_obj_get_style_min_height(item, LV_PART_MAIN);
+ new_dsc[t->grow_item_cnt - 1].max_size = f->row ? lv_obj_get_style_max_width(item, LV_PART_MAIN)
+ : lv_obj_get_style_max_height(item, LV_PART_MAIN);
new_dsc[t->grow_item_cnt - 1].grow_value = grow_value;
new_dsc[t->grow_item_cnt - 1].clamped = 0;
t->grow_dsc = new_dsc;
|
[#1116]modify error_ethereum_node_url err | @@ -709,7 +709,7 @@ START_TEST(test_002InitWallet_0008SetNodeUrlFailureNodeUrlOutOfLimit)
/* 1. execute unit test */
wallet_ptr->network_info.node_url_ptr = NULL;
- rtnVal = BoatEthWalletSetNodeUrl(wallet_ptr, error_ethereum_node_url);
+ rtnVal = BoatEthWalletSetNodeUrl(wallet_ptr, error_platon_node_url);
/* 2. verify test result */
/* 2-1. verify the return value */
ck_assert_int_eq(rtnVal, BOAT_ERROR_COMMON_INVALID_ARGUMENT);
|
Little fix for kdf135_tls macro | @@ -221,7 +221,7 @@ ACVP_RESULT acvp_kdf135_tls_kat_handler (ACVP_CTX *ctx, JSON_Object *obj) {
}
if (strnlen(pm_secret, pm_len) != pm_len/8) {
ACVP_LOG_ERR("pmLen(%d) or pmSecret length(%d) incorrect",
- pm_len/8, strnlen(pm_secret, ACVP_KDF135_TLS_PMSECRET_HEX_MAX));
+ pm_len/8, strnlen(pm_secret, ACVP_KDF135_TLS_PMSECRET_STR_MAX));
return ACVP_INVALID_ARG;
}
|
common BUGFIX comparison typo | @@ -2342,7 +2342,7 @@ sr_chmodown(const char *path, const char *owner, const char *group, mode_t perm)
/* apply permission changes, if any */
if (((int)perm != -1) && (chmod(path, perm) == -1)) {
- if ((errno == EACCES) || (errno = EPERM)) {
+ if ((errno == EACCES) || (errno == EPERM)) {
err_code = SR_ERR_UNAUTHORIZED;
} else {
err_code = SR_ERR_INTERNAL;
@@ -3834,7 +3834,7 @@ sr_path_set_group(const char *path)
/* set correct GID */
if (chown(path, -1, sr_gid) == -1) {
- if ((errno == EACCES) || (errno = EPERM)) {
+ if ((errno == EACCES) || (errno == EPERM)) {
err_code = SR_ERR_UNAUTHORIZED;
} else {
err_code = SR_ERR_INTERNAL;
|
permission-group-hook: support /lib/dbug interface | :: mirror the ships in specified groups to specified permission paths
::
/- *group-store, *permission-group-hook
-/+ *permission-json, default-agent, verb
+/+ *permission-json, default-agent, verb, dbug
::
|%
+$ state
=* state -
::
%+ verb |
+%- agent:dbug
^- agent:gall
=<
|_ =bowl:gall
|
prom: fix coverity 277312, 277317
If one attempts to add a pattern with zero length, first time
it will succeed, and the second time it will cause an invalid memcmp call.
Solution: do not allow to add zero-length patterns.
Type: fix | @@ -305,6 +305,8 @@ prom_stat_patterns_add (u8 **patterns)
{
found = 0;
len = vec_len (*pattern);
+ if (len == 0)
+ continue;
vec_foreach (existing, pm->stats_patterns)
{
if (vec_len (*existing) != len)
|
neon/cvt: cast result of float/double comparison
Fixes | @@ -184,7 +184,7 @@ simde_vcvt_u32_f32(simde_float32x2_t a) {
#if defined(SIMDE_CONVERT_VECTOR_) && defined(SIMDE_VECTOR_SCALAR)
SIMDE_CONVERT_VECTOR_(r_.values, a_.values);
- r_.values &= (a_.values >= SIMDE_FLOAT32_C(0.0));
+ r_.values &= HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), (a_.values >= SIMDE_FLOAT32_C(0.0)));
#else
SIMDE_VECTORIZE
for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
@@ -237,7 +237,7 @@ simde_vcvt_u64_f64(simde_float64x1_t a) {
#if defined(SIMDE_CONVERT_VECTOR_) && defined(SIMDE_VECTOR_SCALAR)
SIMDE_CONVERT_VECTOR_(r_.values, a_.values);
- r_.values &= (a_.values >= SIMDE_FLOAT64_C(0.0));
+ r_.values &= HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), (a_.values >= SIMDE_FLOAT64_C(0.0)));
#else
SIMDE_VECTORIZE
for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
@@ -290,7 +290,7 @@ simde_vcvtq_u32_f32(simde_float32x4_t a) {
#if defined(SIMDE_CONVERT_VECTOR_) && defined(SIMDE_VECTOR_SCALAR)
SIMDE_CONVERT_VECTOR_(r_.values, a_.values);
- r_.values &= (a_.values >= SIMDE_FLOAT32_C(0.0));
+ r_.values &= HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), (a_.values >= SIMDE_FLOAT32_C(0.0)));
#else
SIMDE_VECTORIZE
for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
@@ -349,7 +349,7 @@ simde_vcvtq_u64_f64(simde_float64x2_t a) {
#if defined(SIMDE_CONVERT_VECTOR_) && defined(SIMDE_VECTOR_SCALAR)
SIMDE_CONVERT_VECTOR_(r_.values, a_.values);
- r_.values &= (a_.values >= SIMDE_FLOAT64_C(0.0));
+ r_.values &= HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), (a_.values >= SIMDE_FLOAT64_C(0.0)));
#else
SIMDE_VECTORIZE
for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
|
esp32/machine_i2c: Allow boards to configure I2C pins using new macros.
Following how SPI is configured (and how stm32 does it). | #include "driver/i2c.h"
-#define I2C_0_DEFAULT_SCL (GPIO_NUM_18)
-#define I2C_0_DEFAULT_SDA (GPIO_NUM_19)
+#ifndef MICROPY_HW_I2C0_SCL
+#define MICROPY_HW_I2C0_SCL (GPIO_NUM_18)
+#define MICROPY_HW_I2C0_SDA (GPIO_NUM_19)
+#endif
+
+#ifndef MICROPY_HW_I2C1_SCL
#if CONFIG_IDF_TARGET_ESP32
-#define I2C_1_DEFAULT_SCL (GPIO_NUM_25)
-#define I2C_1_DEFAULT_SDA (GPIO_NUM_26)
+#define MICROPY_HW_I2C1_SCL (GPIO_NUM_25)
+#define MICROPY_HW_I2C1_SDA (GPIO_NUM_26)
#else
-#define I2C_1_DEFAULT_SCL (GPIO_NUM_9)
-#define I2C_1_DEFAULT_SDA (GPIO_NUM_8)
+#define MICROPY_HW_I2C1_SCL (GPIO_NUM_9)
+#define MICROPY_HW_I2C1_SDA (GPIO_NUM_8)
+#endif
#endif
#define I2C_DEFAULT_TIMEOUT_US (10000) // 10ms
@@ -147,11 +152,11 @@ mp_obj_t machine_hw_i2c_make_new(const mp_obj_type_t *type, size_t n_args, size_
self->base.type = &machine_hw_i2c_type;
self->port = i2c_id;
if (self->port == I2C_NUM_0) {
- self->scl = I2C_0_DEFAULT_SCL;
- self->sda = I2C_0_DEFAULT_SDA;
+ self->scl = MICROPY_HW_I2C0_SCL;
+ self->sda = MICROPY_HW_I2C0_SDA;
} else {
- self->scl = I2C_1_DEFAULT_SCL;
- self->sda = I2C_1_DEFAULT_SDA;
+ self->scl = MICROPY_HW_I2C1_SCL;
+ self->sda = MICROPY_HW_I2C1_SDA;
}
first_init = true;
}
|
contact-push-hook: kick on set-private, share on set-public | |= =vase
^- [(list card) agent]
=/ =update:store !<(update:store vase)
- ?. ?=(%disallow -.update) [~ this]
+ ?+ -.update [~ this]
+ %disallow
:_ this
[%give %kick ~[resource+(en-path:res [our.bowl %''])] ~]~
+ ::
+ %set-public
+ :_ this
+ ?. public.update
+ [%give %kick ~[resource+(en-path:res [our.bowl %''])] ~]~
+ %+ murn ~(tap in scry-groups:grp)
+ |= rid=res
+ ?: =(our.bowl entity.rid) ~
+ ?. (is-managed:grp rid) ~
+ `(poke-self:pass:io contact-share+!>([%share entity.rid]))
+ ==
--
|
Sync nsd-control-setup with unbound-control-setup
Make nsd-control-setup add x509v3 SAN extensions to generated
certificates by essentially syncing this script with unbound's
unbound-control-setup, which already includes these extensions in
generated certificates. | @@ -43,7 +43,7 @@ SERVERNAME=nsd
CLIENTNAME=nsd-control
# validity period for certificates
-DAYS=3650
+DAYS=7200
# size of keys in bits
BITS=3072
@@ -86,9 +86,7 @@ fatal() {
usage() {
cat <<EOF
usage: $0 OPTIONS
-
OPTIONS
-
-d <dir> used directory to store keys and certificates (default: $DESTDIR)
-h show help notice
-r recreate certificates
@@ -99,7 +97,7 @@ OPTIND=1
while getopts 'd:hr' arg; do
case "$arg" in
d) DESTDIR="$OPTARG" ;;
- h) usage; exit 0 ;;
+ h) usage; exit 1 ;;
r) RECREATE=1 ;;
?) fatal "'$arg' unknown option" ;;
esac
@@ -122,13 +120,19 @@ if [ ! -f "$SVR_BASE.key" ]; then
fi
cat >server.cnf <<EOF
+[req]
default_bits=$BITS
default_md=$HASH
prompt=no
distinguished_name=req_distinguished_name
-
+x509_extensions=v3_ca
[req_distinguished_name]
commonName=$SERVERNAME
+[v3_ca]
+subjectKeyIdentifier=hash
+authorityKeyIdentifier=keyid:always,issuer:always
+basicConstraints=critical,CA:TRUE,pathlen:0
+subjectAltName=DNS:$SERVERNAME
EOF
[ -f server.cnf ] || fatal "cannot create openssl configuration"
@@ -159,9 +163,12 @@ default_bits=$BITS
default_md=$HASH
prompt=no
distinguished_name=req_distinguished_name
-
+req_extensions=v3_req
[req_distinguished_name]
commonName=$CLIENTNAME
+[v3_req]
+basicConstraints=critical,CA:FALSE
+subjectAltName=DNS:$CLIENTNAME
EOF
[ -f client.cnf ] || fatal "cannot create openssl configuration"
@@ -183,6 +190,8 @@ if [ ! -f "$CTL_BASE.pem" -o $RECREATE -eq 1 ]; then
-CAkey "$SVR_BASE.key" \
-CAcreateserial \
-$HASH \
+ -extfile client.cnf \
+ -extensions v3_req \
-out "$CTL_BASE.pem"
[ ! -f "CTL_BASE.pem" ] || fatal "cannot create signed client certificate"
@@ -199,7 +208,6 @@ cleanup
echo "Setup success. Certificates created. Enable in nsd.conf file to use"
-
# create trusted usage pem
# openssl x509 -in $CTL_BASE.pem -addtrust clientAuth -out $CTL_BASE"_trust.pem"
|
BugID:17988925: modify kernel/mm component of mk/config.in/readme | @@ -340,7 +340,7 @@ endif
# MBINS build support
ifeq ($(MBINS),app)
COMPONENTS += mbins.umbins
-COMPONENTS += rhino.mm
+COMPONENTS += mm
COMPONENTS += uspace
AOS_SDK_DEFINES += BUILD_APP
AOS_SDK_LDFLAGS += -Wl,-wrap,vprintf -Wl,-wrap,fflush -nostartfiles
|
added deauthentication and disassociation counter | @@ -126,6 +126,8 @@ static long int beaconerrorcount;
static long int proberesponsecount;
static long int proberequestcount;
static long int proberequestdirectedcount;
+static long int deauthenticationcount;
+static long int disassociationcount;
static long int authenticationcount;
static long int authopensystemcount;
static long int authseacount;
@@ -351,6 +353,8 @@ beaconerrorcount = 0;
proberesponsecount = 0;
proberequestcount = 0;
proberequestdirectedcount = 0;
+deauthenticationcount = 0;
+disassociationcount = 0;
authenticationcount = 0;
authopensystemcount = 0;
authseacount = 0;
@@ -458,6 +462,8 @@ if(beaconcount > 0) printf("BEACON (total)...........................: %ld\n",
if(proberequestcount > 0) printf("PROBEREQUEST.............................: %ld\n", proberequestcount);
if(proberequestdirectedcount > 0) printf("PROBEREQUEST (directed)..................: %ld\n", proberequestdirectedcount);
if(proberesponsecount > 0) printf("PROBERESONSE.............................: %ld\n", proberesponsecount);
+if(deauthenticationcount > 0) printf("DEAUTHENTICATION (total).................: %ld\n", deauthenticationcount);
+if(disassociationcount > 0) printf("DISASSOCIATION (total)...................: %ld\n", disassociationcount);
if(authenticationcount > 0) printf("AUTHENTICATION (total)...................: %ld\n", authenticationcount);
if(authopensystemcount > 0) printf("AUTHENTICATION (OPEN SYSTEM).............: %ld\n", authopensystemcount);
if(authseacount > 0) printf("AUTHENTICATION (SAE).....................: %ld\n", authseacount);
@@ -1061,6 +1067,7 @@ if((keyver == 1) || (keyver == 2))
HMAC(EVP_sha1(), ptk, 16, eapoldata, eapollen, miczero, NULL);
if(memcmp(&miczero, wpak->keymic, 16) == 0) return true;
}
+ else return false;
}
else if(keyver == 3)
{
@@ -1436,7 +1443,6 @@ static void addhandshake(uint64_t eaptimegap, uint64_t rcgap, messagelist_t *msg
static handshakelist_t *handshakelistnew;
eapolmpcount++;
-
if(msgap->timestamp == msgclient->timestamp) eapolmsgtimestamperrorcount++;
if(testeapolzeropmk(keyver, msgclient->client, msgap->ap, msgap->nonce, msgclient->eapauthlen, msgclient->eapol) == false)
{
@@ -2933,6 +2939,8 @@ if(macfrx->type == IEEE80211_FTYPE_MGMT)
if(memcmp(&mac_broadcast, macfrx->addr1, 6) == 0) process80211probe_req(packetimestamp, macfrx->addr2, payloadlen, payloadptr);
else process80211probe_req_direct(packetimestamp, macfrx->addr2, macfrx->addr1, payloadlen, payloadptr);
}
+ else if(macfrx->subtype == IEEE80211_STYPE_DEAUTH) deauthenticationcount++;
+ else if(macfrx->subtype == IEEE80211_STYPE_DISASSOC) disassociationcount++;
}
else if(macfrx->type == IEEE80211_FTYPE_DATA)
{
|
Fix incorrect chipid params comparison
The current chipid params comparison code is based on a simple
memcmp. This doesn't work since the structure contains a string
pointer. Replace it with a simple field-by-field comparison. | @@ -916,6 +916,22 @@ void dump_a_chip (FILE *fp, struct stlink_chipid_params *dev) {
fprintf(fp, "flags %d\n\n", dev->flags);
}
+static int chipid_params_eq(struct stlink_chipid_params *p1, struct stlink_chipid_params *p2)
+{
+ return p1->chip_id == p2->chip_id &&
+ p1->description && p2->description &&
+ strcmp(p1->description, p2->description) == 0 &&
+ p1->flash_type == p2->flash_type &&
+ p1->flash_size_reg == p2->flash_size_reg &&
+ p1->flash_pagesize == p2->flash_pagesize &&
+ p1->sram_size == p2->sram_size &&
+ p1->bootrom_base == p2->bootrom_base &&
+ p1->bootrom_size == p2->bootrom_size &&
+ p1->option_base == p2->option_base &&
+ p1->option_size == p2->option_size &&
+ p1->flags == p2->flags;
+}
+
struct stlink_chipid_params *stlink_chipid_get_params(uint32_t chipid) {
struct stlink_chipid_params *params = NULL;
struct stlink_chipid_params *p2;
@@ -931,7 +947,7 @@ struct stlink_chipid_params *stlink_chipid_get_params(uint32_t chipid) {
#if 1
if (params == NULL) {
params = p2;
- } else if (memcmp (p2, params, sizeof(struct stlink_chipid_params) - sizeof(struct stlink_chipid_params *)) != 0) {
+ } else if (!chipid_params_eq(params, p2)) {
// fprintf (stderr, "Error, chipid params not identical\n");
// return NULL;
fprintf(stderr, "---------- old ------------\n");
|
[dbg] add dlog macro | @@ -46,6 +46,13 @@ extern "C" {
#define DBG_COLOR
#endif
+/* for dlog */
+#ifdef PKG_USING_DLOG
+#include <dlog.h>
+#else
+#define DLOG(...)
+#endif
+
#if defined(RT_USING_ULOG)
/* using ulog compatible with rtdbg */
#include <ulog.h>
|
Add ksceNetConnect | @@ -545,6 +545,7 @@ typedef struct SceNetIcmpHeader {
int ksceNetSocket(const char *name, int domain, int type, int protocol);
int ksceNetAccept(int s, SceNetSockaddr *addr, unsigned int *addrlen);
int ksceNetBind(int s, const SceNetSockaddr *addr, unsigned int addrlen);
+int ksceNetConnect(int s, const SceNetSockaddr *name, unsigned int namelen);
int ksceNetListen(int s, int backlog);
int ksceNetRecvfrom(int s, void *buf, unsigned int len, int flags, SceNetSockaddr *from, unsigned int *fromlen);
int ksceNetSendto(int s, const void *msg, unsigned int len, int flags, const SceNetSockaddr *to, unsigned int tolen);
|
mINI: Support equal signs in keys and values | @@ -17,6 +17,10 @@ The minimal INI plugin (`mini`) is a very simple storage plugin based on the [IN
## Examples
+### Basic Usage
+
+The following example shows basic usage of the `mini` plugin.
+
```sh
# Mount mini plugin to cascading namespace `/examples/mini`
kdb mount mini.ini /examples/mini mini
@@ -54,6 +58,33 @@ kdb rm -r /examples/mini
kdb umount /examples/mini
```
+### Escaping
+
+As with most configuration file formats, some characters carry special meaning. In the case of the `mini` plugin that character is the `=` sign, which separates keys from values. In most cases you do not need to care about the special meaning of the `=` sign though, since the plugin handles escaping and unescaping of `=` for you. The following example shows this behaviour.
+
+```sh
+kdb mount mini.ini /examples/mini mini
+
+# Store a value and a key containing equal signs (`=`)
+kdb set /examples/mini/=key value=
+#> Using name user/examples/mini/=key
+#> Create a new key user/examples/mini/=key with string value=
+
+# The actual file contains escaped equal characters (`\=`)
+kdb export /examples/mini mini
+#> \=key=value\=
+
+# However, if you retrieve values or keys you do not have to care about escaped values
+kdb ls /examples/mini
+#> user/examples/mini/=key
+kdb get /examples/mini/=key
+#> value=
+
+# Undo modifications to the key database
+kdb rm -r /examples/mini
+kdb umount /examples/mini
+```
+
## Limitations
This plugin only supports simple key-value based INI files without sections. If you want a more feature complete plugin, then please take a look at the [ini plugin](../ini/).
|
Acknowledgements and following TRD. | @@ -19,11 +19,13 @@ const int COM_CHAN = 3;
const int COM_POWER = 4;
const int COM_TX = 5;
const int COM_READY = 6;
+const int COM_COMMIT = 7;
const int EVT_TX = 0;
const int EVT_RX = 1;
+const int EVT_CFG = 2;
-int radio_init(void) {
+int radio_init() {
while (!radio_ready()) {}
return 0;
} // Do nothing for now
@@ -42,16 +44,18 @@ static void cb_rx( __attribute__ ((unused)) int unused0,
*((bool*)ud) = true;
}
+static void cb_config( __attribute__ ((unused)) int unused0,
+ __attribute__ ((unused)) int unused1,
+ __attribute__ ((unused)) int unused2,
+ void* ud) {
+ *((bool*)ud) = true;
+}
+
// packet contains the payload of the 802.15.4 packet; this will
// be copied into a packet buffer with header space within the kernel.
int radio_send(unsigned short addr, const char* packet, unsigned char len) {
bool cond = false;
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wcast-qual"
- // in lieu of RO allow
- void* buf = (void*) packet;
-#pragma GCC diagnostic pop
- int err = allow(SYS_RADIO, BUF_TX, buf, len);
+ int err = allow(SYS_RADIO, BUF_TX, (void*)packet, len);
if (err < 0) {
return err;
}
@@ -83,6 +87,25 @@ int radio_set_addr(unsigned short addr) {
int radio_set_pan(unsigned short pan) {
return command(SYS_RADIO, COM_PAN, (unsigned int)pan);
}
+
+int radio_set_power(char power) {
+ return command(SYS_RADIO, COM_POWER, (unsigned int) (power + 128));
+}
+
+int radio_commit() {
+ bool cond = false;
+ int err = subscribe(SYS_RADIO, EVT_CFG, cb_config, &cond);
+ if (err != SUCCESS) {
+ return err;
+ }
+ err = command(SYS_RADIO, COM_COMMIT, 0);
+ if (err != SUCCESS) {
+ return err;
+ }
+ yield_for(&cond);
+ return SUCCESS;
+}
+
// Valid channels are 10-26
int radio_set_channel(unsigned char channel) {
return command(SYS_RADIO, COM_CHAN, (unsigned int)channel);
@@ -90,12 +113,7 @@ int radio_set_channel(unsigned char channel) {
int radio_receive(const char* packet, unsigned char len) {
bool cond = false;
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wcast-qual"
- // in lieu of RO allow
- void* buf = (void*) packet;
-#pragma GCC diagnostic pop
- int err = allow(SYS_RADIO, BUF_RX, buf, len);
+ int err = allow(SYS_RADIO, BUF_RX, (void*)packet, len);
if (err < 0) {
return err;
}
@@ -107,6 +125,6 @@ int radio_receive(const char* packet, unsigned char len) {
return (int)packet[1];
}
-int radio_ready(void) {
+int radio_ready() {
return command(SYS_RADIO, COM_READY, 0) == SUCCESS;
}
|
stm32/usb: Use correct type for USB HID object. | @@ -588,7 +588,7 @@ STATIC mp_obj_t pyb_usb_hid_recv(size_t n_args, const mp_obj_t *args, mp_map_t *
};
// parse args
- pyb_usb_vcp_obj_t *self = MP_OBJ_TO_PTR(args[0]);
+ pyb_usb_hid_obj_t *self = MP_OBJ_TO_PTR(args[0]);
mp_arg_val_t vals[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args - 1, args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, vals);
@@ -610,7 +610,7 @@ STATIC mp_obj_t pyb_usb_hid_recv(size_t n_args, const mp_obj_t *args, mp_map_t *
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(pyb_usb_hid_recv_obj, 1, pyb_usb_hid_recv);
STATIC mp_obj_t pyb_usb_hid_send(mp_obj_t self_in, mp_obj_t report_in) {
- pyb_usb_vcp_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ pyb_usb_hid_obj_t *self = MP_OBJ_TO_PTR(self_in);
mp_buffer_info_t bufinfo;
byte temp_buf[8];
// get the buffer to send from
@@ -652,7 +652,7 @@ STATIC const mp_rom_map_elem_t pyb_usb_hid_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(pyb_usb_hid_locals_dict, pyb_usb_hid_locals_dict_table);
STATIC mp_uint_t pyb_usb_hid_ioctl(mp_obj_t self_in, mp_uint_t request, mp_uint_t arg, int *errcode) {
- pyb_usb_vcp_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ pyb_usb_hid_obj_t *self = MP_OBJ_TO_PTR(self_in);
mp_uint_t ret;
if (request == MP_STREAM_POLL) {
mp_uint_t flags = arg;
|
add $ to end of regex for better compatability | @@ -48,7 +48,7 @@ static const std::regex UNIQUE_INDICATOR("^[^#]+#[^#]+$");
static const std::regex CHANNEL_INDICATOR("^[^~]+~[^~]+$");
static const std::regex OWNER_INDICATOR("^[^!]+!$");
-static const std::regex RAVEN_NAMES("^RVN|^RAVEN|^RAVENCOIN|^RAVENC0IN|^RAVENCO1N|^RAVENC01N");
+static const std::regex RAVEN_NAMES("^RVN$|^RAVEN$|^RAVENCOIN$|^RAVENC0IN$|^RAVENCO1N$|^RAVENC01N$");
bool IsRootNameValid(const std::string& name)
{
|
Prettify mutex code a bit.
The if statements at the start were a touch odd. | @@ -60,17 +60,19 @@ const mtxtrylock = {mtx
const mtxunlock = {mtx
/*
+ Either the lock is contended or it's uncontended. Any other
+ state is a bug.
+
Uncontended case: If the mutex state is not contended, and we still
are uncontended by the xchg() call, then it's safe to simply return;
nobody was waiting for us.
*/
- if mtx._state == Contended
- mtx._state = Unlocked
- elif xchg(&mtx._state, Unlocked) == Locked
+ if xcas(&mtx._state, Locked, Unlocked) == Locked
-> void
;;
- /* wake one thread */
+ /* Contended case: set the state to unlocked and wake one thread */
+ mtx._state = Unlocked
ftxwake(&mtx._state)
}
|
MCF updated to 2.12 | official repo : http://archive.apache.org/dist/manifoldcf/apache-manifoldcf-${mcf.version}/apache-manifoldcf-${mcf.version}-bin.tar.gz
Datafari repo : http://repomcf.datafari.com/mcf/apache-manifoldcf-${mcf.version}-dev-bin-${mcf.commit.number}.tar.gz
-->
- <url>http://repomcf.datafari.com/mcf/apache-manifoldcf-${mcf.version}-dev-bin-${mcf.commit.number}.tar.gz</url>
- <sha512>ef479fa768411d010ed1336f8e220115e892ddd645f1d2cb1e123eaf3471c4de036329ad3375f126a47a550acb022c0667b527818bbd3a676c7aa9376a264ae1</sha512>
+ <url>https://www-eu.apache.org/dist/manifoldcf/apache-manifoldcf-${mcf.version}/apache-manifoldcf-${mcf.version}-bin.tar.gz</url>
+ <sha512>89C43BC110E1D03FD724323D5C9595687E565E5057002DFFA59E55E2EBAD10B211A65688F46CA27AFD0C8C21E6CABAF2799FA09BE984F3B80A9A481F0A3866AB</sha512>
<unpack>true</unpack>
</configuration>
</execution>
|
fix typo in x509 documentation | @@ -429,7 +429,7 @@ the CA certificate file.
Sets the CA serial number file to use.
When the B<-CA> option is used to sign a certificate it uses a serial
-number specified in a file. This file consist of one line containing
+number specified in a file. This file consists of one line containing
an even number of hex digits with the serial number to use. After each
use the serial number is incremented and written out to the file again.
|
yet more error messages | @@ -207,7 +207,7 @@ int picoquic_socket_set_ecn_options(SOCKET_TYPE sd, int af, int * recv_set, int
/* Request receiving TOS reports in recvmsg */
if (setsockopt(sd, IPPROTO_IP, IP_RECVTOS, &set, sizeof(set)) < 0) {
- DBG_PRINTF("setsockopt IPv6 IPRECVTOS (0x%x) fails, errno: %d\n", set, errno);
+ DBG_PRINTF("setsockopt IPv6 IP_RECVTOS (0x%x) fails, errno: %d\n", set, errno);
ret = -1;
*recv_set = 0;
}
@@ -224,8 +224,7 @@ int picoquic_socket_set_ecn_options(SOCKET_TYPE sd, int af, int * recv_set, int
{
unsigned int ecn = 2; /* ECN_ECT_0 */
/* Request setting ECN_1 in outgoing packets */
- ret = setsockopt(sd, IPPROTO_IP, IP_TOS, &ecn, sizeof(ecn));
- if (ret < 0) {
+ if (setsockopt(sd, IPPROTO_IP, IP_TOS, &ecn, sizeof(ecn)) < 0){
DBG_PRINTF("setsockopt IPv6 IP_TOS (0x%x) fails, errno: %d\n", ecn, errno);
ret = -1;
*send_set = 0;
@@ -242,13 +241,19 @@ int picoquic_socket_set_ecn_options(SOCKET_TYPE sd, int af, int * recv_set, int
}
else {
-
#if defined(IP_TOS)
{
unsigned int ecn = 2;
/* Request setting ECN_1 in outgoing packets */
- ret = setsockopt(sd, IPPROTO_IP, IP_TOS, &ecn, sizeof(ecn));
- *send_set = (ret == 0);
+ if (setsockopt(sd, IPPROTO_IP, IP_TOS, &ecn, sizeof(ecn)) < 0) {
+ DBG_PRINTF("setsockopt IPv4 IP_TOS (0x%x) fails, errno: %d\n", ecn, errno);
+ ret = -1;
+ *send_set = 0;
+ }
+ else {
+ *send_set = 1;
+ ret = 0;
+ }
}
#else
*send_set = 0;
@@ -259,7 +264,14 @@ int picoquic_socket_set_ecn_options(SOCKET_TYPE sd, int af, int * recv_set, int
unsigned char set = 1;
/* Request receiving TOS reports in recvmsg */
- ret = setsockopt(sd, IPPROTO_IP, IP_RECVTOS, &set, sizeof(set));
+ if (setsockopt(sd, IPPROTO_IP, IP_RECVTOS, &set, sizeof(set)) < 0) {
+ DBG_PRINTF("setsockopt IPv6 IP_RECVTOS (0x%x) fails, errno: %d\n", set, errno);
+ ret = -1;
+ *recv_set = 0;
+ }
+ else {
+ *recv_set = 1;
+ ret = 0;
}
#else
*recv_set = 0;
|
odissey: update INTERNALS documentation | Odissey heavily depends on two libraries, which were originally created during its
development: Machinarium and Shapito.
-**Machinarium**
+#### Machinarium
Machinarium extensively used for organization of multi-thread processing, cooperative multi-tasking
and networking IO. All Odissey threads are run in context of machinarium `machines` -
@@ -15,7 +15,7 @@ All synchronization is done using message passing and transparently handled by m
Repository: [github/machinarium](https://github.yandex-team.ru/pmwkaa/machinarium)
-**Shapito**
+#### Shapito
Shapito provides resizable buffers (streams) and methods for constructing, reading and validating
PostgreSQL protocol requests. By design, all PostgreSQL specific details should be provided by
@@ -45,48 +45,53 @@ Repository: [github/shapito](https://github.yandex-team.ru/pmwkaa/shapito).
| console |
'---------'
-**Instance**
+#### Instance
-Entry point.
+Application entry point.
-Handle application initialization and lifecycle. Read configuration file, prepare loggers.
+Handle initialization. Read configuration file, prepare loggers.
Run pooler and relay\_pool threads.
[sources/instance.h](sources/instance.h), [sources/instance.c](sources/instance.c)
-**Pooler**
+#### Pooler
Start router, periodic and console subsystems.
Create listen server one for each resolved address. Each listen server runs inside own coroutine.
-Server coroutine mostly waits on `machine_accept()`. On incoming connection, new client context
-is created and notification message is sent to next relay worker using `relaypool_feed()`.
-Client IO context is detached from poolers `epoll()` context.
+Server coroutine mostly waits on `machine_accept()`.
+
+On incoming connection, new client context is created and notification message is sent to next
+relay worker using `relaypool_feed()`. Client IO context is detached from poolers `epoll()` context.
[sources/pooler.h](sources/pooler.h), [sources/pooler.c](sources/pooler.c)
-**Router**
+#### Router
Handle client registration and routing requests. Does client-to-server attachment and detachment.
-Ensures connection limits and client pool queueing. Handle implicit `Cancel` client request.
-
-Router works in request-reply manner: client (from relay thread) sends a request message to
-router and waits for reply.
+Ensures connection limits and client pool queueing. Handle implicit `Cancel` client request, since access
+to server pool is required to match a client key.
-Router could be a potential hot spot (not an issue at the moment).
+Router works in request-reply manner: client (from relay thread) send a request message to
+router and wait for reply. Could be a potential hot spot (not an issue at the moment).
[sources/router.h](sources/router.h), [sources/router.c](sources/router.c)
-**Periodic**
+#### Periodic
-Do periodic service tasks, like ensuring idle server connections expiration and
+Do periodic service tasks, like ensuring idle server connection expiration and
database scheme obsoletion.
[sources/periodic.h](sources/periodic.h), [sources/periodic.c](sources/periodic.c)
-**Console and signal handling**
+#### Relay and Relay pool
+
+Relay machine (thread) waits on incoming connection notification queue. On new connection event,
+create new frontend coroutine and handle client (frontend) lifecycle. Each relay thread can host
+thousands of client coroutines.
-**Relay and Relay pool**
+Relay pool is responsible for maintaining a worker thread pool. Threads are machinarium machines,
+created using `machine_create()`.
[sources/relay.h](sources/relay.h), [sources/relay.c](sources/relay.c),
[sources/relay_pool.h](sources/relay_pool.h), [sources/relay_pool.c](sources/relay_pool.c)
|
crunch: Check CSV path mark at start of generator | :- %say
|= [[now=@da * bec=beak] [csv-path=path from=@da ~] [to=@da groups=(list path) content=(unit ?) ~]]
=/ our=@p p.bec
+:: check given path has `csv` mark
+::
+?> =(%csv (snag (dec (lent csv-path)) csv-path))
:: get all graph associations ship is a part of
::
=/ associations=associations:ms
|
posix poll: fix timeout overflow error | @@ -1832,13 +1832,13 @@ int posix_poll(struct pollfd *fds, nfds_t nfds, int timeout_ms)
if (!n) {
if (timeout_ms > 0)
- proc_threadSleep(timeout_ms * 1000);
+ proc_threadSleep(timeout_ms * 1000LL);
return 0;
}
if (timeout_ms >= 0) {
proc_gettime(&timeout, &unused);
- timeout += timeout_ms * 1000 + !timeout_ms;
+ timeout += timeout_ms * 1000LL + !timeout_ms;
} else
timeout = 0;
|
ci: deploy to preview as soon as build doc jobs are done | @@ -158,7 +158,6 @@ build_docs_pdf:
tags:
- deploy
- shiny
- dependencies: []
script:
- add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
- export GIT_VER=$(git describe --always ${PIPELINE_COMMIT_SHA} --)
@@ -174,10 +173,13 @@ deploy_docs_preview:
- <<: *if-label-docs
- <<: *if-dev-push
changes: *patterns-docs-preview
- dependencies:
- - build_docs_html_fast
- - build_docs_html_full
- - build_docs_pdf
+ needs:
+ - job: build_docs_html_fast
+ optional: true
+ - job: build_docs_html_full
+ optional: true
+ - job: build_docs_pdf
+ optional: true
variables:
TYPE: "preview"
# older branches use DOCS_DEPLOY_KEY, DOCS_SERVER, DOCS_SERVER_USER, DOCS_PATH for preview server so we keep these names for 'preview'
|
Put extra jtag commands at end of command line so previous args can be overridden | @@ -53,7 +53,7 @@ jlink_load () {
# downloading somewhere in the flash. So need to figure out how to tell it
# not to do that, or report failure if gdb fails to write this file
#
- echo "shell sh -c \"trap '' 2; $JLINK_GDB_SERVER $EXTRA_JTAG_CMD -device $JLINK_DEV -speed 4000 -if SWD -port 3333 -singlerun &\" " > $GDB_CMD_FILE
+ echo "shell sh -c \"trap '' 2; $JLINK_GDB_SERVER -device $JLINK_DEV -speed 1000 -if SWD -port 3333 -singlerun $EXTRA_JTAG_CMD &\" " > $GDB_CMD_FILE
echo "target remote localhost:3333" >> $GDB_CMD_FILE
echo "mon reset" >> $GDB_CMD_FILE
echo "restore $FILE_NAME binary $FLASH_OFFSET" >> $GDB_CMD_FILE
@@ -129,13 +129,13 @@ jlink_debug() {
# Launch jlink server in a separate command interpreter, to make
# sure it doesn't get killed by Ctrl-C signal from bash.
#
- $COMSPEC /C "start $COMSPEC /C $JLINK_GDB_SERVER $EXTRA_JTAG_CMD -device $JLINK_DEV -speed 4000 -if SWD -port 3333 -singlerun"
+ $COMSPEC /C "start $COMSPEC /C $JLINK_GDB_SERVER -device $JLINK_DEV -speed 4000 -if SWD -port 3333 -singlerun $EXTRA_JTAG_CMD"
else
#
# Block Ctrl-C from getting passed to jlink server.
#
set -m
- $JLINK_GDB_SERVER $EXTRA_JTAG_CMD -device $JLINK_DEV -speed 4000 -if SWD -port 3333 -singlerun > /dev/null &
+ $JLINK_GDB_SERVER -device $JLINK_DEV -speed 4000 -if SWD -port 3333 -singlerun $EXTRA_JTAG_CMD > /dev/null &
set +m
fi
@@ -155,7 +155,7 @@ jlink_debug() {
rm $GDB_CMD_FILE
fi
else
- $JLINK_GDB_SERVER $EXTRA_JTAG_CMD -device $JLINK_DEV -speed 4000 -if SWD -port 3333 -singlerun
+ $JLINK_GDB_SERVER -device $JLINK_DEV -speed 4000 -if SWD -port 3333 -singlerun $EXTRA_JTAG_CMD
fi
return 0
}
|
doc CHANGE changes updated | - sr_*_item flag SR_EDIT_NON_RECURSIVE not supported for sr_delete_item()
-- sr_commit() renamed to sr_apply_changes()
- sr_node_t -> struct lyd_node *
- sr_get_subtree(s) removed opts (no iterative retrieval)
- sr_unsubscribe first parameter removed
- deleting a leaf does not check the value/it can be empty! but otherwise only limited paths are accepted, no xpath
- sr_move_item() different relative item input
- error retrieval from session API slightly changed
-- threading - strict 1 connection in one process - main SHM file process-specific lock, otherwise main SHM remap (ftruncate) unsafe
- - then n+m sessions for n threads - do not share one session between several threads
+- threading - do not share one session between several threads
- session options removed, did not make sense anymore
- NO_ABORT_FOR_REFUSED_CFG subscription option removed, default behaviour
- SR_EV_NOTIF_T_REPLAY_STOP -> SR_EV_NOTIF_STOP
- replaced 4 functions sr_(un)lock_(module|datastore) with 2 sr_(un)lock
removed functions:
+- sr_commit() (renamed to sr_apply_changes())
- sr_module_install_subscribe (use notifications)
- sr_feature_enable_subscribe (use notifications)
- sr_subtree_change_subscribe (use sr_module_change_subscribe() with xpath)
@@ -39,7 +38,7 @@ added functions:
- sr_install_module
- sr_remove_module
- sr_update_module
-- sr_cancel_ipdate_module
+- sr_cancel_update_module
- sr_set_replay_support
- sr_set_module_access
- sr_get_module_access
|
fix ble compilation error | @@ -568,7 +568,6 @@ void controller_sleep_deinit(void)
if (s_pm_lock != NULL) {
esp_pm_lock_release(s_pm_lock);
}
- s_pm_lock_acquired = false;
}
if (!s_btdm_allow_light_sleep) {
|
zephyr/test/drivers/src/lis2dw12.c: Format with clang-format
BRANCH=none
TEST=none | @@ -425,8 +425,8 @@ ZTEST(lis2dw12, test_lis2dw12_read)
* output
*/
- expected_sample[i] = fake_sample[i] *
- (1 << (16 - LIS2DW12_RESOLUTION));
+ expected_sample[i] =
+ fake_sample[i] * (1 << (16 - LIS2DW12_RESOLUTION));
}
i2c_common_emul_set_read_fail_reg(i2c_emul,
|
remove creation of configuration | @@ -42,12 +42,7 @@ CLIENT_OBJECTS := $(OBJDIR)/$(CLIENT).o $(OBJDIR)/utils/cleaner.o
API_OBJECTS := $(OBJDIR)/api.o $(OBJDIR)/ipc/ipc.o $(OBJDIR)/ipc/communicator.o $(OBJDIR)/json.o $(OBJDIR)/utils/cleaner.o $(OBJDIR)/utils/stringUtils.o $(OBJDIR)/utils/colors.o $(OBJDIR)/utils/listUtils.o
rm = rm -f
-all: dependencies build man oidcdir
-
-oidcdir:
- @[ -d ~/.config ] && mkdir -p ~/.config/oidc-agent || mkdir -p ~/.oidc-agent
- @[ -d ~/.config ] && touch ~/.config/oidc-agent/$(PROVIDERCONFIG) || touch ~/.oidc-agent/$(PROVIDERCONFIG)
- @echo "Created oidc dir"
+all: dependencies build man
dependencies:
@[ -d $(LIBDIR)/jsmn ] || git clone https://github.com/zserge/jsmn.git $(LIBDIR)/jsmn
|
BUFR: Changing the subtype in the local section has effect on other keys | @@ -60,9 +60,9 @@ if (section2Present && bufrHeaderCentre==98 && section2Length==52) {
meta localLongitude2 bits(keyMore,0,26,-18000000,100000) : dump,no_copy;
meta localLatitude2 bits(keyMore,32,25,-9000000,100000) : dump,no_copy;
- if (rdbSubtype > 255 || numberOfSubsets>255 ||
- ( rdbSubtype>=121 && rdbSubtype <=130 ) ||
- rdbSubtype==31) {
+ if (oldSubtype == 255 || numberOfSubsets>255 ||
+ ( oldSubtype>=121 && oldSubtype <=130 ) ||
+ oldSubtype==31) {
meta ls.localNumberOfObservations bits(keySat,0,16) : dump,long_type,no_copy;
meta ls.satelliteID bits(keySat,16,16) : dump,long_type,no_copy;
} else {
|
nvbios/mem v1: pre-document some table names
This is taken from | @@ -40,7 +40,13 @@ parse_at(struct envy_bios *bios, struct envy_bios_mem *mem,
int idx, int offset, const char ** name)
{
struct M_known_tables m1_tbls[] = {
+ /* { 0x00, &mem->trestrict, "RESET" }, */
+ /* 0x01 Memory Strap Data Count */
{ 0x03, &mem->trestrict, "RESTRICT" },
+ /* { 0x05, &mem->, "DATA VREF" }, */
+ /* { 0x07, &mem->, "DATA DQS" }, */
+ /* { 0x09, &mem->, "DATA DLCELL ON" }, */
+ /* { 0x0B, &mem->, "DATA DLCELL OFF" }, */
};
struct M_known_tables m2_tbls[] = {
{ 0x01, &mem->trestrict, "RESTRICT" },
|
Completely remove legacy mitigation policy | @@ -119,8 +119,6 @@ INT WINAPI wWinMain(
return 1;
if (!PhInitializeNamespacePolicy())
return 1;
- if (!PhInitializeMitigationPolicy())
- return 1;
if (!PhInitializeComPolicy())
return 1;
@@ -844,55 +842,10 @@ BOOLEAN PhInitializeNamespacePolicy(
return TRUE;
}
-BOOLEAN PhInitializeMitigationPolicy(
- VOID
- )
-{
- // The kernel driver preforms the mitigiations and these policies are deprecated. (dmex)
- extern NTSTATUS PhpSetExploitProtectionEnabled(_In_ BOOLEAN Enabled);
- PROCESS_MITIGATION_POLICY_INFORMATION policy = { 0 };
- NTSTATUS status;
-
- policy.Policy = ProcessDynamicCodePolicy;
-
- status = NtQueryInformationProcess(
- NtCurrentProcess(),
- ProcessMitigationPolicy,
- &policy,
- sizeof(policy),
- NULL
- );
-
- if (NT_SUCCESS(status))
- {
- if (policy.DynamicCodePolicy.ProhibitDynamicCode)
- {
- status = PhpSetExploitProtectionEnabled(FALSE);
-
- if (NT_SUCCESS(status))
- {
- PhShellProcessHacker(
- NULL,
- NULL,
- SW_SHOW,
- 0,
- PH_SHELL_APP_PROPAGATE_PARAMETERS,
- 0,
- NULL
- );
-
- PhExitApplication(STATUS_SUCCESS);
- }
- }
- }
-
- if (!NT_SUCCESS(status))
- {
- PhShowStatus(NULL, L"Unable to deprecate mitigation policy", status, 0);
- }
-
- return TRUE;
-
+//BOOLEAN PhInitializeMitigationPolicy(
+// VOID
+// )
+//{
//#ifndef DEBUG
// BOOLEAN PhpIsExploitProtectionEnabled(VOID);
//#define DEFAULT_MITIGATION_POLICY_FLAGS \
@@ -994,8 +947,8 @@ BOOLEAN PhInitializeMitigationPolicy(
//#else
// return TRUE;
//#endif
-}
-
+//}
+//
//BOOLEAN PhInitializeMitigationSignaturePolicy(
// VOID
// )
|
Fix metadata_io_page_lock_acquired typo | @@ -296,7 +296,7 @@ static void metadata_io_io_end(struct metadata_io_request *m_req, int error)
metadata_io_req_complete(m_req);
}
-static void matadata_io_page_lock_acquired(struct ocf_request *req)
+static void metadata_io_page_lock_acquired(struct ocf_request *req)
{
ocf_engine_push_req_front(req, true);
}
@@ -319,7 +319,7 @@ static void metadata_io_req_submit(struct metadata_io_request *m_req)
if (a_req->mio_conc) {
lock = ocf_mio_async_lock(a_req->mio_conc, m_req,
- matadata_io_page_lock_acquired);
+ metadata_io_page_lock_acquired);
if (lock < 0) {
a_req->error = lock;
@@ -329,7 +329,7 @@ static void metadata_io_req_submit(struct metadata_io_request *m_req)
}
if (!a_req->mio_conc || lock == OCF_LOCK_ACQUIRED)
- matadata_io_page_lock_acquired(&m_req->req);
+ metadata_io_page_lock_acquired(&m_req->req);
}
void metadata_io_req_end(struct metadata_io_request *m_req)
|
[CI] Do not lint patches | @@ -44,6 +44,6 @@ done
# Check for trailing whitespaces and tabs
echo "Checking for trailing whitespaces and tabs"
-git diff --check $base HEAD -- ':(exclude)**.def' || EXIT_STATUS=$?
+git diff --check $base HEAD -- ':(exclude)**.def' ':(exclude)**.patch' || EXIT_STATUS=$?
exit $EXIT_STATUS
|
Remove test due to C++ compilation problems | @@ -61,7 +61,6 @@ TESTS = definitions.sh \
grib_jpeg.sh \
grib_ccsds.sh \
md5.sh \
- grib_util_set_spec.sh \
grib_neg_fctime.sh \
bufr_ecc-197.sh \
bufr_ecc-286.sh \
@@ -76,7 +75,7 @@ download_data:
noinst_PROGRAMS = packing_check gauss_sub read_any grib_double_cmp packing pack_unpack \
multi_from_message julian read_index index gribex_perf\
jpeg_perf grib_ccsds_perf so_perf png_perf bpv_limit laplacian \
- unit_tests grib_util_set_spec
+ unit_tests
multi_from_message_SOURCES = multi_from_message.c
laplacian_SOURCES = laplacian.c
@@ -95,7 +94,6 @@ png_perf_SOURCES = png_perf.c
grib_ccsds_perf_SOURCES = grib_ccsds_perf.c
gribex_perf_SOURCES = gribex_perf.c
gauss_sub_SOURCES = gauss_sub.c
-grib_util_set_spec_SOURCES = grib_util_set_spec.c
LDADD = $(top_builddir)/src/libeccodes.la $(EMOS_LIB)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.