don't check array's for null with switch_str_nil macro (MODAPP-44)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6127 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
6ae43f954e
commit
1ada0efb54
|
@ -24,6 +24,7 @@
|
|||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Bret McDanel <trixter AT 0xdecafbad.com>
|
||||
*
|
||||
*
|
||||
* mod_rss.c -- RSS Browser
|
||||
|
@ -323,7 +324,7 @@ SWITCH_STANDARD_APP(rss_function)
|
|||
goto finished;
|
||||
}
|
||||
}
|
||||
if (!switch_strlen_zero(cmd)) {
|
||||
if (*cmd != '\0') {
|
||||
int32_t i;
|
||||
char *p;
|
||||
|
||||
|
@ -482,7 +483,7 @@ SWITCH_STANDARD_APP(rss_function)
|
|||
if (status != SWITCH_STATUS_SUCCESS && status != SWITCH_STATUS_BREAK) {
|
||||
goto finished;
|
||||
}
|
||||
if (!switch_strlen_zero(cmd)) {
|
||||
if (*cmd != '\0') {
|
||||
switch (*cmd) {
|
||||
case '0':
|
||||
switch_set_flag(&dtb, SFLAG_INSTRUCT);
|
||||
|
|
|
@ -1262,7 +1262,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||
sql = switch_mprintf("select count(*) from voicemail_prefs where user='%q' and domain = '%q'", myid, domain_name);
|
||||
vm_execute_sql_callback(profile, profile->mutex, sql, sql2str_callback, &cbt);
|
||||
switch_safe_free(sql);
|
||||
if (switch_strlen_zero(msg_count) || !atoi(msg_count)) {
|
||||
if (*msg_count == '\0' || !atoi(msg_count)) {
|
||||
sql = switch_mprintf("insert into voicemail_prefs values('%q','%q','','')", myid, domain_name);
|
||||
vm_execute_sql(profile, sql, profile->mutex);
|
||||
switch_safe_free(sql);
|
||||
|
@ -1395,7 +1395,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||
goto end;
|
||||
}
|
||||
|
||||
if (switch_strlen_zero(id_buf)) {
|
||||
if (*id_buf == '\0') {
|
||||
continue;
|
||||
} else {
|
||||
myid = id_buf;
|
||||
|
@ -1432,7 +1432,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
|||
if (status != SWITCH_STATUS_SUCCESS) {
|
||||
goto end;
|
||||
}
|
||||
if (switch_strlen_zero(pass_buf)) {
|
||||
if (*pass_buf == '\0') {
|
||||
continue;
|
||||
} else {
|
||||
mypass = pass_buf;
|
||||
|
@ -1656,13 +1656,13 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, cons
|
|||
memset(buf, 0, sizeof(buf));
|
||||
TRY_CODE(switch_ivr_play_file(session, NULL, cbt.name_path, &args));
|
||||
}
|
||||
if (switch_strlen_zero(buf)) {
|
||||
if (*buf == '\0') {
|
||||
memset(buf, 0, sizeof(buf));
|
||||
TRY_CODE(switch_ivr_phrase_macro(session, VM_PLAY_GREETING_MACRO, id, NULL, &args));
|
||||
}
|
||||
}
|
||||
|
||||
if (!switch_strlen_zero(buf)) {
|
||||
if (*buf != '\0') {
|
||||
if (!strcasecmp(buf, profile->main_menu_key)) {
|
||||
voicemail_check_main(session, profile_name, domain_name, id, 0);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue