*** latd-1.35/NEWS Mon Apr 15 11:19:23 2013 --- latd-1.36/NEWS Wed Aug 3 09:48:27 2022 *************** *** 1,3 **** --- 1,10 ---- + latd (1.36) unstable; urgency=low + + Fixed credit counting error for slot_b, as well as some other random + stuff that was just not right. + + -- Johnny Billquist (bqt@softjar.se) Wed Aug 3 09:48:20 2022 + latd (1.33) unstable; urgency=low * Switch to dpkg-source 3.0 (native) format *** latd-1.35/configure.ac Wed Aug 12 20:18:03 2015 --- latd-1.36/configure.ac Wed Aug 3 10:00:37 2022 *************** *** 1,7 **** dnl Process this file with autoconf to produce a configure script. dnl Checks that we are given a good source directory. ! AC_INIT([latd], [1.35]) AC_CONFIG_SRCDIR([latcp.cc]) AM_INIT_AUTOMAKE --- 1,7 ---- dnl Process this file with autoconf to produce a configure script. dnl Checks that we are given a good source directory. ! AC_INIT([latd], [1.36]) AC_CONFIG_SRCDIR([latcp.cc]) AM_INIT_AUTOMAKE *** latd-1.35/connection.cc Thu Jun 25 10:57:34 2009 --- latd-1.36/connection.cc Sat Nov 20 17:31:43 2021 *************** *** 417,423 **** case 0xa0: // Data_b message - port information if (session) ! session->set_port((unsigned char *)slotcmd); break; case 0xb0: --- 417,423 ---- case 0xa0: // Data_b message - port information if (session) ! session->set_port((unsigned char *)slotcmd, msglen); break; case 0xb0: *** latd-1.35/server.cc Wed Aug 20 15:10:23 2008 --- latd-1.36/server.cc Sun Dec 19 03:35:05 2021 *************** *** 833,839 **** if (fdi != fdlist.end()) return; // Already exists ! fdlist.push_back(fdinfo(fdinfo(fd, NULL, type))); } // Remove FD from the FD list --- 833,839 ---- if (fdi != fdlist.end()) return; // Already exists ! fdlist.push_back(fdinfo(fd, NULL, type)); } // Remove FD from the FD list *************** *** 845,851 **** fdi = find(fdlist.begin(), fdlist.end(), fd); if (fdi == fdlist.end()) return; // Does not exist ! fdlist.remove(*fdi); } // Change the DISABLED state of a PTY fd --- 845,851 ---- fdi = find(fdlist.begin(), fdlist.end(), fd); if (fdi == fdlist.end()) return; // Does not exist ! fdlist.erase(fdi); } // Change the DISABLED state of a PTY fd *** latd-1.35/services.cc Wed Aug 20 15:10:23 2008 --- latd-1.36/services.cc Sun Dec 19 03:38:01 2021 *************** *** 258,271 **** output.setf(std::ios::hex, std::ios::basefield); ! output << setiosflags(std::ios::right | std::ios::uppercase) << std::setfill('0') << std::setw(2) << (int)addr[0] << '-' << std::setw(2) << (int)addr[1] << '-' << std::setw(2) << (int)addr[2] << '-' << std::setw(2) << (int)addr[3] << '-' << std::setw(2) << (int)addr[4] << '-' << std::setw(2) << (int)addr[5] ! << resetiosflags(std::ios::right | std::ios::uppercase) << std::setfill(' '); output.setf(std::ios::right, std::ios::adjustfield); output << " " << n->second.get_ident() << std::endl; --- 258,271 ---- output.setf(std::ios::hex, std::ios::basefield); ! output << std::setiosflags(std::ios::right | std::ios::uppercase) << std::setfill('0') << std::setw(2) << (int)addr[0] << '-' << std::setw(2) << (int)addr[1] << '-' << std::setw(2) << (int)addr[2] << '-' << std::setw(2) << (int)addr[3] << '-' << std::setw(2) << (int)addr[4] << '-' << std::setw(2) << (int)addr[5] ! << std::resetiosflags(std::ios::right | std::ios::uppercase) << std::setfill(' '); output.setf(std::ios::right, std::ios::adjustfield); output << " " << n->second.get_ident() << std::endl; *** latd-1.35/session.cc Thu Sep 11 15:36:01 2008 --- latd-1.36/session.cc Sat Nov 20 17:29:48 2021 *************** *** 357,371 **** } } ! void LATSession::set_port(unsigned char *inbuf) { unsigned char *ptr = inbuf+sizeof(LAT_SlotCmd); if (*ptr & 0x10) /* BREAK */ { debuglog(("Sending break\n")); tcsendbreak(master_fd, 0); } } // Add a slot to an existing message --- 357,374 ---- } } ! void LATSession::set_port(unsigned char *inbuf, int len) { unsigned char *ptr = inbuf+sizeof(LAT_SlotCmd); + if (len) { if (*ptr & 0x10) /* BREAK */ { debuglog(("Sending break\n")); tcsendbreak(master_fd, 0); } + --remote_credit; + } } // Add a slot to an existing message *** latd-1.35/session.h Tue Mar 16 14:13:23 2004 --- latd-1.36/session.h Sat Nov 20 17:33:01 2021 *************** *** 23,29 **** void remove_session(); void send_disabled_message(); void add_credit(signed short c); ! void set_port(unsigned char *inbuf); int get_remote_credit() { return remote_credit; } void inc_remote_credit(int inc) { remote_credit+=inc; } void got_connection(unsigned char _remid); --- 23,29 ---- void remove_session(); void send_disabled_message(); void add_credit(signed short c); ! void set_port(unsigned char *inbuf, int len); int get_remote_credit() { return remote_credit; } void inc_remote_credit(int inc) { remote_credit+=inc; } void got_connection(unsigned char _remid);