~ubuntu-branches/ubuntu/intrepid/iaxmodem/intrepid

« back to all changes in this revision

Viewing changes to lib/spandsp/src/at_interpreter.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien BLACHE
  • Date: 2008-02-12 15:29:42 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20080212152942-28cxxstfy8iujm0p
Tags: 1.1.0~dfsg-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 * along with this program; if not, write to the Free Software
26
26
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27
27
 *
28
 
 * $Id: at_interpreter.c,v 1.17 2007/05/15 13:22:43 steveu Exp $
 
28
 * $Id: at_interpreter.c,v 1.22 2007/12/20 11:11:16 steveu Exp $
29
29
 */
30
30
 
31
31
/*! \file */
34
34
#include <config.h>
35
35
#endif
36
36
 
37
 
#define _GNU_SOURCE
38
 
 
39
37
#include <inttypes.h>
40
38
#include <stdlib.h>
41
39
#include <stdio.h>
309
307
 
310
308
void at_reset_call_info(at_state_t *s)
311
309
{
312
 
    struct at_call_id *call_id = s->call_id;
313
 
    while (call_id)
314
 
    {
 
310
    struct at_call_id *call_id;
 
311
 
 
312
    for (call_id = s->call_id;  call_id;  call_id = call_id->next)
315
313
        free(call_id);
316
 
        call_id = call_id->next;
317
 
    }
318
314
    s->call_id = NULL;
319
315
    s->rings_indicated = 0;
320
316
    s->call_info_displayed = FALSE;
776
772
                    *u++ = ch;
777
773
                break;
778
774
            case '-':
779
 
                /* ignore dashes */
 
775
                /* Ignore dashes */
 
776
                /* This is not a standards based thing. It just improves
 
777
                   compatibility with some other modems. */
780
778
                break;
781
779
            case '+':
782
780
                /* V.250 6.3.1.1 International access code */
784
782
                break;
785
783
            case ',':
786
784
                /* V.250 6.3.1.2 Pause */
 
785
                /* Pass these through to the application to handle. */
787
786
                *u++ = ch;
788
787
                break;
789
788
            case 'T':
5265
5264
                    at_modem_control_handler_t *modem_control_handler,
5266
5265
                    void *modem_control_user_data)
5267
5266
{
 
5267
    if (s == NULL)
 
5268
    {
 
5269
        if ((s = (at_state_t *) malloc(sizeof(*s))) == NULL)
 
5270
            return NULL;
 
5271
    }
5268
5272
    memset(s, '\0', sizeof(*s));
5269
5273
    s->modem_control_handler = modem_control_handler;
5270
5274
    s->modem_control_user_data = modem_control_user_data;
5278
5282
    return s;
5279
5283
}
5280
5284
/*- End of function --------------------------------------------------------*/
 
5285
 
 
5286
int at_free(at_state_t *s)
 
5287
{
 
5288
    free(s);
 
5289
    return 0;
 
5290
}
 
5291
/*- End of function --------------------------------------------------------*/
5281
5292
/*- End of file ------------------------------------------------------------*/