1037 |
if (do_notify) |
if (do_notify) |
1038 |
for (msg = mhd->msg_head; msg; msg = msg->next) |
for (msg = mhd->msg_head; msg; msg = msg->next) |
1039 |
{ |
{ |
|
|
|
1040 |
DISPATCH_ADD_MSG(mailbox, mhd); |
DISPATCH_ADD_MSG(mailbox, mhd); |
1041 |
} |
} |
1042 |
|
|
1185 |
status = stream_open (mhm->stream); |
status = stream_open (mhm->stream); |
1186 |
|
|
1187 |
if (status != 0) |
if (status != 0) |
|
{ |
|
1188 |
stream_destroy (&mhm->stream, NULL); |
stream_destroy (&mhm->stream, NULL); |
|
} |
|
1189 |
|
|
1190 |
if (status == 0) |
if (status == 0) |
1191 |
status = mh_scan_message (mhm); |
status = mh_scan_message (mhm); |
1204 |
} |
} |
1205 |
} |
} |
1206 |
|
|
1207 |
|
void |
1208 |
|
mh_check_message (struct _mh_message *mhm) |
1209 |
|
{ |
1210 |
|
if (mhm->body_end == 0) |
1211 |
|
mh_pool_open (mhm); |
1212 |
|
} |
1213 |
|
|
1214 |
/* Reading functions */ |
/* Reading functions */ |
1215 |
|
|
1216 |
static int |
static int |
1299 |
struct _mh_message *mhm = message_get_owner (msg); |
struct _mh_message *mhm = message_get_owner (msg); |
1300 |
if (mhm == NULL) |
if (mhm == NULL) |
1301 |
return EINVAL; |
return EINVAL; |
1302 |
|
mh_check_message (mhm); |
1303 |
if (psize) |
if (psize) |
1304 |
*psize = mhm->body_end - mhm->body_start; |
*psize = mhm->body_end - mhm->body_start; |
1305 |
return 0; |
return 0; |
1306 |
} |
} |
1307 |
|
|
|
|
|
1308 |
static int |
static int |
1309 |
mh_body_lines (body_t body, size_t *plines) |
mh_body_lines (body_t body, size_t *plines) |
1310 |
{ |
{ |
1312 |
struct _mh_message *mhm = message_get_owner (msg); |
struct _mh_message *mhm = message_get_owner (msg); |
1313 |
if (mhm == NULL) |
if (mhm == NULL) |
1314 |
return EINVAL; |
return EINVAL; |
1315 |
|
mh_check_message (mhm); |
1316 |
if (plines) |
if (plines) |
1317 |
*plines = mhm->body_lines; |
*plines = mhm->body_lines; |
1318 |
return 0; |
return 0; |
1347 |
struct _mh_message *mhm = message_get_owner (msg); |
struct _mh_message *mhm = message_get_owner (msg); |
1348 |
if (mhm == NULL) |
if (mhm == NULL) |
1349 |
return EINVAL; |
return EINVAL; |
1350 |
|
mh_check_message (mhm); |
1351 |
if (psize) |
if (psize) |
1352 |
*psize = mhm->body_start; |
*psize = mhm->body_start; |
1353 |
return 0; |
return 0; |
1360 |
struct _mh_message *mhm = message_get_owner (msg); |
struct _mh_message *mhm = message_get_owner (msg); |
1361 |
if (mhm == NULL) |
if (mhm == NULL) |
1362 |
return EINVAL; |
return EINVAL; |
1363 |
|
mh_check_message (mhm); |
1364 |
if (plines) |
if (plines) |
1365 |
*plines = mhm->header_lines; |
*plines = mhm->header_lines; |
1366 |
return 0; |
return 0; |