[svn-commits] tzafrir: trunk r1396 - /trunk/xpp/xpp_usb.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Sep 4 17:07:51 MST 2006


Author: tzafrir
Date: Mon Sep  4 19:07:50 2006
New Revision: 1396

URL: http://svn.digium.com/view/zaptel?rev=1396&view=rev
Log:
Rate limit error messages for USB URBs.

Modified:
    trunk/xpp/xpp_usb.c

Modified: trunk/xpp/xpp_usb.c
URL: http://svn.digium.com/view/zaptel/trunk/xpp/xpp_usb.c?rev=1396&r1=1395&r2=1396&view=diff
==============================================================================
--- trunk/xpp/xpp_usb.c (original)
+++ trunk/xpp/xpp_usb.c Mon Sep  4 19:07:50 2006
@@ -309,7 +309,10 @@
 
 	ret = usb_submit_urb(urb, GFP_ATOMIC);
 	if(ret < 0) {
-		ERR("%s: failed submit_urb: %d\n", __FUNCTION__, ret);
+		static int rate_limit;
+
+		if((rate_limit++ % 1000) < 5)
+			ERR("%s: failed submit_urb: %d\n", __FUNCTION__, ret);
 		xpp_urb_delete(urb);
 		ret = -EBADF;
 		goto out;



More information about the svn-commits mailing list