Commit a6b78ded authored by sletz's avatar sletz
Browse files

Check driver type in jackdmp.cpp.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4535 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 2c63d467
......@@ -849,6 +849,7 @@ jack_driver_descriptor_construct(
memcpy(desc_ptr->desc, description, description_len + 1);
desc_ptr->nparams = 0;
desc_ptr->type = type;
if (filler_ptr != NULL) {
filler_ptr->size = 0;
......
......@@ -430,6 +430,11 @@ int main(int argc, char* argv[])
goto destroy_server;
}
if (jackctl_driver_get_type(master_driver_ctl) != JackMaster) {
fprintf(stderr, "Driver \"%s\" is not a master \n", master_driver_name);
goto destroy_server;
}
if (optind < argc) {
master_driver_nargs = 1 + argc - optind;
} else {
......@@ -469,6 +474,10 @@ int main(int argc, char* argv[])
fprintf(stderr, "Unknown driver \"%s\"\n", *it);
goto close_server;
}
if (jackctl_driver_get_type(slave_driver_ctl) != JackSlave) {
fprintf(stderr, "Driver \"%s\" is not a slave \n", *it);
goto close_server;
}
if (!jackctl_server_add_slave(server_ctl, slave_driver_ctl)) {
fprintf(stderr, "Driver \"%s\" cannot be loaded\n", *it);
goto close_server;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment