summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xapps/samples/cv2x_tcp_app/Cv2xTcpApp.cpp10
-rw-r--r--include/telux/tel/Phone.hpp5
-rw-r--r--include/telux/tel/PhoneListener.hpp4
3 files changed, 11 insertions, 8 deletions
diff --git a/apps/samples/cv2x_tcp_app/Cv2xTcpApp.cpp b/apps/samples/cv2x_tcp_app/Cv2xTcpApp.cpp
index 76fd915..e8c9eb8 100755
--- a/apps/samples/cv2x_tcp_app/Cv2xTcpApp.cpp
+++ b/apps/samples/cv2x_tcp_app/Cv2xTcpApp.cpp
@@ -40,6 +40,7 @@
#include <assert.h>
#include <ifaddrs.h>
#include <cstring>
+#include <string>
#include <sys/time.h>
#include <unistd.h>
#include <iostream>
@@ -74,7 +75,6 @@ static constexpr uint16_t DEFAULT_PORT = 5000u;
static constexpr int PRIORITY = 5;
static constexpr uint32_t PACKET_LEN = 128u;
static constexpr uint32_t PACKET_NUM = 2u;
-static constexpr char IFACE_NAME[] = "rmnet_data0";
static constexpr char TEST_VERNO_MAGIC = 'Q';
static constexpr char CLIENT_UEID = 1;
@@ -259,7 +259,7 @@ static int parseOpts(int argc, char *argv[]) {
case 'd':
if (optarg) {
gDstAddr = optarg;
- cout << "dstAddr: " << gDstAddr.c_str() << endl;
+ cout << "dstAddr: " << gDstAddr << endl;
}
break;
case 'm':
@@ -284,7 +284,7 @@ static int parseOpts(int argc, char *argv[]) {
default:
rc = -1;
printUsage(argv[0]);
- break;
+ return rc;
}
}
@@ -357,7 +357,6 @@ int main(int argc, char *argv[]) {
// Parse parameters
if (parseOpts(argc, argv) < 0) {
- cout << "Options error" << endl;
return EXIT_FAILURE;
}
@@ -418,11 +417,10 @@ int main(int argc, char *argv[]) {
int sock = gTcpSock->getSocket();
if (gTcpMode == TCP_CLIENT) {
// For TCP client, establish connection with the created sock
- struct sockaddr_in6 dstSockAddr;
+ struct sockaddr_in6 dstSockAddr = {0}; //must reset the sockaddr
dstSockAddr.sin6_port = htons((uint16_t)gDstPort);
inet_pton(AF_INET6, gDstAddr.c_str(), (void *)&dstSockAddr.sin6_addr);
dstSockAddr.sin6_family = AF_INET6;
- dstSockAddr.sin6_scope_id = if_nametoindex(IFACE_NAME);
cout << "connecting sock:" << sock << endl;
if (connect(sock, (struct sockaddr *)&dstSockAddr, sizeof(struct sockaddr_in6))) {
diff --git a/include/telux/tel/Phone.hpp b/include/telux/tel/Phone.hpp
index eb084a7..988729d 100644
--- a/include/telux/tel/Phone.hpp
+++ b/include/telux/tel/Phone.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -122,6 +122,7 @@ public:
*
* @returns @ref RadioState
*
+ * @deprecated Use IPhoneManager::requestOperatingMode() API instead
*/
virtual RadioState getRadioState() = 0;
@@ -167,6 +168,8 @@ public:
* radio power request
*
* @returns Status of setRadioPower i.e. success or suitable error code.
+ *
+ * @deprecated Use IPhoneManager::setOperatingMode() API instead
*/
virtual telux::common::Status setRadioPower(
bool enable, std::shared_ptr<telux::common::ICommandResponseCallback> callback = nullptr)
diff --git a/include/telux/tel/PhoneListener.hpp b/include/telux/tel/PhoneListener.hpp
index 35d2504..9b006c0 100644
--- a/include/telux/tel/PhoneListener.hpp
+++ b/include/telux/tel/PhoneListener.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -109,6 +109,8 @@ public:
* changed
*
* @param [in] radioState Radio state of the phone @ref RadioState
+ *
+ * @deprecated Use onOperatingModeChanged() API instead
*/
virtual void onRadioStateChanged(int phoneId, RadioState radioState) {
}