|
@@ -96,9 +96,12 @@ int get_redirect( struct sip_msg *msg , int maxt, int maxb,
|
|
}
|
|
}
|
|
if (max==0)
|
|
if (max==0)
|
|
continue;
|
|
continue;
|
|
- /* put the response code into the acc_param reason struct */
|
|
|
|
- reason->code = t->uac[i].last_received;
|
|
|
|
- reason->code_s.s = int2bstr((unsigned long)reason->code, code_buf, &reason->code_s.len);
|
|
|
|
|
|
+ if(reason!=NULL)
|
|
|
|
+ {
|
|
|
|
+ /* put the response code into the acc_param reason struct */
|
|
|
|
+ reason->code = t->uac[i].last_received;
|
|
|
|
+ reason->code_s.s = int2bstr((unsigned long)reason->code, code_buf, &reason->code_s.len);
|
|
|
|
+ }
|
|
/* get the contact from it */
|
|
/* get the contact from it */
|
|
n = shmcontact2dset( msg, t->uac[i].reply, max, reason, bflags);
|
|
n = shmcontact2dset( msg, t->uac[i].reply, max, reason, bflags);
|
|
if ( n<0 ) {
|
|
if ( n<0 ) {
|