comparison src/ushare.c @ 166:726fe10d9e4a

Code refactoring. Change channel shuld be done in http_open(). Delete unnecessary code, variables.
author Naoya OYAMA <naoya.oyama@gmail.com>
date Tue, 02 Oct 2012 21:57:40 +0900
parents 30e91361506a
children 4f3640bf350d
comparison
equal deleted inserted replaced
165:3ffef0e5b80a 166:726fe10d9e4a
123 ut->xbox360 = false; 123 ut->xbox360 = false;
124 ut->verbose = false; 124 ut->verbose = false;
125 ut->daemon = false; 125 ut->daemon = false;
126 ut->override_iconv_err = false; 126 ut->override_iconv_err = false;
127 ut->cfg_file = NULL; 127 ut->cfg_file = NULL;
128 ut->channel_list = channel_list;
128 129
129 pthread_mutex_init (&ut->termination_mutex, NULL); 130 pthread_mutex_init (&ut->termination_mutex, NULL);
130 pthread_cond_init (&ut->termination_cond, NULL); 131 pthread_cond_init (&ut->termination_cond, NULL);
131
132 #define MAX_CHANNELS 512
133 ut->channel_name = malloc(sizeof(char*)*MAX_CHANNELS);
134 if (!ut->channel_name)
135 return NULL;
136 ut->location_name = malloc(sizeof(char*)*MAX_CHANNELS);
137 if (!ut->location_name)
138 return NULL;
139 ut->request_channel[0] = '\0';
140 ut->nr_channel = 0;
141 ut->channel_list = channel_list;
142 ut->sid = NULL;
143 ut->tp = NULL;
144 132
145 return ut; 133 return ut;
146 } 134 }
147 135
148 static void 136 static void