mmlib/mmat.c: remove some long command related redundancy
authorMatthew Mondor <mmondor@pulsar-zone.net>
Sun, 14 Apr 2019 16:56:09 +0000 (16:56 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Sun, 14 Apr 2019 16:56:09 +0000 (16:56 +0000)
mmsoftware/mmlib/mmat.c

index 31d0acf..cd5bba3 100644 (file)
@@ -179,8 +179,8 @@ next:
                        continue;
                }
                if (*cptr == '+' || *cptr == '#' || *cptr == '!' ||
-                   *cptr == '^') {
-                       /* Long command */
+                   *cptr == '^' || (type == AT_BASIC && *cptr == 'D')) {
+                       /* Long command, including special basic dial */
                        type = AT_LONG;
                        ctx->lcmd[0] = *cptr;
                        lcmdn = 1;
@@ -209,13 +209,6 @@ next:
                                }
                                continue;
                        }
-                       /* Special dial command supports parameters */
-                       if (*cptr == 'D' && !longcmd) {
-                               ctx->lcmd[0] = 'D';
-                               lcmdn = 1;
-                               longcmd = true;
-                               continue;
-                       }
                }
                /* If a long command (ATD, AT+ or AT#) EOL delimits */
                if (longcmd) {