*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
* Copyright 2000 The FreeRADIUS server project
* Copyright 2000 Alan DeKok <aland@ox.org>
static const char rcsid[] = "$Id$";
-#include "autoconf.h"
-#include "libradius.h"
+#include <freeradius-devel/autoconf.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "radiusd.h"
+#include <freeradius-devel/radiusd.h>
/*
check_pairs = check_pairs; /* shut the compiler up */
reply_pairs = reply_pairs;
- rate = atoi((char *)request->strvalue);
+ rate = atoi((char *)request->vp_strvalue);
return rate - check->lvalue;
}
check_pairs = check_pairs; /* shut the compiler up */
reply_pairs = reply_pairs;
- if ((strchr((char *)check->strvalue, ',') == NULL) &&
- (strchr((char *)check->strvalue, '-') == NULL)) {
+ if ((strchr((char *)check->vp_strvalue, ',') == NULL) &&
+ (strchr((char *)check->vp_strvalue, '-') == NULL)) {
return (request->lvalue - check->lvalue);
}
/* Same size */
- strcpy(buf, (char *)check->strvalue);
+ strcpy(buf, (char *)check->vp_strvalue);
s = strtok(buf, ",");
while (s != NULL) {
VALUE_PAIR *check_pairs, VALUE_PAIR **reply_pairs)
{
VALUE_PAIR *vp;
- char *name = (char *)request->strvalue;
+ char *name = (char *)request->vp_strvalue;
char rest[MAX_STRING_LEN];
int len, namelen;
int ret = -1;
#if 0 /* DEBUG */
printf("Comparing %s and %s, check->attr is %d\n",
- name, check->strvalue, check->attribute);
+ name, check->vp_strvalue, check->attribute);
#endif
- len = strlen((char *)check->strvalue);
+ len = strlen((char *)check->vp_strvalue);
switch (check->attribute) {
case PW_PREFIX:
- ret = strncmp(name, (char *)check->strvalue, len);
+ ret = strncmp(name, (char *)check->vp_strvalue, len);
if (ret == 0 && rest)
strcpy(rest, name + len);
break;
if (namelen < len)
break;
ret = strcmp(name + namelen - len,
- (char *)check->strvalue);
+ (char *)check->vp_strvalue);
if (ret == 0 && rest) {
strNcpy(rest, name, namelen - len + 1);
}
pairadd(&request, vp);
}
- strcpy((char *)vp->strvalue, rest);
+ strcpy((char *)vp->vp_strvalue, rest);
vp->length = strlen(rest);
return ret;
/*
* Matches if there is NO SUCH ATTRIBUTE as the one named
- * in check->strvalue. If there IS such an attribute, it
+ * in check->vp_strvalue. If there IS such an attribute, it
* doesn't match.
*
* This is ugly, and definitely non-optimal. We should be
reply_pairs = reply_pairs;
if (check->lvalue == 0) {
- dict = dict_attrbyname((char *)check->strvalue);
+ dict = dict_attrbyname((char *)check->vp_strvalue);
if (dict == NULL) {
return -1;
}