~mateo-salta/nitroshare/nitroshare

« back to all changes in this revision

Viewing changes to src/util/network.cpp

  • Committer: Nathan Osman
  • Date: 2012-06-30 01:18:20 UTC
  • Revision ID: admin@quickmediasolutions.com-20120630011820-c8dz7p16fll1glro
Fixed a couple of bugs with the new broadcast class, added an icon to the wizard, and tweaked things a bit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
{
25
25
    /* Check each address to determine if it is a valid IPv4 address. */
26
26
    foreach(QNetworkAddressEntry entry, interface.addressEntries())
27
 
        if(entry.ip().toIPv4Address())
 
27
        if(entry.ip().toIPv4Address() &&
 
28
           entry.broadcast().toIPv4Address())
28
29
        {
29
30
            if(ip)        *ip        = entry.ip();
30
31
            if(broadcast) *broadcast = entry.broadcast();