comparison src/protocols/simple/simple.c @ 13184:2d68ea9616b3

[gaim-migrate @ 15547] datallah noticed that sip: isn't added to a buddies name if the buddies->send message menu entry is used. committer: Tailor Script <tailor@pidgin.im>
author Thomas Butter <tbutter>
date Wed, 08 Feb 2006 19:49:54 +0000
parents 891be2f09b5c
children 33bef17125c2
comparison
equal deleted inserted replaced
13183:02d40c160599 13184:2d68ea9616b3
755 return TRUE; 755 return TRUE;
756 } 756 }
757 757
758 static void simple_send_message(struct simple_account_data *sip, char *to, char *msg, char *type) { 758 static void simple_send_message(struct simple_account_data *sip, char *to, char *msg, char *type) {
759 gchar *hdr; 759 gchar *hdr;
760 gchar *fullto;
761 if(strncmp("sip:",to,4)) {
762 fullto = g_strdup_printf("sip:%s",to);
763 } else {
764 fullto = g_strdup(to);
765 }
760 if(type) { 766 if(type) {
761 hdr = g_strdup_printf("Content-Type: %s\r\n",type); 767 hdr = g_strdup_printf("Content-Type: %s\r\n",type);
762 } else { 768 } else {
763 hdr = g_strdup("Content-Type: text/plain\r\n"); 769 hdr = g_strdup("Content-Type: text/plain\r\n");
764 } 770 }
765 send_sip_request(sip->gc, "MESSAGE", to, to, hdr, msg, NULL, NULL); 771 send_sip_request(sip->gc, "MESSAGE", fullto, fullto, hdr, msg, NULL, NULL);
766 g_free(hdr); 772 g_free(hdr);
773 g_free(fullto);
767 } 774 }
768 775
769 static int simple_im_send(GaimConnection *gc, const char *who, const char *what, GaimMessageFlags flags) { 776 static int simple_im_send(GaimConnection *gc, const char *who, const char *what, GaimMessageFlags flags) {
770 struct simple_account_data *sip = gc->proto_data; 777 struct simple_account_data *sip = gc->proto_data;
771 char *to = g_strdup(who); 778 char *to = g_strdup(who);