mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-21 01:42:18 +00:00
added peer announcment to monitor interface.
This commit is contained in:
parent
3ea6d4f324
commit
27daf02f81
@ -623,7 +623,7 @@ int monitor_announce_peer(unsigned char *sid)
|
||||
{
|
||||
unsigned char msg[1024];
|
||||
snprintf((char *)msg,1024,"\nnewpeer %s\n",overlay_render_sid(sid));
|
||||
monitor_tell_clients(msg,strlen((char *)msg));
|
||||
monitor_tell_clients(msg,strlen((char *)msg),MONITOR_PEERS);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -651,17 +651,17 @@ int monitor_send_audio(vomp_call_state *call,overlay_mdp_frame *audio)
|
||||
&msg[msglen],sample_bytes);
|
||||
msglen+=sample_bytes;
|
||||
|
||||
monitor_tell_clients(msg,msglen);
|
||||
monitor_tell_clients(msg,msglen,MONITOR_VOMP);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int monitor_tell_clients(unsigned char *msg,int msglen)
|
||||
int monitor_tell_clients(unsigned char *msg,int msglen,int mask)
|
||||
{
|
||||
int i;
|
||||
for(i=0;i<monitor_socket_count;i++)
|
||||
{
|
||||
if (!(monitor_sockets[i].flags&MONITOR_VOMP))
|
||||
if (!(monitor_sockets[i].flags&mask))
|
||||
continue;
|
||||
nextInSameSlot:
|
||||
errno=0;
|
||||
|
2
serval.h
2
serval.h
@ -1465,7 +1465,7 @@ int monitor_get_fds(struct pollfd *fds,int *fdcount,int fdmax);
|
||||
int monitor_call_status(vomp_call_state *call);
|
||||
int monitor_send_audio(vomp_call_state *call,overlay_mdp_frame *audio);
|
||||
int monitor_announce_peer(unsigned char *sid);
|
||||
int monitor_tell_clients(unsigned char *msg,int msglen);
|
||||
int monitor_tell_clients(unsigned char *msg,int msglen,int mask);
|
||||
extern int monitor_socket_count;
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user