comparison src/protocols/napster/napster.c @ 2167:edf8c5a70e5b

[gaim-migrate @ 2177] limiting chat message lengths committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sun, 26 Aug 2001 20:21:45 +0000
parents a464da684307
children c24595d3c364
comparison
equal deleted inserted replaced
2166:dbd74f49dabb 2167:edf8c5a70e5b
950 g_free(channel->name); 950 g_free(channel->name);
951 g_free(channel); 951 g_free(channel);
952 952
953 } 953 }
954 954
955 static void nap_chat_send(struct gaim_connection *gc, int id, char *message) 955 static int nap_chat_send(struct gaim_connection *gc, int id, char *message)
956 { 956 {
957 struct nap_channel *channel = NULL; 957 struct nap_channel *channel = NULL;
958 gchar buf[NAP_BUF_LEN]; 958 gchar buf[NAP_BUF_LEN];
959 959
960 channel = find_channel_by_id(gc, id); 960 channel = find_channel_by_id(gc, id);
961 961
962 if (!channel) { 962 if (!channel) {
963 /* This shouldn't happen */ 963 /* This shouldn't happen */
964 return; 964 return -EINVAL;
965 } 965 }
966 966
967 g_snprintf(buf, NAP_BUF_LEN, "%s %s", channel->name, message); 967 g_snprintf(buf, NAP_BUF_LEN, "%s %s", channel->name, message);
968 nap_write_packet(gc, 0x192, buf); 968 nap_write_packet(gc, 0x192, buf);
969 969 return 0;
970 } 970 }
971 971
972 static void nap_add_buddy(struct gaim_connection *gc, char *name) 972 static void nap_add_buddy(struct gaim_connection *gc, char *name)
973 { 973 {
974 nap_write_packet(gc, 0xCF, name); 974 nap_write_packet(gc, 0xCF, name);