Navigation


Changeset 428:260b8e10f471 in freeDiameter


Ignore:
Timestamp:
Jul 26, 2010, 9:52:23 PM (14 years ago)
Author:
Alexandre Westfahl <awestfahl@freediameter.net>
Branch:
default
Phase:
public
Message:

Removed warning in SIP plugin (gateway)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_radgw/rgwx_sip.c

    r380 r428  
    178178        return 0;
    179179}
    180 
     180/*
    181181static void nonce_del_element(char * nonce, struct rgwp_config *state)
    182182{
     
    199199        }
    200200}
    201 
     201*/
    202202//Retrieve sid from nonce
    203203static char * nonce_get_sid(char * nonce, size_t noncelen, size_t * sidlen, struct rgwp_config *state)
     
    206206        char *sid=NULL;
    207207       
    208         CHECK_PARAMS_DO(nonce && state && noncelen && sidlen, return);
     208        CHECK_PARAMS_DO(nonce && state && noncelen && sidlen, return NULL);
    209209        *sidlen=0;
    210210       
     
    344344        char * un=NULL;
    345345        size_t  un_len;
    346         uint32_t status_type;
    347346        size_t nattr_used = 0;
    348347        struct avp *auth_data=NULL, *auth=NULL, *avp = NULL;
     
    468467        if (i == 0) {
    469468                /* 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;
    471470                value.os.len  = fd_g_config->cnf_diamrlm_len;
    472471        } else {
    473                 value.os.data = un + i;
     472                value.os.data = (unsigned char *)(un + i);
    474473                value.os.len  = un_len - i;
    475474        }
     
    653652                        CHECK_MALLOC(sipuri=malloc(attr->length +3));
    654653                        strcpy(sipuri,"sip:");
    655                         strcat(sipuri,(unsigned char *)temp);
     654                        strcat(sipuri,(const char *)temp);
    656655                        value.os.data=(unsigned char *)sipuri;
    657656                        value.os.len=attr->length +2;
     
    695694                                                                               
    696695                                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);
    699699                                CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) );                                       
    700700                                CHECK_FCT( fd_msg_avp_add ( auth, MSG_BRW_LAST_CHILD, avp) );   
     
    706706                                //We give a fake nonce because it will be calculated at the server.
    707707                                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);
    710710                                CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) );
    711711                                CHECK_FCT( fd_msg_avp_add ( auth, MSG_BRW_LAST_CHILD, avp) );   
     
    741741{
    742742       
    743         struct msg_hdr * hdr;
     743       
    744744        struct avp *avp, *next, *asid;
    745745        struct avp_hdr *ahdr, *sid;
     
    839839                                                sidlen=strlen(sid);
    840840                                               
    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);
    842842                                        }
    843843                                        break;
Note: See TracChangeset for help on using the changeset viewer.