Patch for email user
[email protected] Wed, 02 Dec 2009 15:40:39 +0100
| Newsgroups | gmane.comp.window-managers.icewm.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, icewm is the default window manager for my disto (http://linuxconsole.org). I send you the patch to work with arobase (@) in user name, this is needed when the mail server hosts more thant one domain. Thanks for your (great) work. Yann. ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Icewm-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/icewm-devel
icewm-email-user-with-arobase.patch
(application/octet-stream, 1 KB)
diff -ur icewm-1.3.4pre2.orig/src/yurl.cc icewm-1.3.4pre2/src/yurl.cc
--- icewm-1.3.4pre2.orig/src/yurl.cc 2009-04-27 17:57:44.000000000 +0000
+++ icewm-1.3.4pre2/src/yurl.cc 2009-12-02 14:27:55.000000000 +0000
@@ -43,6 +43,7 @@
fPath = null;
ustring rest(url);
+ int j; // Index to the second '@'
int i = rest.indexOf(':');
if (i != -1) {
fScheme = rest.substring(0, i);
@@ -65,9 +66,18 @@
i = fHost.indexOf('@'); // ???last
if (i != -1) {
+ j = fHost.indexOf('@');
+ if (j != -1) {
+ // warn("@ in username");
+ i = fHost.substring(j+1).indexOf('@');
+ fUser = fHost.substring(0, i+j+1);
+ fHost = fHost.substring(i + 1+j+1);
+ }
+ else
+ {
fUser = fHost.substring(0, i);
fHost = fHost.substring(i + 1);
-
+ }
i = fUser.indexOf(':');
if (i != -1) {
fPassword = fUser.substring(i + 1);