Mercurial > pidgin.yaz
comparison libpurple/protocols/simple/simple.c @ 23354:6b09c40a15d1
There's no need to dup this
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 12 Jun 2008 16:09:58 +0000 |
parents | 25161f5ea347 |
children | 7f401e99f9d9 3da0957e7821 |
comparison
equal
deleted
inserted
replaced
23353:adda955a8db6 | 23354:6b09c40a15d1 |
---|---|
1896 static void simple_login(PurpleAccount *account) | 1896 static void simple_login(PurpleAccount *account) |
1897 { | 1897 { |
1898 PurpleConnection *gc; | 1898 PurpleConnection *gc; |
1899 struct simple_account_data *sip; | 1899 struct simple_account_data *sip; |
1900 gchar **userserver; | 1900 gchar **userserver; |
1901 gchar *hosttoconnect; | 1901 const gchar *hosttoconnect; |
1902 | 1902 |
1903 const char *username = purple_account_get_username(account); | 1903 const char *username = purple_account_get_username(account); |
1904 gc = purple_account_get_connection(account); | 1904 gc = purple_account_get_connection(account); |
1905 | 1905 |
1906 if (strpbrk(username, " \t\v\r\n") != NULL) { | 1906 if (strpbrk(username, " \t\v\r\n") != NULL) { |
1932 | 1932 |
1933 /* TODO: Set the status correctly. */ | 1933 /* TODO: Set the status correctly. */ |
1934 sip->status = g_strdup("available"); | 1934 sip->status = g_strdup("available"); |
1935 | 1935 |
1936 if(!purple_account_get_bool(account, "useproxy", FALSE)) { | 1936 if(!purple_account_get_bool(account, "useproxy", FALSE)) { |
1937 hosttoconnect = g_strdup(sip->servername); | 1937 hosttoconnect = sip->servername; |
1938 } else { | 1938 } else { |
1939 hosttoconnect = g_strdup(purple_account_get_string(account, "proxy", sip->servername)); | 1939 hosttoconnect = purple_account_get_string(account, "proxy", sip->servername); |
1940 } | 1940 } |
1941 | 1941 |
1942 sip->srv_query_data = purple_srv_resolve("sip", | 1942 sip->srv_query_data = purple_srv_resolve("sip", |
1943 sip->udp ? "udp" : "tcp", hosttoconnect, srvresolved, sip); | 1943 sip->udp ? "udp" : "tcp", hosttoconnect, srvresolved, sip); |
1944 g_free(hosttoconnect); | |
1945 } | 1944 } |
1946 | 1945 |
1947 static void simple_close(PurpleConnection *gc) | 1946 static void simple_close(PurpleConnection *gc) |
1948 { | 1947 { |
1949 struct simple_account_data *sip = gc->proto_data; | 1948 struct simple_account_data *sip = gc->proto_data; |