Bug 92454 - [EFL] Return 0 when network is offline
Summary: [EFL] Return 0 when network is offline
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gyuyoung Kim
URL: http://dvcs.w3.org/hg/dap/raw-file/ti...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-26 21:21 PDT by Gyuyoung Kim
Modified: 2012-07-27 17:30 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.54 KB, patch)
2012-07-26 21:25 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (1.76 KB, patch)
2012-07-27 08:45 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gyuyoung Kim 2012-07-26 21:21:28 PDT
Network Info latest spec says 0 is returned when network is offline. r123769 modified to return *infinity value* when network is offiline.
Comment 1 Gyuyoung Kim 2012-07-26 21:25:03 PDT
Created attachment 154832 [details]
Patch
Comment 2 Chris Dumez 2012-07-26 21:44:06 PDT
Comment on attachment 154832 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=154832&action=review

> Source/WebCore/platform/efl/NetworkInfoProviderEfl.cpp:61
> +        return 0; // If network is offline, return 0.

if eeze_net_new() returns NULL, then it indicates that eth0 interface does not exist. The fact that the interface does not exist is difference from being offline. The user may be connected via another network interface. So, in my opinion, this means the bandwidth is unknown.
Comment 3 Gyuyoung Kim 2012-07-26 21:55:56 PDT
(In reply to comment #2)
> (From update of attachment 154832 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=154832&action=review
> 
> > Source/WebCore/platform/efl/NetworkInfoProviderEfl.cpp:61
> > +        return 0; // If network is offline, return 0.
> 
> if eeze_net_new() returns NULL, then it indicates that eth0 interface does not exist. The fact that the interface does not exist is difference from being offline. The user may be connected via another network interface. So, in my opinion, this means the bandwidth is unknown.

Current implementation only supports ethernet. So, if eeze_net_new() returns NULL, it means there is no device and offline now. Of course, updated patch will support network regardless of wireless and ethernet. Then, we can consider if bandwidth is unknown.
Comment 4 Gyuyoung Kim 2012-07-27 06:41:48 PDT
Kenneth, could you take a look ?
Comment 5 Kenneth Rohde Christiansen 2012-07-27 06:43:59 PDT
Comment on attachment 154832 [details]
Patch

Shouldnt you leave an FIXME: for the future? or at least a note
Comment 6 Gyuyoung Kim 2012-07-27 08:45:24 PDT
Created attachment 154962 [details]
Patch
Comment 7 Gyuyoung Kim 2012-07-27 08:47:12 PDT
(In reply to comment #5)
> (From update of attachment 154832 [details])
> Shouldnt you leave an FIXME: for the future? or at least a note

I add an FIXME comment for now. Thanks.
Comment 8 WebKit Review Bot 2012-07-27 17:30:47 PDT
Comment on attachment 154962 [details]
Patch

Clearing flags on attachment: 154962

Committed r123939: <http://trac.webkit.org/changeset/123939>
Comment 9 WebKit Review Bot 2012-07-27 17:30:52 PDT
All reviewed patches have been landed.  Closing bug.