mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
Minor fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -363,7 +363,7 @@ int unload_module(void)
|
|||||||
int load_module(void)
|
int load_module(void)
|
||||||
{
|
{
|
||||||
snprintf((char *)qdir,sizeof(qdir)-1,"%s/%s",(char *)ast_config_AST_SPOOL_DIR,"qcall");
|
snprintf((char *)qdir,sizeof(qdir)-1,"%s/%s",(char *)ast_config_AST_SPOOL_DIR,"qcall");
|
||||||
mkdir(qdir,0660);
|
mkdir(qdir,0760);
|
||||||
pthread_create(&qcall_thread,NULL,qcall,NULL);
|
pthread_create(&qcall_thread,NULL,qcall,NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -3726,7 +3726,9 @@ static int check_user(struct sip_pvt *p, struct sip_request *req, char *cmd, cha
|
|||||||
ast_rtp_setnat(p->vrtp, p->nat);
|
ast_rtp_setnat(p->vrtp, p->nat);
|
||||||
}
|
}
|
||||||
p->canreinvite = peer->canreinvite;
|
p->canreinvite = peer->canreinvite;
|
||||||
|
if (strlen(peer->username))
|
||||||
strncpy(p->username, peer->name, sizeof(p->username) - 1);
|
strncpy(p->username, peer->name, sizeof(p->username) - 1);
|
||||||
|
strncpy(p->peername, peer->name, sizeof(p->peername) - 1);
|
||||||
if (strlen(peer->context))
|
if (strlen(peer->context))
|
||||||
strncpy(p->context, peer->context, sizeof(p->context) - 1);
|
strncpy(p->context, peer->context, sizeof(p->context) - 1);
|
||||||
p->callgroup = peer->callgroup;
|
p->callgroup = peer->callgroup;
|
||||||
@@ -4413,8 +4415,8 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
|
|||||||
p->needdestroy = 1;
|
p->needdestroy = 1;
|
||||||
}
|
}
|
||||||
} else if (!strcasecmp(msg, "BYE")) {
|
} else if (!strcasecmp(msg, "BYE")) {
|
||||||
if (!strlen(p->username))
|
if (!strlen(p->peername))
|
||||||
ast_log(LOG_WARNING, "Acked to authenticate BYE, to %s:%d but we have no matching peer!\n",
|
ast_log(LOG_WARNING, "Asked to authenticate BYE, to %s:%d but we have no matching peer!\n",
|
||||||
inet_ntoa(p->recv.sin_addr), ntohs(p->recv.sin_port));
|
inet_ntoa(p->recv.sin_addr), ntohs(p->recv.sin_port));
|
||||||
if ((p->authtries > 1) || do_proxy_auth(p, req, "BYE", 0)) {
|
if ((p->authtries > 1) || do_proxy_auth(p, req, "BYE", 0)) {
|
||||||
ast_log(LOG_NOTICE, "Failed to authenticate on BYE to '%s'\n", get_header(&p->initreq, "From"));
|
ast_log(LOG_NOTICE, "Failed to authenticate on BYE to '%s'\n", get_header(&p->initreq, "From"));
|
||||||
@@ -4485,8 +4487,8 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
|
|||||||
break;
|
break;
|
||||||
case 407:
|
case 407:
|
||||||
if (!strcasecmp(msg, "BYE")) {
|
if (!strcasecmp(msg, "BYE")) {
|
||||||
if (!strlen(p->username))
|
if (!strlen(p->peername))
|
||||||
ast_log(LOG_WARNING, "Acked to authenticate BYE, to %s:%d but we have no matching peer!\n",
|
ast_log(LOG_WARNING, "Asked to authenticate BYE, to %s:%d but we have no matching peer!\n",
|
||||||
inet_ntoa(p->recv.sin_addr), ntohs(p->recv.sin_port));
|
inet_ntoa(p->recv.sin_addr), ntohs(p->recv.sin_port));
|
||||||
if ((p->authtries > 1) || do_proxy_auth(p, req, "BYE", 0)) {
|
if ((p->authtries > 1) || do_proxy_auth(p, req, "BYE", 0)) {
|
||||||
ast_log(LOG_NOTICE, "Failed to authenticate on BYE to '%s'\n", get_header(&p->initreq, "From"));
|
ast_log(LOG_NOTICE, "Failed to authenticate on BYE to '%s'\n", get_header(&p->initreq, "From"));
|
||||||
|
Reference in New Issue
Block a user