Navigation


Changeset 368:a1f26147ec61 in freeDiameter for extensions/app_sip


Ignore:
Timestamp:
Jul 3, 2010, 12:40:00 AM (14 years ago)
Author:
Alexandre Westfahl <awestfahl@freediameter.net>
Branch:
default
Phase:
public
Message:

Corrected bugs on app_sip and rgwx_sip

Location:
extensions/app_sip
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_sip/diamsip.c

    r364 r368  
    3636#include "diamsip.h"
    3737
    38 static struct disp_hdl * diamsip_MAR_hdl=NULL;
    39 static struct disp_hdl * diamsip_default_hdl=NULL;
     38struct disp_hdl * diamsip_MAR_hdl=NULL;
     39struct disp_hdl * diamsip_default_hdl=NULL;
     40struct session_handler * ds_sess_hdl;
     41
     42struct diamsip_dict sip_dict;
    4043
    4144int diamsip_default_cb( struct msg ** msg, struct avp * avp, struct session * sess, enum disp_action * act)
     
    4851}
    4952
    50 
    51 
    52 
    5353/* entry point */
    54 static int ds_entry()
     54int ds_entry()
    5555{
    5656        struct dict_object * app=NULL;
     
    110110        CHECK_FCT(fd_sess_handler_create(&ds_sess_hdl, free));
    111111       
    112 
    113         //listnonce=NULL;
    114112        return 0;
    115113}
     
    127125        close_mysql_connection();
    128126       
    129         //We delete the chained list of nonces
    130         //nonce_deletelistnonce();
    131         //TODO:NONCE
     127
    132128       
    133129        TRACE_ENTRY();
  • extensions/app_sip/diamsip.h

    r364 r368  
    8484
    8585
    86 static int ds_entry();
     86int ds_entry();
    8787void fd_ext_fini(void);
    8888int diamsip_default_cb( struct msg ** msg, struct avp * avp, struct session * sess, enum disp_action * act);
     
    103103#define SQL_CLEARFLAG_LEN 74
    104104
    105 static struct session_handler * ds_sess_hdl;
    106 static struct session *dssess;
     105extern struct session_handler * ds_sess_hdl;
    107106
    108107
     
    114113
    115114//Storage for some usefull AVPs
    116 static struct {
     115struct diamsip_dict{
    117116        struct dict_object * Auth_Session_State;
    118117        struct dict_object * Auth_Application_Id;
     
    139138        struct dict_object * Digest_Algorithm;
    140139        struct dict_object * Digest_HA1;
    141 } sip_dict;
     140};
     141
     142extern  struct diamsip_dict  sip_dict;
  • extensions/app_sip/multimediaauth.c

    r364 r368  
    3737
    3838
    39 int diamsip_MAR_cb( struct msg ** msg, struct avp * avp, struct session * sess, enum disp_action * act)
     39int diamsip_MAR_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, enum disp_action * act)
    4040{
    4141        struct msg *ans, *qry;
    42         struct avp *a2, *authdataitem;
     42        struct avp *avp, *a2, *authdataitem;
    4343        struct msg_hdr * header = NULL;
    4444        struct avp_hdr * avphdr=NULL, *avpheader=NULL, *avpheader_auth=NULL,*digestheader=NULL;
     
    4848        char * result;
    4949        char password[51];
    50         int idx=0, idx2=0, number_of_auth_items=0,i=0;;
     50        int idx=0, idx2=0, number_of_auth_items=0,i=0;
    5151        //Flags and variables for Database
    5252        int sipurinotstored=0, authenticationpending=0, querylen=0, usernamelen=0;
     
    8282                {
    8383                        CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Application_Id, 0, &avp ) );
     84                        ASSERT(avp);
    8485                        val.i32 = header->msg_appl;
    8586                        CHECK_FCT( fd_msg_avp_setvalue ( avp, &val ) );
     
    670671                                                                        DigestCalcResponseAuth(HA1, digest_nonce, digest_noncecount, digest_cnonce, digest_qop,digest_method, digest_uri, HA2, responseauth);
    671672                                                                       
    672                                                                        
     673                                                                        TRACE_DEBUG(FULL,"Response calculated by Diameter server:%s",response);
     674                                                                                TRACE_DEBUG(FULL,"Response calculated by UA:%s",digest_response);
    673675                                                                        if(strcmp(digest_qop,"auth-int")==0)
    674676                                                                        {
Note: See TracChangeset for help on using the changeset viewer.