Skip to content

Commit adb57e8

Browse files
authored
Cleanups and Github Actions (OpenZWave#24)
Cleanup some debugging output ensure crashdump directory exists on startup (issue OpenZWave#18) Create a Github Action to test PR requests.
1 parent d33279b commit adb57e8

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

.github/workflows/prbuildtest.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: ozwdaemon Docker Image Build Test
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, reopened, synchronize]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout Code
12+
uses: actions/checkout@v1
13+
with:
14+
fetch-depth: 1 # shallow clone
15+
- name: Build Docker Image
16+
run: docker build . --file Docker/Dockerfile

qt-ozwdaemon/main.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void* context, bool succeeded) {
9494

9595
std::string response, error;
9696
bool success = google_breakpad::HTTPUpload::SendRequest(url, parameters, files, proxy_host, proxy_userpasswd, "", &response, NULL, &error);
97-
if (success)
97+
if (success)
9898
qWarning() << "Uploaded Crash minidump With ID: " << response.c_str();
9999
else
100100
qWarning() << "Failed to Upload Crash MiniDump in " << descriptor.path();
@@ -288,10 +288,14 @@ int main(int argc, char *argv[])
288288
if (bppath.isEmpty())
289289
bppath = QStandardPaths::standardLocations(QStandardPaths::TempLocation).at(0);
290290
qInfo() << "Using BreakPad - Crash Directory: " << bppath;
291+
/* ensure path exists */
292+
if (!QDir::exists(bppath)) {
293+
QDir::mkpath(bppath);
294+
}
291295
google_breakpad::MinidumpDescriptor descriptor(bppath.toStdString());
292296
google_breakpad::ExceptionHandler eh(descriptor, NULL, dumpCallback, static_cast<void *>(&daemon), true, -1);
293-
#else
294-
signal(SIGSEGV, backtrace);
297+
#else
298+
signal(SIGSEGV, backtrace);
295299
signal(SIGABRT, backtrace);
296300
#endif
297301

qt-ozwdaemon/mqttcommands/setValue.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ bool MqttCommand_SetValue::processMessage(rapidjson::Document &msg) {
118118
break;
119119
}
120120
case QTOZW_ValueIds::ValueIdTypes::List: {
121-
qDebug() << "Processing List";
122121
if (!msg["Value"].IsUint()) {
123122
this->sendSimpleStatus(false, QString("Incorrect Field Type for Value: Not Integer: ").append(msg["Value"].GetType()));
124123
qCWarning(ozwmcsv) << "Incorrect Field Type (Integer) for " << GetCommand() << ": Value: " << msg["Value"].GetType();
@@ -132,9 +131,7 @@ bool MqttCommand_SetValue::processMessage(rapidjson::Document &msg) {
132131
return false;
133132
}
134133
list.selectedItem = list.labels[index];
135-
qDebug() << list.selectedItem;
136134
data.setValue<QTOZW_ValueIDList>(list);
137-
qDebug() << data;
138135
break;
139136
}
140137
case QTOZW_ValueIds::ValueIdTypes::Raw: {

0 commit comments

Comments
 (0)