#define SIRIDB_VERSION_MAJOR 2
#define SIRIDB_VERSION_MINOR 0
-#define SIRIDB_VERSION_PATCH 33
+#define SIRIDB_VERSION_PATCH 34
/*
* Use SIRIDB_VERSION_PRE_RELEASE for alpha release versions.
* Note that debian alpha packages should use versions like this:
* 2.0.30-0alpha0
*/
-#define SIRIDB_VERSION_PRE_RELEASE ""
+#define SIRIDB_VERSION_PRE_RELEASE "-alpha-0"
#ifndef NDEBUG
#define SIRIDB_VERSION_BUILD_RELEASE "+debug"
'Memory allocation error or maximum recursion depth reached.'):
await self.client0.query('''
list series /.*/ -
- {}/linux.*/{}'''.format('(' * 200, ')' * 200))
+ {}/linux.*/{}'''.format('(' * 500, ')' * 500))
await self.client0.query('alter database set list_limit 5000')
with self.assertRaisesRegex(
('◐', '◓', '◑', '◒')
-class Spinner():
+class Spinner:
def __init__(self, charset=SPINNER3):
self._idx = 0
from .color import Color
-class Task():
+class Task:
def __init__(self, title):
self.running = True
self.task = asyncio.ensure_future(self.process())
}
else
{
+ sirinet_pkg_t * dup;
siridb_pool_t * pool;
uint16_t pid;
pool = siridb->pools->pool + pid;
- if (siridb_pool_send_pkg(
+ if ((dup = sirinet_pkg_dup(pkg)) == NULL ||
+ siridb_pool_send_pkg(
pool,
- pkg,
+ dup,
timeout,
(sirinet_promise_cb) sirinet_promises_on_response,
promises,
- FLAG_KEEP_PKG | flags))
+ flags & ~FLAG_KEEP_PKG))
{
log_debug(
"Cannot send package to pool '%u' "
}
else
{
+ sirinet_pkg_t * dup;
siridb_pool_t * pool;
size_t i;
{
pool = vec->data[i];
- if (siridb_pool_send_pkg(
+ if ((dup = sirinet_pkg_dup(pkg)) == NULL ||
+ siridb_pool_send_pkg(
pool,
- pkg,
+ dup,
timeout,
(sirinet_promise_cb) sirinet_promises_on_response,
promises,
- FLAG_KEEP_PKG | flags))
+ flags & ~FLAG_KEEP_PKG))
{
log_debug(
"Cannot send package to at least on pool "
}
else
{
+ sirinet_pkg_t * dup;
siridb_server_t * server;
size_t i;
if (siridb_server_is_online(server))
{
- if (siridb_server_send_pkg(
+ if ((dup = sirinet_pkg_dup(pkg)) == NULL ||
+ siridb_server_send_pkg(
server,
- pkg,
+ dup,
timeout,
(sirinet_promise_cb) sirinet_promises_on_response,
promises,
- FLAG_KEEP_PKG))
+ 0 /* flags */))
{
log_critical(
"Allocation error while trying to send a package "
/*
* Returns a copy of package allocated using malloc().
- * In case of an error, NULL is returned and a signal is raised.
+ * In case of an error, NULL is returned.
*/
sirinet_pkg_t * sirinet_pkg_dup(sirinet_pkg_t * pkg)
{
size_t size = sizeof(sirinet_pkg_t) + pkg->len;
sirinet_pkg_t * dup = malloc(size);
- if (dup == NULL)
- {
- ERR_ALLOC
- }
- else
+ if (dup != NULL)
{
memcpy(dup, pkg, size);
}