Changeset 428:260b8e10f471 in freeDiameter
- Timestamp:
- Jul 26, 2010, 9:52:23 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/app_radgw/rgwx_sip.c
r380 r428 178 178 return 0; 179 179 } 180 180 /* 181 181 static void nonce_del_element(char * nonce, struct rgwp_config *state) 182 182 { … … 199 199 } 200 200 } 201 201 */ 202 202 //Retrieve sid from nonce 203 203 static char * nonce_get_sid(char * nonce, size_t noncelen, size_t * sidlen, struct rgwp_config *state) … … 206 206 char *sid=NULL; 207 207 208 CHECK_PARAMS_DO(nonce && state && noncelen && sidlen, return );208 CHECK_PARAMS_DO(nonce && state && noncelen && sidlen, return NULL); 209 209 *sidlen=0; 210 210 … … 344 344 char * un=NULL; 345 345 size_t un_len; 346 uint32_t status_type;347 346 size_t nattr_used = 0; 348 347 struct avp *auth_data=NULL, *auth=NULL, *avp = NULL; … … 468 467 if (i == 0) { 469 468 /* Not found in the User-Name => we use the local domain of this gateway */ 470 value.os.data = fd_g_config->cnf_diamrlm;469 value.os.data = (unsigned char *)fd_g_config->cnf_diamrlm; 471 470 value.os.len = fd_g_config->cnf_diamrlm_len; 472 471 } else { 473 value.os.data = un + i;472 value.os.data = (unsigned char *)(un + i); 474 473 value.os.len = un_len - i; 475 474 } … … 653 652 CHECK_MALLOC(sipuri=malloc(attr->length +3)); 654 653 strcpy(sipuri,"sip:"); 655 strcat(sipuri,( unsignedchar *)temp);654 strcat(sipuri,(const char *)temp); 656 655 value.os.data=(unsigned char *)sipuri; 657 656 value.os.len=attr->length +2; … … 695 694 696 695 CHECK_FCT( fd_msg_avp_new ( cs->dict.Digest_Algorithm, 0, &avp ) ); 697 value.os.len = 3; 698 value.os.data = "MD5"; 696 697 value.os.data = (unsigned char *)"MD5"; 698 value.os.len = strlen((const char *)value.os.data); 699 699 CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); 700 700 CHECK_FCT( fd_msg_avp_add ( auth, MSG_BRW_LAST_CHILD, avp) ); … … 706 706 //We give a fake nonce because it will be calculated at the server. 707 707 CHECK_FCT( fd_msg_avp_new ( cs->dict.Digest_Nonce, 0, &avp ) ); 708 value.os.data= "nonce";709 value.os.len= 5;708 value.os.data=(unsigned char *)"nonce"; 709 value.os.len=strlen((const char *)value.os.data); 710 710 CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); 711 711 CHECK_FCT( fd_msg_avp_add ( auth, MSG_BRW_LAST_CHILD, avp) ); … … 741 741 { 742 742 743 struct msg_hdr * hdr;743 744 744 struct avp *avp, *next, *asid; 745 745 struct avp_hdr *ahdr, *sid; … … 839 839 sidlen=strlen(sid); 840 840 841 nonce_add_element( ahdr->avp_value->os.data,ahdr->avp_value->os.len, sid,sidlen, cs);841 nonce_add_element((char *)ahdr->avp_value->os.data,ahdr->avp_value->os.len, sid,sidlen, cs); 842 842 } 843 843 break;
Note: See TracChangeset
for help on using the changeset viewer.