Mercurial > pidgin
comparison src/protocols/silc/silc.c @ 11318:519dc2186438
[gaim-migrate @ 13521]
Bits and pieces all over the place. I was hunting down compiler warnings
all over the place, with crazy CFLAGS. I think I might have got a bit
carried away.
I made the perl stuff compile with gcc 2.x (which don't support
mixed declerations and statements), I think what I did was safe but
readily admit I have no clue how all the perl stuff works.
Rename gaim_presence_add_presence() to gaim_presence_add_list() (to match
the header file - obviously nothing actually _uses_ this)
Implement gaim_savedstatus_get_handle() because it's in the header file.
Remove gaim_account_set_presence() from account.h - it's not actually
implemented anywhere, so it can't be that important.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sat, 20 Aug 2005 20:17:08 +0000 |
parents | 90be432e8385 |
children | 17142948653e |
comparison
equal
deleted
inserted
replaced
11317:cdd9d1011d97 | 11318:519dc2186438 |
---|---|
179 } | 179 } |
180 | 180 |
181 /* Get session detachment data, if available */ | 181 /* Get session detachment data, if available */ |
182 memset(¶ms, 0, sizeof(params)); | 182 memset(¶ms, 0, sizeof(params)); |
183 dfile = silcgaim_session_file(gaim_account_get_username(sg->account)); | 183 dfile = silcgaim_session_file(gaim_account_get_username(sg->account)); |
184 params.detach_data = silc_file_readfile(dfile, ¶ms.detach_data_len); | 184 params.detach_data = (unsigned char *)silc_file_readfile(dfile, ¶ms.detach_data_len); |
185 if (params.detach_data) | 185 if (params.detach_data) |
186 params.detach_data[params.detach_data_len] = 0; | 186 params.detach_data[params.detach_data_len] = 0; |
187 | 187 |
188 /* Add connection to SILC client library */ | 188 /* Add connection to SILC client library */ |
189 conn = silc_client_add_connection( | 189 conn = silc_client_add_connection( |
522 if (val && *val) { | 522 if (val && *val) { |
523 gaim_prefs_set_string("/plugins/prpl/silc/vcard", val); | 523 gaim_prefs_set_string("/plugins/prpl/silc/vcard", val); |
524 tmp = silc_file_readfile(val, &tmp_len); | 524 tmp = silc_file_readfile(val, &tmp_len); |
525 if (tmp) { | 525 if (tmp) { |
526 tmp[tmp_len] = 0; | 526 tmp[tmp_len] = 0; |
527 if (silc_vcard_decode(tmp, tmp_len, &vcard)) | 527 if (silc_vcard_decode((unsigned char *)tmp, tmp_len, &vcard)) |
528 silc_client_attribute_add(client, conn, | 528 silc_client_attribute_add(client, conn, |
529 SILC_ATTRIBUTE_USER_INFO, | 529 SILC_ATTRIBUTE_USER_INFO, |
530 (void *)&vcard, | 530 (void *)&vcard, |
531 sizeof(vcard)); | 531 sizeof(vcard)); |
532 } | 532 } |
833 | 833 |
834 /******************************* IM Routines *********************************/ | 834 /******************************* IM Routines *********************************/ |
835 | 835 |
836 typedef struct { | 836 typedef struct { |
837 char *nick; | 837 char *nick; |
838 unsigned char *message; | 838 char *message; |
839 SilcUInt32 message_len; | 839 SilcUInt32 message_len; |
840 SilcMessageFlags flags; | 840 SilcMessageFlags flags; |
841 } *SilcGaimIM; | 841 } *SilcGaimIM; |
842 | 842 |
843 static void | 843 static void |
878 client_entry = clients[0]; | 878 client_entry = clients[0]; |
879 } | 879 } |
880 | 880 |
881 /* Send the message */ | 881 /* Send the message */ |
882 silc_client_send_private_message(client, conn, client_entry, im->flags, | 882 silc_client_send_private_message(client, conn, client_entry, im->flags, |
883 im->message, im->message_len, TRUE); | 883 (unsigned char *)im->message, im->message_len, TRUE); |
884 gaim_conv_im_write(GAIM_CONV_IM(convo), conn->local_entry->nickname, | 884 gaim_conv_im_write(GAIM_CONV_IM(convo), conn->local_entry->nickname, |
885 im->message, 0, time(NULL)); | 885 im->message, 0, time(NULL)); |
886 | 886 |
887 goto out; | 887 goto out; |
888 | 888 |
953 return 0; | 953 return 0; |
954 } | 954 } |
955 | 955 |
956 /* Send private message directly */ | 956 /* Send private message directly */ |
957 ret = silc_client_send_private_message(client, conn, clients[0], | 957 ret = silc_client_send_private_message(client, conn, clients[0], |
958 mflags, (char *)msg, | 958 mflags, (unsigned char *)msg, |
959 strlen(msg), TRUE); | 959 strlen(msg), TRUE); |
960 | 960 |
961 silc_free(nickname); | 961 silc_free(nickname); |
962 silc_free(clients); | 962 silc_free(clients); |
963 return ret; | 963 return ret; |