Index: channels/chan_iax2.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v retrieving revision 1.222 diff -u -r1.222 chan_iax2.c --- channels/chan_iax2.c 11 Dec 2004 19:25:10 -0000 1.222 +++ channels/chan_iax2.c 18 Dec 2004 21:22:36 -0000 @@ -101,7 +101,7 @@ static char *desc = "Inter Asterisk eXchange (Ver 2)"; static char *tdesc = "Inter Asterisk eXchange Driver (Ver 2)"; -static char *type = "IAX2"; +static char *channeltype = "IAX2"; static char context[80] = "default"; @@ -2493,16 +2493,16 @@ cs[1] = c1; for (/* ever */;;) { /* Check in case we got masqueraded into */ - if ((c0->type != type) || (c1->type != type)) { + if ((c0->type != channeltype) || (c1->type != channeltype)) { if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "Can't masquerade, we're different...\n"); /* Remove from native mode */ - if (c0->type == type) { + if (c0->type == channeltype) { ast_mutex_lock(&iaxsl[callno0]); iaxs[callno0]->bridgecallno = 0; ast_mutex_unlock(&iaxsl[callno0]); } - if (c1->type == type) { + if (c1->type == channeltype) { ast_mutex_lock(&iaxsl[callno1]); iaxs[callno1]->bridgecallno = 0; ast_mutex_unlock(&iaxsl[callno1]); @@ -2694,7 +2694,7 @@ snprintf(tmp->name, sizeof(tmp->name), "IAX2/%s@%s/%d", i->username, i->host, i->callno); else snprintf(tmp->name, sizeof(tmp->name), "IAX2/%s/%d", i->host, i->callno); - tmp->type = type; + tmp->type = channeltype; /* We can support any format by default, until we get restricted */ tmp->nativeformats = capability; tmp->readformat = 0; @@ -4374,7 +4374,7 @@ while((ext = strsep(&stringp, "&"))) { if (onoff) { if (!ast_exists_extension(NULL, regcontext, ext, 1, NULL)) - ast_add_extension(regcontext, 1, ext, 1, NULL, NULL, "Noop", strdup(peer->name), free, type); + ast_add_extension(regcontext, 1, ext, 1, NULL, NULL, "Noop", strdup(peer->name), free, channeltype); } else ast_context_remove_extension(regcontext, ext, 1, NULL); } @@ -6174,7 +6174,7 @@ if (opts) *opts='\0'; - if (chan->type != type) { + if (chan->type != channeltype) { ast_log(LOG_NOTICE, "Can't provision a non-IAX device!\n"); return -1; } @@ -6615,8 +6615,8 @@ } } else if (!strcasecmp(v->name, "timezone")) { strncpy(peer->zonetag, v->value, sizeof(peer->zonetag)-1); - }// else if (strcasecmp(v->name,"type")) - // ast_log(LOG_WARNING, "Ignoring %s\n", v->name); + }/* else if (strcasecmp(v->name,"type")) */ + /* ast_log(LOG_WARNING, "Ignoring %s\n", v->name); */ v=v->next; } if (!peer->authmethods) @@ -6753,8 +6753,8 @@ } } else if (!strcasecmp(v->name, "inkeys")) { strncpy(user->inkeys, v->value, sizeof(user->inkeys) - 1); - }// else if (strcasecmp(v->name,"type")) - // ast_log(LOG_WARNING, "Ignoring %s\n", v->name); + }/* else if (strcasecmp(v->name,"type")) + ast_log(LOG_WARNING, "Ignoring %s\n", v->name); */ v = v->next; } if (!user->authmethods) { @@ -7009,7 +7009,7 @@ strncpy(regcontext, v->value, sizeof(regcontext) - 1); /* Create context if it doesn't exist already */ if (!ast_context_find(regcontext)) - ast_context_create(NULL, regcontext, type); + ast_context_create(NULL, regcontext, channeltype); } else if (!strcasecmp(v->name, "tos")) { if (sscanf(v->value, "%i", &format) == 1) tos = format & 0xff; @@ -7036,8 +7036,8 @@ } } else if (!strcasecmp(v->name, "language")) { strncpy(language, v->value, sizeof(language) - 1); - } //else if (strcasecmp(v->name,"type")) - // ast_log(LOG_WARNING, "Ignoring %s\n", v->name); + } /* else if (strcasecmp(v->name,"type")) + ast_log(LOG_WARNING, "Ignoring %s\n", v->name); */ v = v->next; } iax2_capability = capability; @@ -7501,7 +7501,7 @@ ast_cli_unregister(&cli_show_stats); ast_cli_unregister(&cli_show_cache); ast_unregister_switch(&iax2_switch); - ast_channel_unregister(type); + ast_channel_unregister(channeltype); delete_users(); iax_provision_unload(); return 0; @@ -7585,8 +7585,8 @@ set_config(config,&sin); - if (ast_channel_register(type, tdesc, iax2_capability, iax2_request)) { - ast_log(LOG_ERROR, "Unable to register channel class %s\n", type); + if (ast_channel_register(channeltype, tdesc, iax2_capability, iax2_request)) { + ast_log(LOG_ERROR, "Unable to register channel class %s\n", channeltype); __unload_module(); return -1; }