*** attrprint.c	Thu Apr 17 10:49:22 1997
--- /vol/lacker/ascend/radius-ascend/radius-1.16-ascend/ascendd/attrprint.c	Thu Apr 17 11:32:51 1997
***************
*** 55,89 ****
   *************************************************************************/
  
  void
  fprint_attr_val(fd, pair)
  FILE		*fd;
  VALUE_PAIR	*pair;
  {
  	DICT_VALUE	*dval;
  	char		buffer[32];
  	u_char		*ptr;
! 	int		len;
  
  	switch(pair->type) {
  
  	case ASCEND_SPECIAL_STRING:
  		fprintf(fd, "%s = 0x", pair->name);
  		ptr = (u_char *)pair->strvalue;
  		len = pair->size;
  		while( len ) {
  			fprintf(fd, "%02x", *ptr);
  			ptr++;
  			len--;
  		}
  		fputc(' ', fd);
  		break;
  
  	case PW_TYPE_STRING:
  		fprintf(fd, "%s = \"", pair->name);
  		ptr = (u_char *)pair->strvalue;
  		while(*ptr != '\0') {
  			if(!(isprint(*ptr))) {
  				fprintf(fd, "\\%03o", *ptr);
  			}
  			else {
  				fputc(*ptr, fd);
--- 55,112 ----
   *************************************************************************/
  
  void
  fprint_attr_val(fd, pair)
  FILE		*fd;
  VALUE_PAIR	*pair;
  {
  	DICT_VALUE	*dval;
  	char		buffer[32];
  	u_char		*ptr;
! 	int		len,number;
  
  	switch(pair->type) {
  
  	case ASCEND_SPECIAL_STRING:
+ 
+ 	    if (pair->attribute != ASCEND_NUMBER_SESSIONS) {
  		fprintf(fd, "%s = 0x", pair->name);
  		ptr = (u_char *)pair->strvalue;
  		len = pair->size;
  		while( len ) {
  			fprintf(fd, "%02x", *ptr);
  			ptr++;
  			len--;
  		}
  		fputc(' ', fd);
+ 	    }
+ 	    else {
+ 		fprintf(fd, "%s = \"", pair->name);
+ 		ptr = (u_char *)pair->strvalue + 4;
+ 
+ 		number = ntohl(*(UINT4 *)(pair->strvalue));
+ 		len = pair->size - 4;
+ 		if (len > 0)
+ 		    fprintf(fd,"%d ",number);
+ 		else
+ 		    fprintf(fd,"%d No class defined",number);
+ 		while (len) {
+ 		    if(isprint(*ptr))
+ 			fputc(*ptr, fd);
+ 		    else
+ 		        fprintf(fd, "%02x", *ptr);
+ 		    ptr++;
+ 		    len--;
+ 		}
+ 		fputc('"',fd);
  		break;
+ 	    }
  
  	case PW_TYPE_STRING:
  		fprintf(fd, "%s = \"", pair->name);
  		ptr = (u_char *)pair->strvalue;
  		while(*ptr != '\0') {
  			if(!(isprint(*ptr))) {
  				fprintf(fd, "\\%03o", *ptr);
  			}
  			else {
  				fputc(*ptr, fd);
*** radiusd.c	Wed Apr 16 10:30:17 1997
--- /vol/lacker/ascend/radius-ascend/radius-1.16-ascend/ascendd/radiusd.c	Wed Apr 16 10:42:26 1997
***************
*** 1075,1095 ****
  				DEBUG("    %s (Unknown Type %d)\n",
  					attr->name,attr->type);
  				free(pair);
  				pair = NULL_PAIR;
  				break;
  			}
  			if (pair) {
  				/* temp. assign to ASCEND_SPECIAL_STRING
  				 * so that the printing will be in hex
  				 */
! 				if( attribute == ASCEND_SESSION_SVR_KEY ) {
  					pair->type = ASCEND_SPECIAL_STRING;
  				}
  				debug_pair("request", stdout, pair);
  				if( attribute == ASCEND_SESSION_SVR_KEY ) {
  					pair->type = PW_TYPE_STRING;
  				}
  				if(first_pair == NULL_PAIR) {
  					first_pair = pair;
  				} else {
  					prev->next = pair;
--- 1075,1095 ----
  				DEBUG("    %s (Unknown Type %d)\n",
  					attr->name,attr->type);
  				free(pair);
  				pair = NULL_PAIR;
  				break;
  			}
  			if (pair) {
  				/* temp. assign to ASCEND_SPECIAL_STRING
  				 * so that the printing will be in hex
  				 */
! 				if((attribute == ASCEND_SESSION_SVR_KEY) || (attribute == ASCEND_NUMBER_SESSIONS)) {
  					pair->type = ASCEND_SPECIAL_STRING;
  				}
  				debug_pair("request", stdout, pair);
  				if( attribute == ASCEND_SESSION_SVR_KEY ) {
  					pair->type = PW_TYPE_STRING;
  				}
  				if(first_pair == NULL_PAIR) {
  					first_pair = pair;
  				} else {
  					prev->next = pair;
