169 |
return FALSE; |
return FALSE; |
170 |
|
|
171 |
} else { |
} else { |
172 |
|
|
173 |
|
int n; |
174 |
char req[2*STRLEN]; |
char req[2*STRLEN]; |
175 |
char *auth= get_basic_authentication_header(); |
char *auth= get_basic_authentication_header(); |
176 |
char buf[STRLEN]; |
char buf[STRLEN]; |
180 |
|
|
181 |
free(auth); |
free(auth); |
182 |
sock_send(s, req, sizeof(req), 0); |
sock_send(s, req, sizeof(req), 0); |
183 |
sock_recv(s, buf, STRLEN, 0); |
|
184 |
|
if(0>(n= sock_recv(s, buf, STRLEN, 0))) { |
185 |
|
|
186 |
|
local_status(p); |
187 |
|
close_socket(s); |
188 |
|
|
189 |
|
return TRUE; |
190 |
|
|
191 |
|
} |
192 |
|
|
193 |
close_socket(s); |
close_socket(s); |
194 |
|
|
195 |
/* If everything has gone well the returned string starts with |
/* If everything has gone well the returned string starts with |
196 |
"Process " */ |
"Process " */ |
197 |
|
|
198 |
|
buf[n]= 0; |
199 |
if(starts_with(buf, "Process ")) { |
if(starts_with(buf, "Process ")) { |
200 |
|
|
201 |
fprintf(stdout, "%s", buf); |
fprintf(stdout, "%s", buf); |