Yet Another Bugfix in this shitty library.
git-svn-id: http://yate.null.ro/svn/yate/trunk@419 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
609e58a3d2
commit
f3f9c6ca32
|
@ -1254,11 +1254,13 @@ int iax_call(struct iax_session *session, char *cidnum, char *cidname, char *ich
|
|||
if(secret)
|
||||
strncpy(session->secret, secret, sizeof(session->secret) - 1);
|
||||
|
||||
portno = IAX_DEFAULT_PORTNO;
|
||||
if (strchr(hostname, ':')) {
|
||||
char *tmp;
|
||||
strtok(hostname, ":");
|
||||
portno = atoi(strtok(NULL, ":"));
|
||||
} else {
|
||||
portno = IAX_DEFAULT_PORTNO;
|
||||
tmp = strtok(NULL, ":");
|
||||
if (tmp && *tmp)
|
||||
portno = atoi(tmp);
|
||||
}
|
||||
if (part2) {
|
||||
exten = strtok(part2, "@");
|
||||
|
|
Loading…
Reference in New Issue