Changeset 420:c8a61dabea55 in freeDiameter for extensions/app_sip/registrationtermination.c
- Timestamp:
- Jul 19, 2010, 4:46:33 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/app_sip/registrationtermination.c
r419 r420 48 48 { 49 49 SOCKET sock; 50 51 52 50 SOCKADDR_IN sin, csin; 51 struct rtrsipaor rtrsip; 52 int rcvbytes=0; 53 53 sock = socket(AF_INET, SOCK_STREAM, 0); 54 54 sin.sin_addr.s_addr = inet_addr("127.0.0.1"); 55 56 57 55 sin.sin_family = AF_INET; 56 sin.sin_port = htons(PORT); 57 socklen_t sinsize = sizeof(csin); 58 58 int accepted=0; 59 59 60 TRACE_DEBUG(INFO,"############********************THREAD OPEN \n********************\n********************\n");61 62 60 if(!bind(sock, (SOCKADDR*)&sin, sizeof(sin))) 63 61 { … … 73 71 { 74 72 rcvbytes=recv(accepted, &rtrsip, sizeof(struct rtrsipaor),0); 75 76 73 77 74 if(rcvbytes>-1) 78 75 { 76 //We received something, we can send an RTR 79 77 diamsip_RTR_cb(rtrsip); 80 81 82 78 } 83 79 } 84 80 } 85 86 87 81 } 88 82 else … … 90 84 91 85 92 93 94 95 TRACE_DEBUG(INFO,"############********************THREAD CLOSED \n********************\n********************\n");96 86 pthread_exit(NULL); 97 87 … … 130 120 131 121 132 TRACE_DEBUG( INFO,"We have %d SIP_AOR",num_aor);122 TRACE_DEBUG(FULL,"Request for %d SIP_AOR to be deregistred.",num_aor); 133 123 134 124 if((got_username + num_aor)==0) … … 167 157 } 168 158 159 //Add the Auth-Application-Id 160 { 161 CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Application_Id, 0, &avp ) ); 162 value.i32 = 6; 163 CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); 164 CHECK_FCT( fd_msg_avp_add ( message, MSG_BRW_LAST_CHILD, avp) ); 165 } 169 166 170 167 //Auth_Session_State … … 253 250 } 254 251 252 //TODO:remove for debug 255 253 fd_msg_dump_walk(INFO,message); 256 254 CHECK_FCT( fd_msg_send( &message, NULL, NULL ));
Note: See TracChangeset
for help on using the changeset viewer.