Lines Matching refs:icon

62 	struct osu_icon icon[OSU_MAX_ITEMS];
325 struct icon_entry *icon;
327 dl_list_for_each(icon, &wpa_s->icon_head, struct icon_entry, list) {
328 if (os_memcmp(icon->bssid, bssid, ETH_ALEN) == 0 &&
329 os_strcmp(icon->file_name, file_name) == 0 && icon->image)
330 return icon;
341 struct icon_entry *icon;
347 wpa_printf(MSG_DEBUG, "HS20: Get icon " MACSTR " %s @ %u +%u (%u)",
351 icon = hs20_find_icon(wpa_s, bssid, file_name);
352 if (!icon || !icon->image || offset >= icon->image_len)
354 if (size > icon->image_len - offset)
355 size = icon->image_len - offset;
362 b64 = base64_encode(&icon->image[offset], size, &b64_size);
374 static void hs20_free_icon_entry(struct icon_entry *icon)
376 wpa_printf(MSG_DEBUG, "HS20: Free stored icon from " MACSTR
378 MAC2STR(icon->bssid), icon->dialog_token,
379 icon->file_name ? icon->file_name : "N/A",
380 (unsigned int) icon->image_len);
381 os_free(icon->file_name);
382 os_free(icon->image);
383 os_free(icon);
390 struct icon_entry *icon, *tmp;
402 dl_list_for_each_safe(icon, tmp, &wpa_s->icon_head, struct icon_entry,
404 if ((!bssid || os_memcmp(icon->bssid, bssid, ETH_ALEN) == 0) &&
406 os_strcmp(icon->file_name, file_name) == 0)) {
407 dl_list_del(&icon->list);
408 hs20_free_icon_entry(icon);
444 struct icon_entry *icon, *tmp;
446 dl_list_for_each_safe(icon, tmp, &wpa_s->icon_head, struct icon_entry,
448 if (icon == new_icon)
450 if (os_memcmp(icon->bssid, new_icon->bssid, ETH_ALEN) == 0 &&
451 os_strcmp(icon->file_name, new_icon->file_name) == 0) {
452 dl_list_del(&icon->list);
453 hs20_free_icon_entry(icon);
467 struct icon_entry *icon;
469 dl_list_for_each(icon, &wpa_s->icon_head, struct icon_entry, list) {
470 if (icon->dialog_token == dialog_token && !icon->image &&
471 os_memcmp(icon->bssid, sa, ETH_ALEN) == 0) {
472 icon->image = os_memdup(pos, slen);
473 if (!icon->image)
475 icon->image_len = slen;
476 hs20_remove_duplicate_icons(wpa_s, icon);
479 MAC2STR(sa), icon->file_name,
480 (unsigned int) icon->image_len);
532 snprintf(fname, sizeof(fname), "%s/osu-icon-%u.%s",
534 png ? "png" : "icon");
576 struct osu_icon *icon = &osu->icon[j];
577 if (icon->id || icon->failed)
580 icon->failed = 1;
582 icon->id = wpa_s->osu_icon_id;
721 * We are going through icon fetch, but no icon response was received.
806 struct osu_icon *icon = &osu->icon[j];
807 if (icon->failed)
808 continue; /* could not fetch icon */
809 fprintf(f, "icon=%u:%u:%u:%s:%s:%s\n",
810 icon->id, icon->width, icon->height, icon->lang,
811 icon->icon_type, icon->filename);
826 wpa_printf(MSG_DEBUG, "HS 2.0: Ready to fetch next icon");
831 struct osu_icon *icon = &osu->icon[j];
832 if (icon->id || icon->failed)
835 wpa_printf(MSG_DEBUG, "HS 2.0: Try to fetch icon '%s' "
836 "from " MACSTR, icon->filename,
841 (u8 *) icon->filename,
842 os_strlen(icon->filename),
844 icon->failed = 1;
966 struct osu_icon *icon = &prov->icon[prov->icon_count];
974 icon->width = WPA_GET_LE16(pos2);
976 icon->height = WPA_GET_LE16(pos2);
978 os_memcpy(icon->lang, pos2, 3);
986 os_memcpy(icon->icon_type, pos2, flen);
1000 os_memcpy(icon->filename, pos2, flen);