Changeset 20


Ignore:
Timestamp:
04/01/14 12:59:46 (10 years ago)
Author:
willem
Message:

willem

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Make.inc

    r17 r20  
    77
    88# installation directory of the server on the remote system
    9 REMOTE_CGI_INSTALL_DIR=stopos.osd.surfsara.nl:/usr/local/stopos/cgi-bin
     9#REMOTE_CGI_INSTALL_DIR=stopos.osd.surfsara.nl:/usr/local/stopos/cgi-bin
     10REMOTE_CGI_INSTALL_DIR=localhost:/home/willem/www/cgi-bin
    1011
    1112# location of the client programs:
     
    1314
    1415# remote installation directory of the client programs:
    15 REMOTE_CLIENT_INSTALL_DIR=stopos.osd.surfsara.nl:/usr/local/stopos/bin
     16#REMOTE_CLIENT_INSTALL_DIR=stopos.osd.surfsara.nl:/usr/local/stopos/bin
     17REMOTE_CLIENT_INSTALL_DIR=localhost:/usr/local/stopos/bin
    1618
    1719# location of the modulefile
     
    4446# Define directory to store the non-mysql databases
    4547# default is /tmp
    46 DB_DIR=/data/stopos
     48# DB_DIR=/data/stopos
    4749
  • trunk/modulefile

    r18 r20  
    11#%Module
    22##
    3 ##        stopos 0.92
     3##        stopos 0.93
    44##
    55
     
    88}
    99
    10 set root /home/willem/myroot/sara/sw/stopos-0.92
     10set root /home/willem/myroot/sara/sw/stopos-0.93
    1111
    1212if { [ module-info shelltype ] == "csh" } {
  • trunk/stopos.h

    r17 r20  
    2424                                          // key from extra key
    2525const std::string program_name    = "stopos";
    26 const std::string program_version = "0.92";
     26const std::string program_version = "0.93";
    2727const std::string default_pool    = "pool";
    2828
  • trunk/stoposclient.cpp

    r14 r20  
    2323#include "shellenv.h"
    2424#include "stopos.h"
     25#define  CONNECT_ERROR_MSG "ERROR: Cannot connect to server"
     26#define  CONNECT_ERROR_RETRIES 10
    2527
    2628struct returnvalue
     
    121123int handle_add(wrequest &w,const std::string &fname,returnvalue &r, const bool quiet)
    122124{
    123   size_t number_of_lines;
     125  size_t number_of_lines=0;
    124126
    125127  bool read_from_stdin = 0;
     
    171173    w.set_value(line);
    172174
    173     rc = w.send_message(body,header);
    174 
     175    for (int i=0; i<CONNECT_ERROR_RETRIES; i++)
     176    {
     177      rc = w.send_message(body,header);
     178      if (rc == 0) break;
     179      sleep(1);
     180    }
    175181    if (rc != 0)
    176182    {
    177       r.msg = "ERROR: Cannot connect to server";
     183      r.msg = CONNECT_ERROR_MSG;
    178184      return 1;
    179185    }
     186
    180187    r.parse(body);
    181188    if (r.msg != "OK")
     
    420427    std::string body,header;
    421428
    422     rc = w.send_message(body,header);
    423 
     429    for (int i=0; i<CONNECT_ERROR_RETRIES; i++)
     430    {
     431      rc = w.send_message(body,header);
     432      if (rc == 0) break;
     433      sleep(1);
     434    }
    424435    if (rc != 0)
    425       r.msg = "ERROR: Cannot connect to server";
     436      r.msg = CONNECT_ERROR_MSG;
    426437    else
    427438      r.parse(body);
Note: See TracChangeset for help on using the changeset viewer.