* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#define RCSID "$Id: main.c,v 1.115 2002/10/12 01:28:05 fcusack Exp $"
+#define RCSID "$Id: main.c,v 1.118 2002/10/27 12:19:58 fcusack Exp $"
#include <stdio.h>
#include <ctype.h>
static struct timeval start_time; /* Time when link was started. */
struct pppd_stats link_stats;
-int link_connect_time;
+unsigned link_connect_time;
int link_stats_valid;
/*
* Early check for remote number authorization.
*/
if (!auth_number()) {
- error("calling number %q is not authorized", remote_number);
+ warn("calling number %q is not authorized", remote_number);
exit(EXIT_CNID_AUTH_FAILED);
}
link_connect_time = now.tv_sec - start_time.tv_sec;
link_stats_valid = 1;
- slprintf(numbuf, sizeof(numbuf), "%d", link_connect_time);
+ slprintf(numbuf, sizeof(numbuf), "%u", link_connect_time);
script_setenv("CONNECT_TIME", numbuf, 0);
- slprintf(numbuf, sizeof(numbuf), "%d", link_stats.bytes_out);
+ slprintf(numbuf, sizeof(numbuf), "%u", link_stats.bytes_out);
script_setenv("BYTES_SENT", numbuf, 0);
- slprintf(numbuf, sizeof(numbuf), "%d", link_stats.bytes_in);
+ slprintf(numbuf, sizeof(numbuf), "%u", link_stats.bytes_in);
script_setenv("BYTES_RCVD", numbuf, 0);
}