Mercurial > pt1.oyama
diff 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 |
line wrap: on
line diff
--- a/src/ushare.c Mon Oct 01 21:53:24 2012 +0900 +++ b/src/ushare.c Tue Oct 02 21:57:40 2012 +0900 @@ -125,23 +125,11 @@ ut->daemon = false; ut->override_iconv_err = false; ut->cfg_file = NULL; + ut->channel_list = channel_list; pthread_mutex_init (&ut->termination_mutex, NULL); pthread_cond_init (&ut->termination_cond, NULL); -#define MAX_CHANNELS 512 - ut->channel_name = malloc(sizeof(char*)*MAX_CHANNELS); - if (!ut->channel_name) - return NULL; - ut->location_name = malloc(sizeof(char*)*MAX_CHANNELS); - if (!ut->location_name) - return NULL; - ut->request_channel[0] = '\0'; - ut->nr_channel = 0; - ut->channel_list = channel_list; - ut->sid = NULL; - ut->tp = NULL; - return ut; }