migration: Remove MigrationState from migration_channel_incomming()
All callers were calling migrate_get_current(), so do it inside the function. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
This commit is contained in:
		
							parent
							
								
									c8f9f4f402
								
							
						
					
					
						commit
						543147116e
					
				| @ -19,9 +19,10 @@ | ||||
| #include "qapi/error.h" | ||||
| #include "io/channel-tls.h" | ||||
| 
 | ||||
| void migration_channel_process_incoming(MigrationState *s, | ||||
|                                         QIOChannel *ioc) | ||||
| void migration_channel_process_incoming(QIOChannel *ioc) | ||||
| { | ||||
|     MigrationState *s = migrate_get_current(); | ||||
| 
 | ||||
|     trace_migration_set_incoming_channel( | ||||
|         ioc, object_get_typename(OBJECT(ioc))); | ||||
| 
 | ||||
|  | ||||
| @ -18,8 +18,7 @@ | ||||
| 
 | ||||
| #include "io/channel.h" | ||||
| 
 | ||||
| void migration_channel_process_incoming(MigrationState *s, | ||||
|                                         QIOChannel *ioc); | ||||
| void migration_channel_process_incoming(QIOChannel *ioc); | ||||
| 
 | ||||
| void migration_channel_connect(MigrationState *s, | ||||
|                                QIOChannel *ioc, | ||||
|  | ||||
| @ -49,7 +49,7 @@ static gboolean exec_accept_incoming_migration(QIOChannel *ioc, | ||||
|                                                GIOCondition condition, | ||||
|                                                gpointer opaque) | ||||
| { | ||||
|     migration_channel_process_incoming(migrate_get_current(), ioc); | ||||
|     migration_channel_process_incoming(ioc); | ||||
|     object_unref(OBJECT(ioc)); | ||||
|     return FALSE; /* unregister */ | ||||
| } | ||||
|  | ||||
| @ -49,7 +49,7 @@ static gboolean fd_accept_incoming_migration(QIOChannel *ioc, | ||||
|                                              GIOCondition condition, | ||||
|                                              gpointer opaque) | ||||
| { | ||||
|     migration_channel_process_incoming(migrate_get_current(), ioc); | ||||
|     migration_channel_process_incoming(ioc); | ||||
|     object_unref(OBJECT(ioc)); | ||||
|     return FALSE; /* unregister */ | ||||
| } | ||||
|  | ||||
| @ -148,8 +148,7 @@ static gboolean socket_accept_incoming_migration(QIOChannel *ioc, | ||||
|     trace_migration_socket_incoming_accepted(); | ||||
| 
 | ||||
|     qio_channel_set_name(QIO_CHANNEL(sioc), "migration-socket-incoming"); | ||||
|     migration_channel_process_incoming(migrate_get_current(), | ||||
|                                        QIO_CHANNEL(sioc)); | ||||
|     migration_channel_process_incoming(QIO_CHANNEL(sioc)); | ||||
|     object_unref(OBJECT(sioc)); | ||||
| 
 | ||||
| out: | ||||
|  | ||||
| @ -74,7 +74,7 @@ static void migration_tls_incoming_handshake(QIOTask *task, | ||||
|         error_report_err(err); | ||||
|     } else { | ||||
|         trace_migration_tls_incoming_handshake_complete(); | ||||
|         migration_channel_process_incoming(migrate_get_current(), ioc); | ||||
|         migration_channel_process_incoming(ioc); | ||||
|     } | ||||
|     object_unref(OBJECT(ioc)); | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Juan Quintela
						Juan Quintela