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
46dd56f2
Commit
46dd56f2
authored
13 years ago
by
Rafaël Carré
Browse files
Options
Downloads
Patches
Plain Diff
* #6547: AudioZrtp: use runtime exceptions
Also support custom exception strings
parent
dbe4aff6
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/audiortp/AudioZrtpSession.cpp
+3
-3
3 additions, 3 deletions
sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp
sflphone-common/src/audio/audiortp/AudioZrtpSession.h
+5
-4
5 additions, 4 deletions
sflphone-common/src/audio/audiortp/AudioZrtpSession.h
with
8 additions
and
7 deletions
sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp
+
3
−
3
View file @
46dd56f2
...
@@ -101,7 +101,7 @@ void AudioZrtpSession::initializeZid (void)
...
@@ -101,7 +101,7 @@ void AudioZrtpSession::initializeZid (void)
{
{
if
(
_zidFilename
.
empty
())
{
if
(
_zidFilename
.
empty
())
{
throw
ZrtpZidException
();
throw
ZrtpZidException
(
"zid filename empty"
);
}
}
std
::
string
zidCompleteFilename
;
std
::
string
zidCompleteFilename
;
...
@@ -131,12 +131,12 @@ void AudioZrtpSession::initializeZid (void)
...
@@ -131,12 +131,12 @@ void AudioZrtpSession::initializeZid (void)
if
(
remove
(
zidCompleteFilename
.
c_str
())
!=
0
)
{
if
(
remove
(
zidCompleteFilename
.
c_str
())
!=
0
)
{
_debug
(
"Failed to remove zid file because of: %s"
,
strerror
(
errno
));
_debug
(
"Failed to remove zid file because of: %s"
,
strerror
(
errno
));
throw
ZrtpZidException
();
throw
ZrtpZidException
(
"zid file deletion failed"
);
}
}
if
(
initialize
(
zidCompleteFilename
.
c_str
())
<
0
)
{
if
(
initialize
(
zidCompleteFilename
.
c_str
())
<
0
)
{
_debug
(
"ZRTP initialization failed"
);
_debug
(
"ZRTP initialization failed"
);
throw
ZrtpZidException
();
throw
ZrtpZidException
(
"zid initialization failed"
);
}
}
return
;
return
;
...
...
This diff is collapsed.
Click to expand it.
sflphone-common/src/audio/audiortp/AudioZrtpSession.h
+
5
−
4
View file @
46dd56f2
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#define __SFL_AUDIO_ZRTP_SESSION_H__
#define __SFL_AUDIO_ZRTP_SESSION_H__
#include
<cstddef>
#include
<cstddef>
#include
<stdexcept>
using
std
::
ptrdiff_t
;
using
std
::
ptrdiff_t
;
#include
<ccrtp/rtp.h>
#include
<ccrtp/rtp.h>
...
@@ -46,11 +47,11 @@ class SIPCall;
...
@@ -46,11 +47,11 @@ class SIPCall;
namespace
sfl
namespace
sfl
{
{
class
ZrtpZidException
:
public
std
::
exception
class
ZrtpZidException
:
public
std
::
runtime_error
{
{
virtual
const
char
*
what
()
const
throw
()
{
public:
return
"ZRTP ZID initialization failed."
;
ZrtpZidException
(
const
std
::
string
&
str
=
""
)
:
}
std
::
runtime_error
(
"ZRTP ZID initialization failed."
+
str
)
{
}
};
};
// class AudioZrtpSession : public ost::TimerPort, public ost::SymmetricZRTPSession, public AudioRtpRecordHandler
// class AudioZrtpSession : public ost::TimerPort, public ost::SymmetricZRTPSession, public AudioRtpRecordHandler
...
...
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