chiark / gitweb /
pctb upload: actually look at the right XML tag for the commod maps!
[jarrg-ian.git] / src / com / tedpearson / ypp / market / MarketUploader.java
index 5318b2892da52115ee7209190688a8925389fd52..daafc10b8b10a248fae00a7ad507e2dbf56e6902 100644 (file)
@@ -45,8 +45,9 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
 
        // Yarrg protocol parameters
        private final static String YARRG_CLIENTNAME = "jpctb greenend";
-       private final static String YARRG_CLIENTVERSION = "0.1";
-       private final static String YARRG_CLIENTFIXES = "";
+       private final static String YARRG_CLIENTVERSION =
+           com.tedpearson.ypp.market.Version.version;
+       private final static String YARRG_CLIENTFIXES = "bug-094";
        private final static String YARRG_LIVE_URL = "http://upload.yarrg.chiark.net/commod-update-receiver";
        private final static String YARRG_TEST_URL = "http://upload.yarrg.chiark.net/test/commod-update-receiver";
        private String YARRG_URL;
@@ -444,7 +445,7 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
                        GZIPOutputStream out = new GZIPOutputStream(outStream);
                        //FileOutputStream out = new FileOutputStream(new File("output.text"));
                        DataOutputStream dos = new DataOutputStream(out);
-                       dos.writeBytes("005\n");
+                       dos.writeBytes("005y\n");
                        dos.writeBytes(stallMap.size()+"\n");
                        dos.writeBytes(getAbbrevStallList(stallMap));
                        writeBuySellOffers(buys,sells,offerCount,out);
@@ -596,7 +597,7 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
                        //System.out.println(xml);
                        Reader reader = new CharArrayReader(xml.toCharArray());
                        Document d = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(reader));
-                       NodeList maps = d.getElementsByTagName("c");
+                       NodeList maps = d.getElementsByTagName("CommodMap");
                        for(int i=0;i<maps.getLength();i++) {
                                NodeList content = maps.item(i).getChildNodes();
                                Integer num = Integer.parseInt(content.item(1).getTextContent());