Fixed prevent defects
authorGangHeok Kim <gangheok.kim@samsung.com>
Mon, 15 Jul 2013 08:59:12 +0000 (17:59 +0900)
committerGangHeok Kim <gangheok.kim@samsung.com>
Mon, 15 Jul 2013 08:59:12 +0000 (17:59 +0900)
Change-Id: I21534a5cd68d9f4e0a62ef907349cc991f3c950f

debian/changelog
mobileprint/app/pts_main_view.c
mobileprint/app/pts_print_search.c
mobileprint/previewgen/lib/page_preview.c
packaging/mobileprint.spec

index 820a502..2114ae2 100755 (executable)
@@ -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 <gangheok.kim@samsung.com>  Mon, 15 Jul 2013 17:58:17 +0900
+
 mobileprint (0.2.21-1) unstable; urgency=low
 
   * Clean up for tizen 2.1 source open
index c36a658..57b1dca 100644 (file)
@@ -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
index e6e9924..41075ab 100644 (file)
@@ -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
index 22b20e6..d05d168 100644 (file)
@@ -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()");
index 862cb46..df51df8 100755 (executable)
@@ -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