/[projects]/android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureServlet.java
ViewVC logotype

Diff of /android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureServlet.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 828 by torben, Mon May 10 06:53:20 2010 UTC revision 829 by torben, Thu Jun 10 22:26:09 2010 UTC
# Line 54  public class DepartureServlet extends Ht Line 54  public class DepartureServlet extends Ht
54                          resp.sendError(400, "not enough parameters");                          resp.sendError(400, "not enough parameters");
55                          return;                          return;
56                  }                  }
57                    
58                    boolean arrival = false;
59                    try {
60                            arrival = Integer.parseInt( req.getParameter("arrival")) != 0;
61                    } catch (Exception e) {}
62                    
63                  Statistics.getInstance().incrementDepartureLookups();                  Statistics.getInstance().incrementDepartureLookups();
64                                    
65                  int station = Integer.parseInt( req.getParameter("station") );                  int station = Integer.parseInt( req.getParameter("station") );
# Line 64  public class DepartureServlet extends Ht Line 70  public class DepartureServlet extends Ht
70                  String stationName = StationDAO.getStationName(station);                  String stationName = StationDAO.getStationName(station);
71    
72                  try {                  try {
73                          beans = fetcher.cachedLookupDepartures(station);                          beans = fetcher.cachedLookupDepartures(station, arrival);
74                  } catch (java.io.IOException ioe) {                  } catch (java.io.IOException ioe) {
75                          logger.warning("Read failed, station="+station + ". " + ioe.getMessage() );                          logger.warning("Read failed, station="+station + ". " + ioe.getMessage() );
76                          Statistics.getInstance().incrementDepartureErrors();                          Statistics.getInstance().incrementDepartureErrors();

Legend:
Removed from v.828  
changed lines
  Added in v.829

  ViewVC Help
Powered by ViewVC 1.1.20