Changeset 5617:df74a3973acb in roaraudio for plugins
- Timestamp:
- 08/08/12 16:43:41 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/roard/protocol-irc.c
r5451 r5617 444 444 } 445 445 446 static int new_client(int client, struct roar_vio_calls * vio, struct roard_listen * lsock) {446 static int set_proto(int client, struct roar_vio_calls * vio, struct roar_buffer ** obuffer, void ** userdata, const struct roar_keyval * protopara, ssize_t protoparalen, struct roar_dl_librarypara * pluginpara) { 447 447 struct roar_client_server * cs; 448 448 char * name; 449 449 450 (void)client, (void)vio, (void) lsock;450 (void)client, (void)vio, (void)obuffer, (void)userdata, (void)protopara, (void)protoparalen, (void)pluginpara; 451 451 452 452 clients_get_server(client, &cs); … … 485 485 } 486 486 487 static int check_client(int client, struct roar_vio_calls * vio) { 488 struct roar_vio_calls rvio; 487 static int check_client(int client, struct roar_vio_calls * vio, struct roar_buffer ** obuffer, void ** userdata, const struct roar_keyval * protopara, ssize_t protoparalen, struct roar_dl_librarypara * pluginpara) { 489 488 char cmd[1024*2]; 490 489 char * args; … … 494 493 int found = 0; 495 494 496 if ( vio == NULL ) { 497 vio = &rvio; 498 roar_vio_open_fh_socket(vio, clients_get_fh(client)); 499 } 495 (void)obuffer, (void)userdata, (void)protopara, (void)protoparalen, (void)pluginpara; 500 496 501 497 len = roar_vio_read(vio, cmd, sizeof(cmd)-1); … … 867 863 } 868 864 869 static struct roard_proto proto[1] = { 870 {ROAR_PROTO_IRC, ROAR_SUBSYS_NONE, "Internet Relay Chat", NULL, new_client, NULL, check_client, NULL, NULL} 865 static const struct roar_dl_proto proto = { 866 .proto = ROAR_PROTO_IRC, 867 .description = "Internet Relay Chat", 868 .flags = ROAR_DL_PROTO_FLAGS_NONE, 869 .set_proto = set_proto, 870 .unset_proto = NULL, 871 .handle = check_client, 872 .flush = NULL, 873 .flushed = NULL, 874 .status = NULL 871 875 }; 872 876 873 ROARD_DL_REG_PROTO(proto) 877 static int __reg_proto(struct roar_dl_librarypara * para, struct roar_dl_libraryinst * lib) { 878 (void)para, (void)lib; 879 ROAR_DL_PLUGIN_REG_FN(ROAR_DL_PROTO_SUBTYPE, proto, ROAR_DL_PROTO_VERSION); 880 return 0; 881 } 874 882 875 883 ROAR_DL_PLUGIN_START(protocol_irc) { … … 884 892 ROAR_DL_PLUGIN_REG(ROAR_DL_FN_INIT, init); 885 893 ROAR_DL_PLUGIN_REG_UNLOAD(unload); 886 ROAR D_DL_REGFN_PROTO();894 ROAR_DL_PLUGIN_REG(ROAR_DL_FN_PROTO, __reg_proto); 887 895 } ROAR_DL_PLUGIN_END 888 896
Note: See TracChangeset
for help on using the changeset viewer.