Summary: | ASTERISK-01267: Using SIPFRIENDS, segmentation fault if SIP peer does not exist | ||
Reporter: | janoka (janoka) | Labels: | |
Date Opened: | 2004-03-22 09:23:27.000-0600 | Date Closed: | 2011-06-07 14:00:45 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | Using MySQL and dialing a non-existent SIP Peer (no record in sipfriends with name = 'PtSIP_500123') crashes Asterisk with segmentation fault: -- Executing Dial("SIP/195.56.77.92-081136d0", "SIP/9780500123@PtSIP_500123") in new stack Segmentation fault | ||
Comments: | By: alric (alric) 2004-03-22 10:01:43.000-0600 What version of CVS are you using? I'll try to reproduce this later today, not at my test environment right now though By: Mark Spencer (markster) 2004-03-22 10:16:05.000-0600 We need a backtrace, not a core file. By: alric (alric) 2004-03-22 10:30:10.000-0600 If you need help with the backtrace, a bug marshall on #asterisk will be able to help you. By: janoka (janoka) 2004-03-22 12:57:01.000-0600 Ok, I figured it out. Some time ago, I had applied the patch from bug 935 (chan_sip.patch), but there is a small problem with it: #ifdef MYSQL_FRIENDS if (!p) { p = mysql_peer(peer, NULL); inet_aton(p->tempaddr, &p->addr.sin_addr); } #endif has to be changed to #ifdef MYSQL_FRIENDS if (!p) { p = mysql_peer(peer, NULL); if (p) inet_aton(p->tempaddr, &p->addr.sin_addr); } #endif Thanks for suggesting to look at the backtrace. - Janos |