case CMD_SET_CURRENT_WPS_MODE:
if (ad != NULL) {
wifi_direct_wps_type_e wps_mode;
- int input;
+ int input_wps_mode;
result = wifi_direct_get_req_wps_type(&wps_mode);
switch (wps_mode) {
printf("1. WIFI_DIRECT_WPS_TYPE_PBC\n");
printf("2. WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY\n");
printf("3. WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD\n");
- if (scanf(" %1d", &input) < 1)
+ if (scanf(" %1d", &input_wps_mode) < 1)
break;
- switch (input) {
+ switch (input_wps_mode) {
case 1:
wps_mode = WIFI_DIRECT_WPS_TYPE_PBC;
break;
case CMD_DEREGISTER_SERVICE:
if (ad != NULL) {
- int input;
+ int input_service_id;
printf("Enter service id:\n");
- if (scanf(" %5d", &input) < 1)
+ if (scanf(" %5d", &input_service_id) < 1)
break;
- result = wifi_direct_deregister_service(input);
+ result = wifi_direct_deregister_service(input_service_id);
printf("wifi_direct_deregister_service() result=[%d]\n", result);
}
break;
case CMD_START_SERVICE_DISCOVERY:
if (ad != NULL) {
- int input;
+ int input_service_discovery;
wifi_direct_service_type_e service_type = WIFI_DIRECT_SERVICE_TYPE_ALL;
printf("Input service type:\n");
printf("3. WIFI_DIRECT_SERVICE_TYPE_UPNP\n");
printf("4. WIFI_DIRECT_SERVICE_TYPE_BT_ADDR\n");
printf("5. WIFI_DIRECT_SERVICE_TYPE_CONTACT_INFO\n");
- if (scanf(" %1d", &input) < 1)
+ if (scanf(" %1d", &input_service_discovery) < 1)
break;
- printf("input = %d\n", input);
+ printf("input = %d\n", input_service_discovery);
- switch (input) {
+ switch (input_service_discovery) {
case 1:
service_type = WIFI_DIRECT_SERVICE_TYPE_ALL;
break;
case CMD_CANCEL_SERVICE_DISCOVERY:
if (ad != NULL) {
- int input;
+ int input_service_discovery;
wifi_direct_service_type_e service_type = WIFI_DIRECT_SERVICE_TYPE_ALL;
printf("Input service ID:\n");
- if (scanf(" %1d", &input) < 1)
+ if (scanf(" %1d", &input_service_discovery) < 1)
break;
- printf("input = %d\n", input);
+ printf("input = %d\n", input_service_discovery);
- switch (input) {
+ switch (input_service_discovery) {
case 1:
service_type = WIFI_DIRECT_SERVICE_TYPE_ALL;
break;