diff --git a/mbtask/outstat.c b/mbtask/outstat.c index 54b5d52f..70d5d595 100644 --- a/mbtask/outstat.c +++ b/mbtask/outstat.c @@ -310,14 +310,6 @@ int outstat() */ if (internet) tmp->flavors |= F_CALL; - /* - * Always set semafore do_inet - */ - if (!s_do_inet) { - CreateSema((char *)"do_inet"); - s_do_inet = TRUE; - tasklog('c', "Created semafore do_inet"); - } } if ((tmp->flavors) & F_IMM ) { flstr[0]='I'; @@ -438,6 +430,15 @@ int outstat() nxt_min = 0; } + /* + * Always set semafore do_inet if internet is needed. + */ + if (!s_do_inet && inet_calls) { + CreateSema((char *)"do_inet"); + s_do_inet = TRUE; + tasklog('c', "Created semafore do_inet"); + } + tasklog('o', "Call inet=%d, isdn=%d, pots=%d", inet_calls, isdn_calls, pots_calls); tasklog('+', "Next event at %02d:%02d UTC", nxt_hour, nxt_min); return 0;