DNP: You'd think a simple "prints remaining" counter would be simple..

*grumblegrumblestupidpfirmwarequirks*
This commit is contained in:
Solomon Peachy 2016-09-06 17:32:01 -04:00
parent 7b52082af7
commit 3af7523f0e
1 changed files with 12 additions and 0 deletions

View File

@ -1279,6 +1279,10 @@ top:
count = atoi((char*)resp+4);
free(resp);
/* Old-sk00l models report one less than they should */
if (!ctx->correct_count)
count++;
count -= ctx->mediaoffset;
if (ctx->media_count_new) {
@ -1417,6 +1421,10 @@ top:
count = atoi((char*)resp+4);
free(resp);
/* Old-sk00l models report one less than they should */
if (!ctx->correct_count)
count++;
count -= ctx->mediaoffset;
if (ctx->media_count_new) {
@ -1833,6 +1841,10 @@ static int dnpds40_get_status(struct dnpds40_ctx *ctx)
count = atoi((char*)resp+4);
free(resp);
/* Old-sk00l models report one less than they should */
if (!ctx->correct_count)
count++;
count -= ctx->mediaoffset;
INFO("Native Prints Remaining on Media: %d\n", count);