Changeset 1027:0117a7746b21 in freeDiameter for extensions/app_sip/registrationtermination.c
- Timestamp:
- Apr 15, 2013, 4:17:07 PM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/app_sip/registrationtermination.c
r924 r1027 75 75 { 76 76 //We received something, we can send an RTR 77 app_sip_RTR_cb( rtrsip);77 app_sip_RTR_cb(&rtrsip); 78 78 } 79 79 } … … 88 88 } 89 89 //Called to send a RTR 90 int app_sip_RTR_cb(struct rtrsipaor structure)90 int app_sip_RTR_cb(struct rtrsipaor *structure) 91 91 { 92 92 TRACE_ENTRY("%p", structure); … … 102 102 103 103 //We must check that we have all needed value in structure 104 if(structure .username[0]!='\0')104 if(structure->username[0]!='\0') 105 105 got_username=1; 106 106 107 if(structure .sip_aor1[0]!='\0')107 if(structure->sip_aor1[0]!='\0') 108 108 { 109 109 num_aor++; 110 if(structure .sip_aor2[0]!='\0')110 if(structure->sip_aor2[0]!='\0') 111 111 { 112 112 num_aor++; 113 if(structure .sip_aor3[0]!='\0')113 if(structure->sip_aor3[0]!='\0') 114 114 num_aor++; 115 115 } 116 116 } 117 117 118 if(structure .strreason!='\0')118 if(structure->strreason!='\0') 119 119 got_streason=1; 120 120 … … 128 128 return EINVAL; 129 129 } 130 if(structure .reason<0)130 if(structure->reason<0) 131 131 { 132 132 //We must have a least a SIP_AOR or a Username … … 135 135 } 136 136 137 if(structure .desthost[0]=='\0')137 if(structure->desthost[0]=='\0') 138 138 { 139 139 //We must have a least a SIP_AOR or a Username … … 173 173 { 174 174 CHECK_FCT( fd_msg_avp_new ( sip_dict.Destination_Host, 0, &avp ) ); 175 value.os.data=(unsigned char *)structure .desthost;176 value.os.len=(size_t)strlen(structure .desthost);175 value.os.data=(unsigned char *)structure->desthost; 176 value.os.len=(size_t)strlen(structure->desthost); 177 177 CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); 178 178 CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); … … 186 186 //Reason Code 187 187 CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Reason_Code, 0, &avp ) ); 188 value.i32=structure .reason;188 value.i32=structure->reason; 189 189 CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); 190 190 CHECK_FCT( fd_msg_avp_add( groupedavp, MSG_BRW_LAST_CHILD, avp ) ); … … 194 194 //Reason Info 195 195 CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Reason_Info, 0, &avp ) ); 196 value.os.data=(unsigned char *)structure .strreason;197 value.os.len=(size_t)strlen(structure .strreason);196 value.os.data=(unsigned char *)structure->strreason; 197 value.os.len=(size_t)strlen(structure->strreason); 198 198 CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); 199 199 CHECK_FCT( fd_msg_avp_add( groupedavp, MSG_BRW_LAST_CHILD, avp ) ); … … 209 209 { 210 210 CHECK_FCT( fd_msg_avp_new ( sip_dict.User_Name, 0, &avp ) ); 211 value.os.data=(unsigned char *)structure .username;212 value.os.len=(size_t)strlen(structure .username);211 value.os.data=(unsigned char *)structure->username; 212 value.os.len=(size_t)strlen(structure->username); 213 213 CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); 214 214 CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); … … 221 221 { 222 222 CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_AOR, 0, &avp ) ); 223 value.os.data=(unsigned char *)structure .sip_aor1;224 value.os.len=(size_t)strlen(structure .sip_aor1);223 value.os.data=(unsigned char *)structure->sip_aor1; 224 value.os.len=(size_t)strlen(structure->sip_aor1); 225 225 CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); 226 226 CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); … … 228 228 { 229 229 CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_AOR, 0, &avp ) ); 230 value.os.data=(unsigned char *)structure .sip_aor2;231 value.os.len=(size_t)strlen(structure .sip_aor2);230 value.os.data=(unsigned char *)structure->sip_aor2; 231 value.os.len=(size_t)strlen(structure->sip_aor2); 232 232 CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); 233 233 CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); … … 235 235 { 236 236 CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_AOR, 0, &avp ) ); 237 value.os.data=(unsigned char *)structure .sip_aor3;238 value.os.len=(size_t)strlen(structure .sip_aor3);237 value.os.data=(unsigned char *)structure->sip_aor3; 238 value.os.len=(size_t)strlen(structure->sip_aor3); 239 239 CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); 240 240 CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) );
Note: See TracChangeset
for help on using the changeset viewer.