Mercurial > pidgin.yaz
diff libpurple/protocols/simple/simple.c @ 24697:08414e3d8b4f
Don't allow connecting a SIMPLE account if no server is configured. Fixes #7767.
committer: John Bailey <rekkanoryo@rekkanoryo.org>
| author | Florian Qu?ze <florian@instantbird.org> |
|---|---|
| date | Mon, 15 Dec 2008 03:54:39 +0000 |
| parents | 222be065ce6e |
| children | 49f0e5dbeeed f8dbd57cf635 68f4edb42f39 |
line wrap: on
line diff
--- a/libpurple/protocols/simple/simple.c Mon Dec 15 03:01:38 2008 +0000 +++ b/libpurple/protocols/simple/simple.c Mon Dec 15 03:54:39 2008 +0000 @@ -1939,6 +1939,13 @@ sip->txbuf = purple_circ_buffer_new(0); userserver = g_strsplit(username, "@", 2); + if (userserver[1] == NULL || userserver[1][0] == '\0') { + purple_connection_error_reason(gc, + PURPLE_CONNECTION_ERROR_INVALID_SETTINGS, + _("SIP connect server not specified")); + return; + } + purple_connection_set_display_name(gc, userserver[0]); sip->username = g_strdup(userserver[0]); sip->servername = g_strdup(userserver[1]);
