return NNS_EDGE_ERROR_INVALID_PARAMETER;
}
- if (!key || *key == '\0') {
+ if (!STR_IS_VALID (key)) {
nns_edge_loge ("Invalid param, given key is invalid.");
return NNS_EDGE_ERROR_INVALID_PARAMETER;
}
- if (!value || *value == '\0') {
+ if (!STR_IS_VALID (value)) {
nns_edge_loge ("Invalid param, given value is invalid.");
return NNS_EDGE_ERROR_INVALID_PARAMETER;
}
return NNS_EDGE_ERROR_INVALID_PARAMETER;
}
- if (!key || *key == '\0') {
+ if (!STR_IS_VALID (key)) {
nns_edge_loge ("Invalid param, given key is invalid.");
return NNS_EDGE_ERROR_INVALID_PARAMETER;
}
/* Send capability and info to check compatibility. */
client_id = eh->is_server ? g_get_monotonic_time () : eh->client_id;
- if (!eh->caps_str || *eh->caps_str == '\0') {
+ if (!STR_IS_VALID (eh->caps_str)) {
nns_edge_loge ("Cannot accept socket, invalid capability.");
goto error;
}
{
nns_edge_handle_s *eh;
- if (!id || *id == '\0') {
+ if (!STR_IS_VALID (id)) {
nns_edge_loge ("Invalid param, given ID is invalid.");
return NNS_EDGE_ERROR_INVALID_PARAMETER;
}
- if (!topic || *topic == '\0') {
+ if (!STR_IS_VALID (topic)) {
nns_edge_loge ("Invalid param, given topic is invalid.");
return NNS_EDGE_ERROR_INVALID_PARAMETER;
}
return NNS_EDGE_ERROR_INVALID_PARAMETER;
}
- if (!ip || *ip == '\0') {
+ if (!STR_IS_VALID (ip)) {
nns_edge_loge ("Invalid param, given IP is invalid.");
return NNS_EDGE_ERROR_INVALID_PARAMETER;
}
return NNS_EDGE_ERROR_INVALID_PARAMETER;
}
- if (!key || *key == '\0') {
+ if (!STR_IS_VALID (key)) {
nns_edge_loge ("Invalid param, given key is invalid.");
return NNS_EDGE_ERROR_INVALID_PARAMETER;
}
- if (!value || *value == '\0') {
+ if (!STR_IS_VALID (value)) {
nns_edge_loge ("Invalid param, given value is invalid.");
return NNS_EDGE_ERROR_INVALID_PARAMETER;
}