Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
e2119e89
Commit
e2119e89
authored
5 years ago
by
Friendly Automation
Committed by
Gerrit Code Review
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge "res_pjsip_messaging: Ensure MESSAGE_SEND_STATUS is set properly"
parents
f29ddd89
b1ca2c5d
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
res/res_pjsip_messaging.c
+10
-6
10 additions, 6 deletions
res/res_pjsip_messaging.c
with
10 additions
and
6 deletions
res/res_pjsip_messaging.c
+
10
−
6
View file @
e2119e89
...
...
@@ -637,7 +637,7 @@ static struct msg_data *msg_data_create(const struct ast_msg *msg, const char *t
static
int
msg_send
(
void
*
data
)
{
RAII_VAR
(
struct
msg_data
*
,
mdata
,
data
,
ao2_cleanup
);
struct
msg_data
*
mdata
=
data
;
/* The caller holds a reference */
const
struct
ast_sip_body
body
=
{
.
type
=
"text"
,
...
...
@@ -681,24 +681,28 @@ static int msg_send(void *data)
return
-
1
;
}
return
PJ_SUCCESS
;
return
0
;
}
static
int
sip_msg_send
(
const
struct
ast_msg
*
msg
,
const
char
*
to
,
const
char
*
from
)
{
struct
msg_data
*
mdata
;
int
res
;
if
(
ast_strlen_zero
(
to
))
{
ast_log
(
LOG_ERROR
,
"SIP MESSAGE - a 'To' URI must be specified
\n
"
);
return
-
1
;
}
if
(
!
(
mdata
=
msg_data_create
(
msg
,
to
,
from
))
||
ast_sip_push_task
(
message_serializer
,
msg_send
,
mdata
))
{
ao2_cleanup
(
mdata
);
mdata
=
msg_data_create
(
msg
,
to
,
from
);
if
(
!
mdata
)
{
return
-
1
;
}
return
0
;
res
=
ast_sip_push_task_wait_serializer
(
message_serializer
,
msg_send
,
mdata
);
ao2_ref
(
mdata
,
-
1
);
return
res
;
}
static
const
struct
ast_msg_tech
msg_tech
=
{
...
...
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