Mercurial > noffle
comparison src/client.c @ 144:8b9366fc1361 noffle
[svn] Added timeout to Prt_getLn to avoid Noffle hanging if the
connection breaks down during a fetch.
author | enz |
---|---|
date | Sat, 23 Sep 2000 11:40:35 +0100 |
parents | d6c006a27ffe |
children | 976ff791c7ec |
comparison
equal
deleted
inserted
replaced
143:7400a8e9d5ba | 144:8b9366fc1361 |
---|---|
1 /* | 1 /* |
2 client.c | 2 client.c |
3 | 3 |
4 $Id: client.c 191 2000-08-09 21:26:28Z bears $ | 4 $Id: client.c 217 2000-09-23 10:40:35Z enz $ |
5 */ | 5 */ |
6 | 6 |
7 #if HAVE_CONFIG_H | 7 #if HAVE_CONFIG_H |
8 #include <config.h> | 8 #include <config.h> |
9 #endif | 9 #endif |
85 static Bool | 85 static Bool |
86 getLn( Str line ) | 86 getLn( Str line ) |
87 { | 87 { |
88 Bool r; | 88 Bool r; |
89 | 89 |
90 r = Prt_getLn( line, client.in ); | 90 r = Prt_getLn( line, client.in, Cfg_connectTimeout() ); |
91 if ( ! r ) | 91 if ( ! r ) |
92 logBreakDown(); | 92 logBreakDown(); |
93 return r; | 93 return r; |
94 } | 94 } |
95 | 95 |
96 static Bool | 96 static Bool |
97 getTxtLn( Str line, Bool *err ) | 97 getTxtLn( Str line, Bool *err ) |
98 { | 98 { |
99 Bool r; | 99 Bool r; |
100 | 100 |
101 r = Prt_getTxtLn( line, err, client.in ); | 101 r = Prt_getTxtLn( line, err, client.in, Cfg_connectTimeout() ); |
102 if ( *err ) | 102 if ( *err ) |
103 logBreakDown(); | 103 logBreakDown(); |
104 return r; | 104 return r; |
105 } | 105 } |
106 | 106 |