/*
- * $Id: HttpMsg.cc,v 1.30 2006/05/27 00:35:05 robertc Exp $
+ * $Id: HttpMsg.cc,v 1.31 2006/09/20 11:38:14 adrian Exp $
*
* DEBUG: section 74 HTTP Message
* AUTHOR: Alex Rousskov
const char **parse_end_ptr = &blk_end;
assert(parse_start);
assert(pstate < psParsed);
+ int retval;
*parse_end_ptr = parse_start;
+ PROF_start(HttpMsg_httpMsgParseStep);
+
if (pstate == psReadyToParseStartLine) {
- if (!httpMsgIsolateStart(&parse_start, &blk_start, &blk_end))
- return 0;
+ if (!httpMsgIsolateStart(&parse_start, &blk_start, &blk_end)) {
+ retval = 0;
+ goto finish;
+ }
- if (!parseFirstLine(blk_start, blk_end))
- return httpMsgParseError();
+ if (!parseFirstLine(blk_start, blk_end)) {
+ retval = httpMsgParseError();
+ goto finish;
+ }
*parse_end_ptr = parse_start;
if (pstate == psReadyToParseHeaders) {
if (!httpMsgIsolateHeaders(&parse_start, &blk_start, &blk_end)) {
- if (atEnd)
+ if (atEnd) {
blk_start = parse_start, blk_end = blk_start + strlen(blk_start);
- else
- return 0;
+ } else {
+ retval = 0;
+ goto finish;
+ }
}
if (!header.parse(blk_start, blk_end))
++pstate;
}
-
- return 1;
+ retval = 1;
+finish:
+ PROF_stop(HttpMsg_httpMsgParseStep);
+ return retval;
}
/* handy: resets and returns -1 */
/*
- * $Id: store_client.cc,v 1.147 2006/08/07 02:28:22 robertc Exp $
+ * $Id: store_client.cc,v 1.148 2006/09/20 11:38:14 adrian Exp $
*
* DEBUG: section 90 Storage Manager Client-Side Interface
* AUTHOR: Duane Wessels
dlink_node *nx = NULL;
dlink_node *node;
+ PROF_start(InvokeHandlers);
+
debug(90, 3) ("InvokeHandlers: %s\n", e->getMD5Text());
/* walk the entire list looking for valid callbacks */
storeClientCopy2(e, sc);
}
+ PROF_stop(InvokeHandlers);
}
int