getting even closer to ironing out perceived and otherwise reliability issues
This commit is contained in:
parent
17cfea9221
commit
44d9d0198f
2 changed files with 8 additions and 4 deletions
|
@ -24,8 +24,6 @@ static int answer_music_message(skipstone_message_service *service,
|
||||||
void *buf, uint16_t size, uint16_t id, void *context) {
|
void *buf, uint16_t size, uint16_t id, void *context) {
|
||||||
skipstone_message *message;
|
skipstone_message *message;
|
||||||
|
|
||||||
printf("Got message 0x%02x\n", ((uint8_t *)buf)[0]);
|
|
||||||
|
|
||||||
if (((uint8_t *)buf)[0] == 0x08) {
|
if (((uint8_t *)buf)[0] == 0x08) {
|
||||||
message = skipstone_message_new();
|
message = skipstone_message_new();
|
||||||
skipstone_message_append_uint8(message, 0x10);
|
skipstone_message_append_uint8(message, 0x10);
|
||||||
|
@ -91,10 +89,12 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((link = skipstone_link_open_serial(argv[1])) == NULL) {
|
if ((link = skipstone_link_open_serial(argv[1])) == NULL) {
|
||||||
|
perror("skipstone_link_open_serial()");
|
||||||
goto error_link_open;
|
goto error_link_open;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((service = skipstone_message_service_new()) == NULL) {
|
if ((service = skipstone_message_service_new()) == NULL) {
|
||||||
|
perror("skipstone_message_service_new()");
|
||||||
goto error_message_service_new;
|
goto error_message_service_new;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,6 +103,8 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
skipstone_message_service_run(service, link);
|
skipstone_message_service_run(service, link);
|
||||||
|
|
||||||
|
perror("skipstone_message_service_run()");
|
||||||
|
|
||||||
skipstone_link_close(link);
|
skipstone_link_close(link);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -24,8 +24,6 @@ static int answer_music_message(skipstone_message_service *service,
|
||||||
void *buf, uint16_t size, uint16_t id, void *context) {
|
void *buf, uint16_t size, uint16_t id, void *context) {
|
||||||
skipstone_message *message;
|
skipstone_message *message;
|
||||||
|
|
||||||
printf("Got message 0x%02x\n", ((uint8_t *)buf)[0]);
|
|
||||||
|
|
||||||
if (((uint8_t *)buf)[0] == 0x08) {
|
if (((uint8_t *)buf)[0] == 0x08) {
|
||||||
message = skipstone_message_new();
|
message = skipstone_message_new();
|
||||||
skipstone_message_append_uint8(message, 0x10);
|
skipstone_message_append_uint8(message, 0x10);
|
||||||
|
@ -91,10 +89,12 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((link = skipstone_link_open_serial(argv[1])) == NULL) {
|
if ((link = skipstone_link_open_serial(argv[1])) == NULL) {
|
||||||
|
perror("skipstone_link_open_serial()");
|
||||||
goto error_link_open;
|
goto error_link_open;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((service = skipstone_message_service_new()) == NULL) {
|
if ((service = skipstone_message_service_new()) == NULL) {
|
||||||
|
perror("skipstone_message_service_new()");
|
||||||
goto error_message_service_new;
|
goto error_message_service_new;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,6 +103,8 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
skipstone_message_service_run(service, link);
|
skipstone_message_service_run(service, link);
|
||||||
|
|
||||||
|
perror("skipstone_message_service_run()");
|
||||||
|
|
||||||
skipstone_link_close(link);
|
skipstone_link_close(link);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue