[asterisk-commits] rmudgett: branch rmudgett/ss7_27_knk r399869 - in /team/rmudgett/ss7_27_knk: ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 25 17:01:05 CDT 2013


Author: rmudgett
Date: Wed Sep 25 17:01:00 2013
New Revision: 399869

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399869
Log:
Resolve conflict and restart automerge.

Modified:
    team/rmudgett/ss7_27_knk/   (props changed)
    team/rmudgett/ss7_27_knk/channels/chan_dahdi.c
    team/rmudgett/ss7_27_knk/channels/sig_ss7.c

Propchange: team/rmudgett/ss7_27_knk/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/rmudgett/ss7_27_knk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Propchange: team/rmudgett/ss7_27_knk/
------------------------------------------------------------------------------
--- ss7_27_knk-integrated (original)
+++ ss7_27_knk-integrated Wed Sep 25 17:01:00 2013
@@ -1,1 +1,1 @@
-/trunk:1-399840
+/trunk:1-399867

Modified: team/rmudgett/ss7_27_knk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/ss7_27_knk/channels/chan_dahdi.c?view=diff&rev=399869&r1=399868&r2=399869
==============================================================================
--- team/rmudgett/ss7_27_knk/channels/chan_dahdi.c (original)
+++ team/rmudgett/ss7_27_knk/channels/chan_dahdi.c Wed Sep 25 17:01:00 2013
@@ -14158,6 +14158,7 @@
 	}
 
 	cancel_code = pthread_cancel(master);
+	pthread_kill(master, SIGURG);
 	ast_debug(4,
 		"Waiting to join thread of span %d "
 		"with pid=%p cancel_code=%d\n",
@@ -16887,8 +16888,10 @@
 
 #ifdef HAVE_PRI
 	for (i = 0; i < NUM_SPANS; i++) {
-		if (pris[i].pri.master != AST_PTHREADT_NULL)
+		if (pris[i].pri.master != AST_PTHREADT_NULL) {
 			pthread_cancel(pris[i].pri.master);
+			pthread_kill(pris[i].pri.master, SIGURG);
+		}
 	}
 	ast_cli_unregister_multiple(dahdi_pri_cli, ARRAY_LEN(dahdi_pri_cli));
 	ast_unregister_application(dahdi_send_keypad_facility_app);
@@ -16898,9 +16901,11 @@
 #endif
 #if defined(HAVE_SS7)
 	for (i = 0; i < NUM_SPANS; i++) {
-		if (linksets[i].ss7.master != AST_PTHREADT_NULL)
+		if (linksets[i].ss7.master != AST_PTHREADT_NULL) {
 			pthread_cancel(linksets[i].ss7.master);
-		}
+			pthread_kill(linksets[i].ss7.master, SIGURG);
+		}
+	}
 	ast_cli_unregister_multiple(dahdi_ss7_cli, ARRAY_LEN(dahdi_ss7_cli));
 #endif	/* defined(HAVE_SS7) */
 #if defined(HAVE_OPENR2)
@@ -16944,8 +16949,9 @@
 
 #if defined(HAVE_PRI)
 	for (i = 0; i < NUM_SPANS; i++) {
-		if (pris[i].pri.master && (pris[i].pri.master != AST_PTHREADT_NULL))
+		if (pris[i].pri.master && (pris[i].pri.master != AST_PTHREADT_NULL)) {
 			pthread_join(pris[i].pri.master, NULL);
+		}
 		for (j = 0; j < SIG_PRI_NUM_DCHANS; j++) {
 			dahdi_close_pri_fd(&(pris[i]), j);
 		}

Modified: team/rmudgett/ss7_27_knk/channels/sig_ss7.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/ss7_27_knk/channels/sig_ss7.c?view=diff&rev=399869&r1=399868&r2=399869
==============================================================================
--- team/rmudgett/ss7_27_knk/channels/sig_ss7.c (original)
+++ team/rmudgett/ss7_27_knk/channels/sig_ss7.c Wed Sep 25 17:01:00 2013
@@ -1380,6 +1380,8 @@
 	unsigned char mb_state[255];
 	int nextms;
 
+#define SS7_MAX_POLL	60000	/* Maximum poll time in ms. */
+
 	pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
 
 	ss7_set_debug(ss7, SIG_SS7_DEBUG_DEFAULT);
@@ -1403,8 +1405,11 @@
 			}
 			nextms = tv.tv_sec * 1000;
 			nextms += tv.tv_usec / 1000;
+			if (SS7_MAX_POLL < nextms) {
+				nextms = SS7_MAX_POLL;
+			}
 		} else {
-			nextms = -1;
+			nextms = SS7_MAX_POLL;
 		}
 
 		for (i = 0; i < linkset->numsigchans; i++) {




More information about the asterisk-commits mailing list