Commit ea776ac2 authored by hark's avatar hark
Browse files

get varst from snowmix

parent 456d00df
...@@ -61,9 +61,9 @@ print_snowFeed (snowFeed *f) ...@@ -61,9 +61,9 @@ print_snowFeed (snowFeed *f)
typedef struct snowData snowData; typedef struct snowData snowData;
struct snowData { struct snowData {
int currentFeed feed; snowFeed *currentFeed;
int mixer; snowMixer *mixer;
} };
struct snowData *snow; struct snowData *snow;
...@@ -191,20 +191,30 @@ get_vars (snowMixer *mixer, snowFeed *feed) ...@@ -191,20 +191,30 @@ get_vars (snowMixer *mixer, snowFeed *feed)
return 0; return 0;
} }
void snowData *
init_snowData (snowData *s) init_snowData (snowData *s)
{ {
struct snowMixer *mixer; struct snowMixer *mixer;
struct snowFeed *feed; struct snowFeed *feed;
s = (snowData*)malloc(sizeof(struct snowData)); s = (snowData*)malloc(sizeof(struct snowData));
mixer = (snowMixer*)malloc(sizeof(struct snowMixer)); mixer = (snowMixer*)malloc(sizeof(struct snowMixer));
/*
mixer->host = "bla"; //host
mixer->control_socket = "bla"; //ctrsocket
mixer->state = "bla"; //snowmix
mixer->ratefraction = "bla"; //ratefraction
*/
feed = (snowFeed*)malloc(sizeof(struct snowFeed)); feed = (snowFeed*)malloc(sizeof(struct snowFeed));
//feed->control_pipe = "bla"; //feed_control_pipe
get_vars(mixer, feed); get_vars(mixer, feed);
// print_snowMixer(snow->mixer);
// print_snowFeed(snow->currentFeed);
s->currentFeed = feed; s->currentFeed = feed;
s->mixer = mixer; s->mixer = mixer;
return s;
} }
...@@ -212,7 +222,7 @@ init_snowData (snowData *s) ...@@ -212,7 +222,7 @@ init_snowData (snowData *s)
main (int argc, char *argv[]) main (int argc, char *argv[])
{ {
init_snowData(snow); snow = init_snowData(snow);
// exec script that sets env. // exec script that sets env.
......
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