mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-12 20:47:06 +00:00
don't strstr on null/blank strings.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7027 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
33bd22a308
commit
6c25cb4136
9 files changed
+13
-13
No files matched your search
@@ -1016,7 +1016,7 @@ static int get_dev_by_name(char *name, int in)
|
||||
|
||||
if (switch_strlen_zero(name)) {
|
||||
match = 1;
|
||||
} else if (strstr(pdi->name, name)) {
|
||||
} else if (pdi && pdi->name && strstr(pdi->name, name)) {
|
||||
match = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1275,7 +1275,7 @@ void sofia_presence_handle_sip_i_message(int status,
|
||||
const char *subject = "n/a";
|
||||
char *msg = NULL;
|
||||
|
||||
if (sip->sip_content_type) {
|
||||
if (sip->sip_content_type && !switch_strlen_zero(sip->sip_content_type->c_subtype)) {
|
||||
if (strstr(sip->sip_content_type->c_subtype, "composing")) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user