[asterisk-commits] mmichelson: branch group/CCSS r236025 - /team/group/CCSS/channels/chan_dahdi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Dec 21 17:14:14 CST 2009
Author: mmichelson
Date: Mon Dec 21 17:14:12 2009
New Revision: 236025
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=236025
Log:
Fix use of uninitialized variable.
Modified:
team/group/CCSS/channels/chan_dahdi.c
Modified: team/group/CCSS/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_dahdi.c?view=diff&rev=236025&r1=236024&r2=236025
==============================================================================
--- team/group/CCSS/channels/chan_dahdi.c (original)
+++ team/group/CCSS/channels/chan_dahdi.c Mon Dec 21 17:14:12 2009
@@ -12075,12 +12075,12 @@
return p;
}
-static struct dahdi_pvt *determine_starting_point(char *data, ast_group_t *groupmatch, int *channelmatch, int *backwards, int *roundrobin)
+static struct dahdi_pvt *determine_starting_point(char *data, ast_group_t *groupmatch, int *channelmatch, int *backwards, int *roundrobin, int *rr_starting_point)
{
char *dest;
char *s;
+ char opt = 0;
int x;
- char opt = 0;
int y = 0;
int res = 0;
struct dahdi_pvt *p;
@@ -12162,6 +12162,9 @@
p = iflist;
}
+ if (*roundrobin) {
+ *rr_starting_point = x;
+ }
return p;
}
@@ -12193,7 +12196,6 @@
int unavailreason = 0;
struct dahdi_pvt *p;
struct ast_channel *tmp = NULL;
- int x;
char opt=0;
int res=0, y=0;
int backwards = 0;
@@ -12201,14 +12203,15 @@
int channelmatched = 0;
int groupmatched = 0;
int transcapdigital = 0;
-
- p = determine_starting_point(data, &groupmatch, &channelmatch, &backwards, &roundrobin);
+ int rr_starting_point;
+
+ p = determine_starting_point(data, &groupmatch, &channelmatch, &backwards, &roundrobin, &rr_starting_point);
/* Search for an unowned channel */
exitpvt = p;
ast_mutex_lock(&iflock);
while (p && !tmp) {
if (roundrobin)
- round_robin[x] = p;
+ round_robin[rr_starting_point] = p;
#if 0
ast_verbose("name = %s, %d, %d, %llu\n",p->owner ? p->owner->name : "<none>", p->channel, channelmatch, groupmatch);
#endif
@@ -12323,8 +12326,8 @@
int channelmatched = 0;
int backwards = 0;
int roundrobin = 0;
- /* STUB */
- p = determine_starting_point((char *)dest, &groupmatch, &channelmatch, &backwards, &roundrobin);
+ int rr_starting_point = 0;
+ p = determine_starting_point((char *)dest, &groupmatch, &channelmatch, &backwards, &roundrobin, &rr_starting_point);
exitpvt = p;
for(;;) {
if (is_group_or_channel_match(p, groupmatch, &groupmatched, channelmatch, &channelmatched)) {
More information about the asterisk-commits
mailing list