#define PORT_NUM 2000 /* port number to listen on */
#define DEVELOPER_ID 0
#define CLIENT_ID 4
-#define CLIENT_VERSION 739 /* This version of WebCit */
-#define MINIMUM_CIT_VERSION 739 /* min required Citadel ver */
-#define LIBCITADEL_MIN 739 /* min required libcitadel ver */
+#define CLIENT_VERSION 741 /* This version of WebCit */
+#define MINIMUM_CIT_VERSION 741 /* min required Citadel ver */
+#define LIBCITADEL_MIN 741 /* min required libcitadel ver */
#define DEFAULT_HOST "localhost" /* Default Citadel server */
#define DEFAULT_PORT "504"
#define TARGET "webcit01" /* Target for inline URL's */
/*
* \brief information about us ???
*/
-struct serv_info {
+typedef struct _serv_info {
int serv_pid; /* Process ID of the Citadel server */
StrBuf *serv_nodename; /* Node name of the Citadel server */
StrBuf *serv_humannode; /* human readable node name of the Citadel server */
int serv_fulltext_enabled; /* Does the server have the full text index enabled? */
StrBuf *serv_svn_revision; /* SVN revision of the server */
int serv_supports_openid; /* Does the server support authentication via OpenID? */
-};
+} ServInfo;
/* Session local Members */
int http_sock; /**< HTTP server socket */
int serv_sock; /**< Client socket to Citadel server */
+ StrBuf *ReadBuf;
int chat_sock; /**< Client socket to Citadel server - for chat */
time_t lastreq; /**< Timestamp of most recent HTTP */
time_t last_pager_check; /**< last time we polled for instant msgs */
+ ServInfo *serv_info; /**< Iformation about the citserver we're connected to */
/* Request local Members */
StrBuf *CLineBuf; /**< linebuffering client stuff */
StrBuf *UrlFragment1; /**< first urlfragment, if NEED_URL is specified by the handler*/
StrBuf *UrlFragment2; /**< second urlfragment, if NEED_URL is specified by the handler*/
StrBuf *UrlFragment3; /**< third urlfragment, if NEED_URL is specified by the handler*/
+ StrBuf *UrlFragment4; /**< fourth urlfragment, if NEED_URL is specified by the handler*/
StrBuf *WBuf; /**< Our output buffer */
StrBuf *HBuf; /**< Our HeaderBuffer */
StrBuf *this_page; /**< URL of current page */
extern char file_crpt_file_cer[PATH_MAX];
#endif
-struct serv_info serv_info;
extern char floorlist[128][SIZ];
extern char *axdefs[];
extern char *ctdlhost, *ctdlport;
void display_aide_menu(void);
void display_advanced_menu(void);
void slrp_highest(void);
-void get_serv_info(StrBuf *, char *);
+ServInfo *get_serv_info(StrBuf *, char *);
+void DeleteServInfo(ServInfo **FreeMe);
int uds_connectsock(char *);
int tcp_connectsock(char *, char *);
int serv_getln(char *strbuf, int bufsize);
int StrBuf_ServGetln(StrBuf *buf);
+int StrBuf_ServGetlnBuffered(StrBuf *buf);
int GetServerStatus(StrBuf *Line, long* FullState);
void serv_puts(const char *string);
void who(void);
void msgesc(char *target, size_t tlen, char *strbuf);
void msgescputs(char *strbuf);
void msgescputs1(char *strbuf);
-void stripout(char *str, char leftboundary, char rightboundary);
void dump_vars(void);
void embed_main_menu(void);
void serv_read(char *buf, int bytes);
void validate(void);
void display_graphics_upload(char *, char *, char *);
void do_graphics_upload(char *upl_cmd);
-void serv_read(char *buf, int bytes);
void serv_gets(char *strbuf);
void serv_write(const char *buf, int nbytes);
-void serv_puts(const char *string);
void serv_putbuf(const StrBuf *string);
void serv_printf(const char *format,...)__attribute__((__format__(__printf__,1,2)));
void load_floorlist(void);