Lines 62-68
Link Here
|
62 |
|
62 |
|
63 |
fd = open(argv[i], O_RDONLY, 0); |
63 |
fd = open(argv[i], O_RDONLY, 0); |
64 |
if (fd < 0) |
64 |
if (fd < 0) |
65 |
throw system_error("Can't open file for reading"); |
65 |
throw Mapson::system_error("Can't open file for reading"); |
66 |
fd_sentry sentry(fd); |
66 |
fd_sentry sentry(fd); |
67 |
string mail; |
67 |
string mail; |
68 |
for (rc = read(fd, buffer, sizeof(buffer)); |
68 |
for (rc = read(fd, buffer, sizeof(buffer)); |
Lines 72-78
Link Here
|
72 |
mail.append(buffer, rc); |
72 |
mail.append(buffer, rc); |
73 |
} |
73 |
} |
74 |
if (rc < 0) |
74 |
if (rc < 0) |
75 |
throw system_error("Failed to read from file"); |
75 |
throw Mapson::system_error("Failed to read from file"); |
76 |
|
76 |
|
77 |
// Extract the mail addresses. |
77 |
// Extract the mail addresses. |
78 |
|
78 |
|
Lines 196-202
Link Here
|
196 |
mail.append(buffer, rc); |
196 |
mail.append(buffer, rc); |
197 |
} |
197 |
} |
198 |
if (rc < 0) |
198 |
if (rc < 0) |
199 |
throw system_error("Failed to read mail from standard input"); |
199 |
throw Mapson::system_error("Failed to read mail from standard input"); |
200 |
|
200 |
|
201 |
// Check whether the mail contains a valid cookie. If it does, |
201 |
// Check whether the mail contains a valid cookie. If it does, |
202 |
// mail will be replaced with the original e-mail, that was |
202 |
// mail will be replaced with the original e-mail, that was |