Review Board 1.7.16


sync chan_dahdi->p->outgoing with sig_XXX->p-outgoing

Review Request #1747 - Created Feb. 15, 2012 and submitted

Alec Davis
1.8 and above
Reviewers
asterisk-dev
Asterisk
Jeremy Pepper review https://reviewboard.asterisk.org/r/1737/ highlighted an issue where p->outgoing flag isn't in sync between chan_dahdi and sig_analog
sig_analog: Basic calls in and out with analog TDM800P
sig_pri and sig_ss7: compiles

Diff revision 2

This is not the most recent revision of the diff. The latest diff is revision 5. See what's changed.

1 2 3 4 5
1 2 3 4 5

  1. trunk/channels/chan_dahdi.c: Loading...
  2. trunk/channels/sig_analog.h: Loading...
  3. trunk/channels/sig_analog.c: Loading...
trunk/channels/chan_dahdi.c
Revision 353434 New Change
[20] 2274 lines
[+20] [+] static void my_set_dialing(void *pvt, int is_dialing)
2275
	struct dahdi_pvt *p = pvt;
2275
	struct dahdi_pvt *p = pvt;
2276

    
   
2276

   
2277
	p->dialing = is_dialing;
2277
	p->dialing = is_dialing;
2278
}
2278
}
2279

    
   
2279

   

    
   
2280
static void my_set_outgoing(void *pvt, int is_outgoing)

    
   
2281
{

    
   
2282
	struct dahdi_pvt *p = pvt;

    
   
2283

   

    
   
2284
	ast_log(LOG_WARNING, "ALEC p->outgoing(%d) = %d\n", p->outgoing, is_outgoing);

    
   
2285
	p->outgoing = is_outgoing;

    
   
2286
}

    
   
2287

   
2280
#if defined(HAVE_PRI) || defined(HAVE_SS7)
2288
#if defined(HAVE_PRI) || defined(HAVE_SS7)
2281
static void my_set_digital(void *pvt, int is_digital)
2289
static void my_set_digital(void *pvt, int is_digital)
2282
{
2290
{
2283
	struct dahdi_pvt *p = pvt;
2291
	struct dahdi_pvt *p = pvt;
2284

    
   
2292

   
[+20] [20] 1341 lines
[+20] [+] static int my_have_progressdetect(void *pvt)
3626
		/* Don't have progress detection. */
3634
		/* Don't have progress detection. */
3627
		return 0;
3635
		return 0;
3628
	}
3636
	}
3629
}
3637
}
3630

    
   
3638

   

    
   
3639
static int my_is_outgoing(void *pvt)

    
   
3640
{

    
   
3641
	struct dahdi_pvt *p = pvt;

    
   
3642

   

    
   
3643
	if (p->outgoing) {

    
   
3644
		return 1;

    
   
3645
	}

    
   
3646
	return 0;

    
   
3647
}

    
   
3648

   
3631
static struct analog_callback dahdi_analog_callbacks =
3649
static struct analog_callback dahdi_analog_callbacks =
3632
{
3650
{
3633
	.play_tone = my_play_tone,
3651
	.play_tone = my_play_tone,
3634
	.get_event = my_get_event,
3652
	.get_event = my_get_event,
3635
	.wait_event = my_wait_event,
3653
	.wait_event = my_wait_event,
[+20] [20] 40 lines
[+20] static struct analog_callback dahdi_analog_callbacks =
3676
	.get_sigpvt_bridged_channel = my_get_sigpvt_bridged_channel,
3694
	.get_sigpvt_bridged_channel = my_get_sigpvt_bridged_channel,
3677
	.get_sub_fd = my_get_sub_fd,
3695
	.get_sub_fd = my_get_sub_fd,
3678
	.set_cadence = my_set_cadence,
3696
	.set_cadence = my_set_cadence,
3679
	.set_alarm = my_set_alarm,
3697
	.set_alarm = my_set_alarm,
3680
	.set_dialing = my_set_dialing,
3698
	.set_dialing = my_set_dialing,

    
   
3699
	.set_outgoing = my_set_outgoing,
3681
	.set_ringtimeout = my_set_ringtimeout,
3700
	.set_ringtimeout = my_set_ringtimeout,
3682
	.set_waitingfordt = my_set_waitingfordt,
3701
	.set_waitingfordt = my_set_waitingfordt,
3683
	.check_waitingfordt = my_check_waitingfordt,
3702
	.check_waitingfordt = my_check_waitingfordt,
3684
	.set_confirmanswer = my_set_confirmanswer,
3703
	.set_confirmanswer = my_set_confirmanswer,
3685
	.check_confirmanswer = my_check_confirmanswer,
3704
	.check_confirmanswer = my_check_confirmanswer,
[+20] [20] 7 lines
[+20] static struct analog_callback dahdi_analog_callbacks =
3693
	.set_polarity = my_set_polarity,
3712
	.set_polarity = my_set_polarity,
3694
	.start_polarityswitch = my_start_polarityswitch,
3713
	.start_polarityswitch = my_start_polarityswitch,
3695
	.answer_polarityswitch = my_answer_polarityswitch,
3714
	.answer_polarityswitch = my_answer_polarityswitch,
3696
	.hangup_polarityswitch = my_hangup_polarityswitch,
3715
	.hangup_polarityswitch = my_hangup_polarityswitch,
3697
	.have_progressdetect = my_have_progressdetect,
3716
	.have_progressdetect = my_have_progressdetect,

    
   
3717
	.is_outgoing = my_is_outgoing,
3698
};
3718
};
3699

    
   
3719

   
3700
/*! Round robin search locations. */
3720
/*! Round robin search locations. */
3701
static struct dahdi_pvt *round_robin[32];
3721
static struct dahdi_pvt *round_robin[32];
3702

    
   
3722

   
[+20] [20] 15258 lines
trunk/channels/sig_analog.h
Revision 353434 New Change
 
trunk/channels/sig_analog.c
Revision 353434 New Change
 
  1. trunk/channels/chan_dahdi.c: Loading...
  2. trunk/channels/sig_analog.h: Loading...
  3. trunk/channels/sig_analog.c: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.