} else if (type == GSM0710_STATUS_ACK && channel == 0) {
+ char resp[33];
+
/* Status change message */
if (len >= 2) {
/* Handle status changes on other channels */
/* Send the response to the status change request to ACK it */
gsm0710_debug(ctx, "received status line signal, sending response");
- char resp[33];
if ( len > 31 )
len = 31;
resp[0] = (char)GSM0710_STATUS_ACK;
A callback will be made to ctx->read to get the data for processing */
void gsm0710_ready_read(struct gsm0710_context *ctx)
{
+ int len, posn, posn2, header_size, channel, type;
+
/* Read more data from the underlying serial device */
if (!ctx->read)
return;
- int len = (*(ctx->read))(ctx, ctx->buffer + ctx->buffer_used,
+ len = (*(ctx->read))(ctx, ctx->buffer + ctx->buffer_used,
sizeof(ctx->buffer) - ctx->buffer_used);
if ( len <= 0 )
return;
}
/* Break the incoming data up into packets */
- int posn = 0;
- int posn2;
- int header_size;
- int channel, type;
+ posn = 0;
while (posn < ctx->buffer_used) {
if (ctx->buffer[posn] == (char)0xF9) {