Move from local to external osmo* libraries

src/libdebug -> libosmocore
src/libselect -> libosmocore
src/libtimer -> libosmocore
src/libosmocc -> libosmo-cc
src/libg711 -> libosmo-cc
This commit is contained in:
Andreas Eversberg
2024-01-05 14:20:36 +01:00
parent 6cd2c3e323
commit 3158c48365
198 changed files with 4202 additions and 12564 deletions

View File

@@ -13,21 +13,19 @@ pocsag_LDADD = \
$(COMMON_LA) \
../anetz/libgermanton.a \
$(top_builddir)/src/liboptions/liboptions.a \
$(top_builddir)/src/libdebug/libdebug.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libosmocc/libosmocc.a \
$(top_builddir)/src/libdisplay/libdisplay.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/libtimer/libtimer.a \
$(top_builddir)/src/libselect/libselect.a \
$(top_builddir)/src/libsamplerate/libsamplerate.a \
$(top_builddir)/src/libemphasis/libemphasis.a \
$(top_builddir)/src/libfm/libfm.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libsample/libsample.a \
$(top_builddir)/src/libg711/libg711.a \
$(top_builddir)/src/libaaimage/libaaimage.a \
$(top_builddir)/src/liblogging/liblogging.a \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOCC_LIBS) \
-lm
if HAVE_ALSA

View File

