Skip to content

Commit

Permalink
put back tmpname in domescript. use static for unique_ptr in drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
knro committed Nov 14, 2018
1 parent 4c4e076 commit a436e93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions libindi/drivers/dome/dome_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ typedef enum
SCRIPT_COUNT
} scripts;

std::unique_ptr<DomeScript> scope_script(new DomeScript());
static std::unique_ptr<DomeScript> scope_script(new DomeScript());

void ISGetProperties(const char *dev)
{
Expand Down Expand Up @@ -237,7 +237,8 @@ void DomeScript::TimerHit()
{
if (!isConnected())
return;
char name[1024];
char name[1024]={0};
tmpnam(name);
bool status = RunScript(SCRIPT_STATUS, name, nullptr);
if (status)
{
Expand Down
2 changes: 1 addition & 1 deletion libindi/drivers/telescope/telescope_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ typedef enum
SCRIPT_COUNT
} scripts;

std::unique_ptr<ScopeScript> scope_script(new ScopeScript());
static std::unique_ptr<ScopeScript> scope_script(new ScopeScript());

void ISGetProperties(const char *dev)
{
Expand Down

0 comments on commit a436e93

Please sign in to comment.