|
@@ -107,8 +107,12 @@ static struct run_cmds {
|
107
|
107
|
static void parse_options(struct videohub_data *data, int argc, char **argv) {
|
108
|
108
|
int j, err = 0;
|
109
|
109
|
struct vcmd_entry *c = &parsed_cmds.entry[0];
|
|
110
|
+ // Check environment
|
|
111
|
+ data->dev_host = getenv("VIDEOHUB_HOST");
|
|
112
|
+ data->dev_port = getenv("VIDEOHUB_PORT");
|
110
|
113
|
// Set defaults
|
111
|
|
- data->dev_port = "9990";
|
|
114
|
+ if (!data->dev_port)
|
|
115
|
+ data->dev_port = "9990";
|
112
|
116
|
while ((j = getopt_long(argc, argv, short_options, long_options, NULL)) != -1) {
|
113
|
117
|
if (j == '?') // Invalid parameter
|
114
|
118
|
exit(EXIT_FAILURE);
|