comparison libfreeDiameter/messages.c @ 386:ce8d20725308

Allow empty User-Name RADIUS attributes
author Sebastien Decugis <sdecugis@nict.go.jp>
date Tue, 06 Jul 2010 13:27:11 +0900
parents e283e18b2673
children 743195485eec
comparison
equal deleted inserted replaced
385:69057a6d68ec 386:ce8d20725308
1136 1136
1137 /* Now we have to set the value */ 1137 /* Now we have to set the value */
1138 memcpy(&avp->avp_storage, value, sizeof(union avp_value)); 1138 memcpy(&avp->avp_storage, value, sizeof(union avp_value));
1139 1139
1140 /* Copy an octetstring if needed. */ 1140 /* Copy an octetstring if needed. */
1141 if (type == AVP_TYPE_OCTETSTRING) { 1141 if ((type == AVP_TYPE_OCTETSTRING) && (value->os.len)) {
1142 CHECK_MALLOC( avp->avp_storage.os.data = malloc(value->os.len) ); 1142 CHECK_MALLOC( avp->avp_storage.os.data = malloc(value->os.len) );
1143 avp->avp_mustfreeos = 1; 1143 avp->avp_mustfreeos = 1;
1144 memcpy(avp->avp_storage.os.data, value->os.data, value->os.len); 1144 memcpy(avp->avp_storage.os.data, value->os.data, value->os.len);
1145 } 1145 }
1146 1146
"Welcome to our mercurial repository"