Fix bug of invitation behavior
authorKim Gibyoung <lastkgb.kim@samsung.com>
Sat, 2 Feb 2013 17:56:08 +0000 (02:56 +0900)
committerKim Gibyoung <lastkgb.kim@samsung.com>
Sat, 2 Feb 2013 17:56:08 +0000 (02:56 +0900)
Change-Id: I579f7a28eccfc3f4a69fbe04482514d53c935c11

debian/changelog
include/wifi-direct-internal.h
include/wifi-direct.h
packaging/libwifi-direct.spec
src/wifi-direct-client-proxy.c

index ed429ce..4d2f461 100644 (file)
@@ -1,3 +1,11 @@
+libwifi-direct (0.3.4) unstable; urgency=low
+
+  * Fix bug of invitation behavior
+  * Git : rsa/framework/connectivity/libwifi-direct
+  * Tag : libwifi-direct_0.3.4
+
+ -- Gibyoung Kim <lastkgb.kim@samsung.com>  Sun, 3 Jan 2013 02:53:04 +0900
+
 libwifi-direct (0.3.3) unstable; urgency=low
 
   * Package Update
index 5114d35..e9ccb73 100644 (file)
@@ -154,6 +154,7 @@ typedef enum
        WIFI_DIRECT_CLI_EVENT_GROUP_DESTROY_RSP,                                /**< */
 
        WIFI_DIRECT_CLI_EVENT_IP_LEASED_IND,                            /**< */
+       WIFI_DIRECT_CLI_EVENT_INVITATION_REQ,
 } wfd_client_event_e;
 
 /**
index fc9a0c1..eec9963 100644 (file)
@@ -108,6 +108,7 @@ typedef enum
        WIFI_DIRECT_DISCONNECTION_IND,                  /**< */
        WIFI_DIRECT_GROUP_CREATED,                      /**< */
        WIFI_DIRECT_GROUP_DESTROYED,                    /**< */
+       WIFI_DIRECT_INVITATION_REQ,
 } wifi_direct_connection_state_e;
 
 /**
index b7e26a2..08ac4a1 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       libwifi-direct
 Summary:    wifi direct library (Shared Library)
-Version:    0.3.3
+Version:    0.3.4
 Release:    1
 Group:      TO_BE_FILLED
 License:    Apache-2.0
index 0c21e81..97967cd 100644 (file)
@@ -283,6 +283,9 @@ static int __wfd_convert_client_event(wfd_client_event_e event)
        case WIFI_DIRECT_CLI_EVENT_GROUP_DESTROY_RSP:
                return WIFI_DIRECT_GROUP_DESTROYED;
                break;
+       case WIFI_DIRECT_CLI_EVENT_INVITATION_REQ:
+               return WIFI_DIRECT_INVITATION_REQ;
+               break;
        default:
                WDC_LOGE("Invalid event : [%d]", event);
                break;
@@ -365,6 +368,7 @@ static gboolean __wfd_client_process_event(GIOChannel * source,
        case WIFI_DIRECT_CLI_EVENT_DISASSOCIATION_IND:
        case WIFI_DIRECT_CLI_EVENT_GROUP_CREATE_RSP:
        case WIFI_DIRECT_CLI_EVENT_GROUP_DESTROY_RSP:
+       case WIFI_DIRECT_CLI_EVENT_INVITATION_REQ:
                if (client->connection_cb != NULL)
                        client->connection_cb(error,
                                          (wifi_direct_connection_state_e)
@@ -2027,24 +2031,20 @@ int wifi_direct_foreach_connected_peers(wifi_direct_connected_peer_cb callback,
        req.cmd = WIFI_DIRECT_CMD_GET_CONNECTED_PEERS_INFO;
        req.client_id = client_info->client_id;
 
-       status =
-               __wfd_client_send_request(client_info->sync_sockfd, &req,
+       status = __wfd_client_send_request(client_info->sync_sockfd, &req,
                                                                  sizeof(wifi_direct_client_request_s));
        if (status != WIFI_DIRECT_ERROR_NONE)
        {
-               WDC_LOGE("Error!!! writing to socket, Errno = %s\n",
-                                          strerror(errno));
-               WDC_LOGE("Error!!! [%s]\n",
-                                          __wfd_print_error(status));
+               WDC_LOGE("Error!!! writing to socket, Errno = %s\n", strerror(errno));
+               WDC_LOGE("Error!!! [%s]\n", __wfd_print_error(status));
                client_info->sync_sockfd = -1;
                __wfd_reset_control();
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
        }
 
-       if ((status =
-                __wfd_client_read_socket(client_info->sync_sockfd, (char *) &rsp,
-                                                                 sizeof(wifi_direct_client_response_s))) <= 0)
+       if ((status = __wfd_client_read_socket(client_info->sync_sockfd, (char *) &rsp,
+                                                                               sizeof(wifi_direct_client_response_s))) <= 0)
        {
                WDC_LOGE("Error!!! reading socket, status = %d errno = %s\n",
                                           status, strerror(errno));