From 7b2a325c84c3b5f63569f5dc62f9c61dd06b5703 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Mon, 4 May 2009 21:49:02 +0000 Subject: [PATCH] * remove serv_getln here too --- webcit/serv_func.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/webcit/serv_func.c b/webcit/serv_func.c index 7dbc16c94..2d8188cb0 100644 --- a/webcit/serv_func.c +++ b/webcit/serv_func.c @@ -33,9 +33,9 @@ ServInfo *get_serv_info(StrBuf *browser_host, char *user_agent) { ServInfo *info; StrBuf *Buf; - char buf[SIZ]; int a; + Buf = NewStrBuf(); /** Tell the server what kind of client is connecting */ serv_printf("IDEN %d|%d|%d|%s|%s", DEVELOPER_ID, @@ -44,11 +44,11 @@ ServInfo *get_serv_info(StrBuf *browser_host, char *user_agent) user_agent, ChrPtr(browser_host) ); - serv_getln(buf, sizeof buf); + StrBuf_ServGetln(Buf); /** Tell the server what kind of richtext we prefer */ serv_puts("MSGP text/calendar|text/html|text/plain"); - serv_getln(buf, sizeof buf); + StrBuf_ServGetln(Buf); /* * Tell the server that when we save a calendar event, we @@ -56,18 +56,19 @@ ServInfo *get_serv_info(StrBuf *browser_host, char *user_agent) * instead of by the client. */ serv_puts("ICAL sgi|1"); - serv_getln(buf, sizeof buf); + StrBuf_ServGetln(Buf); /** Now ask the server to tell us a little bit about itself... */ serv_puts("INFO"); - serv_getln(buf, sizeof buf); - if (buf[0] != '1') + StrBuf_ServGetln(Buf); + if (GetServerStatus(Buf, NULL) != 1) { + FreeStrBuf(&Buf); return NULL; + } info = (ServInfo*)malloc(sizeof(ServInfo)); memset(info, 0, sizeof(ServInfo)); a = 0; - Buf = NewStrBuf(); while (StrBuf_ServGetln(Buf), (strcmp(ChrPtr(Buf), "000")!= 0)) { /* lprintf (1, "a: %d [%s]", a, ChrPtr(Buf));*/ switch (a) { -- 2.30.2