add datausage syspopup , fix crash in reference to freed data 13/17813/1
authorHyungdeuk Kim <hd3.kim@samsung.com>
Wed, 5 Jun 2013 05:20:46 +0000 (14:20 +0900)
committerInkyun Kil <inkyun.kil@samsung.com>
Tue, 11 Mar 2014 07:09:03 +0000 (16:09 +0900)
Change-Id: Ib7e81dc1a9988df3363c30abf232c4744ce225b3

data/syspopup_db.sql
packaging/syspopup.spec
syspopup/syspopup.c

index 240092e..4b08e04 100755 (executable)
@@ -31,6 +31,7 @@ INSERT OR REPLACE INTO "syspopup_info" VALUES(NULL,"tickernoti-syspopup",     1,1,-
 INSERT OR REPLACE INTO "syspopup_info" VALUES(NULL,"usbotg-syspopup",          0,1,-1,0,0,"org.tizen.usbotg-syspopup");
 INSERT OR REPLACE INTO "syspopup_info" VALUES(NULL,"allshare-popup",            0,0,-1,0,0,"org.tizen.allshare-popup");
 INSERT OR REPLACE INTO "syspopup_info" VALUES(NULL,"mmc-syspopup",             0,1,-1,0,0,"org.tizen.mmc-syspopup");
+INSERT OR REPLACE INTO "syspopup_info" VALUES(NULL,"datausage-syspopup",       1,1,-1,0,0,"org.tizen.datausage-syspopup");
 /*
 INSERT OR REPLACE INTO "syspopup_info" VALUES(NULL,"drm",                      0,0,5,0,0,"org.tizen.drm-popup");
 INSERT OR REPLACE INTO "syspopup_info" VALUES(NULL,"incoming_call",            2,0,-1,2,2,"org.tizen.incoming_call");
index c1443f1..8fb4b44 100755 (executable)
@@ -3,7 +3,7 @@
 
 Name:           syspopup
 Summary:        Syspopup package
-Version:        0.0.92
+Version:        0.0.93
 Release:        0
 Group:          System/Libraries
 License:        Apache-2.0
@@ -12,6 +12,7 @@ Source1001:     %{name}.manifest
 Source1002:     %{name}-devel.manifest
 Source1003:     %{name}-caller.manifest
 Source1004:     %{name}-caller-devel.manifest
+
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(sqlite3)
 BuildRequires:  pkgconfig(bundle)
index 07de01e..eec3d03 100755 (executable)
@@ -95,6 +95,7 @@ static void __X_syspopup_term_handler(void *data)
 {
 #ifndef WAYLAND
        syspopup *tmp;
+       syspopup *next;
        Display *d;
        Window win;
 
@@ -103,29 +104,33 @@ static void __X_syspopup_term_handler(void *data)
        d = XOpenDisplay(NULL);
        tmp = _syspopup_get_head();
        while (tmp) {
+
+               _D("term action %d - %s", tmp->term_act, tmp->name);
+               next = tmp->next;
+
                switch (tmp->term_act) {
                case SYSPOPUP_TERM:
+                       win = (Window) tmp->internal_data;
+
                        if (tmp->def_term_fn != NULL)
                                tmp->def_term_fn(tmp->dupped_bundle,
                                                 tmp->user_data);
-
-                       win = (Window) tmp->internal_data;
                        XKillClient(d, win);
-                       /*XDestroyWindow(d, win);*/ 
+                       /*XDestroyWindow(d, win);*/
                        /* TODO :modify for multi popup */
                        break;
                case SYSPOPUP_HIDE:
+                       win = (Window) tmp->internal_data;
+
                        if (tmp->def_term_fn != NULL)
                                tmp->def_term_fn(tmp->dupped_bundle,
                                                 tmp->user_data);
-
-                       win = (Window) tmp->internal_data;
                        XUnmapWindow(d, win);
                        break;
                default:
                        _D("term action IGNORED - %s", tmp->name);
                }
-               tmp = tmp->next;
+               tmp = next;
        }
 
        XCloseDisplay(d);