comparison src/html.c @ 5211:0241d6b6702d

[gaim-migrate @ 5581] Wrote a new debugging API, and of course core/ui split it. Debug statements can now have debug levels and categories, for future filtering of stuff, and color highlighting. It's nifty, m'kay? committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 26 Apr 2003 06:46:08 +0000
parents 6911a84cbab1
children 36d2c875a822
comparison
equal deleted inserted replaced
5210:39bb2a35f8d9 5211:0241d6b6702d
214 if (!gunk->sentreq) { 214 if (!gunk->sentreq) {
215 char buf[256]; 215 char buf[256];
216 216
217 g_snprintf(buf, sizeof(buf), "GET %s%s HTTP/1.0\r\n\r\n", gunk->full ? "" : "/", 217 g_snprintf(buf, sizeof(buf), "GET %s%s HTTP/1.0\r\n\r\n", gunk->full ? "" : "/",
218 gunk->full ? gunk->url : gunk->website->page); 218 gunk->full ? gunk->url : gunk->website->page);
219 debug_printf("Request: %s\n", buf); 219
220 gaim_debug(GAIM_DEBUG_MISC, "grab_url_callback",
221 "Request: %s\n", buf);
220 222
221 write(sock, buf, strlen(buf)); 223 write(sock, buf, strlen(buf));
222 fcntl(sock, F_SETFL, O_NONBLOCK); 224 fcntl(sock, F_SETFL, O_NONBLOCK);
223 gunk->sentreq = TRUE; 225 gunk->sentreq = TRUE;
224 gunk->inpa = gaim_input_add(sock, GAIM_INPUT_READ, grab_url_callback, dat); 226 gunk->inpa = gaim_input_add(sock, GAIM_INPUT_READ, grab_url_callback, dat);
280 } 282 }
281 } else if (errno != ETIMEDOUT) { 283 } else if (errno != ETIMEDOUT) {
282 gunk->webdata = g_realloc(gunk->webdata, gunk->len + 1); 284 gunk->webdata = g_realloc(gunk->webdata, gunk->len + 1);
283 gunk->webdata[gunk->len] = 0; 285 gunk->webdata[gunk->len] = 0;
284 286
285 debug_printf(_("Received: '%s'\n"), gunk->webdata); 287 gaim_debug(GAIM_DEBUG_MISC, "grab_url_callback",
288 "Received: '%s'\n", gunk->webdata);
286 289
287 gaim_input_remove(gunk->inpa); 290 gaim_input_remove(gunk->inpa);
288 close(sock); 291 close(sock);
289 gunk->callback(gunk->data, gunk->webdata, gunk->len); 292 gunk->callback(gunk->data, gunk->webdata, gunk->len);
290 if (gunk->webdata) 293 if (gunk->webdata)