r60 - in unstable/rutilt/debian: . patches
benh at alioth.debian.org
benh at alioth.debian.org
Sun Oct 21 23:47:29 UTC 2007
Author: benh
Date: 2007-10-21 23:47:29 +0000 (Sun, 21 Oct 2007)
New Revision: 60
Added:
unstable/rutilt/debian/patches/018_up_and_down.diff
unstable/rutilt/debian/patches/019_fix_ap_address.diff
unstable/rutilt/debian/patches/020_fix_refresh_rate_crash.diff
Modified:
unstable/rutilt/debian/changelog
unstable/rutilt/debian/patches/series
Log:
Added some more fixes.
Modified: unstable/rutilt/debian/changelog
===================================================================
--- unstable/rutilt/debian/changelog 2007-10-14 20:53:30 UTC (rev 59)
+++ unstable/rutilt/debian/changelog 2007-10-21 23:47:29 UTC (rev 60)
@@ -1,3 +1,12 @@
+rutilt (0.15-3) unstable; urgency=low
+
+ * Added patch 018_up_and_down.diff to improve reliability with
+ "legacy" drivers
+ * Added patch 019_fix_ap_address.diff
+ * Added patch 020_fix_refresh_rate_crash.diff
+
+ -- Ben Hutchings <ben at decadent.org.uk> Mon, 22 Oct 2007 00:45:59 +0100
+
rutilt (0.15-2) unstable; urgency=low
[Cesare Tirabassi]
Added: unstable/rutilt/debian/patches/018_up_and_down.diff
===================================================================
--- unstable/rutilt/debian/patches/018_up_and_down.diff (rev 0)
+++ unstable/rutilt/debian/patches/018_up_and_down.diff 2007-10-21 23:47:29 UTC (rev 60)
@@ -0,0 +1,324 @@
+--- rutilt.orig/lib/src/WE17Driver.cxx
++++ rutilt/lib/src/WE17Driver.cxx
+@@ -112,7 +112,8 @@
+ std::cerr << "CWE17Driver::CWE17Driver() Can't get interface"
+ " information : " << Exc.GetCode() << std::endl;
+ #endif // NDEBUG
+- if (Exc.GetCode() != EOPNOTSUPP) throw;
++ if (Exc.GetCode() != EOPNOTSUPP && Exc.GetCode() != ENETDOWN)
++ throw;
+ }
+ if (m_SupportedFreqVec.empty())
+ {
+--- rutilt.orig/lib/src/RTModules.cxx
++++ rutilt/lib/src/RTModules.cxx
+@@ -25,6 +25,7 @@
+ #include "RTDrivers.h"
+ #include "RTDriversRoot.h"
+ #include "ErrorsCode.h"
++#include "NetTools.h"
+
+
+
+@@ -76,9 +77,15 @@
+
+
+ void ApplyRT2400Profile (const nsUserData::CProfile& Profile,
+- nsWireless::CRT2400Driver& Driver)
++ nsWireless::CRT2400Driver& Driver,
++ nsNet::CInterface* pIface = NULL)
+ throw (nsErrors::CSystemExc)
+ {
++ if (pIface)
++ pIface->Down();
++ Driver.SetSSID (Profile.GetSSID());
++ if (pIface)
++ pIface->Up();
+ Driver.SetChannel (Profile.GetChannel());
+ Driver.SetMode (Profile.GetMode());
+ Driver.SetEncryption (Profile.GetEncryptionD());
+@@ -88,12 +95,17 @@
+
+
+ void ApplyRTxxProfile (const nsUserData::CProfile& Profile,
+- nsWireless::IDriver& Driver)
++ nsWireless::IDriver& Driver,
++ nsNet::CInterface* pIface = NULL)
+ throw (nsErrors::CSystemExc)
+ {
++ if (pIface)
++ pIface->Down();
++ Driver.SetSSID (Profile.GetSSID());
++ if (pIface)
++ pIface->Up();
+ Driver.SetMode (Profile.GetMode());
+ Driver.SetChannel (Profile.GetChannel());
+- Driver.SetSSID (Profile.GetSSID());
+ Driver.SetEncryption (Profile.GetEncryptionD());
+ Driver.SetSSID (Profile.GetSSID());
+
+@@ -218,9 +230,13 @@
+ } // RecordProfiles()
+
+
+-void nsCore::CRT2400Module::Connect (const nsWireless::CCell& Cell)
++void nsCore::CRT2400Module::Connect (const nsWireless::CCell& Cell,
++ nsNet::CInterface* pIface)
+ throw (nsErrors::CSystemExc, std::bad_alloc)
+ {
++ pIface->Down();
++ m_pDriver->SetSSID (Cell.GetSSID());
++ pIface->Up();
+ if (Cell.GetMode() == nsWireless::AdHoc);
+ {
+ if (Cell.GetChannel())
+@@ -236,10 +252,11 @@
+ } // Connect()
+
+
+-void nsCore::CRT2400Module::ApplyProfile (unsigned Pos)
++void nsCore::CRT2400Module::ApplyProfile (unsigned Pos,
++ nsNet::CInterface* pIface)
+ throw (nsErrors::CSystemExc)
+ {
+- ApplyRT2400Profile (m_ProfilesFile [Pos], *m_pDriver);
++ ApplyRT2400Profile (m_ProfilesFile [Pos], *m_pDriver, pIface);
+
+ } // ApplyProfile()
+
+@@ -364,12 +381,15 @@
+ } // EditNewProfile()
+
+
+-void nsCore::CRTAdvancedModule::Connect (const nsWireless::CCell& Cell)
++void nsCore::CRTAdvancedModule::Connect (const nsWireless::CCell& Cell,
++ nsNet::CInterface *pIface)
+ throw (nsErrors::CSystemExc, std::bad_alloc)
+ {
++ pIface->Down();
++ m_pDriver->SetSSID (Cell.GetSSID());
++ pIface->Up();
+ m_pDriver->SetMode (nsWireless::GetMatchingMode (Cell.GetMode()));
+ m_pDriver->SetChannel (Cell.GetChannel());
+- m_pDriver->SetSSID (Cell.GetSSID());
+ m_pDriver->SetEncryption (Cell.GetEncryptionD());
+ m_pDriver->SetSSID (Cell.GetSSID());
+ try
+@@ -381,10 +401,11 @@
+ } // Connect()
+
+
+-void nsCore::CRTAdvancedModule::ApplyProfile (unsigned Pos)
++void nsCore::CRTAdvancedModule::ApplyProfile (unsigned Pos,
++ nsNet::CInterface* pIface)
+ throw (nsErrors::CSystemExc)
+ {
+- ApplyRTxxProfile (m_ProfilesFile [Pos], *m_pDriver);
++ ApplyRTxxProfile (m_ProfilesFile [Pos], *m_pDriver, pIface);
+
+ } // ApplyProfile()
+
+@@ -517,12 +538,15 @@
+ } // BecomeRoot()
+
+
+-void nsCore::CRT2570Module::Connect (const nsWireless::CCell& Cell)
++void nsCore::CRT2570Module::Connect (const nsWireless::CCell& Cell,
++ nsNet::CInterface *pIface)
+ throw (nsErrors::CSystemExc, std::bad_alloc)
+ {
++ pIface->Down();
++ m_pDriver->SetSSID (Cell.GetSSID());
++ pIface->Up();
+ m_pDriver->SetMode (nsWireless::GetMatchingMode (Cell.GetMode()));
+ m_pDriver->SetChannel (Cell.GetChannel());
+- m_pDriver->SetSSID (Cell.GetSSID());
+ m_pDriver->SetEncryption (Cell.GetEncryptionD());
+ m_pDriver->SetAPMacAddr (Cell.GetAPMacAddress());
+ m_pDriver->SetSSID (Cell.GetSSID());
+@@ -530,10 +554,11 @@
+ } // Connect()
+
+
+-void nsCore::CRT2570Module::ApplyProfile (unsigned Pos)
++void nsCore::CRT2570Module::ApplyProfile (unsigned Pos,
++ nsNet::CInterface* pIface)
+ throw (nsErrors::CSystemExc)
+ {
+- ApplyRTxxProfile (m_ProfilesFile [Pos], *m_pDriver);
++ ApplyRTxxProfile (m_ProfilesFile [Pos], *m_pDriver, pIface);
+ // ? FIXME ? Does the SSID need to be set again? (WPA)
+
+ } // ApplyProfile()
+--- rutilt.orig/lib/src/GtkGUI.cxx
++++ rutilt/lib/src/GtkGUI.cxx
+@@ -384,7 +384,7 @@
+ #ifndef NDEBUG
+ std::cerr << "Applying the profile (command line)...\n";
+ #endif // NDEBUG
+- m_pModule->ApplyProfile (I);
++ m_pModule->ApplyProfile (I, m_pIface.get());
+ }
+ #ifndef NDEBUG
+ else
+@@ -582,7 +582,7 @@
+ }
+ else
+ */
+- m_pModule->Connect (Cell);
++ m_pModule->Connect (Cell, m_pIface.get());
+ SelectMatchingProfile (Cell);
+ // TODO Use FillCell() instead of AskUser() ?
+ if (AskUser ("Use dhcp with this network?", m_pWindow))
+@@ -697,6 +697,7 @@
+ if (BecomeRoot())
+ {
+ m_CellVec.clear();
++ m_pIface->Up();
+ m_pModule->GetDriver().Scan();
+ m_SiteSurveyTab.ScanningStarted();
+ m_TimeRemaining = 15000; // The driver has 15 seconds.
+@@ -751,6 +752,8 @@
+ #endif // NDEBUG
+ if (Exc.GetCode() == EINTR || Exc.GetCode() == EAGAIN)
+ return true; // We go for another SiteSurveyTimerPeriod.
++ if (Exc.GetCode() == ENETDOWN)
++ return false;
+ This->ProcessError (Exc);
+ }
+ This->m_SiteSurveyTab.ScanningStopped();
+@@ -818,7 +821,8 @@
+ {
+ if (BecomeRoot())
+ {
+- m_pModule->ApplyProfile (m_ProfileTab.GetSelectedRow());
++ m_pModule->ApplyProfile (m_ProfileTab.GetSelectedRow(),
++ m_pIface.get());
+ SetIPFromProfile();
+ ::g_timeout_add (800, reinterpret_cast< ::gboolean (*) (void*)>
+ (RefreshRateDelayedCallBack), this);
+--- rutilt.orig/include/CWE17Module.h
++++ rutilt/include/CWE17Module.h
+@@ -70,12 +70,13 @@
+ (::GtkWindow*, const nsWireless::CCell&) throw();
+ bool EditProfile (::GtkWindow*, unsigned) throw();
+ void DeleteProfile (unsigned) throw();
+- void ApplyProfile (unsigned) throw (nsErrors::CSystemExc);
++ void ApplyProfile (unsigned, nsNet::CInterface*)
++ throw (nsErrors::CSystemExc);
+ /** \warning No bound check! */
+ nsUserData::CProfile& GetProfile (unsigned) throw();
+ unsigned GetNbProfile () const throw();
+ void RecordProfiles () throw (nsErrors::CException);
+- void Connect (const nsWireless::CCell&)
++ void Connect (const nsWireless::CCell&, nsNet::CInterface*)
+ throw (nsErrors::CSystemExc, std::bad_alloc);
+ ::GtkWidget* GetPrivateTab () throw();
+ void BecomeRoot () throw (nsErrors::CException, std::bad_alloc);
+--- rutilt.orig/include/Module.h
++++ rutilt/include/Module.h
+@@ -51,6 +51,10 @@
+
+
+
++namespace nsNet{class CInterface;}
++
++
++
+ namespace nsCore
+ {
+ class ICLIModule
+@@ -78,11 +82,12 @@
+ (::GtkWindow*, const nsWireless::CCell&) throw() = 0;
+ virtual bool EditProfile (::GtkWindow*, unsigned) throw() = 0;
+ virtual void DeleteProfile (unsigned) throw() = 0;
+- virtual void ApplyProfile (unsigned) throw (nsErrors::CSystemExc) = 0;
++ virtual void ApplyProfile (unsigned, nsNet::CInterface*)
++ throw (nsErrors::CSystemExc) = 0;
+ virtual nsUserData::CProfile& GetProfile (unsigned) throw() = 0;
+ virtual unsigned GetNbProfile () const throw() = 0;
+ virtual void RecordProfiles () throw (nsErrors::CException) = 0;
+- virtual void Connect (const nsWireless::CCell&)
++ virtual void Connect (const nsWireless::CCell&, nsNet::CInterface*)
+ throw (nsErrors::CSystemExc, std::bad_alloc) = 0;
+ /** \return A GUI component to set driver specific parameters (may
+ * return 0 if none). */
+--- rutilt.orig/include/RTModules.h
++++ rutilt/include/RTModules.h
+@@ -107,11 +107,12 @@
+ (::GtkWindow*, const nsWireless::CCell&) throw();
+ bool EditProfile (::GtkWindow*, unsigned) throw();
+ void DeleteProfile (unsigned) throw();
+- void ApplyProfile (unsigned) throw (nsErrors::CSystemExc);
++ void ApplyProfile (unsigned, nsNet::CInterface*)
++ throw (nsErrors::CSystemExc);
+ nsUserData::CProfile& GetProfile (unsigned) throw();
+ unsigned GetNbProfile () const throw();
+ void RecordProfiles () throw (nsErrors::CException);
+- void Connect (const nsWireless::CCell&)
++ void Connect (const nsWireless::CCell&, nsNet::CInterface*)
+ throw (nsErrors::CSystemExc, std::bad_alloc);
+ ::GtkWidget* GetPrivateTab () throw();
+
+@@ -173,11 +174,12 @@
+ (::GtkWindow*, const nsWireless::CCell&) throw();
+ bool EditProfile (::GtkWindow*, unsigned) throw();
+ void DeleteProfile (unsigned) throw();
+- void ApplyProfile (unsigned) throw (nsErrors::CSystemExc);
++ void ApplyProfile (unsigned, nsNet::CInterface*)
++ throw (nsErrors::CSystemExc);
+ nsUserData::CProfile& GetProfile (unsigned) throw();
+ unsigned GetNbProfile () const throw();
+ void RecordProfiles () throw (nsErrors::CException);
+- void Connect (const nsWireless::CCell&)
++ void Connect (const nsWireless::CCell&, nsNet::CInterface*)
+ throw (nsErrors::CSystemExc, std::bad_alloc);
+ ::GtkWidget* GetPrivateTab () throw();
+
+@@ -339,11 +341,12 @@
+ (::GtkWindow*, const nsWireless::CCell&) throw();
+ bool EditProfile (::GtkWindow*, unsigned) throw();
+ void DeleteProfile (unsigned) throw();
+- void ApplyProfile (unsigned) throw (nsErrors::CSystemExc);
++ void ApplyProfile (unsigned, nsNet::CInterface*)
++ throw (nsErrors::CSystemExc);
+ nsUserData::CProfile& GetProfile (unsigned) throw();
+ unsigned GetNbProfile () const throw();
+ void RecordProfiles () throw (nsErrors::CException);
+- void Connect (const nsWireless::CCell&)
++ void Connect (const nsWireless::CCell&, nsNet::CInterface*)
+ throw (nsErrors::CSystemExc, std::bad_alloc);
+ ::GtkWidget* GetPrivateTab () throw();
+
+--- rutilt.orig/lib/src/CWE17Module.cxx
++++ rutilt/lib/src/CWE17Module.cxx
+@@ -127,7 +127,7 @@
+ } // EditNewProfile()
+
+
+-void nsCore::CWE17Module::ApplyProfile (unsigned Pos)
++void nsCore::CWE17Module::ApplyProfile (unsigned Pos, nsNet::CInterface*)
+ throw (nsErrors::CSystemExc)
+ {
+ ::ApplyProfile (m_ProfilesFile [Pos], *m_pDriver);
+@@ -135,7 +135,8 @@
+ } // ApplyProfile()
+
+
+-void nsCore::CWE17Module::Connect (const nsWireless::CCell& Cell)
++void nsCore::CWE17Module::Connect (const nsWireless::CCell& Cell,
++ nsNet::CInterface*)
+ throw (nsErrors::CSystemExc, std::bad_alloc)
+ {
+ // Only the txrate is not set, but it should be enough without it.
+--- rutilt.orig/lib/src/NetTools.cxx
++++ rutilt/lib/src/NetTools.cxx
+@@ -190,7 +190,7 @@
+ {
+ ::ifreq Req;
+ GetInterfaceFlags (Req, m_IfName);
+- nsSystem::Ioctl (SIOCSIFFLAGS, &Req, "Can't bring interface down.");
+ Req.ifr_flags &= ~IFF_UP;
++ nsSystem::Ioctl (SIOCSIFFLAGS, &Req, "Can't bring interface down.");
+
+ } // Down()
Added: unstable/rutilt/debian/patches/019_fix_ap_address.diff
===================================================================
--- unstable/rutilt/debian/patches/019_fix_ap_address.diff (rev 0)
+++ unstable/rutilt/debian/patches/019_fix_ap_address.diff 2007-10-21 23:47:29 UTC (rev 60)
@@ -0,0 +1,21 @@
+--- rutilt.orig/lib/src/WE17Driver.cxx
++++ rutilt/lib/src/WE17Driver.cxx
+@@ -29,6 +29,8 @@
+ #include <iostream>
+ #endif // NDEBUG
+
++#include <net/if_arp.h>
++
+ #include "WE17Driver.h"
+ #include "ErrorsCode.h"
+
+@@ -405,7 +407,8 @@
+ #ifndef NDEBUG
+ std::cerr << "CWE17Driver::SetAPMacAddr() " << Addr.GetStr() << std::endl;
+ #endif // NDEBUG
+- strncpy (m_Req.u.ap_addr.sa_data, Addr.Get(), CMacAddress::Size);
++ m_Req.u.ap_addr.sa_family = ARPHRD_ETHER;
++ memcpy (m_Req.u.ap_addr.sa_data, Addr.Get(), CMacAddress::Size);
+ Ioctl (SIOCSIWAP, std::string ("Can't set access point Mac address : ") +
+ Addr.GetStr());
+
Added: unstable/rutilt/debian/patches/020_fix_refresh_rate_crash.diff
===================================================================
--- unstable/rutilt/debian/patches/020_fix_refresh_rate_crash.diff (rev 0)
+++ unstable/rutilt/debian/patches/020_fix_refresh_rate_crash.diff 2007-10-21 23:47:29 UTC (rev 60)
@@ -0,0 +1,12 @@
+--- rutilt.orig/lib/src/GtkGUI.cxx
++++ rutilt/lib/src/GtkGUI.cxx
+@@ -1359,7 +1359,9 @@
+ << Exc.GetCode() << std::endl;
+ #endif // NDEBUG
+ }
++ m_IsIgnored = true;
+ m_PrefsPage.SetRates (RatesVec);
++ m_IsIgnored = false;
+ if (!RatesVec.empty())
+ {
+ unsigned Index (0);
Modified: unstable/rutilt/debian/patches/series
===================================================================
--- unstable/rutilt/debian/patches/series 2007-10-14 20:53:30 UTC (rev 59)
+++ unstable/rutilt/debian/patches/series 2007-10-21 23:47:29 UTC (rev 60)
@@ -11,6 +11,9 @@
002_fix_install.diff
003_fix_ELF_location.diff
013_fix_install_failure.diff
+019_fix_ap_address.diff
+020_fix_refresh_rate_crash.diff
014_make_dialogs_transient.diff
015_use_su-to-root.diff
017_change_version.diff
+018_up_and_down.diff
More information about the Pkg-ralink-commits
mailing list