IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 31, 2007, 4:40:05 PM (19 years ago)
Author:
jhoblitt
Message:

required option update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/camtool.c

    r12237 r13580  
    2323
    2424#include <stdlib.h>
     25#include <stdint.h>
    2526#include <inttypes.h>
    2627
     
    434435    }
    435436
     437    psString chip_id = psMetadataLookupStr(&status, config->args, "-chip_id");
     438    if (!status) {
     439        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -chip_id");
     440        return false;
     441    }
     442    if (!chip_id) {
     443        psError(PS_ERR_UNKNOWN, true, "-chip_id is required");
     444        return false;
     445    }
     446
    436447    psString uri = psMetadataLookupStr(&status, config->args, "-uri");
    437448    if (!status) {
     
    520531
    521532    // default
    522     psS8 code = psMetadataLookupS8(&status, config->args, "-code");
     533    psS16 code = psMetadataLookupS16(&status, config->args, "-code");
    523534    if (!status) {
    524535        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -code");
     
    714725
    715726    bool status = false;
    716     psS8 code = psMetadataLookupS8(&status, config->args, "-code");
     727    psS16 code = psMetadataLookupS16(&status, config->args, "-code");
    717728    if (!status) {
    718729        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -code");
     730        return false;
     731    }
     732    if (code == INT16_MAX) {
     733        psError(PS_ERR_UNKNOWN, true, "-code is required");
    719734        return false;
    720735    }
Note: See TracChangeset for help on using the changeset viewer.