]> err.no Git - yubikey-server-c/commitdiff
Workaround for buggy libykclient
authorTollef Fog Heen <tfheen@err.no>
Mon, 19 Oct 2009 13:21:39 +0000 (15:21 +0200)
committerTollef Fog Heen <tfheen@err.no>
Mon, 19 Oct 2009 13:21:39 +0000 (15:21 +0200)
libykclient requires that parameters come in a particular order,
contrary to what the spec says.  Reorder parameters in order to not
break it.

src/main.c

index 6a4453616d3ac180a9addeada7a979bfea9587dd..9cc0cd9018aabd7829aad0b4b1f1227b1df17384 100644 (file)
@@ -148,15 +148,15 @@ static int send_response(struct MHD_Connection *conn,
        if (signature) {
                t += sprintf(t, "h=%s\n", signature);
        }
-       if (status) {
-               t += sprintf(t, "status=%s\n", status);
-       }
        if (info) {
                t += sprintf(t, "info=%s\n", info);
        }
        if (timestamp) {
                t += sprintf(t, "timestamp=%s\n", timestamp);
        }
+       if (status) {
+               t += sprintf(t, "status=%s\n", status);
+       }
        /* XXX error checking above */
 
        response = MHD_create_response_from_data(strlen(resp_text), resp_text,