Skip to content

Commit

Permalink
WebTunnelAgent cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
obiltschnig committed Oct 4, 2023
1 parent dbbf470 commit 320632e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"intelliSenseMode": "clang-x64",
"includePath": [
"${pocoIncludePath}",
"/usr/local/opt/openssl@3",
"/opt/homebrew/opt/openssl@3"
"/usr/local/opt/openssl@3/include",
"/opt/homebrew/opt/openssl@3/include"
],
"macFrameworkPath": ["/System/Library/Frameworks"],
"defines": [
Expand Down
18 changes: 9 additions & 9 deletions WebTunnel/WebTunnelAgentLib/include/webtunnelagent.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ typedef enum webtunnel_agent_result
} webtunnel_agent_result;


typedef enum webtunnel_agent_status
{
webtunnel_agent_status_disconnected = 0,
webtunnel_agent_status_connected = 1,
webtunnel_agent_status_error = 2,
webtunnel_agent_status_unknown = 3
} webtunnel_agent_status;


typedef enum webtunnel_agent_port_type
{
webtunnel_port_http = 0,
Expand All @@ -80,15 +89,6 @@ typedef enum webtunnel_agent_port_type
} webtunnel_agent_port_type;


typedef enum webtunnel_agent_status
{
webtunnel_agent_status_disconnected = 0,
webtunnel_agent_status_connected = 1,
webtunnel_agent_status_error = 2,
webtunnel_agent_status_unknown = 3
} webtunnel_agent_status;


typedef struct webtunnel_agent_port_spec
{
unsigned short port;
Expand Down
2 changes: 1 addition & 1 deletion WebTunnel/WebTunnelAgentLib/src/Tunnel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void Tunnel::startPropertiesUpdateTask()
{
_logger.debug("Starting PropertiesUpdateTask..."s);
_pPropertiesUpdateTask = new PropertiesUpdateTask(Ptr(this, true));
_pTimer->scheduleAtFixedRate(_pPropertiesUpdateTask, _propertiesUpdateInterval.totalMilliseconds(), _propertiesUpdateInterval.totalMilliseconds());
_pTimer->scheduleAtFixedRate(_pPropertiesUpdateTask, static_cast<long>(_propertiesUpdateInterval.totalMilliseconds()), static_cast<long>(_propertiesUpdateInterval.totalMilliseconds()));
}


Expand Down
1 change: 1 addition & 0 deletions WebTunnel/WebTunnelAgentLib/src/webtunnelagent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ void WebTunnelAgent_API webtunnel_agent_destroy(webtunnel_agent wt)
try
{
pHolder->signature = 0xDEADBEEF;
pHolder->pTunnel->stop();
delete pHolder;
}
catch (...)
Expand Down

0 comments on commit 320632e

Please sign in to comment.