diff --git a/channels/chan_cellphone.c b/channels/chan_cellphone.c index 148bc5d..efe82d3 100644 --- a/channels/chan_cellphone.c +++ b/channels/chan_cellphone.c @@ -69,8 +69,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision: 19 $") #define CEL_CONFIG "cellphone.conf" +#define TYPE "CELL" static int prefformat = AST_FORMAT_SLINEAR; -static char type[] = "CELL"; static int discovery_interval = 60; /* The device discovery interval, default 60 seconds. */ static int sco_socket; /* This is global so it can be closed on module unload outside of the listener thread */ @@ -204,7 +204,7 @@ static int sco_connect(char *bdaddr); static int sdp_search(char *addr, int profile); static const struct ast_channel_tech cel_tech = { - .type = type, + .type = TYPE, .description = "Bluetooth Cellphone Driver", .capabilities = AST_FORMAT_SLINEAR, .requester = cel_request, @@ -750,7 +750,7 @@ static struct ast_channel *cel_new(int state, struct cel_pvt *pvt, char *cid_num pvt->fr.subclass = AST_FORMAT_SLINEAR; pvt->fr.datalen = 48; pvt->fr.samples = 24; - pvt->fr.src = type; + pvt->fr.src = TYPE; pvt->fr.offset = AST_FRIENDLY_OFFSET; pvt->fr.mallocd = 0; pvt->fr.delivery.tv_sec = 0; @@ -1731,7 +1731,7 @@ static int load_module(void) /* Make sure we can register our channel type */ if (ast_channel_register(&cel_tech)) { - ast_log(LOG_ERROR, "Unable to register channel class %s\n", type); + ast_log(LOG_ERROR, "Unable to register channel class %s\n", TYPE); return -1; }