Public feed #533162

Untitled

public text v1 · immutable
Raw Edit
·published 2007-06-03 11:11 UTC
rendered paste body
jrs@linuxserver:/usr/src/universal/sources/svn/libgsmd/gsm/src/gsmd$ svn diff
Index: usock.c
===================================================================
--- usock.c     (revisjon 2134)
+++ usock.c     (arbeidskopi)
@@ -133,7 +133,7 @@
                /* FIXME: number type! */
                break;
        case GSMD_VOICECALL_HANGUP:
-               cmd = atcmd_fill("ATH0", 5, &usock_cmd_cb, gu, gph->id);
+               cmd = atcmd_fill("ATH", 5, &usock_cmd_cb, gu, gph->id);
                break;
        case GSMD_VOICECALL_ANSWER:
                cmd = atcmd_fill("ATA", 4, &usock_cmd_cb, gu, gph->id);
Index: gsmd.c
===================================================================
--- gsmd.c      (revisjon 2134)
+++ gsmd.c      (arbeidskopi)
@@ -311,6 +311,7 @@
        { "leak-report", 0, NULL, 'L' },
        { "vendor", 1, NULL, 'v' },
        { "machine", 1, NULL, 'm' },
+       { "wait", 1, NULL, 'w' },
        { 0, 0, 0, 0 }
 };

@@ -333,6 +334,7 @@
               "\t-l file\t--logfile file\tSpecify a logfile to log to\n"
               "\t-v\t--vendor v\tSpecify GSM modem vendor plugin\n"
               "\t-m\t--machine m\tSpecify GSM modem machine plugin\n"
+              "\t-w\t--wait m\tWait for the AT Interpreter Ready message\n"
               );
 }

@@ -362,7 +364,7 @@
        char *logfile = "syslog";
        char *vendor_name = NULL;
        char *machine_name = NULL;
-
+       int wait = -1;
        signal(SIGTERM, sig_handler);
        signal(SIGINT, sig_handler);
        signal(SIGSEGV, sig_handler);
@@ -374,7 +376,7 @@
        print_header();

        /*FIXME: parse commandline, set daemonize, device, ... */
-       while ((argch = getopt_long(argc, argv, "FVLdhp:s:l:v:m:", opts, NULL)) != -1) {
+       while ((argch = getopt_long(argc, argv, "FVLdhp:s:l:v:m:w:", opts, NULL)) != -1) {
                switch (argch) {
                case 'V':
                        /* FIXME */
@@ -411,6 +413,9 @@
                case 'm':
                        machine_name = optarg;
                        break;
+              case 'w':
+                     wait = atoi(optarg);
+                     break;
                }
        }

@@ -454,7 +459,10 @@
                fprintf(stderr, "couldn't initialize machine plugin\n");
                exit(1);
        }
+       if (wait >= 0)
+              g.interpreter_ready = !wait;

+
        if (atcmd_init(&g, fd) < 0) {
                fprintf(stderr, "can't initialize UART device\n");
                exit(1);
@@ -472,7 +480,7 @@
        if (g.interpreter_ready)
                gsmd_initsettings(&g);

-       gmsd_alive_start(&g);
+//     gmsd_alive_start(&g);

        gsmd_opname_init(&g);

jrs@linuxserver:/usr/src/universal/sources/svn/libgsmd/gsm/src/gsmd$