~n-muench/ubuntu/oneiric/open-vm-tools/open-vm-tools.fix-836277

« back to all changes in this revision

Viewing changes to services/plugins/vmbackup/stateMachine.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-07-30 12:56:49 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090730125649-97sfj5li8axiseoo
Tags: 2009.07.22-179896-2
* Temporarily building without dumbnet, the recently uploaded
  new dumbnet upstream version broke down (Closes: #539006).
* Using more common name to store local debian additions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
VmBackupFinalize(void)
179
179
{
180
180
   g_debug("*** %s\n", __FUNCTION__);
181
 
   g_assert(gBackupState != NULL);
182
 
   g_assert(gBackupState->machineState == VMBACKUP_MSTATE_IDLE);
 
181
   ASSERT(gBackupState != NULL);
 
182
   ASSERT(gBackupState->machineState == VMBACKUP_MSTATE_IDLE);
183
183
 
184
184
   if (gBackupState->currentOp != NULL) {
185
185
      VmBackup_Cancel(gBackupState->currentOp);
196
196
      g_source_destroy(gBackupState->keepAlive);
197
197
   }
198
198
 
199
 
   free(gBackupState->volumes);
 
199
   g_free(gBackupState->volumes);
 
200
   g_free(gBackupState->snapshots);
200
201
   free(gBackupState);
201
202
   gBackupState = NULL;
202
203
}
306
307
VmBackupAsyncCallback(void *clientData)
307
308
{
308
309
   g_debug("*** %s\n", __FUNCTION__);
309
 
   g_assert(gBackupState != NULL);
 
310
   ASSERT(gBackupState != NULL);
310
311
 
311
312
   g_source_unref(gBackupState->timerEvent);
312
313
   gBackupState->timerEvent = NULL;
487
488
      }
488
489
 
489
490
      if (data->args[index] != '\0') {
490
 
         gBackupState->volumes = Util_SafeStrdup(data->args + index);
 
491
         gBackupState->volumes = g_strndup(data->args + index, data->argsSize - index);
491
492
      }
492
493
   }
493
494
 
577
578
                              "Error: unexpected state for snapshot done message.",
578
579
                              FALSE);
579
580
   } else {
 
581
      if (data->argsSize > 1) {
 
582
         gBackupState->snapshots = g_strndup(data->args + 1, data->argsSize - 1);
 
583
      }
580
584
      if (!gSyncProvider->snapshotDone(gBackupState, gSyncProvider->clientData)) {
581
585
         VmBackup_SendEvent(VMBACKUP_EVENT_REQUESTOR_ERROR,
582
586
                            VMBACKUP_SYNC_ERROR,