|
|
| version 1.1.1.2, 2012/05/29 12:55:57 | version 1.1.1.3, 2013/07/22 00:32:35 |
|---|---|
| Line 1 | Line 1 |
| /* $Id$ */ | /* $Id$ */ |
| /* MiniUPnP project | /* MiniUPnP project |
| * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ | * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ |
| * (c) 2006-2011 Thomas Bernard | * (c) 2006-2012 Thomas Bernard |
| * This software is subject to the conditions detailed | * This software is subject to the conditions detailed |
| * in the LICENCE file provided within the distribution */ | * in the LICENCE file provided within the distribution */ |
| Line 91 getifstats(const char * ifname, struct ifdata * data) | Line 91 getifstats(const char * ifname, struct ifdata * data) |
| f = fopen(fname, "r"); | f = fopen(fname, "r"); |
| if(f) { | if(f) { |
| if(fgets(line, sizeof(line), f)) { | if(fgets(line, sizeof(line), f)) { |
| data->baudrate = 1000000*atoi(line); | i = atoi(line); /* 65535 means unknown */ |
| if(i > 0 && i < 65535) | |
| data->baudrate = 1000000*i; | |
| } | } |
| fclose(f); | fclose(f); |
| } else { | } else { |