diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-07 19:51:39 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-07 19:51:39 +0000 |
commit | 16fc398fbb5bca23a101e1a76fd7cd02b0e610a6 (patch) | |
tree | c52e3ead555df1672b49c5cd097b825962602c37 | |
parent | e6a6c845098485327372ac8aa4ab4a116da3a024 (diff) |
now fix the formatting part (bug #4207)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5597 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | channels/chan_features.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/channels/chan_features.c b/channels/chan_features.c index 65d056cfb..1e92d7ee5 100755 --- a/channels/chan_features.c +++ b/channels/chan_features.c @@ -62,16 +62,16 @@ struct feature_sub { }; static struct feature_pvt { - ast_mutex_t lock; /* Channel private lock */ - char tech[AST_MAX_EXTENSION]; /* Technology to abstract */ - char dest[AST_MAX_EXTENSION]; /* Destination to abstract */ + ast_mutex_t lock; /* Channel private lock */ + char tech[AST_MAX_EXTENSION]; /* Technology to abstract */ + char dest[AST_MAX_EXTENSION]; /* Destination to abstract */ struct ast_channel *subchan; struct feature_sub subs[3]; /* Subs */ - struct ast_channel *owner; /* Current Master Channel */ - struct feature_pvt *next; /* Next entity */ + struct ast_channel *owner; /* Current Master Channel */ + struct feature_pvt *next; /* Next entity */ } *features = NULL; -#define SUB_REAL 0 /* Active call */ +#define SUB_REAL 0 /* Active call */ #define SUB_CALLWAIT 1 /* Call-Waiting call on hold */ #define SUB_THREEWAY 2 /* Three-way call */ @@ -453,33 +453,33 @@ static struct ast_channel *features_new(struct feature_pvt *p, int state, int in ast_log(LOG_WARNING, "Unable to allocate channel structure\n"); return NULL; } - tmp->tech = &features_tech; - for (x=1;x<4;x++) { - snprintf(tmp->name, sizeof(tmp->name), "Feature/%s/%s-%d", p->tech, p->dest, x); - for (y=0;y<3;y++) { - if (y == index) - continue; - if (p->subs[x].owner && !strcasecmp(p->subs[x].owner->name, tmp->name)) - break; - } - if (y >= 3) + tmp->tech = &features_tech; + for (x=1;x<4;x++) { + snprintf(tmp->name, sizeof(tmp->name), "Feature/%s/%s-%d", p->tech, p->dest, x); + for (y=0;y<3;y++) { + if (y == index) + continue; + if (p->subs[x].owner && !strcasecmp(p->subs[x].owner->name, tmp->name)) break; } - tmp->type = type; - ast_setstate(tmp, state); - tmp->writeformat = p->subchan->writeformat; - tmp->rawwriteformat = p->subchan->rawwriteformat; - tmp->readformat = p->subchan->readformat; - tmp->rawreadformat = p->subchan->rawreadformat; - tmp->nativeformats = p->subchan->readformat; - tmp->tech_pvt = p; - p->subs[index].owner = tmp; - if (!p->owner) - p->owner = tmp; - ast_mutex_lock(&usecnt_lock); - usecnt++; - ast_mutex_unlock(&usecnt_lock); - ast_update_use_count(); + if (y >= 3) + break; + } + tmp->type = type; + ast_setstate(tmp, state); + tmp->writeformat = p->subchan->writeformat; + tmp->rawwriteformat = p->subchan->rawwriteformat; + tmp->readformat = p->subchan->readformat; + tmp->rawreadformat = p->subchan->rawreadformat; + tmp->nativeformats = p->subchan->readformat; + tmp->tech_pvt = p; + p->subs[index].owner = tmp; + if (!p->owner) + p->owner = tmp; + ast_mutex_lock(&usecnt_lock); + usecnt++; + ast_mutex_unlock(&usecnt_lock); + ast_update_use_count(); return tmp; } |