Mercurial > pidgin.yaz
diff src/protocols/msn/utils.c @ 9193:502707ca1836
[gaim-migrate @ 9988]
Patch by Felipe Contreras to add MSN file transfer and buddy icons. Please
test and report any bugs!
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 06 Jun 2004 02:39:08 +0000 |
parents | cab225a333b5 |
children | ab6636c5a136 |
line wrap: on
line diff
--- a/src/protocols/msn/utils.c Sun Jun 06 02:16:08 2004 +0000 +++ b/src/protocols/msn/utils.c Sun Jun 06 02:39:08 2004 +0000 @@ -314,3 +314,24 @@ g_free(fontface); g_free(msg); } + +void +msn_parse_socket(const char *str, char **ret_host, int *ret_port) +{ + char *host; + char *c; + int port; + + host = g_strdup(str); + + if ((c = strchr(host, ':')) != NULL) + { + *c = '\0'; + port = atoi(c + 1); + } + else + port = 1863; + + *ret_host = host; + *ret_port = port; +}