New Upstream Release - beanstalkd

Ready changes

Summary

Merged new upstream version: 1.13 (was: 1.12).

Resulting package

Built on 2023-04-08T21:08 (took 9m43s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-releases beanstalkd-dbgsymapt install -t fresh-releases beanstalkd

Diff

diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..5e5334c
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,6 @@
+*.gcda
+*.gcno
+*.o
+/vers.c
+/beanstalkd
+/News
diff --git a/.github/workflows/build-latest.yaml b/.github/workflows/build-latest.yaml
new file mode 100644
index 0000000..3ab1253
--- /dev/null
+++ b/.github/workflows/build-latest.yaml
@@ -0,0 +1,29 @@
+---
+name: Continous integration
+on:
+  push:
+    branches:
+      - master
+jobs:
+  tests:
+    name: Tests
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+      - name: Tests
+        run: make check
+  build:
+    name: Docker build
+    runs-on: ubuntu-latest
+    needs:
+      - tests
+    steps:
+      - uses: actions/checkout@v3
+      - name: Login to GitHub Container Registry
+        uses: docker/login-action@v2
+        with:
+          registry: ghcr.io
+          username: ${{ github.actor }}
+          password: ${{ secrets.GITHUB_TOKEN }}
+      - run: docker build . -t `echo ghcr.io/${{ github.repository }}:latest | tr '[:upper:]' '[:lower:]'`
+      - run: docker push `echo ghcr.io/${{ github.repository }}:latest | tr '[:upper:]' '[:lower:]'`
diff --git a/.github/workflows/prs.yaml b/.github/workflows/prs.yaml
new file mode 100644
index 0000000..c41e5f0
--- /dev/null
+++ b/.github/workflows/prs.yaml
@@ -0,0 +1,15 @@
+---
+name: Checks for PRs
+on:
+  pull_request:
+  push:
+    branches-ignore:
+      - master
+jobs:
+  tests:
+    name: Tests
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+      - name: Tests
+        run: make check
\ No newline at end of file
diff --git a/.github/workflows/test-clients.yaml b/.github/workflows/test-clients.yaml
new file mode 100644
index 0000000..7e1b379
--- /dev/null
+++ b/.github/workflows/test-clients.yaml
@@ -0,0 +1,109 @@
+name: Testing clients
+on:
+  - push
+  - pull_request
+jobs:
+  build:
+    name: Build beanstalkd
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+      - run: make
+      - uses: actions/upload-artifact@v3
+        with:
+          name: beanstalkd
+          path: beanstalkd
+  pheanstalk:
+    name: Test Pheanstalk PHP
+    runs-on: ubuntu-latest
+    continue-on-error: true
+    needs:
+      - build
+    steps:
+      - name: Set up PHP
+        uses: shivammathur/setup-php@v2
+        with:
+          php-version: '8.1'
+          tools: phpunit
+      - uses: actions/download-artifact@v3
+        with:
+          name: beanstalkd
+      - name: Start beanstalkd
+        run: chmod +x ./beanstalkd && ./beanstalkd &
+      - uses: actions/checkout@v3
+        with:
+          repository: pheanstalk/pheanstalk
+          ref: v5
+      - name: Install dependencies including dev-dependencies
+        run: composer install
+      - name: Run tests
+        run: phpunit
+        env:
+          SERVER_HOST: localhost
+  greenstalk:
+    # Disable this test suite until https://github.com/justinmayhew/greenstalk/issues/9 is fixed
+    if: ${{ false }}
+    name: Test Greenstalk Python
+    runs-on: ubuntu-latest
+    continue-on-error: true
+    strategy:
+      matrix:
+        python-version: [ 3.9 ]
+    needs:
+      - build
+    steps:
+      - name: Set up Python ${{ matrix.python-version }}
+        uses: actions/setup-python@v4
+        with:
+          python-version: ${{ matrix.python-version }}
+      - uses: actions/checkout@v3
+        with:
+          repository: justinmayhew/greenstalk
+      - uses: actions/download-artifact@v3
+        id: download
+        with:
+          name: beanstalkd
+      - name: Make beanstalkd executable
+        run: chmod +x ${{steps.download.outputs.download-path}}/beanstalkd
+      - name: Run beanstalkd -v
+        run: ${{steps.download.outputs.download-path}}/beanstalkd -v
+
+      - name: Install dependencies
+        run: |
+          pip install pytest
+          pip install .
+      - name: Run tests
+        env:
+          BEANSTALKD_PATH: ${{steps.download.outputs.download-path}}/beanstalkd
+        run: make test
+  pystalk:
+    name: Test Pystalk Python
+    runs-on: ubuntu-latest
+    continue-on-error: true
+    strategy:
+      matrix:
+        python-version: [ "3.10" ]
+    needs:
+      - build
+    steps:
+      - name: Set up Python ${{ matrix.python-version }}
+        uses: actions/setup-python@v4
+        with:
+          python-version: ${{ matrix.python-version }}
+      - uses: actions/checkout@v3
+        with:
+          repository: EasyPost/pystalk
+      - uses: actions/download-artifact@v3
+        id: download
+        with:
+          name: beanstalkd
+      - name: Make beanstalkd executable
+        run: chmod +x ${{steps.download.outputs.download-path}}/beanstalkd
+      - name: Run beanstalkd -v
+        run: ${{steps.download.outputs.download-path}}/beanstalkd -v
+      - name: Install dependencies
+        run: python -m pip install -r requirements-tests.txt -e .
+      - name: Run tests
+        env:
+          BEANSTALKD_PATH: ${{steps.download.outputs.download-path}}/beanstalkd
+        run: pytest tests/
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9cf57fc..fa0b2e6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,8 @@
 # Changelog
 All notable changes to this project will be documented in this file.
 
+## [Unreleased]
+
 ## [1.12] - 2020-06-04
 
 - add support of UNIX domain sockets
@@ -27,7 +29,7 @@ All notable changes to this project will be documented in this file.
 - add DESTDIR support to Makefile
 
 
+[unreleased]: https://github.com/beanstalkd/beanstalkd/compare/v1.12...HEAD
 [1.12]:       https://github.com/beanstalkd/beanstalkd/compare/v1.11...v1.12
 [1.11]:       https://github.com/beanstalkd/beanstalkd/compare/v1.10...v1.11
 [1.10]:       https://github.com/beanstalkd/beanstalkd/compare/v1.9...v1.10
-
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..2253e0e
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,13 @@
+ARG BASE=alpine
+FROM alpine as builder
+RUN apk add --no-cache build-base git
+COPY . /tmp/beanstalkd
+RUN cd /tmp/beanstalkd && make
+
+################################
+ARG BASE
+FROM ${BASE}
+
+COPY --from=builder /tmp/beanstalkd/beanstalkd /usr/bin/
+EXPOSE 11300
+ENTRYPOINT ["/usr/bin/beanstalkd"]
diff --git a/News b/News
index 9c0fa81..55e9bae 100644
--- a/News
+++ b/News
@@ -1,22 +1,32 @@
-This release contains several new features as well as lots of smaller improvements and fixes:
-
-- add support of UNIX domain sockets
-- add support of Solaris/illumos
-- add the "reserve-job" command
-- add draining status to the "stats" command
-- make fsync turned on by default when binlog is used: it's synced every 50ms instead of never
-- replace vendored systemd files with libsystemd
-- systemd usage can be controlled with USE_SYSTEMD=yes/no
-- specify C99 as required compiler
-
+This is a maintenance release. The list of merged PRs:
+
+Add Missing Stats (#643)
+Add pystalk client (#638)
+ci: run tests of some beanstalk clients (#630)
+ci: add a workflow for running tests on PRs or pushes to non-master branch (#635)
+ci: update actions to their latest versions (#634)
+Fix test regression (#632)
+set up CI using GH actions (#613)
+Update beanstalkd.service (#623)
+Quote string values in yaml dictionaries (#610) (#611)
+clean up Dockerfile and support dynamic base image via build args (#616)
+use read_u32 to safely read reserve-with-timeout argument (#607)
+fix pause-tube parameter (#604)
+refactor code using tube_find and remove_ready_job functions (#600)
+testserv: fix endianness issue (#594)
+Make sure to quote os value in stats cmd (#592)
+add dockerfile (#586)
+exit when SIGTERM is received and pid is 1 (#585)
+server: remove redundant listen (#583)
+Updates changelog with 1.12 release (#584)
 Full list of changes (includes authorship information):
-<http://github.com/beanstalkd/beanstalkd/compare/v1.11...v1.12>
+<http://github.com/beanstalkd/beanstalkd/compare/v1.12...v1.13>
 
 Our Urls
 --------
 
-Download the 1.12 tarball directly:
-<https://github.com/beanstalkd/beanstalkd/archive/v1.12.tar.gz>
+Download the 1.13 tarball directly:
+<https://github.com/beanstalkd/beanstalkd/archive/v1.13.tar.gz>
 
 Learn all about beanstalk:
 <https://beanstalkd.github.io/>
diff --git a/README.md b/README.md
index db6760d..009b994 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[![Build Status](https://travis-ci.org/beanstalkd/beanstalkd.svg?branch=master)](https://travis-ci.org/beanstalkd/beanstalkd)
+[![Build Status](https://github.com/beanstalkd/beanstalkd/actions/workflows/build-latest.yaml/badge.svg)](https://github.com/beanstalkd/beanstalkd/actions/workflows/build-latest.yaml)
 [![codecov](https://codecov.io/gh/beanstalkd/beanstalkd/branch/master/graph/badge.svg)](https://codecov.io/gh/beanstalkd/beanstalkd)
 
 # beanstalkd
diff --git a/adm/systemd/beanstalkd.service b/adm/systemd/beanstalkd.service
index adab043..78cbf3c 100644
--- a/adm/systemd/beanstalkd.service
+++ b/adm/systemd/beanstalkd.service
@@ -4,3 +4,6 @@ Description=Beanstalkd is a simple, fast work queue
 [Service]
 User=nobody
 ExecStart=/usr/bin/beanstalkd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/beanstalkd.spec b/beanstalkd.spec
index 3c9bbda..68d438f 100644
--- a/beanstalkd.spec
+++ b/beanstalkd.spec
@@ -4,7 +4,7 @@
 %define beanstalkd_logdir    %{_localstatedir}/log/beanstalkd
 
 Name:           beanstalkd
-Version:        1.12
+Version:        1.13
 Release:        0%{?dist}
 Summary:        A simple, fast workqueue service
 
diff --git a/conn.c b/conn.c
index d10e9dc..07272fa 100644
--- a/conn.c
+++ b/conn.c
@@ -50,7 +50,6 @@ make_conn(int fd, char start_state, Tube *use, Tube *watch)
     TUBE_ASSIGN(c->use, use);
     use->using_ct++;
 
-    c->sock.fd = fd;
     c->state = start_state;
     c->pending_timeout = -1;
     c->tickpos = 0; // Does not mean anything if in_conns is set to 0.
diff --git a/dat.h b/dat.h
index e3dc210..9402754 100644
--- a/dat.h
+++ b/dat.h
@@ -326,7 +326,7 @@ extern struct Ms tubes;
 Tube *make_tube(const char *name);
 void  tube_dref(Tube *t);
 void  tube_iref(Tube *t);
-Tube *tube_find(const char *name);
+Tube *tube_find(Ms *tubeset, const char *name);
 Tube *tube_find_or_make(const char *name);
 #define TUBE_ASSIGN(a,b) (tube_dref(a), (a) = (b), tube_iref(a))
 
diff --git a/debian/changelog b/debian/changelog
index 5b16d15..e2c9ea6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+beanstalkd (1.13-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+  * Drop patch 0003-testserv-fix-endianness-issue.patch, present upstream.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Sat, 08 Apr 2023 20:59:40 -0000
+
 beanstalkd (1.12-2) unstable; urgency=medium
 
   * Fix FTBFS on 64-bit big-endian systems
diff --git a/debian/patches/0001-Fix-FTBFS-for-gnu-kfreebsd.patch b/debian/patches/0001-Fix-FTBFS-for-gnu-kfreebsd.patch
index 9d3c125..1b8843e 100644
--- a/debian/patches/0001-Fix-FTBFS-for-gnu-kfreebsd.patch
+++ b/debian/patches/0001-Fix-FTBFS-for-gnu-kfreebsd.patch
@@ -7,10 +7,10 @@ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=664613
  Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/Makefile b/Makefile
-index dc0afb9..e843ad0 100644
---- a/Makefile
-+++ b/Makefile
+Index: beanstalkd.git/Makefile
+===================================================================
+--- beanstalkd.git.orig/Makefile
++++ beanstalkd.git/Makefile
 @@ -6,7 +6,7 @@ override LDFLAGS?=
  
  LDLIBS?=
diff --git a/debian/patches/0002-Sanitize-Makefile.patch b/debian/patches/0002-Sanitize-Makefile.patch
index 09f29c0..cb38dbb 100644
--- a/debian/patches/0002-Sanitize-Makefile.patch
+++ b/debian/patches/0002-Sanitize-Makefile.patch
@@ -9,10 +9,10 @@ Last-Update: 2014-09-18
  Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/Makefile b/Makefile
-index e843ad0..445d770 100644
---- a/Makefile
-+++ b/Makefile
+Index: beanstalkd.git/Makefile
+===================================================================
+--- beanstalkd.git.orig/Makefile
++++ beanstalkd.git/Makefile
 @@ -1,7 +1,7 @@
  PREFIX?=/usr/local
  BINDIR=$(DESTDIR)$(PREFIX)/bin
diff --git a/debian/patches/0003-testserv-fix-endianness-issue.patch b/debian/patches/0003-testserv-fix-endianness-issue.patch
deleted file mode 100644
index 037acee..0000000
--- a/debian/patches/0003-testserv-fix-endianness-issue.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: Apollon Oikonomopoulos <apoikos@debian.org>
-Date: Wed, 23 Sep 2020 23:33:46 +0300
-Subject: testserv: fix endianness issue
-
-Building beanstalkd on big-endian systems (such as s390x, ppc64 and
-spart64) currently fails on the test phase, indicating an error in
-mustforksrv(). Digging a bit deeper, it turns out this is a type-casting
-issue between size_t (unsigned long int) and socklen_t (unsigned int):
-on these systems, size_t is 8 bytes, while socklen_t is only 4. These
-being big-endian systems, actually casting a (size_t *) pointer as
-(socklen_t *) will set the 4 most significant bytes, rather the
-least-significant ones, leading to unexpected results.
-
-To better illustrate this, on s390x this code:
-
- size_t sz = 0;
- *(socklen_t *)&sz = 4;
- printf("*(socklen_t *)&sz = %d, sz = %ld\n", *(socklen_t *)&sz, sz);
-
-produces the following output:
-
- *(socklen_t *)&sz = 4, sz = 17179869184
-
-where 17179869184 = 4 << 32
-
-Fix this by avoiding the cast from size_to to sockaddr_t altogether.
----
- testserv.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/testserv.c b/testserv.c
-index 449345f..911951d 100644
---- a/testserv.c
-+++ b/testserv.c
-@@ -191,8 +191,8 @@ mustforksrv(void)
-         exit(1);
-     }
- 
--    size_t len = sizeof(addr);
--    int r = getsockname(srv.sock.fd, (struct sockaddr *)&addr, (socklen_t *)&len);
-+    socklen_t len = sizeof(addr);
-+    int r = getsockname(srv.sock.fd, (struct sockaddr *)&addr, &len);
-     if (r == -1 || len > sizeof(addr)) {
-         puts("mustforksrv failed");
-         exit(1);
diff --git a/debian/patches/series b/debian/patches/series
index a911680..5a4cd50 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
 0001-Fix-FTBFS-for-gnu-kfreebsd.patch
 0002-Sanitize-Makefile.patch
-0003-testserv-fix-endianness-issue.patch
diff --git a/doc/protocol.txt b/doc/protocol.txt
index 49bd4fa..ce8bac9 100644
--- a/doc/protocol.txt
+++ b/doc/protocol.txt
@@ -592,6 +592,10 @@ they are not stored on disk with the -b flag.
 
  - "cmd-reserve" is the cumulative number of reserve commands.
 
+ - "cmd-reserve-with-timeout" is the cumulative number of reserve-with-timeout commands.
+
+ - "cmd-touch" is the cumulative number of touch commands.
+
  - "cmd-use" is the cumulative number of use commands.
 
  - "cmd-watch" is the cumulative number of watch commands.
@@ -729,7 +733,7 @@ The pause-tube command can delay any new job being reserved for a given time. It
 
     pause-tube <tube-name> <delay>\r\n
 
- - <tube> is the tube to pause
+ - <tube-name> is the tube to pause
 
  - <delay> is an integer number of seconds < 2**32 to wait before reserving any more
    jobs from the queue
diff --git a/main.c b/main.c
index fa63e77..7e7dc07 100644
--- a/main.c
+++ b/main.c
@@ -39,7 +39,7 @@ su(const char *user)
 static void
 handle_sigterm_pid1()
 {
-    raise(SIGKILL);
+    exit(143);
 }
 
 static void
diff --git a/prot.c b/prot.c
index 3488d39..297e772 100644
--- a/prot.c
+++ b/prot.c
@@ -15,6 +15,7 @@
 #include <inttypes.h>
 #include <stdarg.h>
 #include <signal.h>
+#include <limits.h>
 
 /* job body cannot be greater than this many bytes long */
 size_t job_data_size_limit = JOB_DATA_SIZE_LIMIT_DEFAULT;
@@ -185,13 +186,13 @@ size_t job_data_size_limit = JOB_DATA_SIZE_LIMIT_DEFAULT;
     "binlog-max-size: %d\n" \
     "draining: %s\n" \
     "id: %s\n" \
-    "hostname: %s\n" \
-    "os: %s\n" \
-    "platform: %s\n" \
+    "hostname: \"%s\"\n" \
+    "os: \"%s\"\n" \
+    "platform: \"%s\"\n" \
     "\r\n"
 
 #define STATS_TUBE_FMT "---\n" \
-    "name: %s\n" \
+    "name: \"%s\"\n" \
     "current-jobs-urgent: %" PRIu64 "\n" \
     "current-jobs-ready: %zu\n" \
     "current-jobs-reserved: %" PRIu64 "\n" \
@@ -209,7 +210,7 @@ size_t job_data_size_limit = JOB_DATA_SIZE_LIMIT_DEFAULT;
 
 #define STATS_JOB_FMT "---\n" \
     "id: %" PRIu64 "\n" \
-    "tube: %s\n" \
+    "tube: \"%s\"\n" \
     "state: %s\n" \
     "pri: %u\n" \
     "age: %" PRId64 "\n" \
@@ -278,6 +279,7 @@ static const char * op_names[] = {
     CMD_RESERVE_JOB,
 };
 
+static Job *remove_ready_job(Job *j);
 static Job *remove_buried_job(Job *j);
 
 // epollq_add schedules connection c in the s->conns heap, adds c
@@ -459,13 +461,11 @@ process_queue()
     int64 now = nanoseconds();
 
     while ((j = next_awaited_job(now))) {
-        heapremove(&j->tube->ready, j->heap_index);
-        ready_ct--;
-        if (j->r.pri < URGENT_THRESHOLD) {
-            global_stat.urgent_ct--;
-            j->tube->stat.urgent_ct--;
+        j = remove_ready_job(j);
+        if (j == NULL) {
+            twarnx("job not ready");
+            continue;
         }
-
         Conn *c = ms_take(&j->tube->waiting_conns);
         if (c == NULL) {
             twarnx("waiting_conns is empty");
@@ -1436,11 +1436,12 @@ dispatch_cmd(Conn *c)
 
     case OP_RESERVE_TIMEOUT:
         errno = 0;
-        timeout = strtol(c->cmd + CMD_RESERVE_TIMEOUT_LEN, &end_buf, 10);
-        if (errno) {
+        uint32 utimeout = 0;
+        if (read_u32(&utimeout, c->cmd + CMD_RESERVE_TIMEOUT_LEN, &end_buf) != 0 || utimeout > INT_MAX) {
             reply_msg(c, MSG_BAD_FORMAT);
             return;
         }
+        timeout = (int)utimeout;
         /* Falls through */
 
     case OP_RESERVE:
@@ -1701,7 +1702,7 @@ dispatch_cmd(Conn *c)
         }
         op_ct[type]++;
 
-        t = tube_find(name);
+        t = tube_find(&tubes, name);
         if (!t) {
             reply_msg(c, MSG_NOTFOUND);
             return;
@@ -1795,14 +1796,7 @@ dispatch_cmd(Conn *c)
         }
         op_ct[type]++;
 
-        t = NULL;
-        for (i = 0; i < c->watch.len; i++) {
-            t = c->watch.items[i];
-            if (strncmp(t->name, name, MAX_TUBE_NAME_LEN) == 0)
-                break;
-            t = NULL;
-        }
-
+        t = tube_find(&c->watch, name);
         if (t && c->watch.len < 2) {
             reply_msg(c, MSG_NOT_IGNORED);
             return;
@@ -1831,7 +1825,7 @@ dispatch_cmd(Conn *c)
             reply_msg(c, MSG_BAD_FORMAT);
             return;
         }
-        t = tube_find(name);
+        t = tube_find(&tubes, name);
         if (!t) {
             reply_msg(c, MSG_NOTFOUND);
             return;
diff --git a/serv.c b/serv.c
index f4240a1..1dd9e29 100644
--- a/serv.c
+++ b/serv.c
@@ -39,7 +39,6 @@ void srv_acquire_wal(Server *s) {
 void
 srvserve(Server *s)
 {
-    int r;
     Socket *sock;
 
     if (sockinit() == -1) {
@@ -52,14 +51,7 @@ srvserve(Server *s)
     s->conns.less = conn_less;
     s->conns.setpos = conn_setpos;
 
-    r = listen(s->sock.fd, 1024);
-    if (r == -1) {
-        twarn("listen");
-        return;
-    }
-
-    r = sockwant(&s->sock, 'r');
-    if (r == -1) {
+    if (sockwant(&s->sock, 'r') == -1) {
         twarn("sockwant");
         exit(2);
     }
diff --git a/testserv.c b/testserv.c
index 449345f..2b44a48 100644
--- a/testserv.c
+++ b/testserv.c
@@ -191,8 +191,8 @@ mustforksrv(void)
         exit(1);
     }
 
-    size_t len = sizeof(addr);
-    int r = getsockname(srv.sock.fd, (struct sockaddr *)&addr, (socklen_t *)&len);
+    socklen_t len = sizeof(addr);
+    int r = getsockname(srv.sock.fd, (struct sockaddr *)&addr, &len);
     if (r == -1 || len > sizeof(addr)) {
         puts("mustforksrv failed");
         exit(1);
@@ -941,7 +941,7 @@ cttest_stats_tube()
 
     mustsend(fd, "stats-tube tubea\r\n");
     ckrespsub(fd, "OK ");
-    ckrespsub(fd, "\nname: tubea\n");
+    ckrespsub(fd, "\nname: \"tubea\"\n");
     mustsend(fd, "stats-tube tubea\r\n");
     ckrespsub(fd, "OK ");
     ckrespsub(fd, "\ncurrent-jobs-urgent: 0\n");
@@ -984,7 +984,7 @@ cttest_stats_tube()
 
     mustsend(fd, "stats-tube default\r\n");
     ckrespsub(fd, "OK ");
-    ckrespsub(fd, "\nname: default\n");
+    ckrespsub(fd, "\nname: \"default\"\n");
     mustsend(fd, "stats-tube default\r\n");
     ckrespsub(fd, "OK ");
     ckrespsub(fd, "\ncurrent-jobs-urgent: 0\n");
diff --git a/tube.c b/tube.c
index 05130f0..2f9f8ab 100644
--- a/tube.c
+++ b/tube.c
@@ -82,12 +82,12 @@ make_and_insert_tube(const char *name)
 }
 
 Tube *
-tube_find(const char *name)
+tube_find(Ms *tubeset, const char *name)
 {
     size_t i;
 
-    for (i = 0; i < tubes.len; i++) {
-        Tube *t = tubes.items[i];
+    for (i = 0; i < tubeset->len; i++) {
+        Tube *t = tubeset->items[i];
         if (strncmp(t->name, name, MAX_TUBE_NAME_LEN) == 0)
             return t;
     }
@@ -97,7 +97,7 @@ tube_find(const char *name)
 Tube *
 tube_find_or_make(const char *name)
 {
-    Tube *t = tube_find(name);
+    Tube *t = tube_find(&tubes, name);
     if (t)
         return t;
     return make_and_insert_tube(name);
diff --git a/vers.sh b/vers.sh
index cf61f55..1ec293d 100755
--- a/vers.sh
+++ b/vers.sh
@@ -1 +1 @@
-printf '1.12'
+printf '1.13'

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/lib/debug/.build-id/55/999a7dd461b2b8a3927dd161e36b2c16efd7a6.debug

Files in first set of .debs but not in second

-rw-r--r--  root/root   /usr/lib/debug/.build-id/91/8b2540672186fb8638cb725b4f0a03d71a72bf.debug

No differences were encountered between the control files of package beanstalkd

Control files of package beanstalkd-dbgsym: lines which differ (wdiff format)

  • Build-Ids: 918b2540672186fb8638cb725b4f0a03d71a72bf 55999a7dd461b2b8a3927dd161e36b2c16efd7a6

More details

Full run details