Commit 075e7cf1 authored by Veeraj Khokale's avatar Veeraj Khokale Committed by Ashok Babu Channa

Fix for Jira issues [IOT-1157, IOT-1194]

[IOT-1157]: Added default case for mentioned switch statements.
[IOT-1194]: Removed unused structures and made
g_GatewayID in routingmanager.c as static.

Change-Id: I03ff080867d28e3d32a18bb74fa7a9a26e465774
Signed-off-by: default avatarVeeraj Khokale <veeraj.sk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11775Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarAbhishek Sharma <ce.abhishek@samsung.com>
Reviewed-by: default avatarAshok Babu Channa <ashok.channa@samsung.com>
parent c144e61c
......@@ -71,27 +71,6 @@ static ca_mutex g_mutexObjectList = NULL;
*/
static CAEDRErrorHandleCallback g_edrErrorHandler = NULL;
typedef struct send_data
{
char* address;
char* data;
uint32_t id;
} data_t;
/**
@brief Thread context information for unicast, multicast and secured unicast server
*/
typedef struct
{
bool *stopFlag;
CAAdapterServerType_t type;
} CAAdapterReceiveThreadContext_t;
typedef struct
{
bool *stopFlag;
} CAAdapterAcceptThreadContext_t;
/**
* implement for BT-EDR adapter common method
*/
......
......@@ -237,6 +237,9 @@ void CAEDRSocketConnectionStateCallback(int result, bt_socket_connection_state_e
ca_mutex_unlock(g_edrDeviceListMutex);
}
break;
default:
OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Unknown Bluetooth Socket connection state");
}
OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
......@@ -357,6 +360,9 @@ void CAEDRDeviceDiscoveryCallback(int result, bt_adapter_device_discovery_state_
}
}
break;
default:
OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Unknown Bluetooth Adapter device discovery state");
}
OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT");
......
......@@ -130,8 +130,9 @@ static bool CALECheckConnectionStateValue(jint state)
case GATT_REQUEST_NOT_SUPPORTED:
case GATT_WRITE_NOT_PERMITTED:
return true;
default:
return false;
}
return false;
}
void CALEClientSetScanInterval(int32_t intervalTime, int32_t workingCount)
......
......@@ -693,6 +693,8 @@ CAResult_t CASendErrorMessage(const coap_pdu_t *pdu, uint8_t status,
case CA_MSG_ACKNOWLEDGE:
sentMsgType = CA_MSG_CONFIRM;
break;
default:
sentMsgType = CA_MSG_NONCONFIRM;
}
CAData_t *cloneData = NULL;
......
......@@ -46,7 +46,7 @@
/**
* Unique gateway ID generated before hosting a gateway resource.
*/
uint32_t g_GatewayID = 0;
static uint32_t g_GatewayID = 0;
/**
* Used for assigning unique ID.to endpoint's connected to this gateway
......
......@@ -64,12 +64,6 @@ typedef struct /*CA private key, CA certificate, other CA-related info*/
long numberOfRevoked;
} CKMInfo_t;
typedef struct /*CA private key, CA certificate, certificate revocation/white list*/
{
uint32_t CRLsize;
uint8_t *certificateRevocationList;//should be allocated dynamically
} CRLInfo_t;
//General functions
/**
......
......@@ -135,33 +135,6 @@ typedef struct
size_t reqTotalSize;
} OCServerProtocolRequest;
/**
* This structure will be created in occoap and passed up the stack on the client side.
*/
typedef struct
{
/** handle is retrieved by comparing the token-handle pair in the PDU.*/
ClientCB * cbNode;
/** This is how long this response is valid for (in seconds).*/
uint32_t maxAge;
/** This is the Uri of the resource. (ex. "coap://192.168.1.1/a/led").*/
char * fullUri;
/** This is the relative Uri of the resource. (ex. "/a/led").*/
char * rcvdUri;
/** This is the received payload.*/
char * bufRes;
/** This is the token received OTA.*/
CAToken_t rcvdToken;
/** this structure will be passed to client.*/
OCClientResponse * clientResponse;
} OCResponse;
/**
* This typedef is to represent our Server Instance identification.
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment