[zaptel-commits] mattf: branch mattf/zaptel-1.4-stackcleanup r4149 - /team/mattf/zaptel-1.4-st...

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Sat Apr 5 15:06:57 CDT 2008


Author: mattf
Date: Sat Apr  5 15:06:56 2008
New Revision: 4149

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4149
Log:
Move another ~44 bytes off of zt_ctl_ioctl main stack frame for completeness sake

Modified:
    team/mattf/zaptel-1.4-stackcleanup/kernel/zaptel-base.c

Modified: team/mattf/zaptel-1.4-stackcleanup/kernel/zaptel-base.c
URL: http://svn.digium.com/view/zaptel/team/mattf/zaptel-1.4-stackcleanup/kernel/zaptel-base.c?view=diff&rev=4149&r1=4148&r2=4149
==============================================================================
--- team/mattf/zaptel-1.4-stackcleanup/kernel/zaptel-base.c (original)
+++ team/mattf/zaptel-1.4-stackcleanup/kernel/zaptel-base.c Sat Apr  5 15:06:56 2008
@@ -3540,17 +3540,18 @@
 	int res = 0;
 	int x,y;
 	struct zt_chan *newmaster;
-	struct zt_dialparams tdp;
-	struct zt_maintinfo maint;
-	struct zt_indirect_data ind;
 	unsigned long flags;
 	int rv;
 	switch(cmd) {
 	case ZT_INDIRECT:
+	{
+		struct zt_indirect_data ind;
+
 		if (copy_from_user(&ind, (struct zt_indirect_data *)data, sizeof(ind)))
 			return -EFAULT;
 		VALID_CHANNEL(ind.chan);
 		return zt_chan_ioctl(inode, file, ind.op, (unsigned long) ind.data, ind.chan);
+	}
 	case ZT_SPANCONFIG:
 	{
 		struct zt_lineconfig lc;
@@ -3839,6 +3840,9 @@
 		get_user(j, (int *) data);
 		return free_tone_zone(j);
 	case ZT_SET_DIALPARAMS:
+	{
+		struct zt_dialparams tdp;
+
 		if (copy_from_user(&tdp, (struct zt_dialparams *) data, sizeof(tdp)))
 			return -EFAULT;
 		if ((tdp.dtmf_tonelen > 4000) || (tdp.dtmf_tonelen < 10))
@@ -3882,11 +3886,16 @@
 		mfr2_silence.tonesamples = tdp.mfr2_tonelen * ZT_CHUNKSIZE;
 
 		break;
+	}
 	case ZT_GET_DIALPARAMS:
+	{
+		struct zt_dialparams tdp;
+
 		tdp = global_dialparams;
 		if (copy_to_user((struct zt_dialparams *) data, &tdp, sizeof(tdp)))
 			return -EFAULT;
 		break;
+	}
 	case ZT_GETVERSION:
 	{
 		struct zt_versioninfo vi;
@@ -3899,6 +3908,8 @@
 		break;
 	}
 	case ZT_MAINT:  /* do maintenance stuff */
+	{
+		struct zt_maintinfo maint;
 		  /* get struct from user */
 		if (copy_from_user(&maint,(struct zt_maintinfo *) data, sizeof(maint)))
 			return -EFAULT;
@@ -3939,6 +3950,7 @@
 		zt_alarm_notify(spans[maint.spanno]);  /* process alarm-related events */
 		spin_unlock_irqrestore(&spans[maint.spanno]->lock, flags);
 		break;
+	}
 	case ZT_DYNAMIC_CREATE:
 	case ZT_DYNAMIC_DESTROY:
 		if (zt_dynamic_ioctl)




More information about the zaptel-commits mailing list