diff options
author | Hansen Kurli <hkurli@google.com> | 2023-12-15 07:12:17 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-12-15 07:12:17 +0000 |
commit | 581200e60200d376a97d64146c186512d538194f (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /pppd/plugins/radius/util.c | |
parent | f015527ae6167eff654b507b5d47840663bd8374 (diff) | |
parent | c3c104f692e037b64f7a23b85bcc4d09b5fb6777 (diff) | |
download | ppp-581200e60200d376a97d64146c186512d538194f.tar.gz |
Merge "Remove ppp" into main am: 436e52284b am: c3c104f692
Original change: https://android-review.googlesource.com/c/platform/external/ppp/+/2849360
Change-Id: I54765e50e69538379a1109424f9a613eeb8f696f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'pppd/plugins/radius/util.c')
-rw-r--r-- | pppd/plugins/radius/util.c | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/pppd/plugins/radius/util.c b/pppd/plugins/radius/util.c deleted file mode 100644 index 6f976a7..0000000 --- a/pppd/plugins/radius/util.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - * $Id: util.c,v 1.1 2004/11/14 07:26:26 paulus Exp $ - * - * Copyright (C) 1995,1996,1997 Lars Fenneberg - * - * Copyright 1992 Livingston Enterprises, Inc. - * - * Copyright 1992,1993, 1994,1995 The Regents of the University of Michigan - * and Merit Network, Inc. All Rights Reserved - * - * See the file COPYRIGHT for the respective terms and conditions. - * If the file is missing contact me at lf@elemental.net - * and I'll send you a copy. - * - */ - -#include <includes.h> -#include <radiusclient.h> - -/* - * Function: rc_str2tm - * - * Purpose: Turns printable string into correct tm struct entries. - * - */ - -static const char * months[] = - { - "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" - }; - -void rc_str2tm (char *valstr, struct tm *tm) -{ - int i; - - /* Get the month */ - for (i = 0; i < 12; i++) - { - if (strncmp (months[i], valstr, 3) == 0) - { - tm->tm_mon = i; - i = 13; - } - } - - /* Get the Day */ - tm->tm_mday = atoi (&valstr[4]); - - /* Now the year */ - tm->tm_year = atoi (&valstr[7]) - 1900; -} - -void rc_mdelay(int msecs) -{ - struct timeval tv; - - tv.tv_sec = (int) msecs / 1000; - tv.tv_usec = (msecs % 1000) * 1000; - - select(0,(fd_set *)NULL,(fd_set *)NULL,(fd_set *)NULL, &tv); -} - -/* - * Function: rc_mksid - * - * Purpose: generate a quite unique string - * - * Remarks: not that unique at all... - * - */ - -char * -rc_mksid (void) -{ - static char buf[15]; - static unsigned short int cnt = 0; - sprintf (buf, "%08lX%04X%02hX", - (unsigned long int) time (NULL), - (unsigned int) getpid (), - cnt & 0xFF); - cnt++; - return buf; -} |