Changeset 5606:f7617b41972e in roaraudio for roard/clients.c
- Timestamp:
- 07/31/12 02:33:55 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/clients.c
r5590 r5606 143 143 struct roard_listen * lsock, struct sockaddr * sockaddr, socklen_t addrlen) { 144 144 const struct roard_proto_handle * protohandle; 145 struct roar_dl_librarypara * pluginpara; 145 146 struct roar_vio_calls vio; 146 147 struct roar_client_server * cs; … … 287 288 supported = 1; 288 289 if ( protohandle->impl.common->set_proto != NULL ) { 289 if ( protohandle->impl.common->set_proto(client, &vio, &(cs->outbuf), &(cs->protoinst), protohandle->para, protohandle->paralen) == -1 ) { 290 pluginpara = roar_dl_getpara(protohandle->lhandle); // will return NULL in case protohandle->lhandle is NULL. 291 if ( protohandle->impl.common->set_proto(client, &vio, &(cs->outbuf), &(cs->protoinst), protohandle->para, protohandle->paralen, pluginpara) == -1 ) { 290 292 supported = 0; 291 293 } 294 if ( pluginpara != NULL ) 295 roar_dl_para_unref(pluginpara); 292 296 } 293 297 break; … … 312 316 struct roar_client_server * cs; 313 317 const struct roard_proto_handle * proto; 318 struct roar_dl_librarypara * pluginpara; 314 319 struct roar_vio_calls vio; 315 320 int i; … … 337 342 if ( proto->impl.common->unset_proto != NULL ) { 338 343 roar_vio_open_fh_socket(&vio, clients_get_fh(id)); 339 proto->impl.common->unset_proto(id, &vio, &(cs->outbuf), &(cs->protoinst), proto->para, proto->paralen); 344 pluginpara = roar_dl_getpara(proto->lhandle); // will return NULL in case protohandle->lhandle is NULL. 345 proto->impl.common->unset_proto(id, &vio, &(cs->outbuf), &(cs->protoinst), proto->para, proto->paralen, pluginpara); 346 if ( pluginpara != NULL ) 347 roar_dl_para_unref(pluginpara); 340 348 } 341 349 break; … … 723 731 struct roar_error_state errstate; 724 732 const struct roard_proto_handle * proto; 733 struct roar_dl_librarypara * pluginpara; 725 734 int command_error; 726 735 char * data = NULL; … … 834 843 break; 835 844 case ROARD_PROTO_TYPE_COMMON: 836 if ( proto->impl.common->handle != NULL ) 837 rv = proto->impl.common->handle(id, &vio, &(cs->outbuf), &(cs->protoinst), proto->para, proto->paralen); 845 if ( proto->impl.common->handle != NULL ) { 846 pluginpara = roar_dl_getpara(proto->lhandle); // will return NULL in case protohandle->lhandle is NULL. 847 rv = proto->impl.common->handle(id, &vio, &(cs->outbuf), &(cs->protoinst), proto->para, proto->paralen, pluginpara); 848 if ( pluginpara != NULL ) 849 roar_dl_para_unref(pluginpara); 850 } 838 851 if ( rv == -1 ) 839 852 rv = clients_delete(id); … … 858 871 struct roar_client * c; 859 872 const struct roard_proto_handle * p; 873 struct roar_dl_librarypara * pluginpara; 860 874 size_t len; 861 875 ssize_t ret; … … 892 906 if ( p->lhandle != NULL ) 893 907 roar_dl_context_restore(p->lhandle); 894 rv = p->impl.common->flush(id, &vio, &(cs->outbuf), &(cs->protoinst), p->para, p->paralen); 908 pluginpara = roar_dl_getpara(p->lhandle); // will return NULL in case protohandle->lhandle is NULL. 909 rv = p->impl.common->flush(id, &vio, &(cs->outbuf), &(cs->protoinst), p->para, p->paralen, pluginpara); 895 910 if ( p->lhandle != NULL ) 896 911 roar_dl_context_store(p->lhandle); 912 if ( pluginpara != NULL ) 913 roar_dl_para_unref(pluginpara); 897 914 if ( rv == -1 ) 898 915 rv = clients_delete(id); … … 946 963 if ( p->lhandle != NULL ) 947 964 roar_dl_context_restore(p->lhandle); 948 rv = p->impl.common->flushed(id, &vio, &(cs->outbuf), &(cs->protoinst), p->para, p->paralen); 965 pluginpara = roar_dl_getpara(p->lhandle); // will return NULL in case protohandle->lhandle is NULL. 966 rv = p->impl.common->flushed(id, &vio, &(cs->outbuf), &(cs->protoinst), p->para, p->paralen, pluginpara); 949 967 if ( p->lhandle != NULL ) 950 968 roar_dl_context_store(p->lhandle); 969 if ( pluginpara != NULL ) 970 roar_dl_para_unref(pluginpara); 951 971 if ( rv == -1 ) 952 972 rv = clients_delete(id);
Note: See TracChangeset
for help on using the changeset viewer.