(amd_close): Unlock the monitor before returning
Showing
1 changed file
with
5 additions
and
4 deletions
... | @@ -368,7 +368,8 @@ amd_close (mu_mailbox_t mailbox) | ... | @@ -368,7 +368,8 @@ amd_close (mu_mailbox_t mailbox) |
368 | amd->msg_max = 0; /* maximum message buffer capacity */ | 368 | amd->msg_max = 0; /* maximum message buffer capacity */ |
369 | 369 | ||
370 | amd->uidvalidity = 0; | 370 | amd->uidvalidity = 0; |
371 | 371 | mu_monitor_unlock (mailbox->monitor); | |
372 | |||
372 | return 0; | 373 | return 0; |
373 | } | 374 | } |
374 | 375 | ||
... | @@ -383,7 +384,7 @@ _amd_get_message (struct _amd_data *amd, size_t msgno) | ... | @@ -383,7 +384,7 @@ _amd_get_message (struct _amd_data *amd, size_t msgno) |
383 | 384 | ||
384 | static int | 385 | static int |
385 | _amd_attach_message (mu_mailbox_t mailbox, struct _amd_message *mhm, | 386 | _amd_attach_message (mu_mailbox_t mailbox, struct _amd_message *mhm, |
386 | mu_message_t *pmsg) | 387 | mu_message_t *pmsg) |
387 | { | 388 | { |
388 | int status; | 389 | int status; |
389 | mu_message_t msg; | 390 | mu_message_t msg; |
... | @@ -1477,9 +1478,9 @@ amd_envelope_sender (mu_envelope_t envelope, char *buf, size_t len, size_t *psiz | ... | @@ -1477,9 +1478,9 @@ amd_envelope_sender (mu_envelope_t envelope, char *buf, size_t len, size_t *psiz |
1477 | if (mhm == NULL) | 1478 | if (mhm == NULL) |
1478 | return EINVAL; | 1479 | return EINVAL; |
1479 | 1480 | ||
1480 | if ((status = mu_message_get_header (msg, &hdr)) != 0) | 1481 | if ((status = mu_message_get_header (msg, &hdr))) |
1481 | return status; | 1482 | return status; |
1482 | if (status = mu_header_aget_value (hdr, MU_HEADER_ENV_SENDER, &from)) | 1483 | if ((status = mu_header_aget_value (hdr, MU_HEADER_ENV_SENDER, &from))) |
1483 | return status; | 1484 | return status; |
1484 | 1485 | ||
1485 | if (buf && len > 0) | 1486 | if (buf && len > 0) | ... | ... |
-
Please register or sign in to post a comment