Mercurial > audlegacy-plugins
comparison src/daap/daap.c @ 1452:d43075afd1db
nerge
author | Cristi Magherusan <majeru@atheme-project.org> |
---|---|
date | Fri, 10 Aug 2007 14:23:07 +0300 |
parents | 69bff388b0f8 |
children | ee1b4e1cf7ce |
comparison
equal
deleted
inserted
replaced
1451:31a21423999f | 1452:d43075afd1db |
---|---|
60 g_mutex_lock(mutex_discovery); | 60 g_mutex_lock(mutex_discovery); |
61 g_print ("caut\n"); | 61 g_print ("caut\n"); |
62 daap_found_devices = daap_mdns_get_server_list (); | 62 daap_found_devices = daap_mdns_get_server_list (); |
63 current_server=daap_found_devices; | 63 current_server=daap_found_devices; |
64 g_print ("entering for\n"); | 64 g_print ("entering for\n"); |
65 if(current_server!=NULL) | |
66 g_print("!=NULL\n"); | |
67 else | |
68 g_print("==NULL\n"); | |
69 | |
65 for (; current_server; current_server = g_slist_next (current_server)) | 70 for (; current_server; current_server = g_slist_next (current_server)) |
66 { | 71 { |
67 g_print ("in for\n"); | 72 g_print ("in for\n"); |
68 | 73 |
69 current_device = g_new0(discovery_device_t,1); | 74 current_device = g_new0(discovery_device_t,1); |
108 g_mutex_lock(mutex_init); /* locking for init */ | 113 g_mutex_lock(mutex_init); /* locking for init */ |
109 if(!daap_initialized) | 114 if(!daap_initialized) |
110 { | 115 { |
111 if( !daap_mdns_initialize ()) | 116 if( !daap_mdns_initialize ()) |
112 { | 117 { |
113 #ifdef DEBUG /*this isn't a fatal error, we can try again later*/ | 118 #if 1 /*this isn't a fatal error, we can try again later*/ |
114 g_print("Error while initializing DAAP !!!\n"); | 119 g_print("Error while initializing DAAP !!!\n"); |
115 #endif | 120 #endif |
116 g_mutex_unlock(mutex_init); | 121 g_mutex_unlock(mutex_init); |
117 return NULL; | 122 return NULL; |
118 } | 123 } |
119 else | 124 else |
125 { | |
126 #if 1 | |
127 g_print("DAAP was initialized succesfully\n"); | |
128 #endif | |
120 daap_initialized=TRUE; | 129 daap_initialized=TRUE; |
121 | 130 } |
122 | 131 |
123 if(daap_initialized) | 132 if(daap_initialized) |
133 { | |
134 sleep(1); | |
124 daap_discovery_get_devices_impl(); | 135 daap_discovery_get_devices_impl(); |
136 } | |
125 } | 137 } |
126 g_mutex_unlock(mutex_init); /*init ended*/ | 138 g_mutex_unlock(mutex_init); /*init ended*/ |
127 | 139 |
128 file = g_new0(VFSFile, 1); | 140 file = g_new0(VFSFile, 1); |
129 // GList * l = | 141 // GList * l = |