[asterisk-bugs] [JIRA] Issue Comment Edited: (ASTERISK-20184) Asterisk crash in Dial

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Tue Jul 31 10:34:21 CDT 2012


    [ https://issues.asterisk.org/jira/browse/ASTERISK-20184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=195332#comment-195332 ] 

Richard Mudgett edited comment on ASTERISK-20184 at 7/31/12 10:33 AM:
----------------------------------------------------------------------

I don't see it as the same patch as ASTERISK-18404. Here's the actual patch applied:

{noformat}
Index: include/asterisk/time.h
===================================================================
--- include/asterisk/time.h	(revision 363307)
+++ include/asterisk/time.h	(working copy)
@@ -83,8 +83,9 @@
 	   is handled for positive and negative numbers, by ensuring
 	   that the divisor is always positive
 	*/
-	return  ((end.tv_sec - start.tv_sec) * 1000) +
-		(((1000000 + end.tv_usec - start.tv_usec) / 1000) - 1000);
+	int64_t sec_dif = (int64_t)(end.tv_sec - start.tv_sec) * 1000;
+	int64_t usec_dif = (1000000 + end.tv_usec - start.tv_usec) / 1000 - 1000;
+	return  sec_dif + usec_dif;
 }
 )
{noformat}


      was (Author: dcunningham):
    I don't see it as the same patch as Asterisk #18404. Here's the actual patch applied:

Index: include/asterisk/time.h
===================================================================
--- include/asterisk/time.h	(revision 363307)
+++ include/asterisk/time.h	(working copy)
@@ -83,8 +83,9 @@
 	   is handled for positive and negative numbers, by ensuring
 	   that the divisor is always positive
 	*/
-	return  ((end.tv_sec - start.tv_sec) * 1000) +
-		(((1000000 + end.tv_usec - start.tv_usec) / 1000) - 1000);
+	int64_t sec_dif = (int64_t)(end.tv_sec - start.tv_sec) * 1000;
+	int64_t usec_dif = (1000000 + end.tv_usec - start.tv_usec) / 1000 - 1000;
+	return  sec_dif + usec_dif;
 }
 )

  
> Asterisk crash in Dial
> ----------------------
>
>                 Key: ASTERISK-20184
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20184
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_dial
>    Affects Versions: 1.8.11.1
>         Environment: CentOS release 5.6 (Final)
>            Reporter: David Cunningham
>         Attachments: backtrace.txt, full.477.gz
>
>
> Asterisk crashed when performing a Dial(). Backtrace is attached, and the Asterisk log from the time. Could you please advise what you need? Thanks.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list