~brianaker/gearmand/ssl-update

« back to all changes in this revision

Viewing changes to libgearman/task.cc

Merge lp:~brianaker/gearmand/task-free Build: jenkins-Gearmand-831

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
{
78
78
  if (task_shell and task_shell->impl())
79
79
  {
80
 
    assert(gearman_is_initialized(task_shell));
81
80
    Task* task= task_shell->impl();
82
 
    if (gearman_is_initialized(task_shell))
 
81
    assert(task_shell == task->shell());
83
82
    {
84
83
      assert(task->magic_ != TASK_ANTI_MAGIC);
85
84
      assert(task->magic_ == TASK_MAGIC);
123
122
      }
124
123
      task->job_handle[0]= 0;
125
124
 
126
 
      gearman_set_initialized(task, false);
127
 
      gearman_set_initialized(task_shell, false);
128
 
 
129
 
      task_shell->_impl= NULL;
130
 
 
131
 
      delete task;
132
 
    }
133
 
    else
134
 
    {
135
 
      task->client= NULL;
136
 
      gearman_set_initialized(task_shell, false);
137
 
      task_shell->_impl= NULL;
 
125
      task_shell->_impl= NULL;
 
126
 
138
127
      delete task;
139
128
    }
140
129
  }
141
130
  else if (task_shell)
142
131
  {
143
 
    gearman_set_initialized(task_shell, false);
144
132
    task_shell->_impl= NULL;
145
133
  }
146
134
}
444
432
    {
445
433
      gearman_set_allocated(_shell, false);
446
434
    }
447
 
    gearman_set_initialized(_shell, false);
 
435
    _shell->_impl= NULL;
 
436
    _shell= NULL;
448
437
  }
449
438
}
450
439