PERROR("Remote application did not send us a valid ref with a message.\n");
return(-1);
}
/* find join instance */
join = join_first;
PERROR("Remote application did not send us a valid ref with a message.\n");
return(-1);
}
/* find join instance */
join = join_first;
- while(join)
- {
+ while(join) {
if (join->j_serial == msg->ref)
break;
join = join->next;
}
if (join->j_serial == msg->ref)
break;
join = join->next;
}
- if (!join)
- {
+ if (!join) {
PDEBUG(DEBUG_LOG, "No join found with serial %d. (May have been already released.)\n", msg->ref);
return(0);
}
/* check application */
PDEBUG(DEBUG_LOG, "No join found with serial %d. (May have been already released.)\n", msg->ref);
return(0);
}
/* check application */
- if (join->j_type != JOIN_TYPE_REMOTE)
- {
+ if (join->j_type != JOIN_TYPE_REMOTE) {
PERROR("Ref %d does not belong to a remote join instance.\n", msg->ref);
return(-1);
}
PERROR("Ref %d does not belong to a remote join instance.\n", msg->ref);
return(-1);
}
- if (admin->sock != ((class JoinRemote *)join)->j_remote_id)
- {
+ if (admin->sock != ((class JoinRemote *)join)->j_remote_id) {
PERROR("Ref %d belongs to remote application %s, but not to sending application %s.\n", msg->ref, ((class JoinRemote *)join)->j_remote_name, admin->remote_name);
return(-1);
}
PERROR("Ref %d belongs to remote application %s, but not to sending application %s.\n", msg->ref, ((class JoinRemote *)join)->j_remote_name, admin->remote_name);
return(-1);
}
@@ -743,8+697,7 @@ int admin_message_from_join(int remote_id, unsigned int ref, int message_type, u
* maybe there is no given remote application
*/
admin = admin_first;
* maybe there is no given remote application
*/
admin = admin_first;
- while(admin)
- {
+ while(admin) {
if (admin->remote_name[0] && admin->sock==remote_id)
break;
admin = admin->next;
if (admin->remote_name[0] && admin->sock==remote_id)
break;
admin = admin->next;
@@ -755,8+708,7 @@ int admin_message_from_join(int remote_id, unsigned int ref, int message_type, u
/* seek to end of response list */
responsep = &admin->response;
/* seek to end of response list */
responsep = &admin->response;
- while(*responsep)
- {
+ while(*responsep) {
responsep = &(*responsep)->next;
}
responsep = &(*responsep)->next;
}
@@ -809,11+761,9 @@ int admin_state(struct admin_queue **responsep)
/* interface count */
i = 0;
interface = interface_first;
/* interface count */
i = 0;
interface = interface_first;
- while(interface)
- {
+ while(interface) {
ifport = interface->ifport;
ifport = interface->ifport;
- while(ifport)
- {
+ while(ifport) {
i++;
ifport = ifport->next;
}
i++;
ifport = ifport->next;
}
@@ -823,8+773,7 @@ int admin_state(struct admin_queue **responsep)
/* remote connection count */
i = 0;
admin = admin_first;
/* remote connection count */
i = 0;
admin = admin_first;
- while(admin)
- {
+ while(admin) {
if (admin->remote_name[0])
i++;
admin = admin->next;
if (admin->remote_name[0])
i++;
admin = admin->next;
@@ -833,8+782,7 @@ int admin_state(struct admin_queue **responsep)
/* join count */
join = join_first;
i = 0;
/* join count */
join = join_first;
i = 0;
- while(join)
- {
+ while(join) {
i++;
join = join->next;
}
i++;
join = join->next;
}
@@ -842,8+790,7 @@ int admin_state(struct admin_queue **responsep)
/* apppbx count */
apppbx = apppbx_first;
i = 0;
/* apppbx count */
apppbx = apppbx_first;
i = 0;
- while(apppbx)
- {
+ while(apppbx) {
i++;
apppbx = apppbx->next;
}
i++;
apppbx = apppbx->next;
}
@@ -851,8+798,7 @@ int admin_state(struct admin_queue **responsep)
/* port count */
i = 0;
port = port_first;
/* port count */
i = 0;
port = port_first;
- while(port)
- {
+ while(port) {
i++;
port = port->next;
}
i++;
port = port->next;
}
@@ -876,27+822,30 @@ int admin_state(struct admin_queue **responsep)