sms_queue_test: assert return value of osmo_use_count_get_put()
Change-Id: I9381e88435ccd856ec619135ca9999c15c25d436
Fixes: CID#198416
diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c
index 495e078..25fc312 100644
--- a/tests/sms_queue/sms_queue_test.c
+++ b/tests/sms_queue/sms_queue_test.c
@@ -96,7 +96,7 @@
static struct vlr_subscr arbitrary_vsub = {};
static bool arbitrary_vsub_set_up = false;
struct gsm_sms *sms;
- int i;
+ int i, rc = 0;
printf(" hitting database: looking for MSISDN > '%s', failed_attempts <= %d\n",
last_msisdn, max_failed);
@@ -110,9 +110,10 @@
* may call vlr_subscr_put() on our arbitrary_vsub, what would
* lead to a segfault if its use_count <= 0. To prevent this,
* let's ensure a big enough initial value. */
- osmo_use_count_get_put(&arbitrary_vsub.use_count, VSUB_USE_SMS_RECEIVER, 1000);
- osmo_use_count_get_put(&arbitrary_vsub.use_count, VSUB_USE_SMS_PENDING, 1000);
+ rc += osmo_use_count_get_put(&arbitrary_vsub.use_count, VSUB_USE_SMS_RECEIVER, 1000);
+ rc += osmo_use_count_get_put(&arbitrary_vsub.use_count, VSUB_USE_SMS_PENDING, 1000);
arbitrary_vsub.lu_complete = true;
+ OSMO_ASSERT(rc == 0);
for (i = 0; i < ARRAY_SIZE(fake_sms_db); i++) {
if (!fake_sms_db[i].nr_of_sms)