mirror of
https://github.com/owntracks/recorder.git
synced 2024-11-15 18:08:28 -07:00
ronly fix
This commit is contained in:
parent
e43a767f45
commit
ce4f2f699b
@ -599,13 +599,20 @@ void on_message(struct mosquitto *mosq, void *userdata, const struct mosquitto_m
|
||||
* This JSON payload might actually belong to an RONLY user
|
||||
* but it doesn't have an `r:true' in it. Determine whether
|
||||
* the basetopic belongs to such a user, and force r_ok
|
||||
* accordingly.
|
||||
* accordingly. If this is _type:location it holds the definitive
|
||||
* truth.
|
||||
*/
|
||||
|
||||
if (is_ronly(ud, basetopic)) {
|
||||
r_ok = TRUE;
|
||||
// printf("*** forcing TRUE b/c ronlydb (blen=%ld)\n", blen);
|
||||
}
|
||||
|
||||
if ((j = json_find_member(json, "_type")) != NULL) {
|
||||
if ((j->tag == JSON_STRING) && (strcmp(j->string_, "location") == 0)) {
|
||||
r_ok = FALSE;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
r_ok = TRUE;
|
||||
if ((j->tag != JSON_BOOL) || (j->bool_ == FALSE)) {
|
||||
|
Loading…
Reference in New Issue
Block a user