From 4c5cf38ddb091b90d96236890e9ee5a9059f1d74 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 8 Oct 2009 12:49:12 -0500 Subject: [PATCH] Fix: Use DISC on dlc 0 instead of CLD Some MUX implementations do not seem to support Multiplexer Closedown (CLD) command. The standard specifies that sending DISC on DLC 0 should act exactly the same as CLD. --- gatchat/gsm0710.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gatchat/gsm0710.c b/gatchat/gsm0710.c index 80036807..39c16da7 100644 --- a/gatchat/gsm0710.c +++ b/gatchat/gsm0710.c @@ -37,8 +37,6 @@ #define GSM0710_DATA_ALT 0x03 #define GSM0710_STATUS_SET 0xE3 #define GSM0710_STATUS_ACK 0xE1 -#define GSM0710_TERMINATE_BYTE1 0xC3 -#define GSM0710_TERMINATE_BYTE2 0x01 /* Initialize a GSM 07.10 context, in preparation for startup */ void gsm0710_initialize(struct gsm0710_context *ctx) @@ -212,8 +210,6 @@ int gsm0710_startup(struct gsm0710_context *ctx) /* Shut down the GSM 07.10 session, closing all channels */ void gsm0710_shutdown(struct gsm0710_context *ctx) { - static const unsigned char terminate[2] = { GSM0710_TERMINATE_BYTE1, - GSM0710_TERMINATE_BYTE2 }; int channel; for (channel = 1; channel <= GSM0710_MAX_CHANNELS; ++channel) { @@ -224,7 +220,7 @@ void gsm0710_shutdown(struct gsm0710_context *ctx) GSM0710_CLOSE_CHANNEL, NULL, 0); } - gsm0710_write_frame(ctx, 0, GSM0710_DATA, terminate, 2); + gsm0710_write_frame(ctx, 0, GSM0710_CLOSE_CHANNEL, NULL, 0); memset(ctx->used_channels, 0, sizeof(ctx->used_channels)); }