summaryrefslogtreecommitdiffstats
path: root/gatchat/gsm0710.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-10-08 12:49:12 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-10-08 12:53:25 -0500
commit4c5cf38ddb091b90d96236890e9ee5a9059f1d74 (patch)
tree182e7483b7c00a4a92e37e3afca09b47e28c654f /gatchat/gsm0710.c
parente2415161de74935a3a66765ffb38132c209259c3 (diff)
downloadofono-4c5cf38ddb091b90d96236890e9ee5a9059f1d74.tar.bz2
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.
Diffstat (limited to 'gatchat/gsm0710.c')
-rw-r--r--gatchat/gsm0710.c6
1 files changed, 1 insertions, 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));
}