"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tivo_beacon.c" between
minidlna-1.2.1.tar.gz and minidlna-1.3.0.tar.gz

About: ReadyMedia (formerly known as MiniDLNA) is a simple media server software, with the aim of being fully compliant with DLNA/UPnP-AV clients.

tivo_beacon.c  (minidlna-1.2.1):tivo_beacon.c  (minidlna-1.3.0)
skipping to change at line 47 skipping to change at line 47
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <errno.h> #include <errno.h>
#include <time.h> #include <time.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <net/if.h> #include <net/if.h>
#include <sys/poll.h> #include <poll.h>
#include <netdb.h> #include <netdb.h>
#include "event.h"
#include "tivo_beacon.h" #include "tivo_beacon.h"
#include "upnpglobalvars.h" #include "upnpglobalvars.h"
#include "log.h" #include "log.h"
/* OpenAndConfHTTPSocket() : /* OpenAndConfHTTPSocket() :
* setup the socket used to handle incoming HTTP connections. */ * setup the socket used to handle incoming HTTP connections. */
int int
OpenAndConfTivoBeaconSocket() OpenAndConfTivoBeaconSocket()
{ {
int s; int s;
skipping to change at line 291 skipping to change at line 292
DPRINTF(E_DEBUG, L_TIVO, "Received new beacon: machine(%s/%s) pla tform(%s) services(%s)\n", DPRINTF(E_DEBUG, L_TIVO, "Received new beacon: machine(%s/%s) pla tform(%s) services(%s)\n",
machine ? machine : "-", machine ? machine : "-",
identity ? identity : "-", identity ? identity : "-",
platform ? platform : "-", platform ? platform : "-",
services ? services : "-" ); services ? services : "-" );
return 1; return 1;
} }
return 0; return 0;
} }
void ProcessTiVoBeacon(int s) void ProcessTiVoBeacon(struct event *ev)
{ {
int n; int s, n;
char *cp; char *cp;
struct sockaddr_in sendername; struct sockaddr_in sendername;
socklen_t len_r; socklen_t len_r;
char bufr[1500]; char bufr[1500];
len_r = sizeof(struct sockaddr_in); len_r = sizeof(struct sockaddr_in);
s = ev->fd;
/* We only expect to see beacon msgs from TiVo's and possibly other tivo servers */ /* We only expect to see beacon msgs from TiVo's and possibly other tivo servers */
n = recvfrom(s, bufr, sizeof(bufr), 0, n = recvfrom(s, bufr, sizeof(bufr), 0,
(struct sockaddr *)&sendername, &len_r); (struct sockaddr *)&sendername, &len_r);
if( n > 0 ) if( n > 0 )
bufr[n] = '\0'; bufr[n] = '\0';
/* find which subnet the client is in */ /* find which subnet the client is in */
for(n = 0; n<n_lan_addr; n++) for(n = 0; n<n_lan_addr; n++)
{ {
if( (sendername.sin_addr.s_addr & lan_addr[n].mask.s_addr) if( (sendername.sin_addr.s_addr & lan_addr[n].mask.s_addr)
 End of changes. 5 change blocks. 
3 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)