[zaptel-commits] branch 1.2 r1230 - /branches/1.2/xpp/
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Fri Jul 14 13:19:49 MST 2006
Author: tzafrir
Date: Fri Jul 14 15:19:48 2006
New Revision: 1230
URL: http://svn.digium.com/view/zaptel?rev=1230&view=rev
Log:
NULLify pointers to /proc files after removing them (so anyone who
tries to access them afterwards causes Oops instead of unknown behaviour).
Modified:
branches/1.2/xpp/card_fxo.c
branches/1.2/xpp/card_fxs.c
branches/1.2/xpp/xbus-core.c
branches/1.2/xpp/xpp_usb.c
branches/1.2/xpp/xpp_zap.c
Modified: branches/1.2/xpp/card_fxo.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/card_fxo.c?rev=1230&r1=1229&r2=1230&view=diff
==============================================================================
--- branches/1.2/xpp/card_fxo.c (original)
+++ branches/1.2/xpp/card_fxo.c Fri Jul 14 15:19:48 2006
@@ -211,10 +211,12 @@
if(priv->xpd_slic) {
DBG("Removing xpd DAA file %s/%s\n", xbus->busname, xpd->xpdname);
remove_proc_entry(PROC_DAA_FNAME, xpd->proc_xpd_dir);
+ priv->xpd_slic = NULL;
}
if(priv->fxo_info) {
DBG("Removing xpd FXO_INFO file %s/%s\n", xbus->busname, xpd->xpdname);
remove_proc_entry(PROC_FXO_INFO_FNAME, xpd->proc_xpd_dir);
+ priv->fxo_info = NULL;
}
#endif
}
Modified: branches/1.2/xpp/card_fxs.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/card_fxs.c?rev=1230&r1=1229&r2=1230&view=diff
==============================================================================
--- branches/1.2/xpp/card_fxs.c (original)
+++ branches/1.2/xpp/card_fxs.c Fri Jul 14 15:19:48 2006
@@ -282,10 +282,12 @@
DBG("Removing xpd SLIC file %s/%s\n", xbus->busname, xpd->xpdname);
priv->xpd_slic->data = NULL;
remove_proc_entry(PROC_SLIC_FNAME, xpd->proc_xpd_dir);
+ priv->xpd_slic = NULL;
}
if(priv->fxs_info) {
DBG("Removing xpd FXS_INFO file %s/%s\n", xbus->busname, xpd->xpdname);
remove_proc_entry(PROC_FXS_INFO_FNAME, xpd->proc_xpd_dir);
+ priv->fxs_info = NULL;
}
#endif
}
Modified: branches/1.2/xpp/xbus-core.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/xbus-core.c?rev=1230&r1=1229&r2=1230&view=diff
==============================================================================
--- branches/1.2/xpp/xbus-core.c (original)
+++ branches/1.2/xpp/xbus-core.c Fri Jul 14 15:19:48 2006
@@ -809,8 +809,10 @@
xpp_worker = NULL;
}
#ifdef CONFIG_PROC_FS
- if(proc_xbuses)
+ if(proc_xbuses) {
remove_proc_entry(PROC_XBUSES, xpp_proc_toplevel);
+ proc_xbuses = NULL;
+ }
#endif
if(packet_cache)
kmem_cache_destroy(packet_cache);
Modified: branches/1.2/xpp/xpp_usb.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/xpp_usb.c?rev=1230&r1=1229&r2=1230&view=diff
==============================================================================
--- branches/1.2/xpp/xpp_usb.c (original)
+++ branches/1.2/xpp/xpp_usb.c Fri Jul 14 15:19:48 2006
@@ -662,6 +662,7 @@
if(procsummary) {
DBG("Remove proc_entry: " PROC_USBXPP_SUMMARY "\n");
remove_proc_entry(PROC_USBXPP_SUMMARY, xbus->proc_xbus_dir);
+ procsummary = NULL;
}
xbus_disconnect(xbus); // Blocking until fully deactivated!
}
@@ -705,6 +706,7 @@
#ifdef CONFIG_PROC_FS
if(xbus->proc_xbus_dir) {
remove_proc_entry(PROC_USBXPP_SUMMARY, xbus->proc_xbus_dir);
+ xbus->proc_xbus_dir = NULL;
}
#endif
xusb->present = 0;
Modified: branches/1.2/xpp/xpp_zap.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/xpp_zap.c?rev=1230&r1=1229&r2=1230&view=diff
==============================================================================
--- branches/1.2/xpp/xpp_zap.c (original)
+++ branches/1.2/xpp/xpp_zap.c Fri Jul 14 15:19:48 2006
@@ -1491,6 +1491,7 @@
remove_proc_entry(PROC_SYNC, xpp_proc_toplevel);
if(xpp_proc_toplevel) {
remove_proc_entry(PROC_DIR, NULL);
+ xpp_proc_toplevel = NULL;
}
#endif
}
More information about the zaptel-commits
mailing list