Changeset 5312:27ec111dc8c5 in roaraudio for roard/plugins.c
- Timestamp:
- 11/30/11 01:05:41 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/plugins.c
r5275 r5312 57 57 int i; 58 58 59 if ( plugin->sched != NULL ) 60 if ( plugin->sched->free != NULL ) 59 if ( plugin->sched != NULL ) { 60 if ( plugin->sched->free != NULL ) { 61 roar_dl_context_restore(plugin->lhandle); 61 62 plugin->sched->free(); 63 roar_dl_context_store(plugin->lhandle); 64 } 65 } 62 66 63 67 for (i = 0; i < MAX_PROTOS; i++) { … … 87 91 } 88 92 89 if ( g_plugins[i].sched != NULL ) 90 if ( g_plugins[i].sched->init != NULL ) 93 if ( g_plugins[i].sched != NULL ) { 94 if ( g_plugins[i].sched->init != NULL ) { 95 roar_dl_context_restore(g_plugins[i].lhandle); 91 96 g_plugins[i].sched->init(); 97 roar_dl_context_store(g_plugins[i].lhandle); 98 } 99 } 92 100 93 101 _pp = NULL; … … 114 122 int i; 115 123 116 for (i = 0; i < MAX_PLUGINS; i++) 117 if ( g_plugins[i].lhandle != NULL ) 118 if ( g_plugins[i].sched != NULL ) 119 if ( g_plugins[i].sched->update != NULL ) 124 for (i = 0; i < MAX_PLUGINS; i++) { 125 if ( g_plugins[i].lhandle != NULL ) { 126 if ( g_plugins[i].sched != NULL ) { 127 if ( g_plugins[i].sched->update != NULL ) { 128 roar_dl_context_restore(g_plugins[i].lhandle); 120 129 if ( g_plugins[i].sched->update() == -1 ) 121 130 ret = -1; 131 roar_dl_context_store(g_plugins[i].lhandle); 132 } 133 } 134 } 135 } 122 136 123 137 return ret; … … 178 192 } 179 193 180 return clients_register_proto(proto );194 return clients_register_proto(proto, _pp->lhandle); 181 195 } 182 196
Note: See TracChangeset
for help on using the changeset viewer.