Enlightenment CVS committal Author : devilhorns Project : e_modules Module : net
Dir : e_modules/net Modified Files: e_mod_main.c Log Message: Combination patch from sndev, modified to handle the old variables per-instance rather than per Net structure. Removed the first_time variable as it wasn't being used anywhere. =================================================================== RCS file: /cvs/e/e_modules/net/e_mod_main.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -3 -r1.31 -r1.32 --- e_mod_main.c 25 May 2006 15:54:55 -0000 1.31 +++ e_mod_main.c 29 May 2006 01:48:43 -0000 1.32 @@ -11,6 +11,8 @@ Evas_Object *net_obj; Net *net; Ecore_Timer *check_timer; + unsigned long old_in; + unsigned long old_out; }; struct _Net @@ -444,9 +446,6 @@ FILE *stat; char dev[64]; char buf[256]; - static unsigned long old_in = 0; - static unsigned long old_out = 0; - static int first_time = 1; unsigned long in = 0; unsigned long out = 0; unsigned long dummy = 0; @@ -492,21 +491,15 @@ if (!found) return 1; - bytes_in = in - old_in; - bytes_out = out - old_out; + bytes_in = in - inst->old_in; + bytes_out = out - inst->old_out; if (bytes_in < 0) bytes_in = 0; if (bytes_out < 0) bytes_out = 0; - old_in = in; - old_out = out; - - if (first_time) - { - first_time = 0; - return 1; - } + inst->old_in = in; + inst->old_out = out; if (bytes_in <= 0) edje_object_part_text_set(inst->net_obj, "rx_label", "Rx: 0 B"); ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs