From 37f25c9e0390399a63e146a69e2cd45eded34fe6 Mon Sep 17 00:00:00 2001 From: GangHeok Kim Date: Mon, 15 Jul 2013 17:59:12 +0900 Subject: [PATCH] Fixed prevent defects Change-Id: I21534a5cd68d9f4e0a62ef907349cc991f3c950f --- debian/changelog | 8 ++++++++ mobileprint/app/pts_main_view.c | 5 +---- mobileprint/app/pts_print_search.c | 7 ++++++- mobileprint/previewgen/lib/page_preview.c | 11 ++++++----- packaging/mobileprint.spec | 2 +- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/debian/changelog b/debian/changelog index 820a502..2114ae2 100755 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +mobileprint (0.2.22-1) unstable; urgency=low + + * Fixed prevent defects + * Git: apps/home/mobileprint + * Tag: mobileprint_0.2.22-1 + + -- GangHeok Kim Mon, 15 Jul 2013 17:58:17 +0900 + mobileprint (0.2.21-1) unstable; urgency=low * Clean up for tizen 2.1 source open diff --git a/mobileprint/app/pts_main_view.c b/mobileprint/app/pts_main_view.c index c36a658..57b1dca 100644 --- a/mobileprint/app/pts_main_view.c +++ b/mobileprint/app/pts_main_view.c @@ -2004,7 +2004,6 @@ API Evas_Object *pts_create_main_view(pts_appdata_t *ad) Evas_Object *main_layout = NULL; Evas_Object *back_btn = NULL; Evas_Object *toolbar; - Elm_Object_Item *toolbar_it; ad->main_info.main_layout = pts_create_base_layout_with_conform(ad->main_info.root_win, "navi"); if (NULL == ad->main_info.main_layout) { @@ -2042,9 +2041,7 @@ API Evas_Object *pts_create_main_view(pts_appdata_t *ad) ea_object_event_callback_add(ad->main_info.navi, EA_CALLBACK_MORE, ea_naviframe_more_cb, NULL); /* insert printing button */ - toolbar_it = elm_toolbar_item_append(toolbar, NULL, - _("IDS_SMPOS_SK3_PRINT"), - __pts_main_view_btn_print_cb, ad); + elm_toolbar_item_append(toolbar, NULL, _("IDS_SMPOS_SK3_PRINT"), __pts_main_view_btn_print_cb, ad); elm_object_item_part_content_set(ad->main_info.navi_it, "toolbar", toolbar); /* we have only one item in toolbar, so we could set diff --git a/mobileprint/app/pts_print_search.c b/mobileprint/app/pts_print_search.c index e6e9924..41075ab 100644 --- a/mobileprint/app/pts_print_search.c +++ b/mobileprint/app/pts_print_search.c @@ -97,7 +97,12 @@ static void _wifi_direct_ug_result_cb(ui_gadget_h ug, service_h result, void *pr PTS_RET_IF(ad == NULL, "ad is NULL"); char *ip_addr = NULL; - service_get_extra_data(result, "ip_address", &ip_addr); + int ret = -1; + + ret = service_get_extra_data(result, "ip_address", &ip_addr); + if (ret != SERVICE_ERROR_NONE) { + PTS_DEBUG("get extra data failed!, errno: %d", ret); + } if (ip_addr) { /* Check IP address of connected peer */ // TODO - Add active printer set routine to CUPS using this address diff --git a/mobileprint/previewgen/lib/page_preview.c b/mobileprint/previewgen/lib/page_preview.c index 22b20e6..d05d168 100644 --- a/mobileprint/previewgen/lib/page_preview.c +++ b/mobileprint/previewgen/lib/page_preview.c @@ -276,21 +276,22 @@ int save_pdf_preview_page_image(const char *pdf_fname, int page_num, canvas = create_canvas(&(settings_px.full_size)); PGEN_RETV_IF(canvas == NULL, -1, "canvas is NULL"); - if (load_pdf_page_img(pdf_fname, page_num, &settings_px, - &img_buf, &img_size) < 0) { + /* till we save page images in PPM this is required */ + if (set_canvas_background(canvas, &(settings_px.full_size)) < 0) { + PGEN_DEBUG("ERROR in set_canvas_background()"); destroy_canvas(canvas); PGEN_TRACE_END; return -1; } - /* till we save page images in PPM this is required */ - if (set_canvas_background(canvas, &(settings_px.full_size)) < 0) { - PGEN_DEBUG("ERROR in set_canvas_background()"); + if (load_pdf_page_img(pdf_fname, page_num, &settings_px, + &img_buf, &img_size) < 0) { destroy_canvas(canvas); PGEN_TRACE_END; return -1; } + PGEN_RETV_IF(img_buf == NULL, -1, "img_buf is NULL"); if (set_pdf_preview_page_image(canvas, img_buf, img_size, &off, &settings_px) < 0) { PGEN_DEBUG("ERROR in set_pdf_preview_page_image()"); diff --git a/packaging/mobileprint.spec b/packaging/mobileprint.spec index 862cb46..df51df8 100755 --- a/packaging/mobileprint.spec +++ b/packaging/mobileprint.spec @@ -1,6 +1,6 @@ Name: mobileprint Summary: Library for writing UNIX daemons -Version: 0.2.21 +Version: 0.2.22 Release: 1 Group: System/Libraries License: Flora Software License -- 2.7.4