HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Q: Retrain Negative -- Giving up after 3 tries?



Hi Alan,

I have found the bug in the tagline - there was a calculation mistake, the
author took away a quantity in bits when in should have been in bytes.
This put around 6-12 bytes of junk on the page at the end of every tagline.

This does not totally fix the problem when hylafax is asked to retrain it
should start again at a lower speed, it does not and you still sometimes
get these endless loops.

When i get the above figured out i will post the resulting patch to the
list, meanwhile the tagline patch is included below.

PS How's udjava going? - Ardent are taking an interest :-)

- Robert

-----------------------
diff -cr hylafax-v4.0pl2.orig/faxd/TagLine.c++
hylafax-v4.0pl2/faxd/TagLine.c++
*** hylafax-v4.0pl2.orig/faxd/TagLine.c++       Sat Feb 14 21:49:37 1998
--- hylafax-v4.0pl2/faxd/TagLine.c++    Thu Aug 13 08:53:22 1998
***************
*** 236,242 ****
       * adjusted by the look ahead, a factor of the number of
       * bits pending in the G3 decoder's bit accumulator.
       */
!     u_int decoded = dec.current() - roundup(dec.getPendingBits(),8) - buf;

      if (params.vr == VR_NORMAL) {
        /*
--- 236,243 ----
       * adjusted by the look ahead, a factor of the number of
       * bits pending in the G3 decoder's bit accumulator.
       */
!     u_int look_ahead = roundup(dec.getPendingBits(),8) / 8;
!     u_int decoded = dec.current() - look_ahead - buf;

      if (params.vr == VR_NORMAL) {
        /*
diff -cr hylafax-v4.0pl2.orig/faxd/tagtest.c++
hylafax-v4.0pl2/faxd/tagtest.c++
*** hylafax-v4.0pl2.orig/faxd/tagtest.c++       Sat Feb 14 21:49:46 1998
--- hylafax-v4.0pl2/faxd/tagtest.c++    Thu Aug 13 08:53:14 1998
***************
*** 269,275 ****
       * adjusted by the look ahead, a factor of the number of
       * bits pending in the G3 decoder's bit accumulator.
       */
!     u_int decoded = dec.current() - roundup(dec.getPendingBits(),8) - buf;
      if (params.vr == VR_NORMAL) {
        /*
         * Scale text vertically before encoding.  Note the
--- 269,276 ----
       * adjusted by the look ahead, a factor of the number of
       * bits pending in the G3 decoder's bit accumulator.
       */
!     u_int look_ahead = roundup(dec.getPendingBits(),8) / 8;
!     u_int decoded = dec.current() - look_ahead - buf;
      if (params.vr == VR_NORMAL) {
        /*
         * Scale text vertically before encoding.  Note the  





Project hosted by iFAX Solutions