Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
8bef4318
Commit
8bef4318
authored
13 years ago
by
Rafaël Carré
Browse files
Options
Downloads
Patches
Plain Diff
* #6507 : do not crash if the program is not sflphoned
(tests have their own executable)
parent
3cd7756c
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
sflphone-common/src/audio/codecs/audiocodecfactory.cpp
+3
-2
3 additions, 2 deletions
sflphone-common/src/audio/codecs/audiocodecfactory.cpp
sflphone-common/src/fileutils.cpp
+2
-1
2 additions, 1 deletion
sflphone-common/src/fileutils.cpp
with
5 additions
and
3 deletions
sflphone-common/src/audio/codecs/audiocodecfactory.cpp
+
3
−
2
View file @
8bef4318
...
...
@@ -193,15 +193,16 @@ std::vector<sfl::Codec*> AudioCodecFactory::scanCodecDirectory (void)
std
::
string
libDir
=
std
::
string
(
CODECS_DIR
).
append
(
"/"
);
std
::
string
homeDir
=
std
::
string
(
HOMEDIR
)
+
DIR_SEPARATOR_STR
+
"."
+
PROGDIR
+
"/"
;
std
::
string
srcDir
=
std
::
string
(
get_program_dir
())
+
DIR_SEPARATOR_STR
+
"audio/codecs/"
;
const
char
*
progDir
=
get_program_dir
()
;
// look for a CODECS_PATH environment variable...used in tests
const
char
*
envDir
=
getenv
(
"CODECS_PATH"
);
std
::
vector
<
std
::
string
>
dirToScan
;
dirToScan
.
push_back
(
homeDir
);
dirToScan
.
push_back
(
libDir
);
dirToScan
.
push_back
(
srcDir
);
if
(
envDir
)
dirToScan
.
push_back
(
std
::
string
(
envDir
)
+
DIR_SEPARATOR_STR
);
if
(
progDir
)
dirToScan
.
push_back
(
std
::
string
(
progDir
)
+
DIR_SEPARATOR_STR
+
"audio/codecs/"
);
for
(
i
=
0
;
(
unsigned
int
)
i
<
dirToScan
.
size
()
;
i
++
)
{
std
::
string
dirStr
=
dirToScan
[
i
];
...
...
This diff is collapsed.
Click to expand it.
sflphone-common/src/fileutils.cpp
+
2
−
1
View file @
8bef4318
...
...
@@ -29,8 +29,9 @@
*/
#include
<libgen.h>
#include
<cstdlib>
static
char
*
program_dir
;
static
char
*
program_dir
=
NULL
;
void
set_program_dir
(
char
*
program_path
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment