openmason / webrtc2sip

Automatically exported from code.google.com/p/webrtc2sip
0 stars 0 forks source link

webrtc2sip segfaults whn using a hardcoded config path and setting config path on the command line #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Modify mp_mediaproxy.cc so that webrtc2sip looks for a predefined config.xml 
path, for instance with:
sed -i '1,/NULL/s/NULL/"\/usr\/local\/etc\/webrtc2sip\/config.xml"/' 
mp_mediaproxy.cc
2. Compile webrtc2sip
3. Run it with the --config command line option

What is the expected output?
webrtc2sip should start with the config.xml provided on the command line with 
the --config option

What do you see instead?
webrtc2sip --config=/usr/local/etc/webrtc2sip/config.xml 
*******************************************************************
Copyright (C) 2012-2013 Doubango Telecom <http://www.doubango.org>
HOME PAGE: http://webrtc2sip.org
LICENCE: GPLv3 or proprietary
VERSION: 2.5.0
'quit' to quit the application.
*******************************************************************

Segmentation fault (core dumped)

What version of the product are you using?
webrtc2sip 2.5.0 r87

On what operating system?
Ubuntu 12.04.2 LTS

Best regards,

Jeremy

Original issue reported on code.google.com by autosta...@gmail.com on 22 May 2013 at 9:01

GoogleCodeExporter commented 9 years ago
sConfigXmlPath is updated using realloc() which means you cannot provide a 
constant.
should be something like: sed -i 
'1,/NULL/s/NULL/strdup("\/usr\/local\/etc\/webrtc2sip\/config.xml")/' 
mp_mediaproxy.cc

Original comment by boss...@yahoo.fr on 22 May 2013 at 10:58

GoogleCodeExporter commented 9 years ago
Thanks!

Original comment by autosta...@gmail.com on 22 May 2013 at 11:02