[zaptel-commits] mattf: trunk r2360 - in /trunk: ./ zaptel.c

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Fri Mar 30 14:07:04 MST 2007


Author: mattf
Date: Fri Mar 30 16:07:03 2007
New Revision: 2360

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2360
Log:
Merged revisions 2359 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.4

........
r2359 | mattf | 2007-03-30 15:03:19 -0600 (Fri, 30 Mar 2007) | 2 lines

Fix potential spinlock recursion issue.

........

Modified:
    trunk/   (props changed)
    trunk/zaptel.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/zaptel.c
URL: http://svn.digium.com/view/zaptel/trunk/zaptel.c?view=diff&rev=2360&r1=2359&r2=2360
==============================================================================
--- trunk/zaptel.c (original)
+++ trunk/zaptel.c Fri Mar 30 16:07:03 2007
@@ -6260,6 +6260,22 @@
 	__putbuf_chunk(ss, rxb, ZT_CHUNKSIZE);
 }
 
+extern void __zt_hdlc_abort(struct zt_chan *ss, int event)
+{
+	if (ss->inreadbuf >= 0)
+		ss->readidx[ss->inreadbuf] = 0;
+	if ((ss->flags & ZT_FLAG_OPEN) && !ss->span->alarms)
+		__qevent(ss->master, event);
+}
+
+extern void zt_hdlc_abort(struct zt_chan *ss, int event)
+{
+	unsigned long flags;
+	spin_lock_irqsave(&ss->lock, flags);
+	__zt_hdlc_abort(ss, event);
+	spin_unlock_irqrestore(&ss->lock, flags);
+}
+
 extern void zt_hdlc_putbuf(struct zt_chan *ss, unsigned char *rxb, int bytes)
 {
 	unsigned long flags;
@@ -6289,20 +6305,9 @@
 #ifdef CONFIG_ZAPATA_DEBUG
 		printk("HDLC frame isn't fit into buffer space\n");
 #endif
-		zt_hdlc_abort(ss, ZT_EVENT_OVERRUN);
+		__zt_hdlc_abort(ss, ZT_EVENT_OVERRUN);
 	}
 	res = left;
-	spin_unlock_irqrestore(&ss->lock, flags);
-}
-
-extern void zt_hdlc_abort(struct zt_chan *ss, int event)
-{
-	unsigned long flags;
-	spin_lock_irqsave(&ss->lock, flags);
-	if (ss->inreadbuf >= 0)
-		ss->readidx[ss->inreadbuf] = 0;
-	if ((ss->flags & ZT_FLAG_OPEN) && !ss->span->alarms)
-		__qevent(ss->master, event);
 	spin_unlock_irqrestore(&ss->lock, flags);
 }
 



More information about the zaptel-commits mailing list