Skip to content

Commit

Permalink
Writing least significant byte of subscription QoS (#210)
Browse files Browse the repository at this point in the history
Signed-off-by: Milan Tucic <tucic.milan@gmail.com>
  • Loading branch information
tucic authored and ralight committed Jul 12, 2016
1 parent b6385d3 commit 50b2634
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/persist.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ static int _db_subs_retain_write(struct mosquitto_db *db, FILE *db_fptr, struct
char *thistopic;
uint32_t length;
uint16_t i16temp;
uint8_t i8temp;
dbid_t i64temp;
size_t slen;

Expand Down Expand Up @@ -292,7 +293,8 @@ static int _db_subs_retain_write(struct mosquitto_db *db, FILE *db_fptr, struct
write_e(db_fptr, &i16temp, sizeof(uint16_t));
write_e(db_fptr, thistopic, slen);

write_e(db_fptr, &sub->qos, sizeof(uint8_t));
i8temp = (uint8_t )sub->qos;
write_e(db_fptr, &i8temp, sizeof(uint8_t));
}
sub = sub->next;
}
Expand Down

0 comments on commit 50b2634

Please sign in to comment.