Lines Matching refs:NULL
142 if (op_to_set == NULL) { in set_ipp_version()
166 if (http == NULL) { in determine_ipp_version()
185 ipp_t *request = NULL; in test_and_set_ipp_version()
197 ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, printer_uri); in test_and_set_ipp_version()
200 NULL, __request_ipp_version); in test_and_set_ipp_version()
201 if ((response = cupsDoRequest(http, request, http_resource)) == NULL) { in test_and_set_ipp_version()
266 if (response != NULL) ippDelete(response); in test_and_set_ipp_version()
280 ipp_t *request = NULL; in get_PrinterState()
281 ipp_t *response = NULL; in get_PrinterState()
287 if (printer_state_dyn == NULL) { in get_PrinterState()
299 ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, printer_uri); in get_PrinterState()
302 sizeof(pattrs) / sizeof(pattrs[0]), NULL, pattrs); in get_PrinterState()
304 if ((response = ipp_doCupsRequest(http, request, http_resource, printer_uri)) == NULL) { in get_PrinterState()
332 if ((attrptr = ippFindAttribute(response, "printer-state", IPP_TAG_ENUM)) == NULL) { in get_PrinterStateReason()
355 if ((attrptr = ippFindAttribute(response, "printer-state-reasons", IPP_TAG_KEYWORD)) == NULL) { in get_PrinterStateReason()
363 ippGetString(attrptr, idx, NULL)); in get_PrinterStateReason()
364 if (strncmp(ippGetString(attrptr, idx, NULL), IPP_PRNT_STATE_NONE, in get_PrinterStateReason()
378 } else if (strncmp(ippGetString(attrptr, idx, NULL), IPP_PRNT_STATE_SPOOL_FULL, in get_PrinterStateReason()
392 } else if (strncmp(ippGetString(attrptr, idx, NULL), IPP_PRNT_STATE_MARKER_SUPPLY_LOW, in get_PrinterStateReason()
395 } else if (strncmp(ippGetString(attrptr, idx, NULL), IPP_PRNT_STATE_TONER_LOW, in get_PrinterStateReason()
398 } else if (strncmp(ippGetString(attrptr, idx, NULL), IPP_PRNT_STATE_OTHER_WARN, in get_PrinterStateReason()
403 if (strncmp(ippGetString(attrptr, idx, NULL), IPP_PRNT_STATE_MEDIA_NEEDED, in get_PrinterStateReason()
406 } else if (strncmp(ippGetString(attrptr, idx, NULL), IPP_PRNT_STATE_MEDIA_EMPTY, in get_PrinterStateReason()
409 } else if (strncmp(ippGetString(attrptr, idx, NULL), IPP_PRNT_STATE_TONER_EMPTY, in get_PrinterStateReason()
412 } else if (strncmp(ippGetString(attrptr, idx, NULL), in get_PrinterStateReason()
416 } else if (strncmp(ippGetString(attrptr, idx, NULL), IPP_PRNT_STATE_DOOR_OPEN, in get_PrinterStateReason()
419 } else if (strncmp(ippGetString(attrptr, idx, NULL), IPP_PRNT_STATE_COVER_OPEN, in get_PrinterStateReason()
422 } else if (strncmp(ippGetString(attrptr, idx, NULL), IPP_PRNT_STATE_MEDIA_JAM, in get_PrinterStateReason()
425 } else if (strncmp(ippGetString(attrptr, idx, NULL), IPP_PRNT_SHUTDOWN, in get_PrinterStateReason()
428 } else if (strncmp(ippGetString(attrptr, idx, NULL), IPP_PRNT_STATE_OTHER_ERR, in get_PrinterStateReason()
431 } else if (strncmp(ippGetString(attrptr, idx, NULL), IPP_PRNT_PAUSED, in get_PrinterStateReason()
503 ippTagString(ippGetValueTag(attr)), ippGetString(attr, i, NULL)); in print_col()
532 if (ippGetName(attr) == NULL) { in print_attr()
591 ippTagString(ippGetValueTag(attr)), ippGetString(attr, i, NULL)); in print_attr()
628 if (ippVersions != NULL) { in parse_IPPVersions()
632 if (attrptr != NULL) { in parse_IPPVersions()
635 if (strcmp(ipp10, ippGetString(attrptr, i, NULL)) == 0) { in parse_IPPVersions()
637 } else if (strcmp(ipp11, ippGetString(attrptr, i, NULL)) == 0) { in parse_IPPVersions()
639 } else if (strcmp(ipp20, ippGetString(attrptr, i, NULL)) == 0) { in parse_IPPVersions()
642 LOGD("found another ipp version. %s", ippGetString(attrptr, i, NULL)); in parse_IPPVersions()
759 ippFindAttribute(response, "media-col-ready", IPP_TAG_BEGIN_COLLECTION)) != NULL) { in parse_getMediaSupported()
767 (attrptr2 != NULL); in parse_getMediaSupported()
773 (attrptr3 != NULL); in parse_getMediaSupported()
789 ippGetString(attrptr2, 0, NULL), MAX_STRING); in parse_getMediaSupported()
793 && strstr(mediaReadySet.media_tray_tag, "roll") != NULL) { in parse_getMediaSupported()
808 && (attrptr = ippFindAttribute(response, "media-ready", IPP_TAG_KEYWORD)) != NULL) { in parse_getMediaSupported()
814 ippGetString(attrptr, i, NULL), MAX_STRING); in parse_getMediaSupported()
821 && ((attrptr = ippFindAttribute(response, "media-supported", IPP_TAG_KEYWORD)) != NULL)) { in parse_getMediaSupported()
824 idx = ipp_find_media_size(ippGetString(attrptr, i, NULL), &media_sizeTemp); in parse_getMediaSupported()
911 if ((attrptr = ippFindAttribute(response, "printer-dns-sd-name", IPP_TAG_NAME)) != NULL) { in parse_printerAttributes()
912 strlcpy(capabilities->name, ippGetString(attrptr, 0, NULL), sizeof(capabilities->name)); in parse_printerAttributes()
916 if ((attrptr = ippFindAttribute(response, "printer-info", IPP_TAG_TEXT)) != NULL) { in parse_printerAttributes()
917 strlcpy(capabilities->name, ippGetString(attrptr, 0, NULL), sizeof(capabilities->name)); in parse_printerAttributes()
922 if ((attrptr = ippFindAttribute(response, "printer-name", IPP_TAG_TEXT)) != NULL) { in parse_printerAttributes()
923 strlcpy(capabilities->name, ippGetString(attrptr, 0, NULL), sizeof(capabilities->name)); in parse_printerAttributes()
927 if ((attrptr = ippFindAttribute(response, "printer-make-and-model", IPP_TAG_TEXT)) != NULL) { in parse_printerAttributes()
928 strlcpy(capabilities->make, ippGetString(attrptr, 0, NULL), sizeof(capabilities->make)); in parse_printerAttributes()
931 if ((attrptr = ippFindAttribute(response, "printer-uuid", IPP_TAG_URI)) != NULL) { in parse_printerAttributes()
932 strlcpy(capabilities->uuid, ippGetString(attrptr, 0, NULL), sizeof(capabilities->uuid)); in parse_printerAttributes()
935 if ((attrptr = ippFindAttribute(response, "printer-location", IPP_TAG_TEXT)) != NULL) { in parse_printerAttributes()
936 strlcpy(capabilities->location, ippGetString(attrptr, 0, NULL), in parse_printerAttributes()
940 if ((attrptr = ippFindAttribute(response, "media-default", IPP_TAG_KEYWORD)) != NULL) { in parse_printerAttributes()
941 strlcpy(capabilities->mediaDefault, ippGetString(attrptr, 0, NULL), in parse_printerAttributes()
945 if ((attrptr = ippFindAttribute(response, "color-supported", IPP_TAG_BOOLEAN)) != NULL) { in parse_printerAttributes()
950 if ((attrptr = ippFindAttribute(response, "copies-supported", IPP_TAG_RANGE)) != NULL) { in parse_printerAttributes()
960 NULL) { in parse_printerAttributes()
962 if (strcmp("color", ippGetString(attrptr, i, NULL)) == 0) { in parse_printerAttributes()
968 NULL) { in parse_printerAttributes()
983 != NULL) { in parse_printerAttributes()
985 if (strcmp(imagePDF, ippGetString(attrptr, i, NULL)) == 0) { in parse_printerAttributes()
987 } else if (strcmp(applicationPDF, ippGetString(attrptr, i, NULL)) == 0) { in parse_printerAttributes()
989 } else if (strcmp(imagePCLm, ippGetString(attrptr, i, NULL)) == 0) { in parse_printerAttributes()
991 } else if (strcmp(applicationPDF, ippGetString(attrptr, i, NULL)) == 0) { in parse_printerAttributes()
993 } else if (strcmp(imagePWG, ippGetString(attrptr, i, NULL)) == 0) { in parse_printerAttributes()
999 if ((attrptr = ippFindAttribute(response, "sides-supported", IPP_TAG_KEYWORD)) != NULL) { in parse_printerAttributes()
1001 if (strcmp(IPP_SIDES_TWO_SIDED_SHORT_EDGE, ippGetString(attrptr, i, NULL)) == 0) { in parse_printerAttributes()
1003 } else if (strcmp(IPP_SIDES_TWO_SIDED_LONG_EDGE, ippGetString(attrptr, i, NULL)) == 0) { in parse_printerAttributes()
1011 if (((attrptr = ippFindAttribute(response, "media-type-supported", IPP_TAG_KEYWORD)) != NULL) in parse_printerAttributes()
1013 != NULL)) { in parse_printerAttributes()
1015 if (strcasestr(ippGetString(attrptr, i, NULL), "photographic-glossy")) { in parse_printerAttributes()
1017 } else if (strcasestr(ippGetString(attrptr, i, NULL), "photo")) { in parse_printerAttributes()
1019 } else if (strcasestr(ippGetString(attrptr, i, NULL), "stationery")) { in parse_printerAttributes()
1021 } else if (strcasestr(ippGetString(attrptr, i, NULL), "auto")) { in parse_printerAttributes()
1039 IPP_TAG_RESOLUTION)) != NULL) { in parse_printerAttributes()
1042 IPP_TAG_RESOLUTION)) != NULL) { in parse_printerAttributes()
1050 if ((attrptr = ippFindAttribute(response, "ipp-versions-supported", IPP_TAG_KEYWORD)) != NULL) { in parse_printerAttributes()
1056 if (strcmp(ipp10, ippGetString(attrptr, i, NULL)) == 0) { in parse_printerAttributes()
1058 } else if (strcmp(ipp11, ippGetString(attrptr, i, NULL)) == 0) { in parse_printerAttributes()
1060 } else if (strcmp(ipp20, ippGetString(attrptr, i, NULL)) == 0) { in parse_printerAttributes()
1063 LOGD("found another ipp version. %s", ippGetString(attrptr, i, NULL)); in parse_printerAttributes()
1083 if ((attrptr = ippFindAttribute(response, "epcl-version-supported", IPP_TAG_KEYWORD)) != NULL) { in parse_printerAttributes()
1085 LOGD("setting epcl_ipp_version (KEYWORD) %s", ippGetString(attrptr, i, NULL)); in parse_printerAttributes()
1088 if (strstr(ippGetString(attrptr, i, NULL), epcl10) != NULL) { in parse_printerAttributes()
1095 if ((attrptr = ippFindAttribute(response, "epcl-version-supported", IPP_TAG_TEXT)) != NULL) { in parse_printerAttributes()
1097 LOGD("setting epcl_ipp_verion (TEXT) %s", ippGetString(attrptr, i, NULL)); in parse_printerAttributes()
1100 if (strstr(ippGetString(attrptr, i, NULL), epcl10) != NULL) { in parse_printerAttributes()
1108 NULL) { in parse_printerAttributes()
1115 (j < 4) && (attrptr != NULL); attrptr = ippNextAttribute(collection)) { in parse_printerAttributes()
1129 if ((attrptr = ippFindAttribute(response, "media-size-name", IPP_TAG_KEYWORD)) != NULL) { in parse_printerAttributes()
1137 IPP_TAG_INTEGER)) != NULL) { in parse_printerAttributes()
1156 IPP_TAG_KEYWORD)) != NULL) { in parse_printerAttributes()
1157 LOGD("pclm-compression-method-preferred=%s", ippGetString(attrptr, 0, NULL)); in parse_printerAttributes()
1162 if ((attrptr = ippFindAttribute(response, "pclm-raster-back-side", IPP_TAG_KEYWORD)) == NULL) { in parse_printerAttributes()
1165 if (attrptr != NULL && strcmp(ippGetString(attrptr, 0, NULL), "rotated") != 0) { in parse_printerAttributes()
1174 NULL) { in parse_printerAttributes()
1184 NULL) { in parse_printerAttributes()
1194 NULL) { in parse_printerAttributes()
1204 NULL) { in parse_printerAttributes()
1221 if ((attrptr = ippFindAttribute(response, "printer-device-id", IPP_TAG_TEXT)) != NULL) { in parse_printerAttributes()
1222 if (strstr(ippGetString(attrptr, 0, NULL), "PCL3GUI") != NULL) { in parse_printerAttributes()
1231 if ((attrptr = ippFindAttribute(response, "output-bin-supported", IPP_TAG_KEYWORD)) != NULL) { in parse_printerAttributes()
1232 if (strstr(ippGetString(attrptr, 0, NULL), "face-up") != NULL) { in parse_printerAttributes()
1236 if ((attrptr = ippFindAttribute(response, "printer-output-tray", IPP_TAG_STRING)) != NULL) { in parse_printerAttributes()
1240 if (strstr(tray_str, "faceUp") != NULL) { in parse_printerAttributes()
1248 IPP_TAG_KEYWORD)) != NULL) { in parse_printerAttributes()
1250 if (strcmp("document-source-application-name", ippGetString(attrptr, i, NULL)) == 0) { in parse_printerAttributes()
1253 strcmp("document-source-application-version", ippGetString(attrptr, i, NULL)) == in parse_printerAttributes()
1256 } else if (strcmp("document-source-os-name", ippGetString(attrptr, i, NULL)) == 0) { in parse_printerAttributes()
1258 } else if (strcmp("document-source-os-version", ippGetString(attrptr, i, NULL)) == 0) { in parse_printerAttributes()
1278 if ((attrptr = ippFindAttribute(response, "printer-uri-supported", IPP_TAG_URI)) != NULL) { in parse_printerUris()
1280 uris[i].uri = ippGetString(attrptr, i, NULL); in parse_printerUris()
1287 != NULL) { in parse_printerUris()
1290 if (strcmp("none", ippGetString(attrptr, i, NULL)) != 0 && in parse_printerUris()
1291 strcmp("requesting-user-name", ippGetString(attrptr, i, NULL)) != 0) { in parse_printerUris()
1293 ippGetString(attrptr, i, NULL)); in parse_printerUris()
1379 http_t *curl_http = NULL; in ipp_cups_connect()
1383 if ((connect_info->uri_path == NULL) || (strlen(connect_info->uri_path) == 0)) { in ipp_cups_connect()
1391 if (strstr(connect_info->uri_scheme,IPPS_PREFIX) != NULL) { in ipp_cups_connect()
1392 curl_http = httpConnect2(connect_info->printer_addr, ippPortNumber, NULL, AF_UNSPEC, in ipp_cups_connect()
1393 HTTP_ENCRYPTION_ALWAYS, 1, HTTP_TIMEOUT_MILLIS, NULL); in ipp_cups_connect()
1396 if (curl_http == NULL) { in ipp_cups_connect()
1397 curl_http = httpConnect2(connect_info->printer_addr, ippPortNumber, NULL, AF_UNSPEC, in ipp_cups_connect()
1398 HTTP_ENCRYPTION_REQUIRED, 1, HTTP_TIMEOUT_MILLIS, NULL); in ipp_cups_connect()
1401 curl_http = httpConnect2(connect_info->printer_addr, ippPortNumber, NULL, AF_UNSPEC, in ipp_cups_connect()
1402 HTTP_ENCRYPTION_IF_REQUESTED, 1, HTTP_TIMEOUT_MILLIS, NULL); in ipp_cups_connect()
1405 httpSetTimeout(curl_http, (double)connect_info->timeout / 1000, NULL, 0); in ipp_cups_connect()
1406 httpAssembleURIf(HTTP_URI_CODING_ALL, printer_uri, uriLength, connect_info->uri_scheme, NULL, in ipp_cups_connect()
1409 if (curl_http == NULL) { in ipp_cups_connect()
1413 cupsSetServerCertCB(NULL, NULL); in ipp_cups_connect()
1422 ipp_t *response = NULL; in ippSendRequest()
1434 if (result == HTTP_CONTINUE && response == NULL) { in ippSendRequest()
1458 ipp_t *response = NULL; in ipp_doCupsRequest()
1465 if (http == NULL || request == NULL || http_resource == NULL || printer_uri == NULL) { in ipp_doCupsRequest()
1466 return NULL; in ipp_doCupsRequest()
1471 if (!wprintIsRunning()) return NULL; in ipp_doCupsRequest()
1482 if (response == NULL) { in ipp_doCupsRequest()
1528 response = NULL; in ipp_doCupsRequest()
1533 response = NULL; in ipp_doCupsRequest()