sms_test: Do not crash on logging.

This commit is contained in:
Alexander Chemeris 2014-03-07 20:42:03 +01:00 committed by Holger Hans Peter Freyther
parent 1512ea6452
commit e4c50d5a43
1 changed files with 8 additions and 0 deletions

View File

@ -31,6 +31,11 @@
#include <osmocom/core/msgb.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/application.h>
struct log_info fake_log_info = {};
struct test_case {
const uint8_t *input;
const uint16_t input_length;
@ -278,6 +283,9 @@ int main(int argc, char** argv)
int nchars;
char result[256];
/* Fake logging. */
osmo_init_logging(&fake_log_info);
/* test 7-bit encoding */
for (i = 0; i < ARRAY_SIZE(test_encode); ++i) {
/* Test legacy function (return value only) */