[Title] add initialize sensord start
authorjihye kim <jihye1128.kim@samsung.com>
Tue, 13 Mar 2012 07:29:37 +0000 (16:29 +0900)
committerjihye kim <jihye1128.kim@samsung.com>
Tue, 13 Mar 2012 07:29:37 +0000 (16:29 +0900)
[Type]
[Module]
[Priority]
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

tizen/distrib/temp/dev/emul-skin.properties
tizen/src/skin/maruskin_operation.c
tizen/src/skin/maruskin_server.c

index a217ebb..3a3a9c0 100644 (file)
@@ -1,6 +1,6 @@
 #Generated automatically by emulator.
-#Tue Mar 13 15:43:43 KST 2012
-window.y=79
-window.x=2029
+#Tue Mar 13 16:27:07 KST 2012
+window.y=25
+window.x=1857
 window.scale=1
 window.rotate=0
index 3f62cc0..293041e 100644 (file)
@@ -153,7 +153,7 @@ void do_direction_event( int event_type) {
 
     // send_to_sensor_daemon
     {
-        int s;
+        uint16_t s;
 
         s = tcp_socket_outgoing("127.0.0.1", (uint16_t)(get_sdb_base_port() + SDB_TCP_EMULD_INDEX)); 
         if (s < 0) {
index c82e45e..77926af 100644 (file)
@@ -77,6 +77,7 @@ static uint16_t svr_port = 0;
 static int server_sock = 0;
 static int client_sock = 0;
 static int stop = 0;
+static int sensord_initialized = 0;
 
 static int stop_heartbeat = 0;
 static int recv_heartbeat_count = 0;
@@ -123,6 +124,7 @@ void shutdown_skin_server(void) {
 }
 
 void notify_sensor_daemon_start(void) {
+    sensord_initialized = 1;
     if ( 0 > send_skin( client_sock, SEND_SENSOR_DAEMON_START ) ) {
         ERR( "fail to send SEND_SENSOR_DAEMON_START to skin.\n" );
     }
@@ -395,7 +397,10 @@ static void* run_skin_server( void* args ) {
                     direction = ntohs( direction );
 
                     change_lcd_state( scale, direction );
-                    do_direction_event( direction );
+
+                    if ( sensord_initialized ) {
+                        do_direction_event( direction );
+                    }
                     break;
                 }
                 case RECV_HEART_BEAT: {