Bug 92454

Summary: [EFL] Return 0 when network is offline
Product: WebKit Reporter: Gyuyoung Kim <gyuyoung.kim>
Component: WebKit EFLAssignee: Gyuyoung Kim <gyuyoung.kim>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, kenneth, lucas.de.marchi, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://dvcs.w3.org/hg/dap/raw-file/tip/network-api/Overview.html
Attachments:
Description Flags
Patch
none
Patch none

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.