X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=clients%2Fgtk2%2Fhublist-xml.c;h=d72291d14d93730286e2fe0cb89d734c1da60e5b;hb=c3b5c7fde5f546a3e05da8cd2c032d9c2c74f295;hp=e67f7177fa103fe6f18619e9a47310ab7f51c555;hpb=0d04e87edb98d0a426db309038e9f288270abfbb;p=doldaconnect.git diff --git a/clients/gtk2/hublist-xml.c b/clients/gtk2/hublist-xml.c index e67f717..d72291d 100644 --- a/clients/gtk2/hublist-xml.c +++ b/clients/gtk2/hublist-xml.c @@ -1,6 +1,6 @@ /* * Dolda Connect - Modular multiuser Direct Connect-style client - * Copyright (C) 2007 Fredrik Tolf (fredrik@dolda2000.com) + * Copyright (C) 2007 Fredrik Tolf * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -61,7 +61,7 @@ static int checkvalid(xmlNodePtr n) int pubhubxmlhandler(int op, char *buf, size_t len) { static xmlParserCtxtPtr ctxt = NULL; - int i; + int i, o; xmlNodePtr dr, r, cr, c, n; int numcols, *cols, sortcol; GType type, *types; @@ -142,14 +142,16 @@ int pubhubxmlhandler(int op, char *buf, size_t len) } for(i = 0; i < numcols; i++) { - if(!strcmp(names[i], "Address")) + if(!strcasecmp(names[i], "Address")) { - name = names[0]; - names[0] = names[i]; - names[i] = name; - type = types[0]; - types[0] = types[i]; - types[i] = type; + for(o = i; o > 0; o--) { + name = names[o]; + type = types[o]; + names[o] = names[o - 1]; + types[o] = types[o - 1]; + names[o - 1] = name; + types[o - 1] = type; + } break; } }