summaryrefslogtreecommitdiff
path: root/res/res_pjsip.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/res_pjsip.c')
-rw-r--r--res/res_pjsip.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index 7c9929740..3241d777d 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -3801,8 +3801,6 @@ int ast_sip_create_request(const char *method, struct pjsip_dialog *dlg,
{
const pjsip_method *pmethod = get_pjsip_method(method);
- ast_assert(endpoint != NULL);
-
if (!pmethod) {
ast_log(LOG_WARNING, "Unknown method '%s'. Cannot send request\n", method);
return -1;
@@ -3811,6 +3809,7 @@ int ast_sip_create_request(const char *method, struct pjsip_dialog *dlg,
if (dlg) {
return create_in_dialog_request(pmethod, dlg, tdata);
} else {
+ ast_assert(endpoint != NULL);
return create_out_of_dialog_request(pmethod, endpoint, uri, contact, tdata);
}
}