mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-08 04:45:31 +00:00
sip-provider: Use STR_IS_NULL_OR_EMPTY macro
This commit is contained in:
parent
204772abbd
commit
18173f067f
1 changed files with 4 additions and 5 deletions
|
@ -38,6 +38,7 @@
|
||||||
#include "calls-sip-origin.h"
|
#include "calls-sip-origin.h"
|
||||||
#include "calls-sip-provider.h"
|
#include "calls-sip-provider.h"
|
||||||
#include "calls-sip-util.h"
|
#include "calls-sip-util.h"
|
||||||
|
#include "calls-util.h"
|
||||||
|
|
||||||
#include <libpeas/peas.h>
|
#include <libpeas/peas.h>
|
||||||
#include <sofia-sip/nua.h>
|
#include <sofia-sip/nua.h>
|
||||||
|
@ -171,16 +172,14 @@ on_origin_pw_looked_up (GObject *source,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define IS_NULL_OR_EMPTY(x) ((x) == NULL || (x)[0] == '\0')
|
|
||||||
if (!direct_mode &&
|
if (!direct_mode &&
|
||||||
(IS_NULL_OR_EMPTY (host) ||
|
(STR_IS_NULL_OR_EMPTY (host) ||
|
||||||
IS_NULL_OR_EMPTY (user) ||
|
STR_IS_NULL_OR_EMPTY (user) ||
|
||||||
IS_NULL_OR_EMPTY (password))) {
|
STR_IS_NULL_OR_EMPTY (password))) {
|
||||||
g_warning ("Host, user and password must not be empty");
|
g_warning ("Host, user and password must not be empty");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#undef IS_NULL_OR_EMPTY
|
|
||||||
|
|
||||||
calls_sip_provider_add_origin_full (data->provider,
|
calls_sip_provider_add_origin_full (data->provider,
|
||||||
id,
|
id,
|
||||||
|
|
Loading…
Reference in a new issue