From: Arran Cudbard-Bell Date: Thu, 20 Sep 2012 13:25:47 +0000 (+0100) Subject: Start removing the old one char expansions X-Git-Tag: release_3_0_0_beta1~1693 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3675eb75bfb834da294ecfc579abc617414d688;p=thirdparty%2Ffreeradius-server.git Start removing the old one char expansions --- diff --git a/doc/variables.rst b/doc/variables.rst index e128899e3b4..c7959318335 100644 --- a/doc/variables.rst +++ b/doc/variables.rst @@ -76,10 +76,10 @@ file for a complete list of variables. One-character variables ----------------------- -The following one-character variables are also defined. However, they -are duplicates of the previous general cases, and are only provided -for backwards compatibility. They WILL BE removed in a future -release. They also do NOT permit the use of conditional syntax +The following one-character variables were defined. They were duplicates of the +previous general cases, and were only provided for backwards compatibility. +They are in the process of being removed, this table documents the old variables +and their new equivalents. (i.e. ``:-``, as described above. +-----------+---------------------------+-----------------------+ diff --git a/src/main/xlat.c b/src/main/xlat.c index 1df05dd1f10..47e12a14f0b 100644 --- a/src/main/xlat.c +++ b/src/main/xlat.c @@ -1256,14 +1256,6 @@ int radius_xlat(char *out, int outlen, const char *fmt, case '%': *q++ = *p++; break; - case 'a': /* Protocol: */ - q += valuepair2str(q,freespace,pairfind(request->reply->vps,PW_FRAMED_PROTOCOL, 0),PW_TYPE_INTEGER, func); - p++; - break; - case 'c': /* Callback-Number */ - q += valuepair2str(q,freespace,pairfind(request->reply->vps,PW_CALLBACK_NUMBER, 0),PW_TYPE_STRING, func); - p++; - break; case 'd': /* request day */ TM = localtime_r(&request->timestamp, &s_TM); len = strftime(tmpdt, sizeof(tmpdt), "%d", TM); @@ -1273,14 +1265,6 @@ int radius_xlat(char *out, int outlen, const char *fmt, } p++; break; - case 'f': /* Framed IP address */ - q += valuepair2str(q,freespace,pairfind(request->reply->vps,PW_FRAMED_IP_ADDRESS, 0),PW_TYPE_IPADDR, func); - p++; - break; - case 'i': /* Calling station ID */ - q += valuepair2str(q,freespace,pairfind(request->packet->vps,PW_CALLING_STATION_ID, 0),PW_TYPE_STRING, func); - p++; - break; case 'l': /* request timestamp */ snprintf(tmpdt, sizeof(tmpdt), "%lu", (unsigned long) request->timestamp); @@ -1297,18 +1281,6 @@ int radius_xlat(char *out, int outlen, const char *fmt, } p++; break; - case 'n': /* NAS IP address */ - q += valuepair2str(q,freespace,pairfind(request->packet->vps,PW_NAS_IP_ADDRESS, 0),PW_TYPE_IPADDR, func); - p++; - break; - case 'p': /* Port number */ - q += valuepair2str(q,freespace,pairfind(request->packet->vps,PW_NAS_PORT, 0),PW_TYPE_INTEGER, func); - p++; - break; - case 's': /* Speed */ - q += valuepair2str(q,freespace,pairfind(request->packet->vps,PW_CONNECT_INFO, 0),PW_TYPE_STRING, func); - p++; - break; case 't': /* request timestamp */ CTIME_R(&request->timestamp, tmpdt, sizeof(tmpdt)); nl = strchr(tmpdt, '\n'); @@ -1317,15 +1289,6 @@ int radius_xlat(char *out, int outlen, const char *fmt, q += strlen(q); p++; break; - case 'u': /* User name */ - q += valuepair2str(q,freespace,pairfind(request->packet->vps,PW_USER_NAME, 0),PW_TYPE_STRING, func); - p++; - break; - case 'A': /* radacct_dir */ - strlcpy(q,radacct_dir,freespace); - q += strlen(q); - p++; - break; case 'C': /* ClientName */ strlcpy(q,request->client->shortname,freespace); q += strlen(q); @@ -1364,20 +1327,6 @@ int radius_xlat(char *out, int outlen, const char *fmt, q += strlen(q); p++; break; - case 'L': /* radlog_dir */ - strlcpy(q,radlog_dir,freespace); - q += strlen(q); - p++; - break; - case 'M': /* MTU */ - q += valuepair2str(q,freespace,pairfind(request->reply->vps,PW_FRAMED_MTU, 0),PW_TYPE_INTEGER, func); - p++; - break; - case 'R': /* radius_dir */ - strlcpy(q,radius_dir,freespace); - q += strlen(q); - p++; - break; case 'S': /* request timestamp in SQL format*/ TM = localtime_r(&request->timestamp, &s_TM); len = strftime(tmpdt, sizeof(tmpdt), "%Y-%m-%d %H:%M:%S", TM); @@ -1396,10 +1345,6 @@ int radius_xlat(char *out, int outlen, const char *fmt, } p++; break; - case 'U': /* Stripped User name */ - q += valuepair2str(q,freespace,pairfind(request->packet->vps,PW_STRIPPED_USER_NAME, 0),PW_TYPE_STRING, func); - p++; - break; case 'V': /* Request-Authenticator */ strlcpy(q,"Verified",freespace); q += strlen(q);