@@ -26,7 +26,7 @@
#include <errno.h>
#include <math.h>
#include "../libsample/sample.h"
#include "../libdebug/debug.h"
#include "../liblogging/logging.h"
#include "pocsag.h"
#include "frame.h"
#include "dsp.h"
@@ -40,7 +40,7 @@ static void dsp_init_ramp(pocsag_t *pocsag)
double c;
int i;
PDEBUG_CHAN(DDSP, DEBUG_DEBUG, "Generating cosine shaped ramp table.\n");
LOGP_CHAN(DDSP, LOGL_DEBUG, "Generating cosine shaped ramp table.\n");
for (i = 0; i < 256; i++) {
/* This is mathematically incorrect... */
if (i < 64)
@@ -59,7 +59,7 @@ int dsp_init_sender(pocsag_t *pocsag, int samplerate, int baudrate, double devia
{
int rc;
PDEBUG_CHAN(DDSP, DEBUG_DEBUG, "Init DSP for transceiver.\n");
LOGP_CHAN(DDSP, LOGL_DEBUG, "Init DSP for transceiver.\n");
/* set modulation parameters */
// NOTE: baudrate equals modulation, because we have a raised cosine ramp of beta = 0.5
@@ -67,12 +67,12 @@ int dsp_init_sender(pocsag_t *pocsag, int samplerate, int baudrate, double devia
pocsag->fsk_bitduration = (double)samplerate / (double)baudrate;
pocsag->fsk_bitstep = 1.0 / pocsag->fsk_bitduration;
PDEBUG_CHAN(DDSP, DEBUG_DEBUG, "Use %.4f samples for one bit duration @ %d.\n", pocsag->fsk_bitduration, pocsag->sender.samplerate);
LOGP_CHAN(DDSP, LOGL_DEBUG, "Use %.4f samples for one bit duration @ %d.\n", pocsag->fsk_bitduration, pocsag->sender.samplerate);
pocsag->fsk_tx_buffer_size = pocsag->fsk_bitduration * 32.0 + 10; /* 32 bit, add some extra to prevent short buffer due to rounding */
pocsag->fsk_tx_buffer = calloc(sizeof(sample_t), pocsag->fsk_tx_buffer_size);
if (!pocsag->fsk_tx_buffer) {
PDEBUG_CHAN(DDSP, DEBUG_ERROR, "No memory!\n");
LOGP_CHAN(DDSP, LOGL_ERROR, "No memory!\n");
rc = -ENOMEM;
goto error;
}
@@ -94,7 +94,7 @@ error:
/* Cleanup transceiver instance. */
void dsp_cleanup_sender(pocsag_t *pocsag)
{
PDEBUG_CHAN(DDSP, DEBUG_DEBUG, "Cleanup DSP for transceiver.\n");
LOGP_CHAN(DDSP, LOGL_DEBUG, "Cleanup DSP for transceiver.\n");
if (pocsag->fsk_tx_buffer) {
free(pocsag->fsk_tx_buffer);
@@ -180,7 +180,7 @@ static void fsk_block_decode(pocsag_t *pocsag, uint8_t bit)
pocsag->fsk_rx_index = 0;
} else
if (pocsag->fsk_rx_word == (uint32_t)(~CODEWORD_SYNC))
PDEBUG_CHAN(DDSP, DEBUG_NOTICE, "Received inverted sync, caused by wrong polarity or by radio noise. Verify correct polarity!\n");
LOGP_CHAN(DDSP, LOGL_NOTICE, "Received inverted sync, caused by wrong polarity or by radio noise. Verify correct polarity!\n");
} else {
pocsag->fsk_rx_word = (pocsag->fsk_rx_word << 1) | bit;
if (++pocsag->fsk_rx_index == 32) {

View File

@@ -23,7 +23,7 @@
#include <string.h>
#include <errno.h>
#include "../libsample/sample.h"
#include "../libdebug/debug.h"
#include "../liblogging/logging.h"
#include "pocsag.h"
#include "frame.h"
@@ -103,29 +103,29 @@ static uint32_t pocsag_parity(uint32_t word)
static int debug_word(uint32_t word, int slot)
{
if (pocsag_crc(word >> 11) != ((word >> 1) & 0x3ff)) {
PDEBUG(DPOCSAG, DEBUG_NOTICE, "CRC error in codeword 0x%08x.\n", word);
LOGP(DPOCSAG, LOGL_NOTICE, "CRC error in codeword 0x%08x.\n", word);
return -EINVAL;
}
if (pocsag_parity(word)) {
PDEBUG(DPOCSAG, DEBUG_NOTICE, "Parity error in codeword 0x%08x.\n", word);
LOGP(DPOCSAG, LOGL_NOTICE, "Parity error in codeword 0x%08x.\n", word);
return -EINVAL;
}
if (word == CODEWORD_SYNC) {
PDEBUG(DPOCSAG, DEBUG_DEBUG, "-> valid sync word\n");
LOGP(DPOCSAG, LOGL_DEBUG, "-> valid sync word\n");
return 0;
}
if (word == CODEWORD_IDLE) {
PDEBUG(DPOCSAG, DEBUG_DEBUG, "-> valid idle word\n");
LOGP(DPOCSAG, LOGL_DEBUG, "-> valid idle word\n");
return 0;
}
if (!(word & 0x80000000)) {
PDEBUG(DPOCSAG, DEBUG_DEBUG, "-> valid address word: RIC = '%d', function = '%d' (%s)\n", ((word >> 10) & 0x1ffff8) + slot, (word >> 11) & 0x3, pocsag_function_name[(word >> 11) & 0x3]);
LOGP(DPOCSAG, LOGL_DEBUG, "-> valid address word: RIC = '%d', function = '%d' (%s)\n", ((word >> 10) & 0x1ffff8) + slot, (word >> 11) & 0x3, pocsag_function_name[(word >> 11) & 0x3]);
} else {
PDEBUG(DPOCSAG, DEBUG_DEBUG, "-> valid message word: message = '0x%05x'\n", (word >> 11) & 0xfffff);
LOGP(DPOCSAG, LOGL_DEBUG, "-> valid message word: message = '0x%05x'\n", (word >> 11) & 0xfffff);
}
return 0;
@@ -303,9 +303,9 @@ int64_t get_codeword(pocsag_t *pocsag)
return -1;
case POCSAG_PREAMBLE:
if (!pocsag->word_count)
PDEBUG_CHAN(DPOCSAG, DEBUG_INFO, "Sending preamble.\n");
LOGP_CHAN(DPOCSAG, LOGL_INFO, "Sending preamble.\n");
/* transmit preamble */
PDEBUG_CHAN(DPOCSAG, DEBUG_DEBUG, "Sending 32 bits of preamble pattern 0x%08x.\n", CODEWORD_PREAMBLE);
LOGP_CHAN(DPOCSAG, LOGL_DEBUG, "Sending 32 bits of preamble pattern 0x%08x.\n", CODEWORD_PREAMBLE);
if (++pocsag->word_count == PREAMBLE_COUNT) {
pocsag_new_state(pocsag, POCSAG_MESSAGE);
pocsag->word_count = 0;
@@ -315,10 +315,10 @@ int64_t get_codeword(pocsag_t *pocsag)
break;
case POCSAG_MESSAGE:
if (!pocsag->word_count)
PDEBUG_CHAN(DPOCSAG, DEBUG_INFO, "Sending batch.\n");
LOGP_CHAN(DPOCSAG, LOGL_INFO, "Sending batch.\n");
/* send sync */
if (pocsag->word_count == 0) {
PDEBUG_CHAN(DPOCSAG, DEBUG_DEBUG, "Sending 32 bits of sync pattern 0x%08x.\n", CODEWORD_SYNC);
LOGP_CHAN(DPOCSAG, LOGL_DEBUG, "Sending 32 bits of sync pattern 0x%08x.\n", CODEWORD_SYNC);
/* count codewords */
++pocsag->word_count;
word = CODEWORD_SYNC;
@@ -352,7 +352,7 @@ int64_t get_codeword(pocsag_t *pocsag)
}
/* prevent 'use-after-free' from this point on */
msg = NULL;
PDEBUG_CHAN(DPOCSAG, DEBUG_DEBUG, "Sending 32 bits of message codeword 0x%08x (frame %d.%d).\n", word, slot, subslot);
LOGP_CHAN(DPOCSAG, LOGL_DEBUG, "Sending 32 bits of message codeword 0x%08x (frame %d.%d).\n", word, slot, subslot);
/* count codewords */
if (++pocsag->word_count == 17)
pocsag->word_count = 0;
@@ -365,7 +365,7 @@ int64_t get_codeword(pocsag_t *pocsag)
break;
}
if (msg) {
PDEBUG_CHAN(DPOCSAG, DEBUG_INFO, "Sending message to RIC '%d' / function '%d' (%s)\n", msg->ric, msg->function, pocsag_function_name[msg->function]);
LOGP_CHAN(DPOCSAG, LOGL_INFO, "Sending message to RIC '%d' / function '%d' (%s)\n", msg->ric, msg->function, pocsag_function_name[msg->function]);
/* reset idle counter */
pocsag->idle_count = 0;
/* encode address */
@@ -375,7 +375,7 @@ int64_t get_codeword(pocsag_t *pocsag)
char text[msg->data_length + 1];
memcpy(text, msg->data, msg->data_length);
text[msg->data_length] = '\0';
PDEBUG_CHAN(DPOCSAG, DEBUG_INFO, " -> Message text is \"%s\".\n", text);
LOGP_CHAN(DPOCSAG, LOGL_INFO, " -> Message text is \"%s\".\n", text);
pocsag->current_msg = msg;
msg->data_index = 0;
msg->bit_index = 0;
@@ -390,21 +390,21 @@ int64_t get_codeword(pocsag_t *pocsag)
/* prevent 'use-after-free' from this point on */
msg = NULL;
}
PDEBUG_CHAN(DPOCSAG, DEBUG_DEBUG, "Sending 32 bits of address codeword 0x%08x (frame %d.%d).\n", word, slot, subslot);
LOGP_CHAN(DPOCSAG, LOGL_DEBUG, "Sending 32 bits of address codeword 0x%08x (frame %d.%d).\n", word, slot, subslot);
/* count codewords */
if (++pocsag->word_count == 17)
pocsag->word_count = 0;
break;
}
/* no message, so we send idle pattern */
PDEBUG_CHAN(DPOCSAG, DEBUG_DEBUG, "Sending 32 bits of idle pattern 0x%08x (frame %d.%d).\n", CODEWORD_IDLE, slot, subslot);
LOGP_CHAN(DPOCSAG, LOGL_DEBUG, "Sending 32 bits of idle pattern 0x%08x (frame %d.%d).\n", CODEWORD_IDLE, slot, subslot);
/* count codewords */
if (++pocsag->word_count == 17) {
pocsag->word_count = 0;
/* if no message has been scheduled during transmission and idle counter is reached, stop transmitter */
if (!pocsag->msg_list && pocsag->idle_count++ == IDLE_BATCHES) {
PDEBUG_CHAN(DPOCSAG, DEBUG_INFO, "Transmission done.\n");
PDEBUG_CHAN(DPOCSAG, DEBUG_DEBUG, "Reached %d of idle batches, turning transmitter off.\n", IDLE_BATCHES);
LOGP_CHAN(DPOCSAG, LOGL_INFO, "Transmission done.\n");
LOGP_CHAN(DPOCSAG, LOGL_DEBUG, "Reached %d of idle batches, turning transmitter off.\n", IDLE_BATCHES);
pocsag_new_state(pocsag, POCSAG_IDLE);
}
}
@@ -425,7 +425,7 @@ static void done_rx_msg(pocsag_t *pocsag)
pocsag->rx_msg_valid = 0;
PDEBUG_CHAN(DPOCSAG, DEBUG_INFO, "Received message from RIC '%d' / function '%d' (%s)\n", pocsag->rx_msg_ric, pocsag->rx_msg_function, pocsag_function_name[pocsag->rx_msg_function]);
LOGP_CHAN(DPOCSAG, LOGL_INFO, "Received message from RIC '%d' / function '%d' (%s)\n", pocsag->rx_msg_ric, pocsag->rx_msg_function, pocsag_function_name[pocsag->rx_msg_function]);
{
char text[pocsag->rx_msg_data_length * 5 + 1];
int i, j;
@@ -442,7 +442,7 @@ static void done_rx_msg(pocsag_t *pocsag)
}
text[j] = '\0';
if ((pocsag->rx_msg_function == POCSAG_FUNCTION_NUMERIC || pocsag->rx_msg_function == POCSAG_FUNCTION_ALPHA) && text[0])
PDEBUG_CHAN(DPOCSAG, DEBUG_INFO, " -> Message text is \"%s\".\n", text);
LOGP_CHAN(DPOCSAG, LOGL_INFO, " -> Message text is \"%s\".\n", text);
pocsag_msg_receive(pocsag->language, pocsag->sender.kanal, pocsag->rx_msg_ric, pocsag->rx_msg_function, text);
}
}
@@ -452,17 +452,17 @@ void put_codeword(pocsag_t *pocsag, uint32_t word, int8_t slot, int8_t subslot)
int rc;
if (slot < 0 && word == CODEWORD_SYNC) {
PDEBUG_CHAN(DPOCSAG, DEBUG_DEBUG, "Received 32 bits of sync pattern 0x%08x.\n", CODEWORD_SYNC);
LOGP_CHAN(DPOCSAG, LOGL_DEBUG, "Received 32 bits of sync pattern 0x%08x.\n", CODEWORD_SYNC);
return;
}
if (word == CODEWORD_IDLE) {
PDEBUG_CHAN(DPOCSAG, DEBUG_DEBUG, "Received 32 bits of idle pattern 0x%08x.\n", CODEWORD_IDLE);
LOGP_CHAN(DPOCSAG, LOGL_DEBUG, "Received 32 bits of idle pattern 0x%08x.\n", CODEWORD_IDLE);
} else
if (!(word & 0x80000000))
PDEBUG_CHAN(DPOCSAG, DEBUG_DEBUG, "Received 32 bits of address codeword 0x%08x (frame %d.%d).\n", word, slot, subslot);
LOGP_CHAN(DPOCSAG, LOGL_DEBUG, "Received 32 bits of address codeword 0x%08x (frame %d.%d).\n", word, slot, subslot);
else
PDEBUG_CHAN(DPOCSAG, DEBUG_DEBUG, "Received 32 bits of message codeword 0x%08x (frame %d.%d).\n", word, slot, subslot);
LOGP_CHAN(DPOCSAG, LOGL_DEBUG, "Received 32 bits of message codeword 0x%08x (frame %d.%d).\n", word, slot, subslot);
rc = debug_word(word, slot);
if (rc < 0) {
done_rx_msg(pocsag);

View File

@@ -27,7 +27,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include "../libsample/sample.h"
#include "../libdebug/debug.h"
#include "../liblogging/logging.h"
#include "../libmobile/call.h"
#include "../libmobile/main_mobile.h"
#include "../liboptions/options.h"
@@ -220,7 +220,7 @@ static void myhandler(void)
if (tx)
pocsag_msg_send(language, buffer);
else
PDEBUG(DPOCSAG, DEBUG_ERROR, "Failed to send message, transmitter is not enabled!\n");
LOGP(DPOCSAG, LOGL_ERROR, "Failed to send message, transmitter is not enabled!\n");
}
}
}
@@ -362,6 +362,7 @@ fail:
pocsag_destroy(sender_head);
/* exits */
main_mobile_exit();
fm_exit();
pocsag_exit();

View File

@@ -28,10 +28,10 @@
#include <sys/time.h>
#include <time.h>
#include "../libsample/sample.h"
#include "../libdebug/debug.h"
#include "../liblogging/logging.h"
#include "../libmobile/call.h"
#include "../libmobile/cause.h"
#include "../libosmocc/message.h"
#include <osmocom/cc/message.h>
#include "pocsag.h"
#include "frame.h"
#include "dsp.h"
@@ -195,7 +195,7 @@ void pocsag_new_state(pocsag_t *pocsag, enum pocsag_state new_state)
{
if (pocsag->state == new_state)
return;
PDEBUG(DPOCSAG, DEBUG_DEBUG, "State change: %s -> %s\n", pocsag_state_name[pocsag->state], pocsag_state_name[new_state]);
LOGP(DPOCSAG, LOGL_DEBUG, "State change: %s -> %s\n", pocsag_state_name[pocsag->state], pocsag_state_name[new_state]);
pocsag->state = new_state;
pocsag_display_status();
}
@@ -205,16 +205,16 @@ static pocsag_msg_t *pocsag_msg_create(pocsag_t *pocsag, uint32_t callref, uint3
{
pocsag_msg_t *msg, **msgp;
PDEBUG(DPOCSAG, DEBUG_INFO, "Creating msg instance to page RIC '%d' / function '%d' (%s).\n", ric, function, pocsag_function_name[function]);
LOGP(DPOCSAG, LOGL_INFO, "Creating msg instance to page RIC '%d' / function '%d' (%s).\n", ric, function, pocsag_function_name[function]);
/* create */
msg = calloc(1, sizeof(*msg));
if (!msg) {
PDEBUG(DPOCSAG, DEBUG_ERROR, "No mem!\n");
LOGP(DPOCSAG, LOGL_ERROR, "No mem!\n");
abort();
}
if (strlen(text) > sizeof(msg->data)) {
PDEBUG(DPOCSAG, DEBUG_ERROR, "Text too long!\n");
LOGP(DPOCSAG, LOGL_ERROR, "Text too long!\n");
return NULL;
}
@@ -280,14 +280,14 @@ static int pocsag_scan_or_loopback(pocsag_t *pocsag)
default:
message[0] = '\0';
}
PDEBUG_CHAN(DPOCSAG, DEBUG_NOTICE, "Transmitting %s message '%s' with RIC '%d'.\n", pocsag_function_name[pocsag->default_function], message, pocsag->scan_from);
LOGP_CHAN(DPOCSAG, LOGL_NOTICE, "Transmitting %s message '%s' with RIC '%d'.\n", pocsag_function_name[pocsag->default_function], message, pocsag->scan_from);
pocsag_msg_create(pocsag, 0, pocsag->scan_from, pocsag->default_function, message);
pocsag->scan_from++;
return 1;
}
if (pocsag->sender.loopback) {
PDEBUG(DPOCSAG, DEBUG_INFO, "Sending message for loopback test.\n");
LOGP(DPOCSAG, LOGL_INFO, "Sending message for loopback test.\n");
pocsag_msg_create(pocsag, 0, 1234567, POCSAG_FUNCTION_NUMERIC, "1234");
return 1;
}
@@ -344,23 +344,23 @@ int pocsag_create(const char *kanal, double frequency, const char *device, int u
pocsag = calloc(1, sizeof(*pocsag));
if (!pocsag) {
PDEBUG(DPOCSAG, DEBUG_ERROR, "No memory!\n");
LOGP(DPOCSAG, LOGL_ERROR, "No memory!\n");
return -ENOMEM;
}
PDEBUG(DPOCSAG, DEBUG_DEBUG, "Creating 'POCSAG' instance for 'Kanal' = %s (sample rate %d).\n", kanal, samplerate);
LOGP(DPOCSAG, LOGL_DEBUG, "Creating 'POCSAG' instance for 'Kanal' = %s (sample rate %d).\n", kanal, samplerate);
/* init general part of transceiver */
rc = sender_create(&pocsag->sender, kanal, frequency, frequency, device, use_sdr, samplerate, rx_gain, tx_gain, 0, 0, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
if (rc < 0) {
PDEBUG(DPOCSAG, DEBUG_ERROR, "Failed to init transceiver process!\n");
LOGP(DPOCSAG, LOGL_ERROR, "Failed to init transceiver process!\n");
goto error;
}
/* init audio processing */
rc = dsp_init_sender(pocsag, samplerate, (double)baudrate, deviation, polarity);
if (rc < 0) {
PDEBUG(DPOCSAG, DEBUG_ERROR, "Failed to init audio processing!\n");
LOGP(DPOCSAG, LOGL_ERROR, "Failed to init audio processing!\n");
goto error;
}
@@ -374,7 +374,7 @@ int pocsag_create(const char *kanal, double frequency, const char *device, int u
pocsag_display_status();
PDEBUG(DPOCSAG, DEBUG_NOTICE, "Created 'Kanal' %s\n", kanal);
LOGP(DPOCSAG, LOGL_NOTICE, "Created 'Kanal' %s\n", kanal);
pocsag_scan_or_loopback(pocsag);
@@ -391,7 +391,7 @@ void pocsag_destroy(sender_t *sender)
{
pocsag_t *pocsag = (pocsag_t *) sender;
PDEBUG(DPOCSAG, DEBUG_DEBUG, "Destroying 'POCSAG' instance for 'Kanal' = %s.\n", sender->kanal);
LOGP(DPOCSAG, LOGL_DEBUG, "Destroying 'POCSAG' instance for 'Kanal' = %s.\n", sender->kanal);
while (pocsag->msg_list)
pocsag_msg_destroy(pocsag->msg_list);
@@ -417,29 +417,29 @@ void pocsag_msg_send(enum pocsag_language language, const char *text)
if (!ric_string || !function_string) {
inval:
PDEBUG(DNMT, DEBUG_NOTICE, "Given message MUST be in the following format: RIC,function[,<message with comma and spaces>] (function must be A = 0 = numeric, B = 1 or C = 2 = beep, D = 3 = alphanumeric)\n");
LOGP(DNMT, LOGL_NOTICE, "Given message MUST be in the following format: RIC,function[,<message with comma and spaces>] (function must be A = 0 = numeric, B = 1 or C = 2 = beep, D = 3 = alphanumeric)\n");
return;
}
ric = atoi(ric_string);
if (ric > 2097151) {
PDEBUG(DNMT, DEBUG_NOTICE, "Illegal RIC %d. Maximum allowed RIC is (2^21)-1. (2097151)\n", ric);
LOGP(DNMT, LOGL_NOTICE, "Illegal RIC %d. Maximum allowed RIC is (2^21)-1. (2097151)\n", ric);
goto inval;
}
if (ric == 1003832) {
PDEBUG(DNMT, DEBUG_NOTICE, "Illegal RIC 1003832. (Used as idle codeword)\n");
LOGP(DNMT, LOGL_NOTICE, "Illegal RIC 1003832. (Used as idle codeword)\n");
goto inval;
}
rc = pocsag_function_name2value(function_string);
if (rc < 0) {
PDEBUG(DNMT, DEBUG_NOTICE, "Illegal function '%s'.\n", function_string);
LOGP(DNMT, LOGL_NOTICE, "Illegal function '%s'.\n", function_string);
goto inval;
}
function = rc;
if (message && (function == 1 || function == 2)) {
PDEBUG(DNMT, DEBUG_NOTICE, "Message text is not allowed with function %d.\n", function);
LOGP(DNMT, LOGL_NOTICE, "Message text is not allowed with function %d.\n", function);
goto inval;
}
@@ -470,7 +470,7 @@ inval:
if (!message)
message="";
PDEBUG(DNMT, DEBUG_INFO, "Message for ID '%d/%d' with text '%s'\n", ric, function, message);
LOGP(DNMT, LOGL_INFO, "Message for ID '%d/%d' with text '%s'\n", ric, function, message);
pocsag = (pocsag_t *) sender_head;
pocsag_msg_create(pocsag, 0, ric, function, message);
@@ -505,9 +505,9 @@ int call_down_setup(int callref, const char *caller_id, enum number_type __attri
}
if (!sender) {
if (channel)
PDEBUG(DPOCSAG, DEBUG_NOTICE, "Cannot page, because given station not available, rejecting!\n");
LOGP(DPOCSAG, LOGL_NOTICE, "Cannot page, because given station not available, rejecting!\n");
else
PDEBUG(DPOCSAG, DEBUG_NOTICE, "Cannot page, no trasmitting station available, rejecting!\n");
LOGP(DPOCSAG, LOGL_NOTICE, "Cannot page, no trasmitting station available, rejecting!\n");
return -CAUSE_NOCHANNEL;
}
@@ -548,7 +548,7 @@ void call_down_answer(int __attribute__((unused)) callref)
static void _release(int __attribute__((unused)) callref, int __attribute__((unused)) cause)
{
PDEBUG(DPOCSAG, DEBUG_INFO, "Call has been disconnected by network.\n");
LOGP(DPOCSAG, LOGL_INFO, "Call has been disconnected by network.\n");
}
void call_down_disconnect(int callref, int cause)