- if (!ndmp_connection_mover_connect(self->ndmp, mode, addrs)) {
- set_error_from_ndmp(self);
- return FALSE;
- }
-
- if (!self->for_writing) {
- /* The agent is in the ACTIVE state, and will remain so until we tell
- * it to do something else. The thing we want to is for it to start
- * reading data from the tape, which will immediately trigger an EOW or
- * SEEK pause. */
- if (!ndmp_connection_mover_read(self->ndmp, 0, G_MAXUINT64)) {
- set_error_from_ndmp(self);
- return FALSE;
- }
-
- /* now we should expect a notice that the mover has paused */
- } else {
- /* when writing, the mover will pause as soon as the first byte comes
- * in, so there's no need to do anything to trigger the pause. */
- }
-
- /* NDMJOB sends NDMP9_MOVER_PAUSE_SEEK to indicate that it wants to write
- * outside the window, while the standard specifies .._EOW, instead. When
- * reading to a connection, we get the appropriate .._SEEK. It's easy
- * enough to handle both. */
-
- if (!ndmp_connection_wait_for_notify(self->ndmp,
- NULL,
- NULL,
- &reason, &seek_position)) {
- set_error_from_ndmp(self);
- return FALSE;
- }
-
- if (reason != NDMP9_MOVER_PAUSE_SEEK && reason != NDMP9_MOVER_PAUSE_EOW) {
- device_set_error(DEVICE(self),
- g_strdup_printf("got NOTIFY_MOVER_PAUSED, but not because of EOW or SEEK"),
- DEVICE_STATUS_DEVICE_ERROR);
- return FALSE;
- }
-
- if (self->listen_addrs) {
- g_free(self->listen_addrs);
- self->listen_addrs = NULL;