Ejemplo n.º 1
0
static void
validateFormat(xmlrpc_env *const envP,
               const char *const dt) {

    if (strlen(dt) < 17)
        xmlrpc_faultf(envP,
                      "Invalid length of %u of datetime string.  "
                              "Must be at least 17 characters",
                      (unsigned) strlen(dt));
    else {
        validateFirst17(envP, dt);

        if (!envP->fault_occurred)
            validateFractionalSeconds(envP, dt);
    }
}
Ejemplo n.º 2
0
static __inline__ void
validateFormatNoRegex(xmlrpc_env * const envP,
                      const char * const dt) {

    if (strlen(dt) < 17)
        xmlrpc_env_set_fault_formatted(
            envP, XMLRPC_PARSE_ERROR,
            "Invalid length of %u of datetime.  "
            "Must be at least 17 characters",
            (unsigned)strlen(dt));
    else {
        validateFirst17(envP, dt);

        validateFractionalSeconds(envP, dt);
    }
}