projects
/
lcr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
If ast_channel struct is not declared before ast_register_application2,
[lcr.git]
/
interface.c
diff --git
a/interface.c
b/interface.c
index
4c340d2
..
0264f46
100644
(file)
--- a/
interface.c
+++ b/
interface.c
@@
-1583,16
+1583,15
@@
void relink_interfaces(void)
struct mISDNport *mISDNport;
struct interface_port *ifport;
#endif
struct mISDNport *mISDNport;
struct interface_port *ifport;
#endif
- struct interface *interface, *temp;
- int found;
+ struct interface *interface, *temp, *found;
interface = interface_first;
while(interface) {
interface = interface_first;
while(interface) {
- found =
0
;
+ found =
NULL
;
temp = interface_newlist;
while(temp) {
if (!strcmp(temp->name, interface->name))
temp = interface_newlist;
while(temp) {
if (!strcmp(temp->name, interface->name))
- found =
1
;
+ found =
temp
;
temp = temp->next;
}
if (!found) {
temp = temp->next;
}
if (!found) {
@@
-1608,17
+1607,26
@@
void relink_interfaces(void)
if (interface->sip)
sip_exit_inst(interface);
#endif
if (interface->sip)
sip_exit_inst(interface);
#endif
+ } else {
+#ifdef WITH_SIP
+ if (interface->sip) {
+ /* move sip instance, if we keep interface */
+ found->sip_inst = interface->sip_inst;
+ interface->sip_inst = NULL;
+ }
+#endif
+ ;
}
interface = interface->next;
}
interface = interface_newlist;
while(interface) {
}
interface = interface->next;
}
interface = interface_newlist;
while(interface) {
- found =
0
;
+ found =
NULL
;
temp = interface_first;
while(temp) {
if (!strcmp(temp->name, interface->name))
temp = interface_first;
while(temp) {
if (!strcmp(temp->name, interface->name))
- found =
1
;
+ found =
temp
;
temp = temp->next;
}
if (!found) {
temp = temp->next;
}
if (!found) {