]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
1st half of the fix for Bug 740
authorAidan Van Dyk <aidan@ifax.com>
Mon, 3 Apr 2006 16:47:18 +0000 (16:47 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Mon, 3 Apr 2006 16:47:18 +0000 (16:47 +0000)
faxd/Class1.c++

index d4fbc7b77f98e12c81886cf5b0baca99e8d49be2..60b7aab68ae2484fe28ea290bfc4af477c9d2d6e 100644 (file)
@@ -515,8 +515,16 @@ Class1Modem::renegotiatePrimary(bool constrain)
     buf[size++] = DLE;
     if (constrain) {
        // don't neotiate a faster rate
-       if (primaryV34Rate == 1 || primaryV34Rate == 2) buf[size++] = 0x70;     // 2400 bit/s
-       else buf[size++] = primaryV34Rate + 0x6D;       // drop 4800 bit/s
+       if (primaryV34Rate == 1) buf[size++] = 0x70;    // 2400 bit/s
+       else if (primaryV34Rate == 2 || primaryV34Rate == 3) {
+           /*
+            * V.34 bitspeed 2400 is only possible with symbolrate 2400, and
+            * as we have no way of determining the symbolrate, we cannot
+            * wisely instruct the modem to use 2400 bps unless the modem
+            * negotiates it independently.
+            */
+           buf[size++] = 0x71;                         // 4800 bit/s
+       } else buf[size++] = primaryV34Rate + 0x6D;     // drop 4800 bit/s
        buf[size++] = DLE;
     }
     buf[size++] = 0x6C;                                        // <DLE><pph>