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
37350d89
Commit
37350d89
authored
13 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #6655: cleanup in main
parent
d8b62f5f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
daemon/src/main.cpp
+5
-26
5 additions, 26 deletions
daemon/src/main.cpp
with
5 additions
and
26 deletions
daemon/src/main.cpp
+
5
−
26
View file @
37350d89
...
...
@@ -46,23 +46,15 @@
#include
"audio/audiolayer.h"
using
namespace
ost
;
/*
CommandOptionArg level (
"log-level", "l", "Log level (not yet implemented)"
);
*/
CommandOptionNoArg
console
(
ost
::
CommandOptionNoArg
console
(
"console"
,
"c"
,
"Log in console (instead of syslog)"
);
CommandOptionNoArg
debug
(
ost
::
CommandOptionNoArg
debug
(
"debug"
,
"d"
,
"Debug mode (more verbose)"
);
CommandOptionNoArg
help
(
ost
::
CommandOptionNoArg
help
(
"help"
,
"h"
,
"Print help"
);
...
...
@@ -77,7 +69,7 @@ main (int argc, char **argv)
// makeCommandOptionParse allocates the object with operator new, so
// auto_ptr is fine in this context.
// TODO: This should eventually be replaced with std::unique_ptr for C++0x
std
::
auto_ptr
<
CommandOptionParse
>
args
(
makeCommandOptionParse
(
argc
,
argv
,
""
));
std
::
auto_ptr
<
ost
::
CommandOptionParse
>
args
(
ost
::
makeCommandOptionParse
(
argc
,
argv
,
""
));
printf
(
"SFLphone Daemon %s, by Savoir-Faire Linux 2004-2011
\n
"
,
VERSION
);
printf
(
"http://www.sflphone.org/
\n
"
);
...
...
@@ -160,7 +152,7 @@ main (int argc, char **argv)
char
*
res
;
res
=
fgets
(
cOldPid
,
64
,
fp
);
if
(
res
==
NULL
)
perror
(
"Error getting string from stream"
);
if
(
res
==
NULL
)
perror
(
"Error getting string from stream"
);
else
{
fclose
(
fp
);
...
...
@@ -176,21 +168,10 @@ main (int argc, char **argv)
fputs
(
cPid
,
fp
);
fclose
(
fp
);
}
}
}
}
int
sessionPort
=
0
;
if
(
argc
==
2
)
{
char
*
ptrPort
=
strstr
(
argv
[
1
],
"--port="
);
if
(
ptrPort
!=
0
)
{
sessionPort
=
atoi
(
ptrPort
+
7
);
}
}
try
{
// TODO Use $XDG_CONFIG_HOME to save the config file (which default to $HOME/.config)
Manager
::
instance
().
initConfigFile
();
...
...
@@ -209,5 +190,3 @@ main (int argc, char **argv)
return
0
;
}
// EOF
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